cancel
Showing results for 
Search instead for 
Did you mean: 

Using only - UseOneAsMany Standard Function

Former Member
0 Kudos

Hi Experts,

Is there any way to build the following scenario using only the standard functions graphical mapping? Maybe the UseOneAsMany standard function? We need to travel two segments only to one segment.

XML Input

Addiotinally, the output needs to contains both header & items data in the same segment.

XML Output

Have a look at in the following mapping. This is the real scenario.

Best regards,

Leandro Silva

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Leandro,

This should be possible. Here is the mapping I used using your sample:

for message:

idHeader

descHeader

idItem and descItem

Sample output:

This is of course the simplified version. Just tweak it to your requirement.

Regards,

Mark

Former Member
0 Kudos

Hi Mark, thanks for your response.

After some tests, I got an IDOC with multiple items.. I've tried to increase the context, but it's not working well.

Please, have a loot at the XML input, now there are some message nodes

Additionally, the XML output following the same logic.


Here, the real scenario (IDOC > XSD)

The PosicionOC segment is following the E1EDP01 IDOC segment. On our scenario they are the Message being mapped to Message. It's working fine.

Additionally, here there are 6 TextoOC segments following both E1EDPT1 IDOC segments, concatenating with E1EDPT2 IDOC segments. On our scenario they are Header + Item being mapped to Order. It's also working fine for the first record.

Here is the issue, for the second record, the TextoOC segment is not receiving the IDOC segments.


I've tried to remove the removecontext, in additional I've increased the context to E1EDP01, but it is not working.

Do you have any ideia why the second record is not receiving the remaining of them?

Best regards,
Leandro Silva

former_member182412
Active Contributor
0 Kudos

Hi Leandro,

Use below mapping for your first source and target xml's.

Regards,

Praveen.

Former Member
0 Kudos

Hi Praveen,

Thanks for your response.

After the applied solution, I got the same issue, the second record is not being sent to legacy. Applying the removecontext function, I have the following result. All the E1EDPT2 segments are in the same level.


By the way, have a look at the following IDOC.

The E1EDP01 segment will be the our MESSAGE node, in this case there are 2, in additional there are 6 E1EDPT2 segments, that will be our ORDER node.

If I set to the E1EDPT1 context, I will have the correct result, because now I have 6 and 6 segments

Therefore, the second 6 records remaining is not being sent. Only the first of them.

Best regards,
Leandro Silva

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Leandro,

Here is the updated mapping:

for idMessage

for order

for idHeader

for descHeader

for idItem and descItem

sample input/output

I can't really comment on the actual mapping, you have to give me the input/output xml

Regards,

Mark

former_member182412
Active Contributor
0 Kudos

Hi Leandro,

Use below mapping for TEXTOS node in the target side.

Use below mapping for TextoOC field in the target.

Regards,

Praveen.

Answers (1)

Answers (1)

Harish
Active Contributor
0 Kudos

Hi,

you can use format by example for your case. Use one as many is for repeating one source value based on another value. In your case you have two header segment (can be more then one).

regards,

Harish