Skip to Content
avatar image
Former Member

by using submit can i pass parameter value to another program?

hi to all,

i am shabeer abap fresher , i hava scenario in that is like this.

prog1:

parameters: path type string ,

r1 radiobutton group rd,

r2 radiobutton group rd.

if r1 eq 'x'.

submit <zxxxxxxx> and return.

endif.

can i pass that path value to zxxxxxxxxxx. is it possible if not i must get that in zxxxxxxxx send some exaples.

bye

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • avatar image
    Former Member
    May 05, 2008 at 12:41 PM

    hi,

    Yes you can do that ...

    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/submit.htm

    Regards,

    Santosh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 05, 2008 at 12:43 PM

    HI,

    u can pass the parameters value along with the submit statement.

    refer to this link for example code

    http://www.sapdevelopment.co.uk/reporting/rep_submit.htm

    rgds,

    bharat.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 05, 2008 at 12:45 PM

    Hi Shaik,

    Yes you can do that.

    please check the sample code to achieve this:

    Lets say u have the following parameters on your selection screen of the report:

    1. s_aufnr (order)

    2. s_werks (plant)

    3. p_matnr (material)

    SUBMIT X

    WITH s_aufnr IN s_aufnr

    WITH s_werks IN s_werks

    WITH p_matnr EQ p_matnr

    AND RETURN.

    Complete details about the submit.

    Syntax

    SUBMIT {rep|(name)} selscreen_options

    list_options

    job_options

    AND RETURN.

    Addition:

    ... AND RETURN

    Effect

    The SUBMIT statement accesses an executable program rep. The executable program is executed as described under Calling Executable Reports.

    The program name rep can either be specified directly or as the content of a character-like data object name. The data object name must contain the name of the program to be accessed in block capitals. If the program specified in name is not found, an irretrievable exception is generated.

    The selscreen_options additions can be used to determine the selection screen for the program accessed and to supply it with values.

    The list_options additions allow you to influence the output medium and the page size in the basic list for the program accessed.

    SUBMIT - selscreen_options

    Syntax

    ... USING SELECTION-SCREEN dynnr

    VIA SELECTION-SCREEN

    selscreen_parameters ... .

    Extras:

    1. ... USING SELECTION-SCREEN dynnr

    2. ... VIA SELECTION-SCREEN

    Effect

    The addition USING SELECTION-SCREEN specifies the selection screen, VIA SELECTION-SCREEN specifies whether it is displayed. The additions selscreen_parameters provide values for the parameters, selection criteria, and the free selection of the called selection screen.

    The values are transferred to the selection screen between the events INITIALIZATION and AT SELECTION-SCREEN OUTPUT The following hierarchy applies for transferring values:

    First, the variant of the addition USING SELECTION-SET is transferred, which sets all parameters and selection criteria to the values of the variant. The values previously set in the called program are overwritten.

    The values of the table of the addition WITH SELECTION-TABLE are then transferred. All parameters and selection criteria specified there are overwritten accordingly.

    Finally, the values of the additions WITH sel value are transferred. All parameters and selection criteria are overwritten accordingly. If the addition WITH sel value is used more than once for the same parameter, this is overwritten with the last specified value. If the addition WITH sel value is used more than once for the same selection criterion, a selection table with the corresponding number of lines is transferred.

    Providing values for free selections is independent of this hierarchy.

    OR

    you can achieve this by following code:

    u can use EXPORT and IMPORT statement for transferring Values from one program to another

    Calling Program:

    EXPORT matnr field1 field2 field3 to MEMORY ID 'MEM1'.

    Called Program:

    IMPORT matnr field1 field2 field3 FROM MEMORY ID 'MEM1'.

    Regards,

    Sunil.

    Add comment
    10|10000 characters needed characters exceeded

  • May 05, 2008 at 12:48 PM

    In Calling program..

    REPORT  ZAK_SUBMIT                                 .
    
    data: rspar type table of rsparams with header line.
    
    rspar-selname = 'P_NAME'.
    rspar-kind = 'P'.
    rspar-low = 'Hello'.
    append rspar.
    
    submit zak_submitted via selection-screen with selection-table rspar and return.

    In the called program..

    report zak_submitted.
    
    parameters: name(10), salary type i.
    
    end-of-selection.
    
    write:/ name, salary.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 05, 2008 at 12:54 PM

    hi,

    in program <zxxxxxxx> define

    parameter : zpath type string .

    and in prog1,

    SUBMIT <zxxxxxxx> USING SELECTION-SCREEN '1000'

    WITH zpath = path .

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2013 at 11:22 AM

    Hi Ahmed,

    SUBMIT<zxxxxxxx> WITH path EQ path AND RETURN.

    This will work.

    Regards,

    Raju K. Rao

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2013 at 11:34 AM

    Hi,

    Yes u can pass the path Variable.

    submit ZXXXX

              with path = ' XYZ '

    And ZXXXX should also contain a selection-screen parameter called path with same datatype/data element.

    reward if helpful.

    Add comment
    10|10000 characters needed characters exceeded