on 04-21-2016 11:50 AM
Hi All ,
Please help out in the typical issue , my requirement is that i have to send the data to the target system which consist of huge data character of 10000 characters but maximum character to send the data from IDOC is 132 so i have written code in the which it should split the data and merge the data at last .
if(!Text[0].equals(""))
{
int len = Text[0].length();
int divide = len/132;
int count =0;
String out = "";
int temp = 0;
if(len%132 == 0)
{
result1.addValue("");
for(int i=0;i<divide;i++)
{
temp = 132*i;
out = Text[0].substring (0+temp,132+temp);
result.addValue(out);
count= count+1;
if(count>=5)
{
result1.addValue("");
result.addContextChange();
count=0;
}
}
}
else
{
result1.addValue("");
for(int j=0;j<divide;j++)
{
temp = 132*j;
out = Text[0].substring (0+temp,132+temp);
result.addValue(out);
count= count+1;
if(count>=divide)
{
result.addContextChange();
result1.addValue("");
count=0;
}
}
result.addValue (Text[0].substring (divide*132, len));
}
}
else
result.addSuppress();
Correct me if am wrong
Best Regards,
Vijender
Any one have idea ?
Regards,
Vijender
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
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.