cancel
Showing results for 
Search instead for 
Did you mean: 

PI7.1 : Ignore first line from CSV

Former Member
0 Kudos

Hi All,

I have a Sender CC with FCC for CSV file and I need to ignore the first line.

For eg. the File content is as below

Number,Name,Age,Addr

101,abc,43,asadfasdf

102,bcd,24,asdvsvdsv

103,pqr,32,afdadsfdsa

Is it possible Ignore the first line -> Number,Name,Age,Addr in FCC to convert the data part only.

I want to avoid these Header fields name to getting into Message Mapping as I am performing some other business logic using Colllapse context, SplitbyValue node functions (on Number values).

Thanks for your inputs.

Accepted Solutions (1)

Accepted Solutions (1)

former_member241146
Active Participant
0 Kudos

Hi.

You can keep first line in the structure and after that do a treatment in the Message Mapping ignoring this node.

Best Regards.

Bruno.

Answers (4)

Answers (4)

Former Member

In your sender file communication channel with message protocol File Content Conversion you see a parameter Document Offset on the Content Conversion tab: Use this to specify the number of lines that should be skipped (i.e. 1 in your case, default value is 0). For further details check the SAP PI online help on [Converting Text Format in the Sender File/FTP Adapter to XML |http://help.sap.com/saphelp_nwpi711/helpdata/en/44/6713ec3f914ddee10000000a1553f7/frameset.htm].

Former Member
0 Kudos

Thank you.

Former Member
0 Kudos

HI Anil,

In the File Structure in the receiver file adapter use Document Offset=1.

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.

Thanks,

Former Member
0 Kudos

As Harald Boeing replied, you can set document offset = 1, it will ignor first line.

Regards

Liang

Former Member
0 Kudos

As Harald Boeing replied, you can set document offset = 1, it will ignor first line.

Regards

Liang