06-12-2008 1:50 PM
Hi Experts,
Am writing out a classical report to the screen to the user, when he runs the prog. ONLINE. fine.
(automatically, it create a spool file, if it runs in back ground, fine)
but, pls. let me know that, if the user runs ONLINE, user wanna to hv a spool file and wanna to see on the screen same time, so, ls. let me know that, HOw to send the classical report to spool file apart from dispalying on screen, when runs ONLINE?
thanq
06-12-2008 2:00 PM
You may try something like
* screen fields
TABLES sscrfields.
AT SELECTION-SCREEN.
* Screen action change
IF sscrfields-ucomm EQ 'ONLI'.
sscrfields-ucomm = 'PRIN'.
ENDIF
Regards
06-12-2008 1:57 PM
Hi!
Check out the following statements for this:
NEW PAGE PRINT ON
SUBMIT TO SAP-SPOOL
PRINT-CONTROL
Regards
Tamás
Edited by: Tamás Nyisztor on Jun 12, 2008 2:58 PM
06-12-2008 2:00 PM
You may try something like
* screen fields
TABLES sscrfields.
AT SELECTION-SCREEN.
* Screen action change
IF sscrfields-ucomm EQ 'ONLI'.
sscrfields-ucomm = 'PRIN'.
ENDIF
Regards
06-12-2008 2:00 PM
One method is to Submit a job for the same report in Background with the same Parameters/Select Option as for the main program..
To prevent recurrsion in the logic ( The background report should not submit a job again ), you can check the flag SY-BATCH. The logic for submitting a job can be based on the field SY-BATCH. IF the field is INitial then Submit the JOb in background. If the field is Filled, Skip the Job creation/submit.
Regards,
Aj