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

Calling a BAPI from a report

Former Member
0 Likes
1,687

Hi experts,

I am in the process of calling a BAPI from a report.

I am doing this stuff for the first time. So getting some issues.

My BAPI (RFC enabled FM has the following details)

Import Parameters:

VIRT

BIG

WIN

SRVC

EXCEL

PATH

Tables Parameter:

OUT_SRVC

OUT_WIN

OUT_BIG

CUST_NAME

EQUI_NUM

SER_NUM

HOST

Then there is some coding in the source code of the FM. The logic basically is that I am giving input as cust_name only at present, and gettinf the related details as output in the out_srvc table.

Now when I am calling the BAPI in the report, I am not sure what parameters to give:

REPORT Z_BAPI_CALL .

data: lt_data type table of equi.

data: lt_customer_name type table of zasset_data_name_table.

CALL FUNCTION 'ZFM_DATA'

EXPORTING

virt =

big =

win =

srvc =

excel =

path =

  • IMPORTING

  • RETURN =

tables

out_srvc =

out_win =

out_big =

cust_name =

equi_num =

ser_num =

host =

Thanks,

Ajay.

1 ACCEPTED SOLUTION
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,257

Hi,

Just check the BAPI for the import parameters to know what are mandatory(in SE37).

That needs to be passed for sure.Other than that, you can pass whaetver data you have in the import parameters as specified for the BAPI.

3 REPLIES 3
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,258

Hi,

Just check the BAPI for the import parameters to know what are mandatory(in SE37).

That needs to be passed for sure.Other than that, you can pass whaetver data you have in the import parameters as specified for the BAPI.

Read only

Former Member
0 Likes
1,257

Try to execute the bapi in se37 transaction and check it...

if you face any problem regarding some test data..

in se37 do a where used list for that bapi and select any standard or custom program where the bapi is used and go there and refer to the variable declare and point to referning table and try to get some data...

Regards

Kumar

Read only

prasenjit_sharma
Active Contributor
0 Likes
1,257

Hi,

You need to pass the data to the BAPI as per the logic written in the BAPI. This is not a standard BAPI and we'd not know what you have written inside it. So you need to be specific about your requirement. Check in your BAPI what parameter means what and based on that pass the values.

Regards

Prasenjit