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 Function Module

Former Member
0 Kudos

Hi guys,

I got a BAPI(RFC ENABLED) which will create PO after creating asset number.Please tell me how to run a bapi(RFC enabled function module)?

1 REPLY 1

Former Member
0 Kudos

Hi Reema,

You can call BAPI FM like Normal FM. But after calling BAPI you have to explicit give commit statement.

Refer to following sample code.

CALL FUNCTION 'BAPI_EQUI_CREATE'.

EXPORTING

EXTERNAL_NUMBER = L_EQUIPMENT

DATA_GENERAL = L_DATA_GENERAL

DATA_SPECIFIC = L_DATA_SPECIFIC

IMPORTING

EQUIPMENT = L_EQUIPMENT

DATA_GENERAL_EXP = L_DATA_GENERAL

DATA_SPECIFIC_EXP = L_DATA_SPECIFIC

RETURN = L_RETURN_CREATE.

IF L_RETURN_CREATE-TYPE ='S'.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' destination w_rfcdest.

ENDIF.

Dont forget to award point.

Regards,

Mukesh