I'm trying to call BAPISDORDER_GETDETAILEDLIST
to get the sales orders form SAP into my C# application, but for some reason headerTable
doesn't return any information.
Any clues?
This is how I do it:
public DataTable getVariantConfiguratioin(String ordernumber)
{
IRfcFunction testfn = repo.CreateFunction("BAPISDORDER_GETDETAILEDLIST");
IRfcStructure data = testfn.GetStructure("I_BAPI_VIEW");
IRfcTable salesDocuments = testfn.GetTable("SALES_DOCUMENTS");
IRfcTable headerTable = testfn.GetTable("ORDER_HEADERS_OUT");
data.SetValue("HEADER", "X");
data.SetValue("ITEM", "X");
data.SetValue("SDCOND", "X");
salesDocuments.Append();
salesDocuments.SetValue("VBELN", ordernumber);
testfn.Invoke(dest);
DataTable headerTableDT = headerTable.ToDataTable("headerTableDT");
return headerTableDT;
}