Application Development 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: 

How to send the display report to SPOOL, when runs prog. ONLINE?

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

raymond_giuseppi
Active Contributor
0 Kudos

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

former_member195698
Active Contributor
0 Kudos

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