KB Article #170147
Parse step behavior and error handling
Problem
-- the Parse step used in a Mapping Services flow is used to cast data from a Business Document to another (usually from a VLOB field to a more complex structure)
-- how does it react when the input data do not fully match the output format ?
Resolution
-- let us start with 3 examples :
Ex1 :
input Bdoc (bdoc_in) : InHouse, fixed format, 10 characters
output Bdoc (bdoc_out) : InHouse, fixed format, 8 characters
bdoc_in (azertyuiop) -> Parse step -> bdoc_out (azertyui)
conclusion : as you can see, the 2 last characters will be just "ignored". no error will be thrown
Ex2 :
input Bdoc (bdoc_in) : InHouse, variable format terminted by EOF, only 1 VLOB field
output Bdoc (bdoc_out) : IDOC (any kind of IDOC)
bdoc_in :
EDI_DC40 1000000000074699775702 .....
E2MARAM 10000000000746997750000010000000200....
Z2MARAM 10000000000746997750000020000010312....
E2MAKTM 100000000007469977500000300000103005DMC...
E2MAKTM 100000000007469977500000400000103005EMC ...
error xxxxxxxxxxxxxxxxxx dummy line xxxxxxxxxxxxxxxxxxx
E2MAKTM 100000000007469977500001200000103005VMC...
Z2MARCM 100000000007469977500001400001304CHM...
bdoc_out will be created as follow :
EDI_DC40 1000000000074699775702 .....
E2MARAM 10000000000746997750000010000000200....
Z2MARAM 10000000000746997750000020000010312....
E2MAKTM 100000000007469977500000300000103005DMC...
E2MAKTM 100000000007469977500000400000103005EMC ...
conclusion : an output bdoc is generated but part of the message is missing and no error is thrown
Ex3 :
input Bdoc (bdoc_in) : InHouse, variable format terminted by EOF, only 1 VLOB field
output Bdoc (bdoc_out) : IDOC (any kind of IDOC)
bdoc_in :
EDI_DC40 dummy characters dummy characters dummy characters 1000000000074699775702 .....
E2MARAM 10000000000746997750000010000000200....
Z2MARAM 10000000000746997750000020000010312....
E2MAKTM 100000000007469977500000300000103005DMC...
result : a parsing error will occur and no output will be created
CONCLUSION :
-- the Parse step throws an error only if it cannot generate a valid output message (according to the Business document definition)
-- if an incompatible data is found, the remaining characters are ignored.
-- the Parse step reads the input message and generates the output message as soon as an incompatible data has been detected (unexpected segment, carriage returns, …).