Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

13 REPLIES 13

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

Declare ranges in the second program and use them.

viquar_iqbal
Active Contributor
0 Kudos

Hi

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

Former Member
0 Kudos

Hi,

Try like this,

SUBMIT zrptpsh10 AND RETURN

WITH pnpbegda EQ wa_2001-begda

WITH pnpendda EQ wa_2001-endda

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi ,

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

Regards,

Bhanu.R

kiran_k8
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Actually the program which i am calling is a standard program so we cant do changes in that.

I think Import /Export command doesnt work in this case.

We tried to use submit statement by

SUBMIT rsarch_store_file

WITH g_object EQ wa_admi_run-object

WITH g_archive_key EQ wa_admi_files-archiv_key

WITH g_session EQ wa_admi_files-document

WITH g_store_before_deletion EQ 'X'

WITH g_arch_docid EQ wa_admi_files-arch_docid

WITH g_jobname EQ wa_admi_jobs-jobname

WITH g_jobcount EQ wa_admi_jobs-jobcount.

But the values were not getting passed in the called program.

kiran_k8
Active Contributor
0 Kudos

Bhanu,

I never tried submitting a standard program but I think we can get it by using EXPORT LIST TO MEMORY and then reading it from Memory using a function module.Just search in SDN with these keywords you will stumble on some results.

K.Kiran.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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'.

Former Member
0 Kudos

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

Former Member
0 Kudos

answered