‎2008 Mar 26 8:57 PM
Hi,
I have two Executable programs. Program A, Program B.
(to execute Program A in background)
Program B has job_open, submit program A...and return, Job_close.
Job count etc everything is achieved properly.
But when checked in debugging, submit statement is not really executing Program A but directly going into SAPLS38E and the cursor is back in program B.
It means not fetching any data. No error too.
When Program A is executed separately I could get output.
Plz suggest what the problem could be.
thanks
‎2008 Mar 26 9:16 PM
Hi,
Can you please paste the piece of code (SUBMIT) that is actually calling the Program A?
Regards,
Raj
‎2008 Mar 26 9:16 PM
Hi,
Can you please paste the piece of code (SUBMIT) that is actually calling the Program A?
Regards,
Raj
‎2008 Mar 26 9:20 PM
START-OF-SELECTION
perform background.
END-OF-SELECTION.
Form background.
JOB_OPEN.......
SUBMIT ZPROGRAMA USER SYST-UNAME
VIA JOB JOBNAME
NUMBER JOBCOUNT
AND RETURN.
JOB_CLOSE.
End form
Are my start of/end of selection statements troubling?
‎2008 Mar 26 9:26 PM
Maybe I'm not understanding, but try this I hope it helps
START-OF-SELECTION
break-point.
SUBMIT ZPROGRAMA USER SYST-UNAME
VIA JOB JOBNAME
NUMBER JOBCOUNT
AND RETURN.
break-point.
END-OF-SELECTION.
Are you debugging step by step? if yes, try to stop at the first brea-point. then press f8 to go to the second break and see what happens
‎2008 Mar 26 9:28 PM
Hi,
When you use the JOB_OPEN.... it returns a variable JOBCOUNT. Please try passing that to the SUBMIT.
Your program should work.
Regards,
Raj
‎2008 Mar 26 9:31 PM
I did that.
after the submit part control is coming back. But during the submit it's not executing the PROGRAM A. But getting into the standard background program.
‎2008 Mar 26 9:33 PM
Have you tried putting a break in Zprograma and not debbuging the submit to see if it enters?
I've had problems using call transaction in the debbuger, maybe that's the problem
Edit: Almost forget, what is the sy-subrc value after the submit?
Edited by: Ramiro Escamilla on Mar 26, 2008 10:38 PM
‎2008 Mar 26 9:34 PM
Raja shekhar...if you see my code snippet....I have already passed my jobcount.
do I need to have initialization, start of selections statements in both the programs.....???
Or need to have those only in the program which submits the other one?
Plz clarify
thanks
‎2008 Mar 26 9:40 PM
Ramiro...it's the same. I tried to jump with F8 with those break points. no change.
the program that I am submitting has a selection screen.
It's never branching out for me to enter any data.
Based on the selection criteria data has to be retrieved in background. but it's never getting into that program.
sy-subrc is 0.
Edited by: Alchemi on Mar 26, 2008 4:41 PM
‎2008 Mar 26 9:55 PM
Hi Alchemi,
You need to fill the Selection Screen data of PROGRAMA before you call it through SUBMIT.
Please find the syntax:
SUBMIT ZPROGRAMA AND RETURN
USER SY-UNAME
VIA JOB JOBNAME NUMBER JOBCOUNT
WITH <Selection-Screen Variable1 of ZPROGRAMA> = Value1
WITH <Selection-Screen Variable2 of ZPROGRAMA> = Value2
If you Selection-Screen Variable is Select-Option, declare a variable of type RANGES and fill all the required values and then pass it intead of Value1/2
If you Selection-Screen Variable is a parameter then just pass the value.
Hope this solves your problem.
Regards,
Raj
‎2008 Mar 26 10:00 PM
thanks guys.
I just realized that i need to pass the selection screen parameters. Let me try and do that.
‎2008 Mar 27 7:35 AM
of course the cursor will come back to program B unless you say submit and wait. How are you trying to debug? Is the job visible in sm37? If the job has already finished, try to debug using jdbg command.