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: 

Funtion module/BAPI

Former Member
0 Kudos

Hi,

what is the difference between a Function module and BAPI.

Best Reg,

U.khan

5 REPLIES 5

nishanthbhandar
Contributor
0 Kudos

Check these links.

<i>Reward helpful answers</i>

Cheers

Nishanth

Former Member
0 Kudos

Hai

The steps to be followed are :

1. Find out the relevant BAPI (BAPI_SALESORDER_CHANGE for VA02).

[for VA01 use BAPI_SALESORDER_CREATEFROMDAT2]

2. Create a Z program and call the BAPi (same as a Funtion module call).

2. Now, if you see this BAPi, it has

-> Importing structures.

eg: SALESDOCUMENT: this will take the Sales order header data as input.

-> Tables parameters:

eg: ORDER_ITEM_IN: this will take the line item data as input.

Note :

Only specify fields that should be changed

Select these fields by entering an X in the checkboxes

Enter a U in the UPDATEFLAG field

Always specify key fields when changing the data, including in the checkboxes

The configuration is an exception here. If this needs to be changed, you need to complete it again fully.

Maintain quantities and dates in the schedule line data

Possible UPDATEFLAGS:

U = change

D = delete

I = add

Example

1. Delete the whole order

2. Delete order items

3. Change the order

4. Change the configuration

Notes

1. Minimum entry:

You must enter the order number in the SALESDOCUMENT structure.

You must always enter key fields for changes.

You must always specify the update indicator in the ORDER_HEADER_INX.

2. Commit control:

The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.

For further details... refer to the Function Module documentation for the BAPi.

BAPI's have no Exception parameters

while F.Module having Exceptions.

Thanks & regards

Sreeni

Former Member
0 Kudos

Hi ubedulla,

1. BAPI is also a FM,

but

a) Its RFC Enabled

b) Its registered in BOR.

c) BAPI FM usually start with BAPI_*

Thats all.

2. For practical purpose, it does not make

much difference.

regards,

amit m.

0 Kudos

Hi Amit,

Function modules are saved in Central Library.

you said BAPI's are savEd in BOR.

(Business Object Repository)

do you mean BOR and central libraty are different or what.

Regards.

u.khan

0 Kudos

Hi again,

1. Function modules are saved in Central Library.

Thats true ! Thats why

we can accesss function modules globally

from anywhere in any program.

2. But when we save that BAPI is stored in BOR

it means that

a) Like OO Concepts, Objects having

methods and properties,

the OBJECT is REGISTERED

under BOR

(as usual, it is saved in central library,

but the focas point is

the OBJECT is registed)

b) This object will have many methods,

which are implemented thru

Function module interfaces,

and such FM are nothing but

called as BAPI !

regards,

amit m.