Error while posting a sales order in SAP from .net application

SAP HANASAPSAP Basis

Note that sold to party and ship to party are mandate fields. You need to add the created structures and tables to the function as shown in below code:

RfcRepository repo = destination.Repository;
IRfcFunction salesDoc = repo.CreateFunction("BAPI_SALESORDER_CREATEFROMDAT1");
IRfcStructure salesHeader = salesDoc.GetStructure("ORDER_HEADER_IN");
salesHeader.SetValue("DOC_TYPE", "ZDLR");
salesDoc.SetStructure(salesHeader);
salesDoc.Invoke(destination);

For more details you can check BAPI_SALESORDER_CREATEFROMDAT1 or below link:

BAPI_SALESORDER_CREATEFROMDAT1


raja
Published on 07-Dec-2017 02:49:06
Advertisements