/AWS1/IF_BDI=>TESTPARSING()¶
About TestParsing¶
Parses the input EDI (electronic data interchange) file. The input file has a file size limit of 250 KB.
Method Signature¶
METHODS /AWS1/IF_BDI~TESTPARSING
IMPORTING
!IO_INPUTFILE TYPE REF TO /AWS1/CL_BDIS3LOCATION OPTIONAL
!IV_FILEFORMAT TYPE /AWS1/BDIFILEFORMAT OPTIONAL
!IO_EDITYPE TYPE REF TO /AWS1/CL_BDIEDITYPE OPTIONAL
!IO_ADVANCEDOPTIONS TYPE REF TO /AWS1/CL_BDIADVANCEDOPTIONS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bditestparsingrsp
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:¶
io_inputfile TYPE REF TO /AWS1/CL_BDIS3LOCATION /AWS1/CL_BDIS3LOCATION¶
Specifies an
S3Locationobject, which contains the Amazon S3 bucket and prefix for the location of the input file.
iv_fileformat TYPE /AWS1/BDIFILEFORMAT /AWS1/BDIFILEFORMAT¶
Specifies that the currently supported file formats for EDI transformations are
JSONandXML.
io_editype TYPE REF TO /AWS1/CL_BDIEDITYPE /AWS1/CL_BDIEDITYPE¶
Specifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.
Optional arguments:¶
io_advancedoptions TYPE REF TO /AWS1/CL_BDIADVANCEDOPTIONS /AWS1/CL_BDIADVANCEDOPTIONS¶
Specifies advanced options for parsing the input EDI file. These options allow for more granular control over the parsing process, including split options for X12 files.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bditestparsingrsp /AWS1/CL_BDITESTPARSINGRSP¶
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->testparsing(
io_advancedoptions = new /aws1/cl_bdiadvancedoptions(
io_x12 = new /aws1/cl_bdix12advancedoptions(
io_splitoptions = new /aws1/cl_bdix12splitoptions( |string| )
io_validationoptions = new /aws1/cl_bdix12validationopts(
it_validationrules = VALUE /aws1/cl_bdix12validationrule=>tt_x12validationrules(
(
new /aws1/cl_bdix12validationrule(
io_codelistvalidationrule = new /aws1/cl_bdix12codelstvalida00(
it_codestoadd = VALUE /aws1/cl_bdicodelist_w=>tt_codelist(
( new /aws1/cl_bdicodelist_w( |string| ) )
)
it_codestoremove = VALUE /aws1/cl_bdicodelist_w=>tt_codelist(
( new /aws1/cl_bdicodelist_w( |string| ) )
)
iv_elementid = |string|
)
io_elementlengthvalidationrl = new /aws1/cl_bdix12elementlength00(
iv_elementid = |string|
iv_maxlength = 123
iv_minlength = 123
)
io_elementreqvalidationrule = new /aws1/cl_bdix12elementreqval00(
iv_elementposition = |string|
iv_requirement = |string|
)
)
)
)
)
)
)
io_editype = new /aws1/cl_bdieditype(
io_x12details = new /aws1/cl_bdix12details(
iv_transactionset = |string|
iv_version = |string|
)
)
io_inputfile = new /aws1/cl_bdis3location(
iv_bucketname = |string|
iv_key = |string|
)
iv_fileformat = |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_parsedfilecontent( ).
LOOP AT lo_result->get_parsedsplitfilecontents( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_validationmessages( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
Sample TestParsing call¶
Sample TestParsing call
DATA(lo_result) = lo_client->testparsing(
io_editype = new /aws1/cl_bdieditype(
io_x12details = new /aws1/cl_bdix12details(
iv_transactionset = |X12_110|
iv_version = |VERSION_4010|
)
)
io_inputfile = new /aws1/cl_bdis3location(
iv_bucketname = |test-bucket|
iv_key = |sampleFile.txt|
)
iv_fileformat = |JSON|
).
Sample TestParsing call without EDI Splitting¶
Sample TestParsing call without EDI Splitting
DATA(lo_result) = lo_client->testparsing(
io_advancedoptions = new /aws1/cl_bdiadvancedoptions( new /aws1/cl_bdix12advancedoptions( io_splitoptions = new /aws1/cl_bdix12splitoptions( |NONE| ) ) )
io_editype = new /aws1/cl_bdieditype(
io_x12details = new /aws1/cl_bdix12details(
iv_transactionset = |X12_110|
iv_version = |VERSION_4010|
)
)
io_inputfile = new /aws1/cl_bdis3location(
iv_bucketname = |test-bucket|
iv_key = |sampleFile.txt|
)
iv_fileformat = |JSON|
).
Sample TestParsing call with EDI Splitting by Transaction¶
Sample TestParsing call with EDI Splitting by Transaction
DATA(lo_result) = lo_client->testparsing(
io_advancedoptions = new /aws1/cl_bdiadvancedoptions( new /aws1/cl_bdix12advancedoptions( io_splitoptions = new /aws1/cl_bdix12splitoptions( |TRANSACTION| ) ) )
io_editype = new /aws1/cl_bdieditype(
io_x12details = new /aws1/cl_bdix12details(
iv_transactionset = |X12_110|
iv_version = |VERSION_4010|
)
)
io_inputfile = new /aws1/cl_bdis3location(
iv_bucketname = |test-bucket|
iv_key = |sampleFile.txt|
)
iv_fileformat = |JSON|
).
Sample TestParsing call with Validation Options¶
Sample TestParsing call with Validation Options
DATA(lo_result) = lo_client->testparsing(
io_advancedoptions = new /aws1/cl_bdiadvancedoptions(
io_x12 = new /aws1/cl_bdix12advancedoptions(
io_validationoptions = new /aws1/cl_bdix12validationopts(
it_validationrules = VALUE /aws1/cl_bdix12validationrule=>tt_x12validationrules(
(
new /aws1/cl_bdix12validationrule(
io_codelistvalidationrule = new /aws1/cl_bdix12codelstvalida00(
it_codestoadd = VALUE /aws1/cl_bdicodelist_w=>tt_codelist(
( new /aws1/cl_bdicodelist_w( |X| ) )
( new /aws1/cl_bdicodelist_w( |Y| ) )
( new /aws1/cl_bdicodelist_w( |Z| ) )
)
it_codestoremove = VALUE /aws1/cl_bdicodelist_w=>tt_codelist(
( new /aws1/cl_bdicodelist_w( |A| ) )
( new /aws1/cl_bdicodelist_w( |B| ) )
( new /aws1/cl_bdicodelist_w( |C| ) )
)
iv_elementid = |1280|
)
)
)
(
new /aws1/cl_bdix12validationrule(
io_elementreqvalidationrule = new /aws1/cl_bdix12elementreqval00(
iv_elementposition = |NM1-01|
iv_requirement = |OPTIONAL|
)
)
)
(
new /aws1/cl_bdix12validationrule(
io_elementlengthvalidationrl = new /aws1/cl_bdix12elementlength00(
iv_elementid = |0803|
iv_maxlength = 30
iv_minlength = 5
)
)
)
)
)
)
)
io_editype = new /aws1/cl_bdieditype(
io_x12details = new /aws1/cl_bdix12details(
iv_transactionset = |X12_110|
iv_version = |VERSION_4010|
)
)
io_inputfile = new /aws1/cl_bdis3location(
iv_bucketname = |test-bucket|
iv_key = |sampleFile.txt|
)
iv_fileformat = |JSON|
).