on 10-16-2012 1:23 AM
Hi All,
I have message mapping of XML to FIDCCP2 (Z copy).
It works great with segments for Doc. header (E1FIKPF) and Doc. items (E1FISEG), but if I try to map fields in segments Doc. item 2nd part (E1FISE2) or in CPD Customer/Vendor (E1FISEC) it will execute the mapping showing that execution was successful but if I check there are fields or even whole segments mising.
And it always happens that there will be a couple of segments that are OK, and then it stops working and segments/fields are missing.
I try to fill the fields in E1FISE2 MATNR_EXTERNAL and in E1FISEC fields BANKN and BANKL.
To ilustrate:
Message Mapping:
XML FIDCCP2 (IDOC)
<item> -------------------------- E1FISE2 (Segment = 1)
<field1> --------- \
<field2> --------- / CONCAT ---- MATNR_EXTERNAL
Result of mapping test:
<item>1</item>
<field1>11</field1>
<field2>22</field2> MATNR = 1122
<item>2</item>
<field1>11</field1>
<field2>22</field2> (no field / sometimes whole segment missing)
Any ideas?
Looks like a bug?! We are PI 7.3 SP7 java only.
Kind Regards
Vladimir
I dont think it is a bug
The best way ti debug your mapping is using display queue, when you use concat function if two arguments were not present then mapping shows successfull but you dont see value.
So make sure that contexts set correctly and data is correct, use display queue and debug mapping . this is best way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
thank you for the hints!
I solved the problem but I would like to give a more detailed explanation.
The context of the input fields was the same, the display queues were showing correct context change and values, output of all functions was correct including the expected result in the mapped field.
Images of the queues of a mapping that does not work (img. 1) and a one that works (img.2) are attached. Both are identical!
What was causing the problem was the Occurrence of the Segment (in target IDOC) AND the Field - both were 0..1.
This means that in one Context there can be 0 or 1 Segment (same for fields beneath).
The segment was mapped to the parent node of the input fields (in my original message above named - Item), the logic being that was that with each Item I get another Segment - WRONG!
What this really gives is the Context in which this (parent) node Item is and that is the Context of it's parent node (one level higher than input fields), and not the Context of the input fields, and hence I was getting only one Segment.
Testing with larger XML files was giving more than one Segment since there were more context changes above the parent node!
So in order to get the right context for the segment I mapped the segment to one of the fields that is a sibling to the input fields and now it works perfectly, because with each new Item the context is changing and I get 1 segment per Item.
I hope I cleared this up for some future PI newbies
Regards,
Vladimir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is not a bug ..
Just cross check your mapping functionality.
Regards,
Naveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to check the values in the queue are getting populated and the context of the values with respect to the target node are appropriate..as said above you can check the output of each mapping function using display queue and act accordingly..
HTH
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.