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

Call report in function module

Former Member
0 Likes
4,341

Hi All,

Please tell me how to call report in function module. i want input parameters of function module with same selection screen parameters of report. please tell to me .if possible provide the code.

Thanks,

Raju.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,993

Hi Kumar,

Incorporate the below logic in the FM that you have developed.

SUBMIT zreport WITH s_vbeln  IN t_saleorder_range
                            WITH p_file         EQ w_file
                            AND RETURN.

Note: Here, t_salerder_range is an internal table of type range. It has four fields just like selection-options...SIGN,OPTION, LOW and HIGH. Whatever the values that you pass here would be taken as the selection screen values for the report that you are calling.

Hope this is helpful

Thanks,

Babu Kilari

8 REPLIES 8
Read only

former_member556412
Active Participant
0 Likes
1,993

Hi,

Use SUBMIT to call a report in the Function Module.

Regards,

Bhanu

Read only

Former Member
0 Likes
1,993

Hi

You can try using Submit command, (not sure Check it )

Thanks

Read only

Former Member
0 Likes
1,993

hi,

you want to create z FM right?

If yes then create import parameters of same type as your report selection screen.

in source code tab of your FM write all your report code & pass ur import parameters name and not selection screen parameters.

Now in whatever internal table ur fetching data that table give into tables tab of FM.

better u decalre this int.table of any std table type. else u have to create zstructure in se11 and then use it as reference while passing in FM.

Try it,

it will work

Regards

Edited by: Vishal Chavan on Jun 24, 2009 7:19 AM

Read only

Former Member
0 Likes
1,993

Hi Kumar,

Incorporate the below logic in the FM that you have developed.

SUBMIT zreport WITH s_vbeln  IN t_saleorder_range
                            WITH p_file         EQ w_file
                            AND RETURN.

Note: Here, t_salerder_range is an internal table of type range. It has four fields just like selection-options...SIGN,OPTION, LOW and HIGH. Whatever the values that you pass here would be taken as the selection screen values for the report that you are calling.

Hope this is helpful

Thanks,

Babu Kilari

Read only

Former Member
0 Likes
1,993

Hi Kumar,

Incorporate the below logic in the FM that you have developed.

SUBMIT zreport WITH s_vbeln  IN t_saleorder_range
                            WITH p_file         EQ w_file
                            AND RETURN.

Note: Here, t_salerder_range is an internal table of type range. It has four fields just like selection-options...SIGN,OPTION, LOW and HIGH. Whatever the values that you pass here would be taken as the selection screen values for the report that you are calling.

Hope this is helpful

Thanks,

Babu Kilari

Read only

Former Member
0 Likes
1,995

Hi Kumar,

Incorporate the below logic in the FM that you have developed.

SUBMIT zreport WITH s_vbeln  IN t_saleorder_range
                            WITH p_file         EQ w_file
                            AND RETURN.

Note: Here, t_salerder_range is an internal table of type range. It has four fields just like selection-options...SIGN,OPTION, LOW and HIGH. Whatever the values that you pass here would be taken as the selection screen values for the report that you are calling.

Hope this is helpful

Thanks,

Babu Kilari

Read only

0 Likes
1,993

Thanks for your all replies.

Read only

Former Member
0 Likes
1,993

Hi Kumar,

Incorporate the below logic in the FM that you have developed.

SUBMIT zreport WITH s_vbeln  IN t_saleorder_range
                            WITH p_file         EQ w_file
                            AND RETURN.

Note: Here, t_salerder_range is an internal table of type range. It has four fields just like selection-options...SIGN,OPTION, LOW and HIGH. Whatever the values that you pass here would be taken as the selection screen values for the report that you are calling.

Hope this is helpful

Thanks,

Babu Kilari