cancel
Showing results for 
Search instead for 
Did you mean: 

How to skip first TWO Lines of .txt file using XSLT Mapping >

former_member189387
Active Contributor
0 Kudos

Hi Friends ,

I have an .txt file in has the format as

<TEST>

4564564545

56456444566

56465

How can i skip the first two Lines when i am writing the XSLT Mapping ?

That <TEST> and empty line shouldn't go the rfc .

How can i skip and sent to rfc using XSLT Mapping ?

Best Regards .,

V.Rangarajan

Accepted Solutions (0)

Answers (2)

Answers (2)

udo_martens
Active Contributor
0 Kudos

Hi Rangarajan,

you can skip lines in XSLT bei using condition with X-Path function position, for example:

<xsl:for-each select="//myStructure/*[position() &gt; 1]"/>

<i>Select all subelements from myStructure except position of them is less than 2</i>

Regards,

Udo

Shabarish_Nair
Active Contributor
0 Kudos

you can avoid the empty lines in your File Content Conversion by defining offset.

<i>Under Document Offset, specify the number of lines that are to be ignored at the beginning of the document.

This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines.</i>

ref: http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

then the generated XML after FCC will not have the empty lines.

former_member189387
Active Contributor
0 Kudos

Hi ,

It is using Mail Sender Adapter . I have to read an attachement which contains the format which i have specified.

If File Sender Adapter then we can do by setting offset . But here i am using xslt mapping to convert the incoming line details from Mail Sender .

In XSLT is there is there any Option to skip if it is <TEST> like that ?

Regards .,

V.Rangarajan

Former Member
0 Kudos

one option will be to have your interface configured as

mail->File-> receiver instead of mail->receiver

regards

krishna