Application Development and Automation 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: 
Read only

Query on BAPI

Former Member
0 Likes
574

hi friends

Here is my query on BAPI.

I want to call a BAPI from an ABAP Program,plz help me on this.

thanks

mrutyun^

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
525

just call it like any other function module, eg:

DATA: user TYPE bapibname-bapibname,

address TYPE bapiaddr3.

user = tusr02-bname.

CALL FUNCTION 'BAPI_USER_GET_DETAIL'

EXPORTING

username = user

IMPORTING

address = address

TABLES

return = return

.

and specify the RFC destination,if you call into another system. You can find this out via transaction SM59 in the caller system. If you don't find the destination you have to configure it.

call function 'BAPI_USER_GET_DETAIL' destination 'NONE'

3 REPLIES 3
Read only

Former Member
0 Likes
525

Hi,

In ABAP programs BAPI's are called as general FM's...

find the BAPI use pattern to copy the FM interface into your program and go ahead

santhosh

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
525

Hi,

As suggested,use pattern function to ccall the bapi.

Pass the parameters as you pass for normal function module.

Read only

Former Member
0 Likes
526

just call it like any other function module, eg:

DATA: user TYPE bapibname-bapibname,

address TYPE bapiaddr3.

user = tusr02-bname.

CALL FUNCTION 'BAPI_USER_GET_DETAIL'

EXPORTING

username = user

IMPORTING

address = address

TABLES

return = return

.

and specify the RFC destination,if you call into another system. You can find this out via transaction SM59 in the caller system. If you don't find the destination you have to configure it.

call function 'BAPI_USER_GET_DETAIL' destination 'NONE'