on 12-13-2014 5:37 PM
Hi experts,ed through
Non SAP system is sending long text description and PI has to split multiple TDLINE each of max size 70 char.These we have achieved through java udf.
TDFORMAT field is set to constant "=".The issue in SAP Idoc header text is if the 70 th/140/210 th char is space,2 words are combined together without space.How to fix this issue in PI?
Regards,
Karthiga
in place of UDF you can use substring node function...
Please send your mapping screen shot...and let me know your exact mapping ..
Thanks,
Sreenivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please find the UDF and code snippets for the same requirement.
http://scn.sap.com/thread/3175764
Hope this helps!
Thanks,
Sudhansu
Hi,
Non SAP system will be sending the description of length 280 or lesser char.We have to map this description in PI to TDLINE field.TDLINE can accomadate only 70 char.so PI has to generate 4 E1EDPT2 segment and 4 TDLINE.I can able to split the string to 4 substring by below udf.
int size = Integer.parseInt(splitsize[0]);
for(int j=0; j < inputstring.length; j++)
{
if(inputstring[j].equals(""))
result.addValue("");
else
{
for (int i = 0; i < inputstring[j].length(); i += size)
{
int end = i + size > inputstring[j].length() ? inputstring[j].length() : i + size;
result.addValue(inputstring[j].substring(i, end));
}
}
}
SAP ECC finally merging all the TDLINE.Issue is when 70th/140th char is space,the 69th and 71th char are getting merged without space.
so ECC ask us to check whether the space exist at end of first/sec/third line and move that space to beginning of line.This is one option.
Other option when PI is splitting the string to 70 char,it should nt break the words inbetween.Rather PI should split closed space char available .meaning 70 or <70 char in one TDLINE.
Regards,
Karthiga
you just need to adjust the length. in the UDF you have add one more else if and define the length.. for your case it should be
if (len >0 && Len < 70 ) {
result.addValue(....)
} elseif(len >0 && len < 140 ) {
result.addValue(....)
result.addValue(....)
}else if (len >0&& len <210) {
result.addValue(....)
result.addValue(....)
result.addValue(....)
}else if (len >0 && len <280) {
result.addValue(....)
result.addValue(....)
result.addValue(....)
result.addValue(....)
}
Refer Hareesh Gampacomments .......
Hi,
Are you using the "trim" function by any chance. Please try by removing it.
Thanks,
Sudhansu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi sudhansu,
I am using below udf for splitting the string to 70 char.TDFORMAT is set to constant "=".
nt size = Integer.parseInt(splitsize[0]);
for(int j=0; j < inputstring.length; j++)
{
if(inputstring[j].equals(""))
result.addValue("");
else
{
for (int i = 0; i < inputstring[j].length(); i += size)
{
int end = i + size > inputstring[j].length() ? inputstring[j].length() : i + size;
result.addValue(inputstring[j].substring(i, end));
}
}
}
the issue here is when 70th/140th char is space in input string,2 words are getting concatinated in SAP header text.How to fix it..
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
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.