‎2010 Dec 16 6:28 AM
Dear All,
I am using submit command with selection screen parameters of the called program and making a spool out of it and then converting spool output to pdf and sending it on through mail. While running the program in Development client it gives the full output but when I run it in Quality client it is not giving the output . I debugged it and found out that when submit command returns the output in development it gives the full output but in quality it is not giving the output . I have executed the called program separately with the same parameters it is running fine but not with submit command.
Regards,
Amber Bhatia
‎2010 Dec 16 6:54 AM
Howdy,
Are you setting the printer name in your spool parameters? It may work in Dev because you have a default printer set in your user parameters, but not in Quality.
Post a code sample so we can get an idea.
Cheers
Alex
‎2010 Dec 16 6:55 AM
Hi,
Sounds strange ! Have you checked if the values that you are passing to the called program are all in internal format?
‎2010 Dec 16 7:53 AM
Here is the code where i am using Submit Command .
*opening a job to be send to spool
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = NAME
IMPORTING
JOBCOUNT = NUMBER
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4.
IF SY-SUBRC = 0.
*submit the created job with selection parameters
SUBMIT HINCEDT0 TO SAP-SPOOL
SPOOL PARAMETERS PRINPAR
WITHOUT SPOOL DYNPRO
WITH PNPXABKR = P0001-ABKRS
WITH PNPPERNR = PERNR-PERNR
WITH PNPBEGDA = PN-BEGDA
WITH PNPENDDA = PN-ENDDA
WITH PNPABKRS = P0001-ABKRS
WITH FORMULAR = 'ZJK9'
VIA JOB NAME NUMBER NUMBER
AND RETURN.
ENDIF.
IF SY-SUBRC = 0.
*closing the job which was send earlier
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = NUMBER
JOBNAME = NAME
STRTIMMED = 'X'
EXCEPTIONS
CANT_START_IMMEDIATE = 1
INVALID_STARTDATE = 2
JOBNAME_MISSING = 3
JOB_CLOSE_FAILED = 4
JOB_NOSTEPS = 5
JOB_NOTEX = 6
LOCK_FAILED = 7
OTHERS = 8.
I am executing the program HINCEDT0 using the above parameters ..
Regards,
Amber Bhatia
‎2010 Dec 16 8:21 AM
Hi,
SUBMIT HINCEDT0 TO SAP-SPOOL
SPOOL PARAMETERS PRINPAR <--- Check the values in PRINPAR
WITHOUT SPOOL DYNPRO
WITH PNPXABKR = P0001-ABKRS
WITH PNPPERNR = PERNR-PERNR
WITH PNPBEGDA = PN-BEGDA
WITH PNPENDDA = PN-ENDDA
WITH PNPABKRS = P0001-ABKRS
WITH FORMULAR = 'ZJK9'
VIA JOB NAME NUMBER NUMBER
AND RETURN.Regards,
Srini.
‎2010 Dec 16 8:36 AM
Hi,
Values of prinpar is blank before and after the submit is executed .
Regards,
Amber
‎2010 Dec 16 10:24 AM
‎2011 Mar 18 4:00 PM