2008 Aug 11 8:44 AM
Hi expertz...need your help up here.
Have a situation where we need to trigger another program(say zabc : PO History) when the user selects a line in the ALV list and then clicks a button (to call zabc), the new program should run in the background and open up or display the results in a New Session.
Have tried to use FM 'SUBMIT_REPORT' with STARTING NEW TASK but it dosnt work. Please see the call below.
CALL FUNCTION 'SUBMIT_REPORT' "STARTING NEW TASK 'TEST1'
EXPORTING
RDIR = TRDIR
report = 'ZPRPP_WORKORDERPURCHASING'
RET_VIA_LEAVE = ' '
VARIANT = ' '
VARIPROG = 'ZPRPP_WORKORDERPURCHASING'
SKIP_SELSCREEN = 'X'
EXPRESSIONS =
IMPORTING
VARIANT =
TABLES
SELECTION_TABLE = i_rspar
EXCEPTIONS
JUST_VIA_VARIANT = 1
NO_SUBMIT_AUTH = 2
OTHERS = 3
Any Idea!.
Thanks
Jaif
Hi expertz...need your help up here.
Have a situation where we need to trigger another program(say zabc : PO History) when the user selects a line in the ALV list and then clicks a button (to call zabc), the new program should run in the background and open up or display the results in a New Session.
Have tried to use FM 'SUBMIT_REPORT' with STARTING NEW TASK but it dosnt work. Please see the call below.
CALL FUNCTION 'SUBMIT_REPORT' "STARTING NEW TASK 'TEST1'
EXPORTING
RDIR = TRDIR
report = 'ZPRPP_WORKORDERPURCHASING'
RET_VIA_LEAVE = ' '
VARIANT = ' '
VARIPROG = 'ZPRPP_WORKORDERPURCHASING'
SKIP_SELSCREEN = 'X'
EXPRESSIONS =
IMPORTING
VARIANT =
TABLES
SELECTION_TABLE = i_rspar
EXCEPTIONS
JUST_VIA_VARIANT = 1
NO_SUBMIT_AUTH = 2
OTHERS = 3
Any Idea!.
Thanks
Jaif
2008 Aug 11 9:06 AM
Hello Jaif,
Did you check with 'wait 'for sometime before you call this FM?
Regards
Bindu
2008 Aug 11 10:05 AM
Hi Bindu ...
WAIT..!!!
I would appreciate a lill more explanation on this.
Thanks
Jaif.
2011 Jul 14 10:35 AM
If anyone wants to do this..
Just create a FM with Remote enable..If do not know how to create one ..refer the attributes of any BAPI and all import & export parameters must have "Pass Value" checked.
Use the FM as below..
call function 'ANY_RFC_FM'
STARTING NEW TASK 'TEST'
DESTINATION 'NONE'
EXPORTING
XXXXXXXX = XXXXXXX.
Reference: https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=23658609
2011 Jul 14 10:43 AM
Hi,
copy your function module SUBMIT_REPORT to ZSUBMIT_REPORT and make it remote enabled.
Now, where ever you want to call this FM, call as below,
CALL FUNCTION 'ZSUBMIT_REPORT' STARTING NEW TASK 'T'
EXPORTING
* RDIR = TRDIR
report = 'ZPRPP_WORKORDERPURCHASING'
RET_VIA_LEAVE = ' '
* VARIANT = ' '
VARIPROG = 'ZPRPP_WORKORDERPURCHASING'
SKIP_SELSCREEN = 'X'
* EXPRESSIONS =
* IMPORTING
* VARIANT =
TABLES
SELECTION_TABLE = i_rspar
EXCEPTIONS
JUST_VIA_VARIANT = 1
NO_SUBMIT_AUTH = 2
OTHERS = 3.Check it out, it works for me.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |