cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue

Former Member
0 Kudos

Hello All,

Please refer to earlier thread ,

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Techie,

You can use this mapping:

Regards,

Mark

Former Member
0 Kudos

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.

former_member190293
Active Contributor
0 Kudos

Hi Techie!

Mapping:

TDLINE is in context of E1TXTH6

VBELN is in context of E1EDT20

PARTNER_Q and PARTNER_ID are in context of E1EDL20.

UDF:

Result:

Regards, Evgeniy.

Former Member
0 Kudos

Thanks for your help! I put all the mapping and got 2 of them right.. For the FAHZD field, i am still getting blank value

My mapping looks like this

UDF is same as you mentioned.

My third parameter is Partner_Q and fourth is Partner_ID

Also i have changed the context as mentioned.

output XML is

FAHZTD is coming as blank

Rgds

former_member190293
Active Contributor
0 Kudos

Hi Techie!

FormatNumber in this case is intended to fit the length of TDLINE value to VBELN. As I could see from your data you have TDLINE value length of 8 numbers while VBELN has length of 10 numbers with leading zeros. So format string must be "0000000000" with empty second parameter to equalize both values by length for further comparing inside UDF.

Regards, Evgeniy.

former_member190293
Active Contributor
0 Kudos

Hi Techie!

Mapping:

TDLINE is in context of E1TXTH6 and TDID is in context of MT_E1TXTH6.

Result:

Regards, Evgeniy.