on 06-14-2016 11:16 PM
Hi,
I have typical mapping question in IDOC TO file The file is of type IDOC ( we are sending IDOC XML as target file)
The scenario is s, i have to populate a value in target segment of IDOC based on the valye from source.
However the Source occurrence is more then target ( for e.g Surce occurs 5 time where as target nly 2 time)
Let's say source has
<Segment 1>
<value 1>
<value 2>
</Segment>
<Segment 2>
. <value 1>
<value 2>
</Segment>
<Segment 3>
. <value 1>
<value 2>
</Segment>
Now target will be only 2 iteration..
<Target1>
<result>
</Target1>
<Target2>
<result>
</Target2>
Result value would be
If value 1 = X
then Result = value 2
Please advice how to handle the context as they are at diff level..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for reply. Let me allow to put my requirement..I have IDOC SHPMNT05 on both the sides ( IDOC to file)
For the target segment E1EDk33-FAHZT my requirement is
Take the value from E1TXTP6-TDLINE ( Which is ZText1 in Delivery).
If the First 8 char of E1TXTP6-TDLINE and concatenate 00, matches with E1EDL20-VBELN
AND
If the E1ADRM1-PARTNER_Q = WE
Then map the E1ADRM1-PARNTER to field E1EDK33-FAHZ
Source
Target
For e.g. if the value of TDLINE is 80010053 and VBENL is 0080010053
then there are multiple E1ADRM1 segment. Go through this and find out which segment has partner_Q as WE and then pass the PARTNER ID of that segment into FAHZ field.
I have tried to do below mapping
This is coming fine for one line however when there are 2 TDLINE segment, the second E1EDk33 segment does not get the value of FAHZ
Thanks for your time & appreciate your help on this..
Hi Techie,
If you want to create multiple FAHZ where the TDLINE equals to VBELN then use below mapping, let me know if this is not the case.
UDF:
Execution Type: All Values Of Context
public void checkTextExist(String[] tdline, String[] vbeln, ResultList result, Container container)
throws StreamTransformationException {
List<String> textList = Arrays.asList(tdline);
for (int i = 0; i < vbeln.length; i++) {
if (textList.contains(vbeln[i]))
result.addValue("true");
else
result.addValue("false");
}
}
Regards,
Praveen.
Thanks! The values are coming in FAHZTD. However i had other mapping based on TDLINE
For e.g. I have mapping for DISTZ where i placed the first 8 chact of TDLINE
Also i have mapping for GESZTD where i put the sequence of TDLine occurance.
If the TDLINE segment occurs 2 times, then first GESZTD wil have 1 and second will have 2
However after changing the map with UDF, i am only getting the values in first E1ED33 segment i am not getting in second. Does that need to do with contect change and assignment of E1EDk33
My mapping for E1EDk33 and FAHZD looks below
output coming as
Hi,
Your requirement looks a bit odd for me.
You have 3 segments with 3 sets of Value1 and Value2 but your target can take max 2 values from value2 field of the source if Value1 is 'X'.
Tell me what is all of your value1 is 'X' then how will you set the 3rd value in target.
Thanks,
Apu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello All,
Sorry for opening this again., I have issue in mapping that i would like to discuss.
I have source message as
Here the Segment E1TXTH6 repeats for every text element inserted into document.
I have to map like this
(1) For every E1TXTH6 if the value in TDID is ZST* ( like ZST1-10) then create one E1EDK33 segment on the target.
(2) Inside this segment E1TXTH6 value GESZTD should have last char of TDID . For E.g. for ZST1 it should be 1
For this I have put up mapping like this
Issue is only last value is coming like from ZST2 only 2 is coming and ignoring the other 1
While i am looking for this
The value coming is
Please advice the mapping
Thanks in advance.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.