Thanks for reply. I was able to get this but due to change in mapping of E1EDk33 and i had some other issue.
Here is my overall scenario
It is IDOC to file mapping with SHPMNT05 IDOC as source and XSD of same IDOC as target.
So on both ends it is SHPNT05 idoc.
Now the source doc is not passing the segment E1EDK33 but target needs this segment when:
(1) When the source segment E1TXTH6-TDID has ZST*(1-9), pick the value from TDLINE
(2) Create as many E1EDK33 on target as many source has ZST* ( in above case 2 exists as third one is Z100)
(3) Inside the E1EDK33, field DIZTZ is first delivery of TDLINE ( so in above case it would 80010037 and 80010034) and output shown below
(4) The field GESZTD is the 4 char of TDID field. So if the delivery 37 is part of ZST1 and then value 1 and so on
(5) FAHZTD: This is value of Ship to of that first delivery In our case it would be ship to of 37 & 34
This info is coming way down under segment E1ADRM1-PARTNER_ID
This segment is repeated for all the partners. I have to choose first
(a) If the segment E1EDL20-VBELN is equal to first 8 char of E1TXTH6-TDLINE
In this case the delivery is 37 and data in source looks like
So this is first check, second check is under this there various segment E1ADRM1
Choose the Parnter_ID of those segment where Parnter_Q is WE
Which means first find the E1EDL20 ( by matching TDLINE) and then under this, find the segment which has value as WE and pick the partner ID
Final output should be
Based on above input, i am able to get the mapping for DISTZ, GESZTD but have issues in FAHZTD. the mapping is
The output i am getting is
I am looking for value
The mapping done is
Thanks & Please advice.










