How to Use FM – Inputs for BAPI_PROCORD_CREATE / BAPI_PRODORD_CREATE / BAPI_TRANSACTION_COMMIT

Introduction

As a Functional consultants we may struggle to know how to use Function Modules.

This Blog may help you to know, how to use the Function Modules

Main Part

Go to SE37 Transaction

Then give any function module in the field.

Then click execute

In the next screen click values button

Now give the input values

MATERIAL = MATNR for which you need to create the order as like in CO01/ CR01 screen
PLANT = WERKS in which you are creating the order as like in CO01/ CR01 screen
ORDER_TYPE = AUART - Order type as like in CO01/ CR01 screen
QUANTITY = MENGE - Quantity for which the order need to be created
PROD_VERSION = VERDIS - Production version

If you need to display the field names click on column to get it.

Now go back and click execute

Now the output will show the success message. Production order will be created

If you want to save the input values, click save and give some name to save it. So that you can use it on next time.

Saved input data can be fetched from test data directory.

Some times the data will not be saved after the execution. So we need to use BAPI_TRANSACTION_COMMIT to save the data.

You can do it as like below

In se37 screen go to Function Module > Execute > Test Sequence

Then put the two function modules in sequence and click execute.

Now the two FM will execute one by one. Now choose the test data directory to choose the input values automatically.

Click execute. It will complete the first FM and move on to next FM

Here Maintain X in Wait and click execute. Here after the data will be saved. This is the way to check the Function modules. Also you can use BAPI transaction to get the details about each Function module.

Conclusion

I hope this may help a much

Would like you guys to see more relevant things using the link:

https://blogs.sap.com/tags/9aaa6d7b-e017-4ddc-805d-9bbd02a6c46d/),

We would very much appreciate your comments and suggestions below.