on 06-24-2009 8:11 PM
Hi am using a sender SOAP adapter with 'Servlet (Axis)' as transport protocol and 'Axis' as message protocol.
I am using the MessageTransformBean to do my file content conversion.
There is a header line in the file which contains column names.
Sample file:
BOX ID (FI, SOS or COM),Doc Type,Company, Date,Post Key, Number
FI,SA,US,200505311,40,5001000
FI,SA,US,200505332,40,5001000
FI,SA,US,200505333,40,5001000
............................
I am using SimplePlain2XML and I want to ignore the first line of the file and pick up only from 2nd line.
I tried using xml.documentOffset and xml.documentSkipFirstRows parameters to achive this. but both are not working.
I can use StructPlain2XML and handle this whole situation. But i will have to look for keys and all. But can i do this somehow with SimplePlain2XML?
Thanks,
Shobha
Hi Shobha,
The alternate way is to remove the first line and generate the output from second line onwards in message mapping.
Here is the UDF(Context level) to suppress the first line.
Item --- > UDF(removeFirstLine)---->Item
for(int i=0;i<a.length;i++)
{
if(i==0){
result.addValue(ResultList.SUPPRESS);
}
else
result.addValue(a[i]);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shobha,
In my opinion we can use only the parameters Names given in the tabular form mentioned in help.sap [link|http://help.sap.com/saphelp_nw04/Helpdata/EN/24/4cad3baabd4737bab64d0201bc0c6c/frameset.htm]
And i can see there is nothing like xml.documentOffset or similar parameter.
One possibility would be to write adapter module or you can read as full file and in mapping you can eliminate it.
Regards,
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sobha,
I am having exactly the same issue. Did you get solution to this problem? Please help.
thanks
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.