on 04-25-2011 8:24 PM
I would like to map an XML tag <Text>Line1Line2Line3Line4</Text>
to an IDOC segment E1ED1TEXT . Defined as occurring 0 to 999999.
I would like to map each item separated by a tilde into a separate occurence of the IDOC text segment. Is ther anyway to repeat the mapping without duplicating the subtree.
E1ED1TEXT
Text_Id - "ZTXT"
Text_Line = Line1
E1ED1TEXT
Text_Id - "ZTXT"
Text_Line = Line2
E1ED1TEXT
Text_Id - "ZTXT"
Text_Line = Line3
Hello,
This is only possible using UDF
mapping is like this:
Text -> UDF -> splitByValue:eachValue -> Text_Id
UDF is of context type
argument is input
String temp[] = input[0].split("~");
for(int a=0;a<temp.length;a++){
result.addValue(temp[a]);
}
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
duplicate post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have to use UDF and code given by Mark should work without any issues provided you do you mapping as given below..
1. Text ->UDF->E1ED1TEXT
2. Text->UDF->SplitByValue(each)-->Text_Line
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.