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

How to pass variable while using SUBMIT

Hi,

Can anyone tell me how to pass the parameter variables to other report program while using the 'submit' keyword?

I've modified some variables & want to pass them to the report I'm calling with 'submit' keyword.

Thanx in advance,

Hemant.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2005 at 11:14 AM

    use the following code...

    Say u have program p1 with parameters which needs to be passed to program p2.

    SUBMIT p2

    AND return

    with p2-<parameter1> = p1-<parameter1>

    with p2-<parameter2> = p1-<parameter1>.

    This will solve ur problem.

    Pl. award appropriate points.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 06, 2005 at 11:12 AM

    hi,

    sample:

      SUBMIT ZFBPET00 WITH BR_BUKRS IN BR_BUKRS
                      WITH BLART    IN BLART
                      WITH BR_GJAHR in s_gjahr
                      WITH EXTRAKT EQ 'X'
                      WITH DS_NAME EQ DS_NAME
                      WITH CPUDATUM IN DATUM
                      EXPORTING LIST TO MEMORY
                      AND RETURN.

    Andreas

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 06, 2005 at 11:13 AM

    1) using ranges addition

    2) using export and Import statements.

    YOu have to declare ranges in the current program and populate the data in them and pass them with the submit statement using the <b>With</b> addition.

    YOu have to declare the select-option which receive the values from the calling program with no-display addition.

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 06, 2005 at 11:13 AM

    Hemant

    U can use EXPORT/IMPORT ing of Data ie using ABAP Memory.

    EXPORT the variable in the Current program and IMPORT it inside the SUBMIT program.

    Thanks

    Kam

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 06, 2005 at 11:19 AM

    One more sample.

    Program accessed

    REPORT report1.

    DATA text(10) TYPE c.

    SELECTION-SCREEN BEGIN OF SCREEN 1100.

    SELECT-OPTIONS: selcrit1 FOR text,

    selcrit2 FOR text.

    SELECTION-SCREEN END OF SCREEN 1100.

    ...

    Calling program

    REPORT report2.

    DATA: text(10) TYPE c,

    rspar_tab TYPE TABLE OF rsparams,

    rspar_line LIKE LINE OF rspar_tab,

    range_tab LIKE RANGE OF text,

    range_line LIKE LINE OF range_tab.

    ...

    rspar_line-selname = 'SELCRIT1'.

    rspar_line-kind = 'S'.

    rspar_line-sign = 'I'.

    rspar_line-option = 'EQ'.

    rspar_line-low = 'ABAP'.

    APPEND rspar_line TO rspar_tab.

    range_line-sign = 'E'.

    range_line-option = 'EQ'.

    range_line-low = 'H'.

    APPEND range_line TO range_tab.

    range_line-sign = 'E'.

    range_line-option = 'EQ'.

    range_line-low = 'K'.

    APPEND range_line TO range_tab.

    SUBMIT report1 USING SELECTION-SCREEN '1100'

    WITH SELECTION-TABLE rspar_tab

    WITH selcrit2 BETWEEN 'H' AND 'K'

    WITH selcrit2 IN range_tab

    AND RETURN.

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2005 at 11:26 AM

    Hi,

    If there is any variant avilable for the report, you can use the following statement to submit the report,

    For ex,

    SUBMIT report(report_name)

    USING SELECTION-SET 'variant_name'

    wiTH s_werks = p_werks "Plant value

    AND RETURN.

    Hope this helps,

    Rgds,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 07, 2005 at 02:12 AM

    hi,

    First of all,make sure the report program that you are calling contain the passing variable, for example:

    FORM test TABLES itab

    USING variable1

    variable2.

    Then you may called you program using:

    PERFORM <i>FORMNAME</i> IN PROGRAM <i>PROGRAMNAME</i>

    TABLES itab

    USING variable1

    variable2.

    Hopes it helps you.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 07, 2005 at 02:16 AM

    Hi,

    Sorry, i oversee that you want to use 'SUBMIT'.

    Try to use this:

    SUBMIT ZFIXXXXR00_CUSTLINE

    WITH dd_kunnr IN s_kunnr

    WITH dd_kunnr = p_bukrs

    WITH pa_stida = s_datum-low

    WITH x_opsel = 'X'

    • WITH x_aisel = 'X'

    WITH x_shbv = v_indicator

    AND RETURN.

    First of all, the dd_kunnr, dd_kunnr, pa_stida, x_opsel, x_shbv are coming from the select option or the parameters from the program you are calling from.

    After that, you may use import statement in your program to retrieve the values from the program you are calling too.Do remember to use export statement inside the program you are calling from.

    Thanks.

    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.