‎2014 Jun 05 6:18 AM
Hi guys,
I have a problem with calling a program(or transaction code).
I want to call a program with a variant by "CALL TRANSACTION" or "SUBMIT".
I checked that "SUBMIT" is possible by using "SELECTION-SET" but I can't use it because it doesn't allow calling a program with a variable which has the program name like below.
'SUBMIT gv_program SELECTION-SET gv_variant.'
Is there a solution for this?
Thanks.
‎2014 Jun 05 6:29 AM
Hi,
Shouldn't it simply be written: SUBMIT (gv_program) USING SELECTION-SET gv_variant. ?
cheers
Janis
‎2014 Jun 05 6:29 AM
Hi,
Shouldn't it simply be written: SUBMIT (gv_program) USING SELECTION-SET gv_variant. ?
cheers
Janis
‎2014 Jun 05 6:49 AM
‎2014 Jun 05 6:30 AM
Hi,
Have you tried
SUBMIT (g_pname) USING SELECTION-SET g_varnt .
Or you can pass values through this method also
SUBMIT Program
WITH p_field1 EQ value
WITH p_field2 EQ value
WITH p_field3 EQ value
AND RETURN.
Refer: ABAP Keyword Documentation
‎2014 Jun 05 6:52 AM
‎2014 Jun 05 6:40 AM
Hello Janghwan,
you can directly as shown below.
Program Name : zm_forecast
variant name : 'ZTEST'
submit zm_forecast USING SELECTION-SET 'ZTEST'.
‎2014 Jun 05 6:52 AM
I can't use the program name directly because the program name is not fixed.
Thanks.
‎2014 Jun 05 6:47 AM
Read the online documentation of SUBMIT statement or press F1. A SUBMIT (variablename) is allowed, also many solutions are provided to pass values from USING SELECTION-SET variant to explicit values for parameters WITH expr_syntax1 WITH expr_syntax2 ...
Regards,
Raymond
‎2014 Jun 05 6:50 AM
No, it is not possible to call a program/transaction using a variable in place of program name.
As SUBMIT statement executes a report. Can only execute reports of type '1'.And the ways that it could be used are :-
*Code used to execute a report
SUBMIT Zreport.
*Code used to populate 'select-options' & execute report
SUBMIT zreport with selection-table seltab
via selection-screen.
*Code used to populate 'parameters' & execute report
SUBMIT zreport with p_param1 = 'value'
with p_param2 = 'value'.
*Submit report and return to current program afterwards
SUBMIT zreport AND RETURN.
*Submit report via its own selection screen
SUBMIT zreport VIA SELECTION-SCREEN.
*Submit report using selection screen variant
SUBMIT zreport USING SELECTION-SET 'VARIANT1'.
*Submit report but export resultant list to memory, rather than
*it being displayed on screen
SUBMIT zreport EXPORTING LIST TO MEMORY.
And CALL TRANSACTION statement calls the transaction whose transaction code is contained in data object ta.
CALL TRANSACTION ta
{ [AND SKIP FIRST SCREEN] ---- suppresses the display of a screen of the initial dynpro
| [USING bdc_tab [bdc_options]] }. ----- enables the transaction to be executed using a batch input table. This requires an internal table bdc_tab of row type BDCDATA to be passed from ABAP Dictionary to a dialog transaction
Wish this helps you...
Regards,
Bishwajit