Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs

Community Topics Groups Answers Blogs Events Programs Resources What's New Explore SAP

Ask a Question Write a Blog Post

Technical Articles

Raj Sinha
July 29, 2019 | 3 minute read

BAPI Simulation & Finding BAPI


 9  12  12,236

Follow 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.
 Like 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 &
 RSS Feed 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).
https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 1/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs

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

https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 2/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs

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.

https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 3/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs

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)

https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 4/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs

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).

https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 5/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs

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.

https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 6/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs

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.

Assigned Tags
https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 7/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs
Assigned Tags
Alert Moderator
MAN Production Planning (PP) | ABAP Testing and Analysis | MAN (Manufacturing) | SAP S/4HANA | bapi | BAPI SIMULATION | FINDING BAPI

View more... 

Similar Blog Posts 


Some Problems Caused by Buffer When Executing PP-SFC BAPIs SAP Query gets Dump after new query or change, import a query & also
By Jessica Li Aug 03, 2016 occurs every time a release is upgraded.
By Raj Sinha Dec 02, 2019

MRP Live Vs classic (As per SAP note 2640393)


By Narasimha Prasad Bhat Nov 27, 2022

Related Questions 
BAPI_MATERIAL_PLANNING extensionout question user exit
By Former Member Jun 17, 2013 By Former Member Jun 03, 2008

BAPI for HU creation and proposal packing as in MFP21 or COP21


By Krzysztof Petecki Jul 06, 2011

9 Comments

https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 8/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs

Sandra Rossi
July 29, 2019 at 11:51 am

I'm not sure what you mean by using the words Simulate and Test, but it may mislead people who could think it means that the database tables won't be
updated.

If those BAPIs do the updates only via an update task, then yes the updates will not be performed (except things like number ranges) because they are only
triggered if BAPI_TRANSACTION_COMMIT is executed after executing the BAPI. It could be useful then to explain how to create a "call sequence" in SE37 (or
to link to existing articles).

But if those BAPIs do the updates without an update task, then the updates are definitely committed to the database (the BAPI you are testing is an example).

Another thing is that some released "BAPI" function modules are not shown in the transaction BAPI because the concept of BAPI is larger than just the
function modules, they can be related to a business object type (transaction code SWO1).

Like 2 | Reply | Alert Moderator | Share

Michelle Crapo
July 29, 2019 at 12:13 pm

Totally agree with you.  Call sequence - this is a nice WIKI.

So much other fun things you have to know about them too.  Wrapping code around the BAPI can be a nice option or a needed option for an RFC.

Like 2 | Reply | Alert Moderator | Share

Raj Sinha | Blog Post Author


July 29, 2019 at 2:37 pm

Hello Sandra,

https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 9/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs

My purpose for sharing this blog was to share how the BAPI gets simulated so I mentioned the word Simulation.

And I do know some of the BAPI's commit the data into respective tables.

Thanks for your mentioning about the implicit update functionality of the BAPI. I'll update my document with a Note in it with the same.

Best Regards,

Raj Sinha

Like 1 | Reply | Alert Moderator | Share

Michelle Crapo
July 29, 2019 at 12:09 pm

Nice addition.  Step by step is always appreciated.

I also look for BAPIs - by going to SE80, function module BAPI*ORDER* or something similar.  Another great search is look at your SAP package on your
original program.   Then display that package and look at the BAPIs.  (Also you can find function modules, that sometimes you can use.)

Ask 10 different developers, and you'll get 10 different answers.  My point is for the search - if I don't find it one way I look for it a different way.

BTW - most developers can find the BAPI/Function module.  Usually you don't have to specify it. 

Like 1 | Reply | Alert Moderator | Share

Raj Sinha | Blog Post Author


July 29, 2019 at 2:47 pm
https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 10/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs

Hello Michelle,

I was actually preparing a few documents for my own reference and thought of sharing one of them with as many details as possible.

Please notify if any additions/ changes necessary.

It’s a privilege to have advice/feedback from experts like you. ?

Best Regards,

Raj Sinha

Like 0 | Reply | Alert Moderator | Share

Michelle Crapo
July 29, 2019 at 3:08 pm

None needed for your documentation or the Blog.   BTW - sharing your documentation is an excellent reason to blog.  I just did a search, and
there is a lot out there.  Trying to get everything in one place is hard.  This will be nice for people who haven't found the BAPI transaction - and
the how to is so nice when you are learning.

Just letting you know sometimes it's just easier for me to find a BAPI in a different way.  I'll add mine and perhaps many others will as well. 
Sometimes the comments are an excellent way for people to learn.  And trying to do a "quick" google search - I decided just to make my own
screen shots.

The link for working with packages is in the above link I added.  I had completely forgotten about that.

So if I wanted to find a BAPI for updating purchase records - one of the ways:

The quickest I use and then with the PO Detail I'll decide to put more into it to search:

https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 11/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs

SE80->function module

Look at the program package:  (Before this technical detail - program)

So I have the package ME, I open it in SE80, and search for BAPI - that's one way to do it.
https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 12/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs

Like 1 | Reply | Alert Moderator | Share

Raj Sinha | Blog Post Author


July 29, 2019 at 3:58 pm

https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 13/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs

Thanks, Michelle Crapo for sharing the valuable information to this post.

Best Regards

Raj Sinha

Like 0 | Reply | Alert Moderator | Share

Prabhat Tiwari
July 31, 2019 at 7:00 am

Thanks,

Raj Sinha for sharing your precious information.

Regards,

Prabhat Tiwari

Like 1 | Reply | Alert Moderator | Share

Raj Sinha | Blog Post Author


July 31, 2019 at 7:19 am

Really Appreciated.

Best Regards,

Raj Sinha

https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 14/15
2/3/23, 11:12 BAPI Simulation & Finding BAPI | SAP Blogs
Like 0 | Reply | Alert Moderator | Share

Add Comment

Find us on

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Preferencias de cookies

Newsletter Support

https://blogs.sap.com/2019/07/29/bapi-simulation-finding-bapi/ 15/15

You might also like