09-14-2008 1:09 AM
Hello friends,
I have 2 questions.
Basically I have screen with many push buttons on it.
I am able to capture the place where it will trigger after the button is hit.
My 1st question is,
when the push button is hit, I need to call SM30, put the table name and hit the maintain button on it.
2nd Question,
When the push button is hit I have to call a Z report, fill in the selection screen with the file name and then execute.
Please suggest.
Thanks,
Ster..
09-14-2008 4:17 AM
> when the push button is hit, I need to call SM30, put the table name and hit the maintain button on it.
In the user_command handling if it is report porgram then you can use the event at user-commnad
at user-command.
when 'BUTTON1'.
CALL TRANSCACTION 'SM30'.
> When the push button is hit I have to call a Z report, fill in the selection screen with the file name and then execute.
when 'BUTTON2'.
SUBMIT ZREPORT.
09-14-2008 4:06 AM
in case of first push button use call transaction and in case of second pushbutton use submit program
09-14-2008 4:17 AM
> when the push button is hit, I need to call SM30, put the table name and hit the maintain button on it.
In the user_command handling if it is report porgram then you can use the event at user-commnad
at user-command.
when 'BUTTON1'.
CALL TRANSCACTION 'SM30'.
> When the push button is hit I have to call a Z report, fill in the selection screen with the file name and then execute.
when 'BUTTON2'.
SUBMIT ZREPORT.
09-14-2008 3:05 PM
Thanks all for the suggestions.
I have tried this approach for 1 and 2 as suggested.
For question when I call Sm30 I need to hit the maintain button and go to the second screen.
In the second case I have a file path on the selection screen, I need to pass this file path to the report.
Any suggestions,
Ster
09-14-2008 3:26 PM
If you want to hit the button manually then you can do this...
Then you can call this function VIEW_MAINTENANCE_CALL , instead of call transaction.
call function 'VIEW_MAINTENANCE_CALL'
exporting
action = 'U' "it will directly open in maintenance mode
view_name = p_view
exceptions
client_reference = 1
foreign_lock = 2
invalid_action = 3
no_clientindependent_auth = 4
no_database_function = 5
no_editor_function = 6
no_show_auth = 7
no_tvdir_entry = 8
no_upd_auth = 9
only_show_allowed = 10
system_failure = 11
unknown_field_in_dba_sellist = 12
view_not_found = 13
others = 14.
if sy-subrc ne 0.
endif.
and second case
you need to use the addition WITH along with submit.
SUBMIT ZREPORT
WITH P_FILE EQ V_FILE and RETURN. "Assuming the you have some parameter named P_FILE
"pass the v_file which is of same type, and populate the file name to it.