cancel
Showing results for 
Search instead for 
Did you mean: 

ORDERS(IDOC) to XCBL text transfer

laurent_touillaud
Contributor
0 Kudos

Hi,

I'm desperately trying to add a context in target structure when segments of orders in source structure are not filled.

source structure :

E1EDP01 (item 1)

POSEX

-E1EDPT1(0..9999)

--E1EDPT2(0..9999)

---TDLINE(0..1)

E1EDP01 (item 2)

POSEX

-E1EDPT1

--E1EDPT2

---TDLINE

-E1EDPT1

--E1EDPT2

---TDLINE

E1EDP01 (item 3)

POSEX -


>Segments not filled

E1EDP01 (item 4)

POSEX

-E1EDPT1

--E1EDPT2

---TDLINE

Target structure :

ListOfStructuredNote(0..1)

-StructuredNote(0..9999)

--GeneralNote(0..1)

mapping one to one:

POSEX -> ListOfStructuredNote

E1EDPT2 -> StructuredNote (context on E1EDP01)(Mapwithdefault)

TDLINE -> GeneralNote(0..1)

This results are :

Item1

-StructuredNote

--GeneralNote (coming fromTDLINE1)

Item2

-StructuredNote

--GeneralNote (coming fromTDLINE2)

-StructuredNote

--GeneralNote (coming fromTDLINE3)

Item3

-StructuredNote

--GeneralNote (coming fromTDLINE4)

Item4

-StructuredNote

--GeneralNote (Empty)

The TDLINE4 should be in Item4

The two first structures are mapped ok

But the General note is missing one context because item3 has no texts.

I need to add this context otherwise the 4th TDLINE is getting in the 3rd Structurednote.

Can anyone help?

Thanks,

Laurent.

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

To add a context, you can use the function mapWithDefault

In this case you set the context of TDLINE to POSEX. Then you use mapWithDefault, then splitByValue.

Regards

Stefan

laurent_touillaud
Contributor
0 Kudos

Hi Stefan,

To answer on the standard functions i found another solution.

I used the function FormatByExample with one input with context and the other input with results without context. The context is the added in result compared to first input contexts.

Best regards,

Laurent.