Application Development and Automation 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: 
Read only

SUBMIT COMMAND ERROR

Former Member
0 Likes
844

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

7 REPLIES 7
Read only

alex_cook
Active Participant
0 Likes
781

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

Read only

Former Member
0 Likes
781

Hi,

Sounds strange ! Have you checked if the values that you are passing to the called program are all in internal format?

Read only

Former Member
0 Likes
781

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

Read only

0 Likes
781

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.

Read only

0 Likes
781

Hi,

Values of prinpar is blank before and after the submit is executed .

Regards,

Amber

Read only

0 Likes
781

Cross check the values for both the systems.....

Read only

0 Likes
781

Done