Home > Ask the SAP software/management Experts > Questions & Answers > Calling BAPIs through JCo
Ask The SAP Expert: Questions & Answers
EMAIL THIS

Calling BAPIs through JCo

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: 05 October 2001

I am working on a java application which need to connect to SAP R/3. Through my java code I am trying to call BAPI functions. We are using JCO 1.1. While creating a salesorder I use BAPI_SALESORDER_CREATEFROMDAT1. I have set all the necessary input parameters like header, items and partner role. Before and after executing the function I am taking an HTML dump. In that HTML after execution it gives me an error in the return parameter(BAPIRETURN) "No customer master record exists for sold-to party" and since the function is not executed properly as usual it is not giving me a salesdocument number, since the order is not properly created. In the case above my document type was "ZOR1" . Then I tried creating another order (through java) using document type "TA" which is the german version for "OR". This time I didn't get any error and document number was also generated, but it was unable to set the sold-to-party and ship-to-party informations. The number generated for the document was also not similar to those for successfully created orders. But with the same input I could create a salesorder from SE37 function module (which also successfully sets the sold-to-party and ship-to-party info).
Please enlighten me with the solution for the problems I am facing. As In case of "OR" I have used "TA". What are the other mappings for other document types like ZOR1, ZSH1, etc. Where do I get all these mappings? Also please tell me why the same parameters which successfully created an order in se37 are unable to create the same through BAPI call from java application. What changes need to be done? Can you elaborate on the German - English issue while passing the input parameters?


>

The BAPIs usually use the internal format (e.g., German codes, leading zeroes) for all fields. SE37 calls the GUI conversion exits, whereas the BAPIs themselves do not (see my article in www.sappro.com). My company offers a component (ARAsoft Java BAPI ObjectFactory) that helps with the necessary conversions (send email for trial version). Otherwise you have to study the conversion BAPIs and use them in your client code. Check the dictionary definitions for all fields you are using to see whether they have associated conversion exits.


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



SAP White Paper Topics
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, 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