cancel
Showing results for 
Search instead for 
Did you mean: 

MAPPING PROBLEM - SIMPLE vs. ADVANCED FUNCTIONS

Former Member
0 Kudos

Dear all,

I got an IDOC-EDIFACT Mapping, which deals a lot with container variables to prestructure the complex and nested target structure, provide counter and some actual/"you are here"-variables for the reason, that the segments of the target structure are mostly build from the same type, but different filled, depending on what they represent.

Filling this target segments I need simple functions, which provide my "your are in a ABC segment"-variables to orientate and then I need most of the time a advanced function, which searches e.g. positions in the source structure (imagine POSNR) and get depending "You are here..."-variable relevant data to map. This is where I get problems. I don't get it totally, yet...but it seems like, how often my field mapping (The different connected functions leading to target field) for one field is processed, depends on the number of the target field itself, as long as you use simple functions (make sense), when I use advanced functions (soesn't matter ,in which step in my field mapping), the field mapping seems to run only once (still makes sense, because you queue the source field entries), but how does it work if I have to use both function types.

Can some one please help?

Thank you in advance...

Daniel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

What i could understand from your question is

-You have to use both simple functions and Advanced functions for your requirement but since you have multiple data entries you have to deal all the source-target relationship with respect to its right context.

Basically you are talking about Handling the contexts when you use both the functions -Bigger than your Qusetion...!....

If my above understanding is right,then

*You have many node functions to handle the context(like parent-child).do have a look on those functions.

*In your advanced functions you can use ResultList.CC,

ResultList.SUPPRESS and with some other functions to handle the contexts.

*But usually removing the context before giving it to user defined functions is the good practice,if needed you can build the context inside your function ELSE you could handle the same by using node functions after advanced functions.

Let me know if this helps you.

Thanks in advance.

RGds,

Vasanth.

Message was edited by: Vasanthakumar Balasubramani

Answers (3)

Answers (3)

Former Member
0 Kudos

@ Stefan: I posted screenshots from my scenario under http://www.sapicon.de/webspace/ and added also a description, its a little complicate, but I hope these Pictures make it more clear..

@ all - I think these information are needed to solve the problem...

I am looking forward to find a solution for that...

Kind regards,

Daniel

Former Member
0 Kudos

Hi Daniel,

By some means if you could define the number of target entries in the source side you can use the container to hold the value and the same can be utilized in any advanced functions.

Note:Even i would suggest you to provide a sample mapping of the same so that we can try it out.

Thanks in advance.

RGds,

Vasanth.

Former Member
0 Kudos

Thanks for your answer,

I am into contextes and your tips would normally work and make me go, but... my problem ist a little more complicate. Let's see I try to explain it in another way.

If you map a constant or a simple function to a target element - you don't care for the occurency of your source element or simple functions, right? This is because, independent from a source element (with the correct occurency matching the target element) XI takes care that your constant is repeated often enough to build so many target elements as needed.

If you use advanced Functions, its little more complicate, then you have allready to provide a queue, which tells the advanced function - how many times to run and how how many result entries to create, 'cause these must match with the number of occurency of your target element (in simple words: you control the number of runs, that your single field mapping is processed).

Question: What happens if I use simple Functions (Which should be called every time and context, the target field should be build - in a single context) and advanced function(which should identify, depending on the result of the actual simple function call values from queued source fields) in a single element-mapping?

What controlls the number of runs? Me or XI? How to provide the right number of entries from my advanced function without knowing before, how many target elements must be build and without a direct dependency from source elements?

Thanks for thinking about this...

stefan_grube
Active Contributor
0 Kudos

Hi Daniel,

It is not well defined, how often a target element is produced, when it is not connected to a source element.

So you should avoid this.

Simple functions without paramters work like constants and produce the target element exactly once for each context, when min occurrance is 0 or 1. But this is valid only, when this simple function or constant is connected directly to the target element.

Advanced functions without paramters seem to produce the target element for each context, when min occurrance is 1, but only once for all contexts, when min occurrance is 0.

If you use functions with parameters, then it works like this:

Simple functions are called for each source element. Advanced functions which do not cache the queue are called for each context (empty or not), advanced functions with cache the queue are called only once.

You should provide an example for your mapping, that makes it easier to discuss.

Regards

Stefan