Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BApi

Former Member
0 Kudos

Hello friends,

How does Bapi work. I mean whne I create a Sales order using a BAPI does it check for the data That I am passing. WOuld it look if The material exist, would it do for the combination of sales area, or do I need to check it explicitly.

Shejal.

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

BAPI usually will perform input data check.

You may not necessary to perform data validation prior to call the BAPI. If any input data error occured, the BAPI will raise an exception.

Also please add this BAPI BAPI_TRANSACTION_COMMIT at the end for commit work purposes.

Regards,

Ferry Lianto

6 REPLIES 6

ferry_lianto
Active Contributor
0 Kudos

Hi,

BAPI usually will perform input data check.

You may not necessary to perform data validation prior to call the BAPI. If any input data error occured, the BAPI will raise an exception.

Also please add this BAPI BAPI_TRANSACTION_COMMIT at the end for commit work purposes.

Regards,

Ferry Lianto

former_member191977
Contributor
0 Kudos

It does checks the validity of the material and the combination and so on. Only if the data you are passing to the BAPI exists in the system it creates the order. Otherwise throws a system message like the same when you populate the data to a transaction.

0 Kudos

Thanks Ferry and Vinni.

DOes anyone have some real time example using,

BAPI_PLANNEDORDER_CREATE.

Shejal.

ferry_lianto
Active Contributor
0 Kudos

Hi,

Sorry I don't have any sample codes.

But perhaps you can check module pool MDBAPI01 or transaction MDBA.

Also check this link perhaps it may help (not in English)

http://sap4.com/funcion-274.html

Regards,

Ferry Lianto

0 Kudos

Thanks Ferry,

The sample program helps. I am assuming that is all have to be done for creating a planned order.

However i have a text file and it comes to my Internal table in the program and I am assuming I have to pass the data of the internal table in to the export parameters of the FM.

Thanks again for the sample report..

Shejal.

0 Kudos

Sorry, I don't have one either but I can assist you if you need any help on it while you are coding.

yes, you are right. Hope everything goes smooth.