Skip to Content
0
Former Member
Feb 25, 2011 at 04:05 PM

Export Table with NCO 3.0

64 Views

Hi,

I would like to fill a table in my .net environment (Visual Studio and NCO 3.0) and pass the table as a import Parameter via RFC to the SAP System.

If I pass a table with just one line, everything works perfect. If I try to append more lines to my table in vb.net and pass it to the sap system, all the rows in the table are the same as the one I appended last.

Here is my code (the values for the table are just for testing):

Dim uploadAPI As IRfcFunction = ecc.Repository.CreateFunction("ZRFCtestfunction")

Dim binTable As IRfcTable = uploadAPI.GetTable("iv_itab")

Dim am As RfcStructureMetadata = _ecc.Repository.GetStructureMetadata("SDOKCNTBIN")

Dim row As IRfcStructure = am.CreateStructure()

row.SetValue("LINE", "1212121212")

binTable.Append(row)

row.SetValue("LINE", "3333333333")

binTable.Append(row)

uploadAPI.SetValue("IV_ITAB", binTable)

uploadAPI.Invoke(_ecc)

the result in the SAP-System would be a Table like this(both lines are the one I appended last):

-


- 3333333333 -

-


- 3333333333 -

-


Does anyone know what to do get the right(both) lines into the table?

Thanks in advance