cancel
Showing results for 
Search instead for 
Did you mean: 

Fixed Length Flat File to XML issue.

Former Member
0 Kudos

Hi All,

We are using the below structure for extracting Header and Line Items. The file should ideally come as

File Header

Document Header

Line Item

Document Header

Line Item

Line Item

Document Header

Line Item

File Trailer

Our structure is

<MT_Message> 1..1

<RecordSet> 1..1

  <FieldHeader> 1..1

  <DocumentHeader> 0..n

  <LineItem> 0..n

  <Trailer> 1..1

We are using SAP SFTP Adapter and using MTB.

When we are getting the file as 1 fileheader 1 document header 1 or many line items and 1 trailer we are able pick the file

However when we get the file as 1 fileheader 1st document header 1 or many line items 2nd document header 1 line item 1 trailer. The message throws error in the

channel as Error Consistency Check in recordset structure validation. And it gives a line number which always belongs to the 2nd set of Document Header.

We have verified that the data is correct by running each pair of Document Header and single or Multiple LineItems but the issue happens when a multiple set of Document Header and Line Items occur.

What are we missing here that we are unable to read the second set starting from Document Header .

Thanks,

Shaibayan

Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor
0 Kudos

Hi Shaibayan!

Try to set option in your FCC settings:

Regards, Evgeniy.

Former Member
0 Kudos

Hi Evgeniy,

I am using MTB. How would it look like in there?

xml.RecordsetSequence Variable?

Thanks,

Shai

former_member190293
Active Contributor
0 Kudos

Hi Shaibayan!

As per SAP Help:

xml.recordsetStructureOrder=asc|var

The start and end of recordsets containing a variable number and arrangement of structures are determined as follows:


If the value is asc (ascending), the order of the recordset structures is assumed to be fixed. A new recordset is started as soon as an earlier structure occurs.


If the value is var (variable), the order is not assumed to be fixed. A new recordset is only started when another structure occurs that is defined with a fixed number. If all structures are defined as variable (*), the system interprets the entire document as a single recordset.


The default value is asc.


You can find MTB parameters list here:

http://scn.sap.com/docs/DOC-58321


Also it might be helpful to refer to SAP Help for File/FTP adapter:

http://help.sap.com/saphelp_erp60_sp/helpdata/en/0d/00453c91f37151e10000000a11402f/content.htm


Regards, Evgeniy.

Answers (2)

Answers (2)

Former Member
0 Kudos

xml.recordsetStructureOrder var have resolved my issue.

Thanks all for pointing to the right direction.

former_member190293
Active Contributor
0 Kudos

Hi Shaibayan!

Glad to hear. Wouldn't you close the thread then by setting correct answer or by setting "Assumed answered" for the thread.

Regards, Evgeniy.

former_member186851
Active Contributor
0 Kudos

Hello Shai,

Please post the MTB configured.

Former Member
0 Kudos