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

passing the values from one pgm to another pgm (Calling pgm has no sel scr)

Hi gurus,

In my requirement i need to pass the values from one program to another program.

I am using SUBMIT statement . But , the program which i am calling has no selection screen.

So how can i pass the values?

Please help me ASAP.

Regards,

Bhanu.R

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

11 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2009 at 12:03 PM

    HI,

    When calling program doesn't have the selection sceen field. Then what is requirement to pass the values to the calling program.

    Please be more clear about the requirement.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2009 at 12:04 PM

    Hi,

    Declare ranges in the second program and use them.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 20, 2009 at 12:04 PM

    Hi

    you can export the value to a memory id before submit to program and retreive the values there

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2009 at 12:04 PM

    Hi,

    Try like this,

    SUBMIT zrptpsh10 AND RETURN

    WITH pnpbegda EQ wa_2001-begda

    WITH pnpendda EQ wa_2001-endda

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2009 at 12:05 PM

    Hi Bhanupani,

    I am not sure what exact data you require in the called program.

    You can try with IMPORT / EXPORT funda. But you have to modify both the programs to work properly.

    Regards,

    Anil Salekar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2009 at 12:05 PM

    Hi ,

    Actually we need to pass the values from our main pgm to the calling pgm.

    Regards,

    Bhanu.R

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 20, 2009 at 12:05 PM

    Bhanu,

    If you are trying to get the data of an internal table in program1 to program2 then in program1 you can use Export itab1 to memory and then in the program2 import itab1 from memory.You can get tons of threads on this if you search in SDN.Both the programs should be having the internal table of the same structure declared.

    K.Kiran.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2009 at 12:08 PM

    Hi,

    Just define parameters in calling prog with same type of called prog. and pass the parameter by using the following stat

    SUBMITH <PRO>

    WITH va1 = va2,

    va3 = va4

    ANS RETURN.

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2009 at 12:10 PM

    Export your internal tables or work areas to a memory id in ur program before u use submit.

    Then in second pgm you have to import from memory id given above.

    example.

    EXPORT gs_header FROM gs_header to memory id 'HEADER'.
    EXPORT gt_item FROM gt_item to memory id 'ITEM'.
    
    SUBMIT YFIIN_DISHC_MAILREPORT EXPORTING LIST TO MEMORY AND RETURN.

    In your second pgm you can write

    import gs_header TO gs_header from MEMORY id 'HEADER'.
    import gt_item TO gt_item from MEMORY id 'ITEM'.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2009 at 12:31 PM

    Hi:

    The SET PARAMETER and GET PARAMETER statements allow you to write to, or read from, the SAP memory. The EXPORT TO MEMORY and IMPORT FROM MEMORY statements allow you to write data to, or read data from, the ABAP memory.

    Regards

    Shashi

    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.