Skip to Content
author's profile photo Former Member
Former Member

CALL TRANSACTION or SUBMIT

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Jun 05, 2014 at 05:29 AM

    Hi,

    Shouldn't it simply be written: SUBMIT (gv_program) USING SELECTION-SET gv_variant. ?


    cheers

    Janis

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 05, 2014 at 05: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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 05, 2014 at 05: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 05, 2014 at 05: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 05, 2014 at 05:40 AM

    Hello Janghwan,

    you can directly as shown below.

    Program Name : zm_forecast

    variant name : 'ZTEST'

    submit zm_forecast USING SELECTION-SET 'ZTEST'.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.