Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
Raj_Sinha
Participant
26,336
Introduction:

In this blog post, you will learn how to Find BAPI & Simulate BAPI. Like many of the time, we need to create or upload data in mass. And for that, we use LSMW or BDC to upload entries to system. But in some case, we need BAPI to upload data.

Simulated BAPI help`s technical person (ABAP) to code it in less time. And as Functional we must have an idea of how to find BAPI & simulate BAPI. For that, I have shared the easiest way how to work out along with the screenshot.

Overview:

First of all, you need to know which BAPI will full fill your requirement. In this blog post, I have simulated BAPI for Production Order Creation (CO01).

To find a BAPI use Tcode: BAPI (BAPI Explorer)



For Prod. Order Creation we have BAPI_PRODORD_CREATE

Now, to simulate BAPI you can double click on BAPI_PRODORD_CREATE and then press F8.

 

Or open Tcode: SE37 (Functional Builder: Initial Screen)

Copy the BAPI under Functional Module & Press function F8 or



After executing you`ll get the screen Test Functional Module: Initial Screen.

You can take the help of Documentation provided for BAPI by SAP. In some of cases, you won`t get documentation for BAPI due to non-availability of the document in language EN.

 



Note: Documentation helps you in simulating BAPI with correct and required data to input.

Under Import Parameter; Double Click on ORDERDATA.



Click on    Single Entry (Shift+F7).

Fill the below entries;

  • MATERIAL: (Material Code)

  • PLANT: (Plant)

  • ORDER_TYPE: (Order type)

  • BASIC_START_DATE: (Order Start Date)

  • BASIC_END_DATE: (Order End Date)

  • QUANTITY: (Order Quantity)

  • PROD_VERSION: (Production Version)




Note: Basic Start Date & Basic End Date is to be filled according to the scheduling type you are using.

i.e. if scheduling type is;

  • Backwards then fill only Basic_End_Date.

  • Forwards then fill only Basic_Start_Date.

  • Only Capacity requirement then fill both Start & End Date.

  • Current Date then leave date as blank


You can also use the other parameter like SCRAP_QUANTITY, ORDER_PRIORITY, etc.

After filling these entries come back to the main screen or press Function-F3(Back).



Now execute the BAPI you will get an Order Number under Export parameters.



In my test run, I got an ORDER_NUMBER: 1***401

If any of the ORDERDATA entries is wrong then the system will return error under RETURN Parameters.

As for the error message, I have made wrong entries in field PROD_VERSION. Below is the screenshot for the same.



RETURN: E61 567Version PV11 does not exist for material SFGPRFGRM101T in plant 1010.

After filling correct entries to BAPI execute it and save the test case for your technical person (ABAPER).

Also, you can cross-check the generated production order number in COOIS or CO03.

Click on Save & give a name to it !!
NOTE: "This BAPI performs Implicit Update task i.e. On the generation of ORDER_NUMBER under Export Parameter this BAPI update the entries into the database. Also, In some cases, we need to perform the update task explicitly. Will be sharing the same with some other BAPI".

-------------------------------------------------------------------------------------------------------------------------------------

Thanks for going through the detailed document. Do revert back if you have more queries or feedbacks/ inputs so that I can update the document.

For any help on BAPI`s & FM related to PP, QM & MM leave a comment.

Best Regards,

Raj Sinha.
10 Comments
Labels in this area