on ‎2018 Feb 17 1:49 PM
Hi Experts,
Interface : XML to idoc.
Since i want to generate multiple idocs from single xml file, i am using multi mapping.
My SAP PO version is 7.5, somehow node functions removeContext and collapseContext are not working as expected.
So i have created udf and used. Reference: https://blogs.sap.com/2015/11/07/node-functions-as-udf-in-sap-pi/
Based on 1 unique value from sender records.. idocs should be generated.
Below is structure :

Mapping for ZOTC_DELVRY01:

Mapping for Z1DLHEADER:

Mapping for Z1DLITEM:

Fields :
Z1DLHEADER:
ShippingPoint
NGBSSD
Z1DLITEM:
Material
SAMPLE data used :
Record1 : ShippingPoint: SS01, NGBSSD: SH0001, Material: A
Record2 : ShippingPoint: SS01, NGBSSD: SH0001, Material: B
Record3 : ShippingPoint: SS02, NGBSSD: SH0002, Material: C
Record4 : ShippingPoint: SS02, NGBSSD: SH0002, Material:D
As per my requirement Idocs should be formed based on NGBSSD values.
Expected output from above sample data: 2 idocs should be formed.
1st idoc :
Header should have values from Record 1
Item should have Material A & Material B
2nd idoc :
Header should have values from Record 3
Item should have Material C & Material D
Current Output:
2 idocs are forming.
1st Idoc :
Header has values from Record1
Item has : Material A & Material B
2nd idoc with :
Header has values from Record1
Material C & Material D in line item.
Issue:
For 2nd idoc Header values are wrongly populated in test tab.
FYI:
when i do DisplayQueue for Z1DLHEADER i am generating correct output. but in test tab not getting correct values.

Please somebody help me with this.
Regards
Ankyy
Request clarification before answering.
Mapping is wrong for ZOTC_DELVRY01 and Z1DLHEADER. use collapse context after change value for ZOTC_DELVRY01 mapping.And use splitByvalue after collapse context for Z1DLHEADER mapping
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.