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 Standard program in Z report

Former Member
0 Likes
1,535

Hi,

Zreport is calling the MB5B Transaction program ( rm07mlbd ) using the submit statement.

Here i have to take the values of Total/Val. of Receipts & Total/Value of Issues and do the some extra calculation in ZREPORT.

But when i used the below statements, i am able to get the whole output of the MB5B transaction into internal table. But How to get the specified values only i.e. Total/Val. of Receipts & Total/Value of Issues.

SUBMIT rm07mlbd AND RETURN WITH SELECTION-TABLE seltab

EXPORTING LIST TO MEMORY.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = itab_list

EXCEPTIONS

not_found = 4

OTHERS = 8.

CALL FUNCTION 'LIST_TO_ASCI'

EXPORTING

list_index = -1

TABLES

listasci = vlist

listobject = itab_list

EXCEPTIONS

empty_list = 1

list_index_invalid = 2

OTHERS = 3.

CALL FUNCTION 'LIST_FREE_MEMORY'.

Thanks in Advance

Balu

Hi,

Zreport is calling the MB5B Transaction program ( rm07mlbd ) using the submit statement.

Here i have to take the values of Total/Val. of Receipts & Total/Value of Issues and do the some extra calculation in ZREPORT.

But when i used the below statements, i am able to get the whole output of the MB5B transaction into internal table. But How to get the specified values only i.e. Total/Val. of Receipts & Total/Value of Issues.

SUBMIT rm07mlbd AND RETURN WITH SELECTION-TABLE seltab

EXPORTING LIST TO MEMORY.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = itab_list

EXCEPTIONS

not_found = 4

OTHERS = 8.

CALL FUNCTION 'LIST_TO_ASCI'

EXPORTING

list_index = -1

TABLES

listasci = vlist

listobject = itab_list

EXCEPTIONS

empty_list = 1

list_index_invalid = 2

OTHERS = 3.

CALL FUNCTION 'LIST_FREE_MEMORY'.

Thanks in Advance

Balu

2 REPLIES 2
Read only

RaymondGiuseppi
Active Contributor
0 Likes
833

It would be hard to extract the result from the spool-type data received, did you try to find an exit, BAdI or Enhancement point in the standard report where you could export the relevant internal table

(e.g.. use an implicit enhancement point at start or end of form [LISTAUSGABE1|http://www.sdn.sap.com/irj/scn/advancedsearch?query=listausgabe1] in include [RM07MLBD_FORM_02|http://www.sdn.sap.com/irj/scn/advancedsearch?query=rm07mlbd_form_02] where you could export [G_T_BELEGE|http://www.sdn.sap.com/irj/scn/advancedsearch?query=g_t_belege], of course check first that you are called from an external report [sy-calld|http://help.sap.com/abapdocu_70/en/ABENSYSTEM_FIELDS.htm])

Regards,

Raymond

Read only

Former Member
0 Likes
833

You might want to try the following:

SUBMIT RM07MLBD VIA SELECTION-SCREEN USING SELECTION-SET 'SELECTIONSETRECEIPT' AND RETURN.

SUBMIT RM07MLBD VIA SELECTION-SCREEN USING SELECTION-SET 'SELECTIONSETISSUES' AND RETURN.

Regards,

Gaurav Brahmbhatt