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. Requires Free Membership to View
When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.
Hannah Smalltree, Editorial Directora) "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.
This was first published in July 2001