cancel
Showing results for 
Search instead for 
Did you mean: 

Sender FileContentConversion - Message tranformation bean - documentOffset

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

arijit_mukherjee2
Participant
0 Kudos

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]);

}

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Shobha,

I'm looking for a way to implement a similar scenario using StructPlain2XML.

Could you please help me with some screen shots on how to configure the SOAP Axis adapter and the modules.

Thx

Former Member
0 Kudos

Hi Sobha,

I am having exactly the same issue. Did you get solution to this problem? Please help.

thanks

Ram