By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
I'm a beginner in using BAPI's... The first BAPI I used is the "BapiCreateFromDat1" and it's now running. Now, I am using the "BapiGetOpenItems" but I always prompted for error. The error is... "Company code does not exist". This is how I implemented the Bapi: <% Set OpenI = Server.CreateObject("SMB.ARAccount.1") call OpenI.DimAs("BapiGetOpenItems", "KEYDATE", Key_date) call OpenI.DimAs("BapiGetOpenItems", "LineItems", OpenILineItems) call OpenI.DimAs("BapiGetOpenItems", "Return", BapiReturn) Key_date = "09/25/2000" OpenILineItems.Addnew OpenILineItems.Fields("Comp_Code") = "0010" OpenILineItems.Fields("CUSTOMER") = "0000100429" OpenILineItems.Update OpenI.Destination = "BEER" %> <% on Error Resume Next call OpenI.BapiGetOpenItems( Key_date, OpenILineItems, , BapiReturn) %> Are my codes correct? Please help me.
a) "Keydate" is not a structure or table parameter so it makes no sense to call DimAs for this parameter. b) There is no reason to fill the "Lineitems" table parameter, it is filled by the BAPI. c) You need to set the "CompanyCode" and "Customer" key fields by using the InitKeys method of the proxy class.
Dig Deeper on SAP ABAP
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.