cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping of multiple Idoc segments to array

Former Member
0 Kudos

Hi,

I have a mapping of multiple Idocs, which multiple segments to a webservice xml.

Since I got only the first value of field Quali in segment E1P0024 mapped to the FahrerQualifikationIDs I used removeContext function for the Quali field of segment E1P0024. Now are all values from all E1PLOGI Idocs transferred to the first Fahrer.
One E1PLOGI is representing one Fahrer. Each Quali values of one E1PLOGI have to be transferred as a string beneath FahrerQualifikationIDs.

How can I achieve this?

Thanks,
Michael

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Priyanka and Ryan,

thanks for the help so far. I could not succeed yet.

Hiere is a sample input file:

One E1PLOGI represents one person (Fahrer) in the output structure. As long as there is only 1 person (E1PLOGI) is in the message everything works fine. If there are multiple E1PLOGI in the message all qualifications from segment E1P0024 are assigned to the first person in outbound.
Here the mapping result:

My actual mapping for the strings in FahrerQualifikationIDs is:

I tried with several contexts, unsucessfully.

Any furter help is appreciated and will be rewarded. Attached the xml files.

Thanks Michael

Ryan-Crosby
Active Contributor
0 Kudos

Hi Michael,

Try a slight modification to your string mapping based on this screenshot - the QUALI highlighted in yellow has the context set to 'E1PLOGI'.  I created a sample of the source and target messages in my system to test it and it worked for me.

Regards,

Ryan Crosby

Former Member
0 Kudos

Hi Ryan,

now I have the first fahrer assigned correctly with 2 qualifications but nothing in the second one.

Thanks and Regards
Michael

Ryan-Crosby
Active Contributor
0 Kudos

Hi Michael,

What do you have for a mapping for FahrerQualifikationIDs?  Also, what does the queue look like for the formatByExample function?

Regards,

Ryan Crosby

Former Member
0 Kudos

Hi Ryan,

yes it is working now. I changed the mapping of FahrerQualificationIDs from E1PLOGI to E1PLOGI/SEGMENT.

Thanks a lot.

Kind regards
Michael

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi again,

the structure is more complex then I described yet. Here is a screenshot from the outbound structure:

E1PITYP is also used for other data types beneath. These segments I use in the mapping too. Only E1P0024 can have multiple values which have to go to Array of strings.

Thanks
/Michael

Ryan-Crosby
Active Contributor
0 Kudos

Hi Michael,

If you take the first approach then that I mentioned it should give the proper data output for the string element.  I was not knowing that the E1PITYP had more occurrences so the second option wouldn't really be an appropriate solution.

Regards,

Ryan Crosby

PriyankaAnagani
Active Contributor
0 Kudos

Can you provide sample input and output Xml files so that we can try helping further.

---Priyanka

PriyankaAnagani
Active Contributor
0 Kudos

Hi Mike,

Use SplitByValue(EachValue) just before mapping for target field "string".

Your mapping logic-->SplitByEachValue-->string

---Priyanka

Former Member
0 Kudos

Hi Priyanka,

thanks for your response.
Now it looks like in the picture above. But then I have again only the first Quali value filled in  string.

The context of Quali is E1PLOGI.

/Michael

Ryan-Crosby
Active Contributor
0 Kudos

Hi Michael,

Instead of SplitByValue try FormatByExample with the first parameter as the output of removeContext function and then use E1P0024 with the context set to IDOC as the second parameter.  It looks like you would also have the option of mapping E1PITYP to FahrerQualifikationIDs and then pass the QUALI with context set to E1PITYP to the input of string without using removeContext.

Regards,

Ryan Crosby

PriyankaAnagani
Active Contributor
0 Kudos

Hi Mike,

Please Try Below.

QUALI-->CollapseContext-->Fahrer

QUALI-->FixValues-->String

Context of QUALI should be E1PLOGI on both the above mappings.

--Priyanka