2008 May 15 2:18 PM
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.
2008 May 15 2:41 PM
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.
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.
2008 May 15 2:23 PM
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
2008 May 15 2:41 PM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |