/AWS1/IF_BDI=>TESTMAPPING()¶
About TestMapping¶
Maps the input file according to the provided template file. The API call downloads the file contents from the Amazon S3 location, and passes the contents in as a string, to the inputFileContent parameter.
Method Signature¶
METHODS /AWS1/IF_BDI~TESTMAPPING
IMPORTING
!IV_INPUTFILECONTENT TYPE /AWS1/BDITESTMAPINPUTFILECONT OPTIONAL
!IV_MAPPINGTEMPLATE TYPE /AWS1/BDIMAPPINGTEMPLATE OPTIONAL
!IV_FILEFORMAT TYPE /AWS1/BDIFILEFORMAT OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bditestmappingrsp
RAISING
/AWS1/CX_BDIACCESSDENIEDEX
/AWS1/CX_BDIINTERNALSERVEREX
/AWS1/CX_BDIRESOURCENOTFOUNDEX
/AWS1/CX_BDITHROTTLINGEX
/AWS1/CX_BDIVALIDATIONEX
/AWS1/CX_BDICLIENTEXC
/AWS1/CX_BDISERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_inputfilecontent TYPE /AWS1/BDITESTMAPINPUTFILECONT /AWS1/BDITESTMAPINPUTFILECONT¶
Specify the contents of the EDI (electronic data interchange) XML or JSON file that is used as input for the transform.
iv_mappingtemplate TYPE /AWS1/BDIMAPPINGTEMPLATE /AWS1/BDIMAPPINGTEMPLATE¶
Specifies the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.
This parameter is available for backwards compatibility. Use the Mapping data type instead.
iv_fileformat TYPE /AWS1/BDIFILEFORMAT /AWS1/BDIFILEFORMAT¶
Specifies that the currently supported file formats for EDI transformations are
JSONandXML.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bditestmappingrsp /AWS1/CL_BDITESTMAPPINGRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->testmapping(
iv_fileformat = |string|
iv_inputfilecontent = |string|
iv_mappingtemplate = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_string = lo_result->get_mappedfilecontent( ).
ENDIF.
Sample TestMapping call¶
Sample TestMapping call
DATA(lo_result) = lo_client->testmapping(
iv_fileformat = |JSON|
iv_inputfilecontent = |Sample file content|
iv_mappingtemplate = |$|
).