Home > Ask the SAP Experts > Questions & Answers > "BapiGetOpenItems" Error
Ask The SAP Expert: Questions & Answers
EMAIL THIS

"BapiGetOpenItems" Error

Thomas  Schuessler EXPERT RESPONSE FROM: Thomas Schuessler

Pose a Question
Other SAP Categories
Meet all SAP Experts
Become an Expert for this site
>
QUESTION POSED ON: 18 July 2001
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. 

>
EXPERT RESPONSE

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. 


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

HomeNewsTopicsBlogsTipsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
SearchSAP.com is a search service provided by TechTarget and is completely
independent of and not affiliated with SAP AG.
  TechTarget - The IT Media ROI Experts