Skip to Content
avatar image
Former Member

...file Sender content conversion 'lastFieldsOptional' error

Hi All,

I am working on a File Sender content conversion--> flat file to XI.

it's fixed length field all the rows with same column.

090627 344535AFDFG+GBP65433 ASDSSD GFD dFSSGFD 6757532

090627 344535AFDFG-GBP65433 ASDSSD GFD dFSSGFD 6757532

090627 344535AFDFG-GBP65433 ASDSSD GFD dFSSGFD 6757532

090627 344535AFDFG-GBP65433 ASDSSD GFD dFSSGFD 6757532

090628 344536AFDFG+GBP45434 ASDSSD GFD dFSSGFD 6757532

090628 344536AFDFG-GBP45434 ASDSSD GFD dFSSGFD 6757532

**EOF**

I am sucessfully able to handle the file if i remove "**EOF*" from incoming file. But i get "lastfieldsOptional" error with "*EOF**"

>

Parameters-

Recordset Structure - ROW,*

Recordsets per message - *

ROW.fieldFixedLengths - 6,8,20,10,30,1,3,1,11,1,11,6,10,10,20,10,10,2,6,6,2,6,6,3

ROW.fieldNames - INV_DATE,INV_NO,PAYMENT_REF,CUST_NO,CUST_NAME...etc etc

ignoreRecordsetName - true

There are parameters available to ignore Last field(last column) of a Row/Rocerdset

but how to ignore the last row of the file.

Plz suggest some parameter to ignore the last row/field of the file.

Regs,

Ansh

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Jul 07, 2009 at 02:24 PM

    Hey,

    NameA.lastFieldsOptional

    You use this parameter to specify whether the last fields can be omitted (YES) or not (NO) in a structure with fixed field length, as defined in parameter fieldFixedLengths. If you do not make an entry, the default value is NO.

    This parameter does not apply to comma-separated structures. Missing fields are ignored.

    Cheers

    Agasthuri Doss

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 07, 2009 at 06:40 PM

    Create two structures (Data and trailer) within your sender adapter file adapter content conversion read the trailer record also using keyfield name and keyfield value = "**EOF**" (Only if the **EOF** is fixed value) and bring the trailer record also into your message mapping and skip this trailer data during the message mapping

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 07, 2009 at 10:01 PM

    Ansh,

    .lastFieldsOptional is obselete and you cannot use. Please see sap help:

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

    The best thing comes to my mind is use:

    .keepIncompleteFields as YES

    Also give a try with:

    .missingLastfields as add

    So with this I think your last line in the file will read into XI. But the value of last line is **EOF**. So the length is 9. Since your the first two fixed lengths are 6 and 8. You will have these values as ***EOF and ***. So while mapping you can use doesnot satrt with * and map it, so that your last line will be ignored.

    Note: with this apporach you have to make sure your first two columns never start with *. If you have a doubt then you can use the condition doesnot equal to ***EOF for first field and doesnot equal to *** for the second field when you map. I hope it makes sense to you.

    Regards,

    ---Satish

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Ansh,

      Its only one structure ROW and your last line reads into this only. In mapping you are ignoring the last line for the first two fields mapping.

      Regards,

      ---Satish