cancel
Showing results for 
Search instead for 
Did you mean: 

Last Row not added to XML Document

Former Member
0 Kudos

Hi,

I've created a transaction extracting data from SAP, trying to convert the data into a MII XML Document. But when i try to add the rows with the repeater block, it does not include the last record from the extracted SAP data.

Description of the transaction:

SAP function call

MII XML Document

Repeater (repeats on all items in the SAP output)

->MII XML Row

->Assign data to MII XML Row

Assing XML Document to Transaction output property

I have inserted a logger at the assignment action block, and the last SAP record is treated by the repeater block, but when i do a count on the SAP item elements and the converted Rows in the MII XML Document there is missing one record..

Has any body had a similar problem and solved it some how??

BR

Jens

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

What do you mean by "Assign data to MII XML Row" ?

I would expect your transaction to look like

SAP function call

MII XML Document

Repeater (repeats on all items in the SAP output)

->MII XML Row

Assign XML Document to Transaction output property

All the data assignment would be done from within the "Row" action?

Former Member
0 Kudos

Hi Nick,

What do you mean by "Assign data to MII XML Row" ?

Below the repeater action sequence, i have added a sequence with a MII XML Row action block, and below that i have a sequence with a assignment block assigning elements from the Repeater/Item node to the MII XML Row.

But the assignment is not the issue, the main issue is that the last Row is not inserted into the MII XML Document...

BR

Jens

Former Member
0 Kudos

Hi

I think it is something to do with the technique you are using to add the rows.

What you are doing is adding a blank row to the document, then populating the row action block (NOT the row in the document) with the first row from your repeater.

You then run the row action block the second time, it has the data from the first repeater row, and then you populate the row action block with the second repeater row.

So at the end you will have a rowset with 1 empty row and all but the last populated row from your repeater, plus a Row action populated with the last row from the repeater, but not added to your document.

What you can do is either - move all your assignments into the Row object (definitely recommend this), or append the final row object to the document rowset before you assign it to your output.

Hope this makes sense!

Nick