2013 Nov 27 7:39 AM
Hi all,
I have dialog Program (Module pool) and now i need to Execute a report program with button click (it may on another screen). Can someone help me to do this and explain how to do it.
When I click a button it should go for Selection screen and need to run the report . \
thanks
2013 Nov 27 7:43 AM
U can use CALL TRANSACTION or SUBMIT
SUBMIT < PROGRAM NAME > VAI SELECTION-SCREEN AND RETURN.
OR
CALL TRANSACTION '<TRANSACTION CODE OF REPORT PROGRAM>'
2013 Nov 27 7:43 AM
U can use CALL TRANSACTION or SUBMIT
SUBMIT < PROGRAM NAME > VAI SELECTION-SCREEN AND RETURN.
OR
CALL TRANSACTION '<TRANSACTION CODE OF REPORT PROGRAM>'
2013 Nov 27 7:46 AM
2013 Nov 27 7:48 AM
Use the 'Submit Program' command in the module pool user-command.
SUBMIT {rep|(name)} [selscreen_options]
[list_options]
[job_options]
[AND RETURN].
If the program needs to return to the module pool after 'Back' action of the report , use the 'And return' addition in the syntax.
If the program needs to stop at the selection screen ,use the 'VIA SELECTION-SCREEN' addition,otherwise pass the details that the selection screen needs using the option 'WITH SELECTION-TABLE'.
Check the syntax for 'Submit' keyword
2013 Nov 27 8:14 AM
2013 Nov 27 9:16 AM
Hi Anuradha,
In User Command PAI module of your dialog screen:
CASE ok_code.
WHEN 'REPORT'.
CALL TRANSACTION 'ZRNREP'.
ENDCASE.
That's the easiest way.
Regards,
Vladimir
2013 Nov 27 9:37 AM
Simple try like this
REPORT yram_52.
CALL SCREEN 9000.
*&---------------------------------------------------------------------*
*& Module STATUS_9000 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_9000 OUTPUT.
SET PF-STATUS 'PF_9000'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_9000 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_9000 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_9000 INPUT.
CASE sy-ucomm.
when 'REPORT'.
CALL TRANSACTION 'MB5B'.
When 'EXIT'.
Leave TO SCREEN 0.
endcase.
ENDMODULE. " USER_COMMAND_9000 INPUT
Output
2013 Nov 27 10:03 AM
HI Anuradha,
First create a button in the screen and also assign the FCODE in the screen layout . then in the PAI event of the screen , check for the ok_code is equal to FCODE.
IF FCODE EQ ok_code.
SUBMIT reportname AND RETURN.
endif.
On clicking the button , the report program gets called and on clicking back if comes to the current program.
Regards,
Sivaganesh
2013 Nov 27 10:19 AM
Dear Siva,
Very thanks for ur reply.
is that reportname is the program name. ( Ex : zstock (this a stock report of ours) ) ??????
2013 Nov 27 10:26 AM
yes Anuradha Wijesinghe.
If you want to stop at selection screen then write VIA SELECTION SCREEN with the submit statement.