02-20-2009 12:00 PM
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
02-20-2009 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.
02-20-2009 12:04 PM
02-20-2009 12:04 PM
Hi
you can export the value to a memory id before submit to program and retreive the values there
02-20-2009 12:04 PM
Hi,
Try like this,
SUBMIT zrptpsh10 AND RETURN
WITH pnpbegda EQ wa_2001-begda
WITH pnpendda EQ wa_2001-endda
02-20-2009 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
02-20-2009 12:05 PM
Hi ,
Actually we need to pass the values from our main pgm to the calling pgm.
Regards,
Bhanu.R
02-20-2009 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.
02-20-2009 12:09 PM
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.
02-20-2009 12:12 PM
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.
02-20-2009 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.
02-20-2009 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'.
02-20-2009 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
03-19-2009 12:51 PM