‎2016 May 05 6:30 AM
Dear Experts ,
Here i am facing an issue that i have to run two programs at a time with only one input that is giving to program-A through parameter.
Here i need to run program-B after 5 seconds to execution of program-A . By using JOB_OPEN ,JOB_SUBMIT , JOB_CLOSE it is running successfully .
i am using EXPORT AND IMPORT MEMORY ID's to transfer the input value from Program-A to program-B . But input value is not transferring properly to Program-B it is giving output which is not related input that i provided in program-A .
please share your experience to resolve this issue.
Thank You.
‎2016 May 05 7:37 AM
Hi venkatesh,
it may be possible that your system has many application server and your program A and B are running on different application server. so one way is to force your program to run on same application server by providing sy-host.
OR
you can use shared buffer in place of memory id.
to export.
export ITAB to shared buffer indx(st) id 'YOURKEY'.
to import
import imara from shared buffer indx(st) id 'YOURKEY'.
to free buffer.
delete from shared buffer indx(st) id 'YOURKEY'.
OR
we have another solution to use DATABASE instead of SHARED BUFFER in EXPORT and IMPORT statements.
EXPORT itab FROM itab TO DATABASE indx(ar) CLIENT sy-mandt ID job_number in program1 where job number is unique.
Then
IMPORT itab TO itab FROM DATABASE indx(ar) CLIENT sy-mandt ID job_number in program2 where job number is passed from program1 to program2 while submit job.
Then DELETE FROM DATABASE indx(ar) CLIENT sy-mandt ID job_number.
‎2016 May 05 6:50 AM
You can you SET/GET PARAMETER for the same,
Try below,
SUBMIT program VIA JOB and SET/GET parameter | SCN
Hope this helps.
‎2016 May 05 7:05 AM
thanks for your response .
i used SET/GET parameters now its coming exact output when i run 2nd program independently but in SM37 in spool output it is showing again wrong output .
please guide me if you know.
thank you.
‎2016 May 05 6:55 AM
Program B's memory is entirely independent of A, so EXPORT/IMPORT to MEMORY ID won't work.
Options:
1. Add selection options/parameters to B and fill the variant from A before using the JOB_ FMs
2. Use SUBMIT instead of the JOB_ FMs.
‎2016 May 05 7:03 AM
Thank you sir for responding.
here the problem is i have to run that 2nd program in background that is it is not possible to use submit.
and i used SET/GET parameters now its coming exact output when i run 2nd program independently but in SM37 in spool output it is showig again wrong output .
please guide me sir how to do this .
Thank you.
‎2016 May 05 8:17 AM
Don't use SET/GET. To limited. And what will you do if something changes those parameters before job B runs?
Use a selection screen in program B. Simplest, safest, easiest solution.
‎2016 May 05 7:37 AM
This could be a very stupid answer.
Let the Program A save the param to a lookup table.
Let Program B read the value from lookup table...
Helps?
‎2016 May 05 7:37 AM
Hi venkatesh,
it may be possible that your system has many application server and your program A and B are running on different application server. so one way is to force your program to run on same application server by providing sy-host.
OR
you can use shared buffer in place of memory id.
to export.
export ITAB to shared buffer indx(st) id 'YOURKEY'.
to import
import imara from shared buffer indx(st) id 'YOURKEY'.
to free buffer.
delete from shared buffer indx(st) id 'YOURKEY'.
OR
we have another solution to use DATABASE instead of SHARED BUFFER in EXPORT and IMPORT statements.
EXPORT itab FROM itab TO DATABASE indx(ar) CLIENT sy-mandt ID job_number in program1 where job number is unique.
Then
IMPORT itab TO itab FROM DATABASE indx(ar) CLIENT sy-mandt ID job_number in program2 where job number is passed from program1 to program2 while submit job.
Then DELETE FROM DATABASE indx(ar) CLIENT sy-mandt ID job_number.
‎2016 May 05 7:52 AM
Thank you for your response .
if i use EXPORT and IMPORT , the input value is not transferring from program-A to program-B .
so i am using SET and GET parameters now output is coming properly when program-B is executed independently .
but when i check it in background job(SM37) its showing wrong output .
what to do know ?
THANK YOU.
‎2016 May 05 8:06 AM
is your both program are running by the same user??
because this SET/GET parameter are user specific.
‎2016 May 05 8:09 AM
‎2016 May 05 8:27 AM
‎2016 May 05 12:56 PM