on 01-07-2009 3:42 AM
I need to map text from an IDOC (DESADV01) to EDIFACT IFTMIN message in XI
I am using the graphical mapping editor
I have the following in the idoc segment E1EDKT3 -> TDID = 9028
E1EDKT4 -> TDLINE (This is Line1)
E1EDKT4 -> TDLINE (This is Line2)
E1EDKT4 -> TDLINE (This is Line3)
E1EDKT4 -> TDLINE (This is Line4)
Each TDLINE needs to mapped to the segment NAD -> C_C058 -> D_3124, D_3124_2, D_3124_3, D_3124_4
Result should be
This is Line1 -> D_3124
This is Line2 -> D_3124_2
This is Line3 -> D_3124_3
Can you tell me how I can achieve this?
Thanks
Mark
Hi Mark,
Function Category: Statistics --> index
R = Index i of Xi. In the function properties, you specify the following: the initial value of i, the increment, and whether the index value is to be reinitialized at the beginning of every new context, or whether it is to have the same value for the entire source structure.
See:
http://help.sap.com/saphelp_NW04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
Regards Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You could use the copyValue function:
TDLINE --> copyValue(0) --> D_3124
TDLINE --> copyValue(1) --> D_3124_2
TDLINE --> copyValue(2) --> D_3124_3
TDLINE --> copyValue(3) --> D_3124_4
Hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Akshay
Thanks for your response, unfortunately you cannot do this as TDLINE is the Source message.
Regards
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Guys
Thank you for your responses,
getting closer, however, not quite there yet...The Copy Value needs to be given an index ( this index cannot be a constant value as you may have several lines of text from a different ID at this level. These lines canl be SUPPRESSED however you need to know what index the relevant text is on and increment this index accordingly.
So I guess I need a UDF which will read the resultlist and pick up the first value not suppressed and copy this across - then this index value will need to be incremented and stored to be used for the second line etc.
Can you give me an example of how to do this?
Thanks
Mark
Hi,
This can be done without using UDF, just use the function removeContext example:
Suppose the queue for your lines is:
A, CC(Context Change), B, SUPPRESS, C, SUPPRESS, D
When you use removeContext, the output would now be:
A,B,C,D
You can then use the copyValue technique as referenced in the responses above. Then, as for the children nodes, you can use the ifWithoutElse function to only pass the values from the lines that were not suppressed. Just make sure you do it in an argument like this:
Parent Node --> mapWithDefault:SUPPRESS --> equalsS:SUPPRESS --> not --> 1. ifWithoutElse
Child Node --> mapWithDefault:SUPPRESS --> 2. ifWithoutElse
Hi,
Right Click on your TDLINE Node and say 'Duplicate Subtree' for 4 times.
Then set the context accordingly...and Map it directly tothe required target node.
save and execute mappings and execute.
This should work....with some points
Regards,
Akshay.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.