Skip to Content
avatar image
Former Member

File Content Conversion for a CSV file with Field names in the first row.

Hi Geeks,

I need to pick a csv file which has the field names in the first row. But the data starts from line 2.

The file looks as follows

Shipment Date,Airline Carrier Code (DHL),Mode,Airline Carrier Number,Freight Airway Bill Number,Origin,Destination,Service Center,Weight,Weigt Unit of Measure,Pieces,Total Value

8/5/2007,AS,D,27,12345678,JFK,SEA,JFK,1234567.12,LB,10,1234567.21

I am getting the payload as below.

- <ns:MT_CAL_DW_MULTI xmlns:ns="http://PurchOrder">

- <CAL_PO>

<shipment_date>Shipment Date</shipment_date>

<airline_carrier_code>Airline Carrier Code (DHL)</airline_carrier_code>

<mode>Mode</mode>

<airline_carrier_number>Airline Carrier Number</airline_carrier_number>

<freight_airway_billnumber>Freight Airway Bill Number</freight_airway_billnumber>

<origin>Origin</origin>

<destination>Destination</destination>

<service_center>Service Center</service_center>

<weight>Weight</weight>

<weight_unit_of_messure>Weigt Unit of Measure</weight_unit_of_messure>

<pieces>Pieces</pieces>

<total_value>Total Value</total_value>

</CAL_PO>

- <CAL_PO>

<shipment_date>8/5/2007</shipment_date>

<airline_carrier_code>AS</airline_carrier_code>

<mode>D</mode>

<airline_carrier_number>27</airline_carrier_number>

<freight_airway_billnumber>12345678</freight_airway_billnumber>

<origin>JFK</origin>

<destination>SEA</destination>

<service_center>JFK</service_center>

<weight>1234567.12</weight>

<weight_unit_of_messure>LB</weight_unit_of_messure>

<pieces>10</pieces>

<total_value>1234567.21</total_value>

</CAL_PO>

</ns:MT_CAL_DW_MULTI>

Here the requirement is that the communication channel should ignore the first row which contains the field names and should start reading from line 2.

It would be a great help if some body can throw light that how this can be achieved.

Thanks,

Noorul

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 16, 2007 at 02:22 PM

    Hi Noorul,

    In Sender Communication of File Adapter, set the value for Document Offset as 1.It means the first record of the file has not been come into payload.Check this it will solve u r problem.

    Cheers

    Veera

    >>> Reward points, if it is needful.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 08, 2007 at 10:04 AM

    Try using "Document offset" in sender file adapter configuration. It says the starting position to validate by ignoring the specified number of lines.

    Check

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2007 at 07:26 PM

    Veera,

    Thanks for the solution. It worked, I read the File Adapter documentation completely but could not make it.

    Now the solution which you gave is working. Thanks,

    Noorul

    Add comment
    10|10000 characters needed characters exceeded