cancel
Showing results for 
Search instead for 
Did you mean: 

Header fields to be removed from sender file

Former Member
0 Kudos

hi friends,

In my scenario the file with which i am testing is having some header fields but there is no mapping for those header fields .

i want those header fields to be removed and only the content which is needed  to be processed to the target side.below are screen shots. can any one help me in how to remove these header fields.  source is FTP and target is SFTP.

1.this is the file used for testing ,the one marked in blue is the content that should be passed

2. the target file should look like below screenshot  with out any headers

3. but its comming like below screensht with header fields

thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

thanks all

Handled it in mapping 

regards,

Chandra

Former Member
0 Kudos

Hi all,

How do we handle it in mapping in my scenario, can any one help

Regards,

Chandra

Cortex2k
Active Participant
0 Kudos

Hi Chandra

You could make a UDF on item level suppressing the first line. Code could be something like this:

for(int i=0;i<a.length;i++)

{

if(i==0){

result.addValue(ResultList.SUPPRESS);

}

else

result.addValue(a[i]);

}


Best regards,

Chris

former_member187010
Participant
0 Kudos


Hi Chandra,

You can use Document offset parameter in FCC if you have specific no. of line in each file

http://help.sap.com/erp2005_ehp_04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm?framese...

Else Handle the conversion in Mapping.

Regards

Jitender Gusain

Former Member
0 Kudos

Hello,

If u are sure about the number of header lines then u can use document offset parameter in FCC?

Thanks

Amit Srivastava

Former Member
0 Kudos


Hi Srivastava,

thnq for ur responce ,i used File as message protocol and configured with module configuration.

Former Member
0 Kudos

Hello,

U mean u are using Message transform bean to convert text into XML file in sender file adapter?

If yes, then there is a parameter in MTB to skip header lines

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi,

yes im using Message transfrom bean. can you mention whts the parameter use to skip the header lines . And also in the end of the file there are last two lines which comes after the content which are also not needed, can these last lines also be removed by using the parameter.

Former Member
0 Kudos

Hello,

Check my reply

>>And also in the end of the file there are last two lines which comes after the content which are also not needed, can these last lines also be removed by using the parameter.

No, u have to handle the same at mapping level

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit,

tried with

xml.processFieldNames ---- from File

xml.documentsSkipFirstRows-------- <no of Rows>

xml.documentOffset -------<no of Rows>

But no luck

mine is SimplePlain2XML


former_member184720
Active Contributor
0 Kudos

Yes Chandra. Seems like SimplePlain2XML does not support documentSkipFirstRows

Rene has confirmed the same in the below thread

http://scn.sap.com/thread/3327932

You have to handle it in the mapping..

naveen_chichili
Active Contributor
0 Kudos

Hi Chandra,

If the conversion type is StructPlain2XML you have the following parameters that can be used :

1) xml.documentOffset =  2

2) xml.documentSkipFirstRows=<noOfRows>

the other option would be to check if this can be handled in the mapping....try  set mapping to ignore the first rows which you dont need.

Thanks,

Naveen.

Former Member
0 Kudos


Hi naveen,

how do we handle it with mapping in my scenario.

Regards,

Sharath