cancel
Showing results for 
Search instead for 
Did you mean: 

Content Conversion on complex structures

Former Member
0 Kudos

Has anyone gotten content conversion to work on more than just simple parent/child structures? We are able to do

Recordset

--LineA

--LineB

--LineC

etc etc

But we'd like "grandchildren" in our records -

Recordset

--Header01 (1)

-


DetailA1 (unbounded)

-


DetailA2 (unbounded)

-


DetailA3 (unbounded)

-


DetailB1 (unbounded)

-


DetailB2 (unbounded)

-


DetailB3 (unbounded)

We can't figure out how to specify this structure. I have seen several people ask the same question. We currently accomplish it by setting up all the structures to be on the same level, and then in mapping we add context changes, but wondering if we're just missing some step in content conversion setup we could take advantage of.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Amanda,

Whenever we have come across this situation we have written Java mapping to get round this which is a real pain.

How do you add the context change using message mapping?

Former Member
0 Kudos

in a custom user-defined function, or using SplitByValue

The documentation on this is ok on help.sap.com... but I really got my feet wet with the exercises from the eLearning TBIT classes. If you're like me, you learn more from messing than you do from reading. Open your map, set up some data, and then mess with putting the function on different values/children that you map. Use the "display queues", you'll see how the data gets affected, and how it'll see the data differently when there are context changes.

This has to be the most non-intuitive thing we've messed with in XI... but obviously the most needed tool, as mapping with parents/children is about the most common thing we have to do. I see most people taking the java or XSLT route to get around this, but we are trying hard not to, as we don't want performance issues with large objects... Are you guys passing big objects? Have you seen any hits?

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Amanda,

What I meant to say in my last post is that I did not understand how adding context changes would allow me to map the source structure to the target.

Do you have an example java function that I could take a look at?

Former Member
0 Kudos

I'm trying to set up your scenario... sorry I'm not familiar with the structure you're trying to get to vs the one you have...

if you want to email me, it might be easier... derringer_amanda_l@cat.com

and then we can walk thru how to make that structure work out.

Former Member
0 Kudos

Hi

is there now a solution for this problem?

Greets

J.

Former Member
0 Kudos

Hi - Sorry for the long delay - we were on holiday here.

The short answer - SAP makes you write your own module to accomplish this scenario. We have asked for a 'standard' fix since we know many other people are looking into the same issues, especially when communicating with legacy systems on mainframes... No word yet...

Good luck!

Former Member
0 Kudos

Hi Amanda,

I have an input file with the following structure

Header 1..unbounded

..Item 1..unbounded

....ItemCond 0..unbounded

....AddFields 0..unbounded

..HeadCond 0..unbounded

..Tender 0..unbounded

I need to map this to an IDOC of the following structure :-

E1WPB01

..E1WPB02

....E1WPB03

....E1WPB04

....E1WXX01

..E1WPB05

..E1WPB06

In order to convert the XML created by file file adapter into a format suitable for mapping to the IDOC structure we are about to start work on a Java program to perform the conversion. Obviously performance is a concern. Are you saying that this can be solved by adding context changes?

Regards

Ian

Former Member
0 Kudos

Context changes and some custom user functions on looping, yes. I'm NOT saying it's easy - this stuff took us longer to do than we thought, and it's so hard to pick up & remember what's happening when a change needs to be made. We are working right now on a strategic decision on how we want to handle this stuff. (You have to wonder what's the best approach when SAP themselves deliver maps in XSLT for complex structures...) There are pros & cons for all the different mapping approaches for sure.

I can't really tell you if manipulating the contexts of your entire structure is more or less of a performance hit than just running an outright java program to do it all for you... That's a valid question, though. Maybe someone with more expertise than me can answer that?