INPUTMAPPING/OUTPUTMAPPING Element
Definition
You use the INPUTMAPPING element whenever the parameter name used in the HTML template does not match the import parameter name of the RFC function module, the BAPI, or other module.
You always define the INPUTMAPPING element within the MODULE element.
Use
The values of the parameters can be read from the HTML template in ABAP using the Web Transaction API. The parameters that return the RFC function module must be transferred to the ITS using the Web Transaction API. The parameter names must match those of the HTML templates.
Example
Syntax in the Standalone ITS
In the flow file in the standalone ITS, the syntax is as follows:
<module name="BAPI_FLIGHT_GETLIST" type="RFC" stateful="0">
<inputmapping source="MY_ROWS" target="MAX_ROWS" />
<outputmapping source="FLIGHT_LIST" target="MY_LIST" />
</module>
Syntax in the Integrated ITS
In ABAP in the integrated ITS, the syntax could be as follows:
In PAI:
field-get 'my_rows' idx l_data_table len.
IF sy-subrc <> 0.
EXIT.
ENDIF.
READ TABLE l_data_table INDEX 1 INTO my_rows.
In PBO:
CALL FUNCTION 'BAPI_FLIGHT_GETLIST'
exporting
max_rows = my_rows
tables
flight_list = my_list.
counter = 1.
loop at my_list into wa.
field-set 'MY_LIST-AIRLINEID' counter wa-AIRLINEID.
field-set 'MY_LIST-FLIGHTDATE' counter wa-FLIGHTDATE.
field-set 'MY_LIST-CITYFROM' counter wa-CITYFROM.
field-set 'MY_LIST-CITYTO' counter wa-CITYTO.
add 1 to counter.
endloop.