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 whithout any display

Former Member
0 Likes
457

Hi,

I use the SUBMIT instruction to call a program B from a program A.

The problem is that i don't want the program I call (B) to display the informations it displays when it runs "alone".

The cause is that the program A need to call numerous times the program B and if the program B displays its informations, the program A can't continue until I press the 'ESC' button...

Is there a way to solve my problem ?

Thanks a lot !

--Yohann.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
438

Hi,

Check the below example programs

Program1:

REPORT zkum_func_test.

DATA: number TYPE tbtcjob-jobcount,

name TYPE tbtcjob-jobname VALUE 'JOB_TEST',

print_parameters TYPE pri_params.

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 ZKUM_FUNC_TEST1 TO SAP-SPOOL

SPOOL PARAMETERS print_parameters

WITHOUT SPOOL DYNPRO

VIA JOB name NUMBER number

AND RETURN.

IF sy-subrc = 0.

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.

IF sy-subrc = 0.

  • ...

ENDIF.

ENDIF.

ENDIF.

Program2:

report zkum_func_test1.

do 10 times.

write:/5 sy-index.

enddo.

2 REPLIES 2
Read only

Former Member
0 Likes
438

Hi,

Check whether the program runs in the submit mode if yes then make write statement into a spool.

using fm

GET_PRINT_PARAMETERS

JOB_OPEN

JOB_SUBMIT

JOB_CLOSE

Regards,

Shiva Kumar

Read only

Former Member
0 Likes
439

Hi,

Check the below example programs

Program1:

REPORT zkum_func_test.

DATA: number TYPE tbtcjob-jobcount,

name TYPE tbtcjob-jobname VALUE 'JOB_TEST',

print_parameters TYPE pri_params.

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 ZKUM_FUNC_TEST1 TO SAP-SPOOL

SPOOL PARAMETERS print_parameters

WITHOUT SPOOL DYNPRO

VIA JOB name NUMBER number

AND RETURN.

IF sy-subrc = 0.

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.

IF sy-subrc = 0.

  • ...

ENDIF.

ENDIF.

ENDIF.

Program2:

report zkum_func_test1.

do 10 times.

write:/5 sy-index.

enddo.