Hi Experts,
Would request your help for the below requirement.
Here are the details:
E1MTXHM(0:Unbounded)
E1MTXLM(0:Unbounded)
If E1MTXHM-TDID = "BEST" (purchase order text), then first 40 characters from
E1MTXLM-TDLINE (first segment) to the target field ART_TEXT_1
If E1MTXHM-TDID = "BEST" (purchase order text), then first 40 characters from
E1MTXLM-TDLINE (Second segment) to the target field ART_TEXT_2
If E1MTXHM-TDID = "BEST" (purchase order text), then first 40 characters from
E1MTXLM-TDLINE (Third segment) to the target field ART_TEXT_3
So in the above case E1MTXHM & E1MTXLM can occur multiple times i.e for example:
E1MTXHM-TDID = "GRUN" with E1MTXLM-TDLINE multiple times
E1MTXHM-TDID = "PRUE" with E1MTXLM-TDLINE multiple times
E1MTXHM-TDID = "IVER" with E1MTXLM-TDLINE multiple times
But from the above cases,I need to transfer the data in case of E1MTXHM-TDID = "BEST" with the above detailed field values and ignore the rest values.Also I have applied the below logic.
As per from the below Logic I am able to generate the above required output: Below are screen shots in detail:
Mapping Logic Applied:
Source Input Values:
Target Output Generated:
So now here in case if the segment E1MTXLM does not occur atleast once under the segment E1MTXHM, the function USEONEASMANY is throwing an error. Please provide me the generic logic in all the cases for the above requirement.
Kindly do the needful.
Thanks in advance!!
Many Thanks,
Best Regards,
Prashanth Bharadwaj Ch.