cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue with context changed

former_member440449
Participant
0 Kudos

Gurus,

I have an IDOC to XML interface, and these are the structures:

Source (IDOC sender)

Target (XML receiver)

For each E1EDP01, a "Concepto" segment must be created:

My issue is on "comentario" field, where my logic must be like this:

When I have more than one E1EDP01 with different E1EDPT2 with different values (including Y040) the data is not being populated correctly.

I tried playing with different context change for each file but doesn't seems to work.

Can anyone please tell me how can this be done? I am unable to solve it!

I am attaching an IDOC example (xml format), IDOC structure (xsd format) and also the target structure (xsd format) if required all as TXT attached. You can rename to .xsd if you need to import it anywhere.

Thanks in advanced!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Claudio,

Try this below Graphical Mapping. Here Maintain the Context level for  TDID and TDLINE as E1EDP01.

Also don't make Keep Suppress Value for the iFWithOutElse Node Function.

Regard's

Preethi.

Answers (3)

Answers (3)

former_member440449
Participant
0 Kudos

thanks Javier but that doesn't seem to work neither.

Seems more complex than it is.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Claudio,

Can you export your message mapping via ctrl+shift+alt+0 (in edit mode) and then attach it here?

Regards,

Mark

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Claudio,

Per TDID with Y040 value, if there are more than one E1EDPT2 segment, which value should be taken only one or all of it? If only one should be taken (e.g first line), then this logic would work

Output:

If all TDLINE values need to be taken and need to appear in only one comentario field per E1EDP01, then you need a UDF that will concat all of those values and output it as a single context. e.g

Output:

Hope this helps,

Mark

former_member440449
Participant
0 Kudos

Thanks both for your replies.

Unfortunately they did not work.

This is what I have now in my mapping:

and this is the error I have when trying to test:

I'm not sure why it worked for you, but in my case with the same data it's not working.

Any clues to share?

Harish
Active Contributor
0 Kudos

Hi Claudio,

the problem is with format by number, can you please share the screen shot of format by number function?

Regards,

Harish

javier_alcubilla
Contributor
0 Kudos

Try adding MapWithDefault just after TDID and TDLINE

former_member440449
Participant
0 Kudos

Harish,

I assume you mean the format by example instead of format by number.

Here's the screenshot of the actual logic:

Harish
Active Contributor
0 Kudos

Hi Claudio,

its a typo, i mean Format by example.

I tried to simplify the logic, Please try with below map

Please use keep suppress option in if without else

Output

Please let me know if you still have any issue.

Regards,

Harish

Harish
Active Contributor
0 Kudos

Hi Claudio,

Please check the option keep suppress in if without else.

regards,

Harish