cancel
Showing results for 
Search instead for 
Did you mean: 

SplitByValue: Mapping Question

Former Member
0 Kudos

Hey experts,

I was working with a map IDoc DELVRY05 --> EDI 856, and while working with a Splitbyvalue function i got an issue since i can't transfer all the values to the splits EDI created

- Example IDoc Structure:

IDoc

E1EDL20

EA1DRM1 (partner segment)

...

...

E1EDL37 (Pack segment/Split value required for unique EXIDV)

E1EDL37 (Pack segment/Split value required for unique... )

Following this blog ( ) i did learn how to pass the values for every EDI without mixing data

for example i did create 3 EDI based on 3 unique (EXIDV) tracking numbers and for every new EDI i map the corresponding EXIDV (good news)

But i understood that logic only because the EXIDV is the field which i use the splitbyvalue, so my question is..

- How this affects other values????? how should i map them so the data that i don't need to splitcan appear in all the EDI generated? (bad news)

For example, i need to map some header data as the VBELN from E1EDL20 for every new EDI, but i can't make it to every map since it only maps the field in the first EDI and the others 2 are empty (failing the transmission if the EDI field to map is 1.1)

If i use RemoveContext it works for some fields (at header level) and others not (at item level), i only need to create new EDI (this is the reason to make the split and every EDI should had the corresponding tracking number data, and the rest of the fields are the same for every EDI: partner data, header data, etc)

So i'm not sure how to transfer the rest of the values, i'm having troubles trying to understand this,

any help?

Thanks in advance!!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I tried using the CopyValue after CreateIf and it works, but right after that i have to create another DTM for QUALF = "007" i try the exact same way but i doesn't work, why is that??

Sorry about the repeating messages i had to change to question to "not answered"

Edited by: Alanis Alexis on Aug 27, 2008 3:18 PM

Former Member
0 Kudos
QUALF
= ----> CreateIf ---> DTM
"006"

You need to use OR condition here before createIF.The first input to OR will be the value of QUALF->"006" and the second input will be QUALF->"007".

If that doesn't work,then use removeContext as well.

QUALF->removeContext->"006" QUALF->removeContect>"007" and then feed this to OR.

Thanx

Aamir

Former Member
0 Kudos

But i need this in differents segments,

i mean,

1º DTM with 006,

2º DTM with 007

If i use OR condition with both as once would that only create the first of those values that encounters?

I'm currently doing:

QUALF = 006 --> CreateIf --> DTM

QUALF = 007 --> CreateIf --> DTM[1] <- duplicating segment

that way I'm creating both DTM only on 1º EDI created (in my test data i can create 3 EDI's)

The problem appears while trying to apply CopyValue to this idea

QUALF = 006 --> CreateIf --> "CopyValue" --> DTM

QUALF = 007 --> CreateIf --> "CopyValue" --> DTM[1]

If i map like that the "006" it works, but if after that i add the second with CopyValue as well i get an error:

- Cannot produce target element /ns0:Messages/ns0:Message1/LIST/S_ISA/S_GS/S_ST/G_SHL/S_HL/S_DTM. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

That sounds like if the first DTM is failing... so im really confused

as note the QUALF is one context up so i can evaluate all the qualf values..

So as you see, with RemoveContext i would probably get the same issue, because the real problem is that i can't replicate the DTM for all the needed EDI's after the split (i need that same data for all of them)

I keep trying but i really not sure what's the logic i should do, anyway many thanks for quick response!

Edited by: Alanis Alexis on Aug 27, 2008 3:40 PM

Former Member
0 Kudos

Hi!

Did you try to set other context to field QUALF? And also I think the better way is just to use ifWithoutElse function to pass values leaving other segments blank.

Kind regards,

Radek

Former Member
0 Kudos

Hey Radek,

Thanks for the response, the context was working fine (checking the queue i could see all the values so that was enough to select the desired value)

but i did changed the "CreateIf" for a IfWithoutElse function (mapping an empty constant value if true, and then using CopyValue:

QUALF(context)

= ---> IfWithoutElse --> Map Constant -->Copy->DTM

006

That way works perfect, maybe the "True" at the output of the CreateIf isn't very nice for the CopyValue function, but now that i'm mapping a constant value if true seems to be copying correctly

Many thanks for the help guys!

Former Member
0 Kudos

One additional question..

how go i take that same use for creating segments?

for example:

QUALF

= -


> CreateIf ---> DTM

"006"

How do i apply this to the creation of segments? (the CopyValue)

Because i have to map this DTM for every EDI with the same data

I tried using the CopyValue after the "QUALF" but is not working, and i only get the DTM created in the first EDI (out of 3 EDI created)

Thanks!

Former Member
0 Kudos

>>but i can't make it to every map since it only maps the field in the first EDI and the others 2 are empty

Use copyValue function here.

Use copyValue for any value which exists only once on the sender side but needs to be mapped multiple times on the Receiver side.

Thanx

Aamir

Former Member
0 Kudos

Thanks Aamir! it seems to be working correctly now