on 05-22-2008 8:09 AM
Hi Experts,
I need your suggestion in the following scenario regarding the mapping.
We have a file to idoc scenario from third party system to SAP via XI in which one text is coming contains more than 70 chars, but as length in the idoc (sap side) is restricted to 70 chars only, the text is getting truncated and updated in sap.
I hope, if we can add some logic in the mapping to generate multiple segments of 70 chars each if the text length is more thn 70 chars, then we can achieve this.
Can any one of you suggest in detail how to achieve this in mapping, probably with 1:N ? Any documents would be appreciated.
Thanks in Advance,
Jitender
Thanks Gourav. I have included the logic in UDF and it seems splitting the string fine.
Right now source field is mapped to TDLINE in E1EDPT2 so
Do we need to change this mapping also?
How the multiple segements will be generated?
Thanks in Advance
Jitender
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rohit,
Can you please explain in detail on how to generate the segment E1EDPT2 many times dynamically if the string lengh is more than 70 chars.
Points would be re warded.
Thanks in advance,
Jitender
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jitender,
you can use below mention UDF
public void Split(String[] var1, ResultList result, Container container){
String input = "";
input = var1[0];
while( input.length() > 70 ){
result.addValue(input.substring(0,70));
input = input.substring(70);
}
result.addValue(input);
}
Gaurav Jain
Edited by: Gaurav Jain on May 22, 2008 10:42 AM
Hi,
1) U have to use UDF to get this.
2) In UDF split total text in 70-70 char. for this check text length using if condition.
3) Use RemoveContext node function to map this field and its parent node.
Regards,
Rohit
Reward points if helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
7 | |
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.