/AWS1/IF_BDI=>UPDATETRANSFORMER()¶
About UpdateTransformer¶
Updates the specified parameters for a transformer. A transformer can take an EDI file as input and transform it into a JSON-or XML-formatted document. Alternatively, a transformer can take a JSON-or XML-formatted document as input and transform it into an EDI file.
Method Signature¶
METHODS /AWS1/IF_BDI~UPDATETRANSFORMER
IMPORTING
!IV_TRANSFORMERID TYPE /AWS1/BDITRANSFORMERID OPTIONAL
!IV_NAME TYPE /AWS1/BDITRANSFORMERNAME OPTIONAL
!IV_STATUS TYPE /AWS1/BDITRANSFORMERSTATUS OPTIONAL
!IV_FILEFORMAT TYPE /AWS1/BDIFILEFORMAT OPTIONAL
!IV_MAPPINGTEMPLATE TYPE /AWS1/BDIMAPPINGTEMPLATE OPTIONAL
!IO_EDITYPE TYPE REF TO /AWS1/CL_BDIEDITYPE OPTIONAL
!IV_SAMPLEDOCUMENT TYPE /AWS1/BDIFILELOCATION OPTIONAL
!IO_INPUTCONVERSION TYPE REF TO /AWS1/CL_BDIINPUTCONVERSION OPTIONAL
!IO_MAPPING TYPE REF TO /AWS1/CL_BDIMAPPING OPTIONAL
!IO_OUTPUTCONVERSION TYPE REF TO /AWS1/CL_BDIOUTPUTCONVERSION OPTIONAL
!IO_SAMPLEDOCUMENTS TYPE REF TO /AWS1/CL_BDISAMPLEDOCUMENTS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdiupdatexformerrsp
RAISING
/AWS1/CX_BDIACCESSDENIEDEX
/AWS1/CX_BDICONFLICTEXCEPTION
/AWS1/CX_BDIINTERNALSERVEREX
/AWS1/CX_BDIRESOURCENOTFOUNDEX
/AWS1/CX_BDISERVICEQUOTAEXCDEX
/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_transformerid TYPE /AWS1/BDITRANSFORMERID /AWS1/BDITRANSFORMERID¶
Specifies the system-assigned unique identifier for the transformer.
Optional arguments:¶
iv_name TYPE /AWS1/BDITRANSFORMERNAME /AWS1/BDITRANSFORMERNAME¶
Specify a new name for the transformer, if you want to update it.
iv_status TYPE /AWS1/BDITRANSFORMERSTATUS /AWS1/BDITRANSFORMERSTATUS¶
Specifies the transformer's status. You can update the state of the transformer from
inactivetoactive.
iv_fileformat TYPE /AWS1/BDIFILEFORMAT /AWS1/BDIFILEFORMAT¶
Specifies that the currently supported file formats for EDI transformations are
JSONandXML.
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.
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.
iv_sampledocument TYPE /AWS1/BDIFILELOCATION /AWS1/BDIFILELOCATION¶
Specifies a sample EDI document that is used by a transformer as a guide for processing the EDI data.
io_inputconversion TYPE REF TO /AWS1/CL_BDIINPUTCONVERSION /AWS1/CL_BDIINPUTCONVERSION¶
To update, specify the
InputConversionobject, which contains the format options for the inbound transformation.
io_mapping TYPE REF TO /AWS1/CL_BDIMAPPING /AWS1/CL_BDIMAPPING¶
Specify the structure that contains the mapping template and its language (either XSLT or JSONATA).
io_outputconversion TYPE REF TO /AWS1/CL_BDIOUTPUTCONVERSION /AWS1/CL_BDIOUTPUTCONVERSION¶
To update, specify the
OutputConversionobject, which contains the format options for the outbound transformation.
io_sampledocuments TYPE REF TO /AWS1/CL_BDISAMPLEDOCUMENTS /AWS1/CL_BDISAMPLEDOCUMENTS¶
Specify a structure that contains the Amazon S3 bucket and an array of the corresponding keys used to identify the location for your sample documents.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bdiupdatexformerrsp /AWS1/CL_BDIUPDATEXFORMERRSP¶
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->updatetransformer(
io_editype = new /aws1/cl_bdieditype(
io_x12details = new /aws1/cl_bdix12details(
iv_transactionset = |string|
iv_version = |string|
)
)
io_inputconversion = new /aws1/cl_bdiinputconversion(
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_formatoptions = new /aws1/cl_bdiformatoptions(
io_x12 = new /aws1/cl_bdix12details(
iv_transactionset = |string|
iv_version = |string|
)
)
iv_fromformat = |string|
)
io_mapping = new /aws1/cl_bdimapping(
iv_template = |string|
iv_templatelanguage = |string|
)
io_outputconversion = new /aws1/cl_bdioutputconversion(
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_formatoptions = new /aws1/cl_bdiformatoptions(
io_x12 = new /aws1/cl_bdix12details(
iv_transactionset = |string|
iv_version = |string|
)
)
iv_toformat = |string|
)
io_sampledocuments = new /aws1/cl_bdisampledocuments(
it_keys = VALUE /aws1/cl_bdisampledocumentkeys=>tt_keylist(
(
new /aws1/cl_bdisampledocumentkeys(
iv_input = |string|
iv_output = |string|
)
)
)
iv_bucketname = |string|
)
iv_fileformat = |string|
iv_mappingtemplate = |string|
iv_name = |string|
iv_sampledocument = |string|
iv_status = |string|
iv_transformerid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_transformerid = lo_result->get_transformerid( ).
lv_resourcearn = lo_result->get_transformerarn( ).
lv_transformername = lo_result->get_name( ).
lv_transformerstatus = lo_result->get_status( ).
lv_createddate = lo_result->get_createdat( ).
lv_modifieddate = lo_result->get_modifiedat( ).
lv_fileformat = lo_result->get_fileformat( ).
lv_mappingtemplate = lo_result->get_mappingtemplate( ).
lo_editype = lo_result->get_editype( ).
IF lo_editype IS NOT INITIAL.
lo_x12details = lo_editype->get_x12details( ).
IF lo_x12details IS NOT INITIAL.
lv_x12transactionset = lo_x12details->get_transactionset( ).
lv_x12version = lo_x12details->get_version( ).
ENDIF.
ENDIF.
lv_filelocation = lo_result->get_sampledocument( ).
lo_inputconversion = lo_result->get_inputconversion( ).
IF lo_inputconversion IS NOT INITIAL.
lv_fromformat = lo_inputconversion->get_fromformat( ).
lo_formatoptions = lo_inputconversion->get_formatoptions( ).
IF lo_formatoptions IS NOT INITIAL.
lo_x12details = lo_formatoptions->get_x12( ).
IF lo_x12details IS NOT INITIAL.
lv_x12transactionset = lo_x12details->get_transactionset( ).
lv_x12version = lo_x12details->get_version( ).
ENDIF.
ENDIF.
lo_advancedoptions = lo_inputconversion->get_advancedoptions( ).
IF lo_advancedoptions IS NOT INITIAL.
lo_x12advancedoptions = lo_advancedoptions->get_x12( ).
IF lo_x12advancedoptions IS NOT INITIAL.
lo_x12splitoptions = lo_x12advancedoptions->get_splitoptions( ).
IF lo_x12splitoptions IS NOT INITIAL.
lv_x12splitby = lo_x12splitoptions->get_splitby( ).
ENDIF.
lo_x12validationoptions = lo_x12advancedoptions->get_validationoptions( ).
IF lo_x12validationoptions IS NOT INITIAL.
LOOP AT lo_x12validationoptions->get_validationrules( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lo_x12codelistvalidationru = lo_row_1->get_codelistvalidationrule( ).
IF lo_x12codelistvalidationru IS NOT INITIAL.
lv_elementid = lo_x12codelistvalidationru->get_elementid( ).
LOOP AT lo_x12codelistvalidationru->get_codestoadd( ) 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.
LOOP AT lo_x12codelistvalidationru->get_codestoremove( ) 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.
lo_x12elementlengthvalidat = lo_row_1->get_elementlengthvalidatio00( ).
IF lo_x12elementlengthvalidat IS NOT INITIAL.
lv_elementid = lo_x12elementlengthvalidat->get_elementid( ).
lv_integer = lo_x12elementlengthvalidat->get_maxlength( ).
lv_integer = lo_x12elementlengthvalidat->get_minlength( ).
ENDIF.
lo_x12elementrequirementva = lo_row_1->get_elementreqvalidationrule( ).
IF lo_x12elementrequirementva IS NOT INITIAL.
lv_elementposition = lo_x12elementrequirementva->get_elementposition( ).
lv_elementrequirement = lo_x12elementrequirementva->get_requirement( ).
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
lo_mapping = lo_result->get_mapping( ).
IF lo_mapping IS NOT INITIAL.
lv_mappingtemplatelanguage = lo_mapping->get_templatelanguage( ).
lv_mappingtemplate = lo_mapping->get_template( ).
ENDIF.
lo_outputconversion = lo_result->get_outputconversion( ).
IF lo_outputconversion IS NOT INITIAL.
lv_toformat = lo_outputconversion->get_toformat( ).
lo_formatoptions = lo_outputconversion->get_formatoptions( ).
IF lo_formatoptions IS NOT INITIAL.
lo_x12details = lo_formatoptions->get_x12( ).
IF lo_x12details IS NOT INITIAL.
lv_x12transactionset = lo_x12details->get_transactionset( ).
lv_x12version = lo_x12details->get_version( ).
ENDIF.
ENDIF.
lo_advancedoptions = lo_outputconversion->get_advancedoptions( ).
IF lo_advancedoptions IS NOT INITIAL.
lo_x12advancedoptions = lo_advancedoptions->get_x12( ).
IF lo_x12advancedoptions IS NOT INITIAL.
lo_x12splitoptions = lo_x12advancedoptions->get_splitoptions( ).
IF lo_x12splitoptions IS NOT INITIAL.
lv_x12splitby = lo_x12splitoptions->get_splitby( ).
ENDIF.
lo_x12validationoptions = lo_x12advancedoptions->get_validationoptions( ).
IF lo_x12validationoptions IS NOT INITIAL.
LOOP AT lo_x12validationoptions->get_validationrules( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lo_x12codelistvalidationru = lo_row_1->get_codelistvalidationrule( ).
IF lo_x12codelistvalidationru IS NOT INITIAL.
lv_elementid = lo_x12codelistvalidationru->get_elementid( ).
LOOP AT lo_x12codelistvalidationru->get_codestoadd( ) 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.
LOOP AT lo_x12codelistvalidationru->get_codestoremove( ) 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.
lo_x12elementlengthvalidat = lo_row_1->get_elementlengthvalidatio00( ).
IF lo_x12elementlengthvalidat IS NOT INITIAL.
lv_elementid = lo_x12elementlengthvalidat->get_elementid( ).
lv_integer = lo_x12elementlengthvalidat->get_maxlength( ).
lv_integer = lo_x12elementlengthvalidat->get_minlength( ).
ENDIF.
lo_x12elementrequirementva = lo_row_1->get_elementreqvalidationrule( ).
IF lo_x12elementrequirementva IS NOT INITIAL.
lv_elementposition = lo_x12elementrequirementva->get_elementposition( ).
lv_elementrequirement = lo_x12elementrequirementva->get_requirement( ).
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
lo_sampledocuments = lo_result->get_sampledocuments( ).
IF lo_sampledocuments IS NOT INITIAL.
lv_bucketname = lo_sampledocuments->get_bucketname( ).
LOOP AT lo_sampledocuments->get_keys( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_s3key = lo_row_5->get_input( ).
lv_s3key = lo_row_5->get_output( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
Sample UpdateTransformer call¶
Sample UpdateTransformer call
DATA(lo_result) = lo_client->updatetransformer(
io_inputconversion = new /aws1/cl_bdiinputconversion(
io_advancedoptions = new /aws1/cl_bdiadvancedoptions(
io_x12 = new /aws1/cl_bdix12advancedoptions(
io_splitoptions = new /aws1/cl_bdix12splitoptions( |NONE| )
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( |A| ) )
( new /aws1/cl_bdicodelist_w( |B| ) )
( new /aws1/cl_bdicodelist_w( |C| ) )
)
it_codestoremove = 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| ) )
)
iv_elementid = |1234|
)
)
)
(
new /aws1/cl_bdix12validationrule(
io_elementreqvalidationrule = new /aws1/cl_bdix12elementreqval00(
iv_elementposition = |NM1-01|
iv_requirement = |MANDATORY|
)
)
)
(
new /aws1/cl_bdix12validationrule(
io_elementlengthvalidationrl = new /aws1/cl_bdix12elementlength00(
iv_elementid = |5678|
iv_maxlength = 10
iv_minlength = 2
)
)
)
)
)
)
)
io_formatoptions = new /aws1/cl_bdiformatoptions(
io_x12 = new /aws1/cl_bdix12details(
iv_transactionset = |X12_110|
iv_version = |VERSION_4010|
)
)
iv_fromformat = |X12|
)
io_mapping = new /aws1/cl_bdimapping(
iv_template = |{}|
iv_templatelanguage = |JSONATA|
)
io_sampledocuments = new /aws1/cl_bdisampledocuments(
it_keys = VALUE /aws1/cl_bdisampledocumentkeys=>tt_keylist(
( new /aws1/cl_bdisampledocumentkeys( iv_input = |sampleDoc.txt| ) )
)
iv_bucketname = |test-bucket|
)
iv_name = |transformX12|
iv_status = |inactive|
iv_transformerid = |tr-974c129999f84d8c9|
).