on 10-26-2006 6:05 PM
Hi,
I have R/3-XI-File scenario.The output file should look like (suppose there are 3 columns in file,column1(10),column2(3),Column3(3))
"ABC ","XYZ","PQR"
"ABCDEFGHIJ","XYZ","PQR"
the data for each column is enclosed within quotation marks and comma is the field separator.If the value of field is less then the length of field then white space should be there within quotation marks.
Can this be achieved using content conversion?
Thanks,
Rekha
Hi,
This will help you
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
I am reachable at- agasthuri@gmail.com, If you want i will send some document related to it.
Regards
Agasthuri Doss
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use this code ...
int len_original = a.length() ;
int len_required = Integer.parseInt(b);
StringBuffer sBuf= new StringBuffer(a);
while (sBuf.length() < len_required)
{
sBuf.insert(len_original,' ');
}
String input = "\"" + sBuf + "\"";
return(input);
for the two inputs, first give the field and in the second input give a constant with the length say 10 or 12 for example which is the original req. for the field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rekha & Ram,
I have send the Document, I hope it is usefull.
Regards
Agasthuri Doss
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
As there is not much control in the Reciever side file content conversion, it is prefer to format your data in the mapping. And then send this data to communication channel.
So logic of incorporating spaces, and quotation marks etc, you can do in the mapping. If you are using message mapping, try to do with java user defined functions.
Then just in the reciever channel you can put just delimiter so that it is easy.,
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Agasthuri Doss Baladandapani
Can you Pls as well send me the DOcs ?
my ID mlrshee@gmail.com
Thanks,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
During mapping write a generic UDF that will check the length of the data passed in and encloses it with " double quotes and whitespaces. And while doing the content conversion its simple and normal content conversion.
OR
In the UDF just add the white space.
In the content conversion set <b>"</b> as begin separator and end separator. The field separator would be <b>",</b>.
Regards,
Prakash
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.