cancel
Showing results for 
Search instead for 
Did you mean: 

...file Sender content conversion 'lastFieldsOptional' error

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Satish,

It sounds good...but if i read n gets "**EOF**" into XI thn ignors in mapping....i need to mention the key fields value for both ROW and last structure (for last line-occu 1) whereas none of the value in ROW structure is constant....

Can i give key field as not equal to "***EOF" in parameters for 1st field????? if yes how?

Thnks & Regs,

Ansh

Former Member
0 Kudos

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

Former Member
0 Kudos

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

agasthuri_doss
Active Contributor
0 Kudos

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