on 10-31-2007 7:39 PM
Hello,
I am doing a mapping from a BAPI to an XML structure. In the BAPI there are two tables each that have an element called <i>division</i>. In the target structure there is one structure that is a super set of each of the tables elements. I would like to map each of the table structures where the division is equal into the target structure. What is the most efficient way to do this? I can simulate this using the concat function, but that does not ensure the divisions are equal and it requires each context to be in the same order.
Desired Result:
Input
-
Table 1 Row 1: Division1,X1,Y1
Table 2 Row 1: Division1,A1,B1
Table 1 Row 2: Division2,X2,Y2
-
Output
-
Result 1 Row 1: Divison 1,X1,Y2,A1,B1
Result 1 Row 2: Division 2, X2,Y2
Your help is much appreciated.
Thanks,
Dustin
Hi Dustin,
First of all the output wihich you shown for Result 1 Row 1 is having <b>Y2</b> but it should be
Result 1 Row 1: Divison 1,X1,<b>Y1</b>,A1,B1
Correct me if i am wrong.
I think it could be achived by using bewlo mentioned function.
1. RemoveContext
2. SplitByValue (value changed)
3. CollapseContexts
4. Concat
But to use these function i will require the source & target mapping structure.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sarvesh,
Your catch on my example is correct - it should have been Y1 in the first row.
I'm not sure of the best way to give you a source to target, but I'll give you an example.
Source TABLES:
T1 (0...*)
-
Division
Quantity
T2 (0...*)
-
Division
Price
Target Structure (XML) (0...*)
Division
Quantity
Price
-
Thanks,
Dustin
I figured it out finally...
http://help.sap.com/saphelp_nw04/helpdata/en/ec/8fb142d043b911e10000000a1550b0/content.htm
hi Dusting,
You can try using JOIN statement to collect data from two tables and then consolidate into required 1 structure.
JOIN ensures data consolidation from outbound side of XI only, i think it should be efficient
regards
ramesh P
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.