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

can we call a report using a standard function module

Former Member
4,859

Hi,

Can any body suggest me , Is there any STANDARD function module which calls a report(may be a standard report)  and get the

output of the report in Function module itself , as i am working on a third party system the FM should be RFC enabled.

waiting for your valuable suggestions.

Regards

sam

1 ACCEPTED SOLUTION
Read only

Former Member
2,605

Thanks for all your helpful answers.

i am using the standard function module  INST_EXECUTE_REPORT

Regards

SAM

9 REPLIES 9
Read only

Former Member
0 Likes
2,605

Hi,

You can refer to the below link :

http://scn.sap.com/thread/996766

or you can also try the below:

SUBMIT... AND RETURN

           EXPORTING LIST TO MEMORY.

Hope it serves useful to you.

Read only

Former Member
0 Likes
2,605

Hi,

Inside the FM

You write call Transaction  report name

or

Use statement SUBMIT report_name AND RETURN.

Karthik.R

Read only

former_member209818
Active Contributor
0 Likes
2,605

Hi Sam,

I dont think we have any such FM... and even if it's there, I m sure, it will not gather the output details and send those as a export from FM.

For your need, you will actually need to develop a Custom FM and put your report's Logic inside the same. Even submitting the Report inside FM will not serve your purpose..

- Harshad

Read only

Former Member
0 Likes
2,605

Hi.

Try this FM.

1.SUBST_START_REPORT_IN_BATCH

For execute the report in background.

2.RFC_READ_TABLE

For get query of table TBTCP
3.BAPI_XBP_JOB_SPOOLLIST_READ

For get the list(Return)

Regards.

Read only

Former Member
0 Likes
2,605

Hi,

Please try this below RFC FM

CC_CALL_TRANSACTION_NEW_TASK

Import

Provide Transaction - SE38

Tables Parameter

PARAMTAB-PARAMID - RID.

  PARAMTAB-PARTEXT - Your Report Name (ZXX)

Regards,

Shankar Darbha

Read only

Former Member
0 Likes
2,605

as far as i can understand your problem. u want to fetch data from some standard report and then display that data in ur zreport.

if my guess is true.

then here is your answer.

as such there is no standard FM exits ,(( let me know if u came to know any )).

u need to create enhancement point or source code enhancement in that standard report.

first insert SUBMIT statement in UR Program.

Example:

like this i have created in MB5B standard report.

Enhancement implmentation zenhance_mb5b.

Free memory id 'ABC'.

Export i_tab to memory id 'ABC'.

end enhancement.

and then import same data table to ur data table.

SUBMIT RM07MLBD WITH SELECTION-TABLE SEL_TABAND  RETURN

    EXPORTING LIST TO MEMORY.

*G_T_TOTALS_FLAT is an internal output table

IMPORT G_T_TOTALS_FLAT FROM MEMORY ID 'ABC'.

finally G_T_TOTALS_FLAT this internal table will container all data fetched from mb5b.

Revert back if u feel any confusion.

Read only

Former Member
2,606

Thanks for all your helpful answers.

i am using the standard function module  INST_EXECUTE_REPORT

Regards

SAM

Read only

2,605

I am trying to execute a program RKAEP000 with P_TCODE = KSB1.

I am not able to pass the range KOSTL-LOW and KOSTL-HIGH in params.

But If the value is assigned to KOSTL than it works but this is a single value.

I can pass multiple KOSTL param and assign unique values but I need to pass a range so it possible or am I doing wrong?

Read only

2,605

I think there is no standard FM , you have to create a custom FM and assign it to the report.