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: 

generation of spool

Former Member
0 Kudos

i have a rquirement of generating a spool for a interface report where the report does the file download to a applocation server or presenation server depending on the radio button selected .i need to generate a spool for the report which has selection screen data ,total no. of records,actual output file data records.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

U need to change the code of that report in order to write the data of selection-screen, if you want to generate automatically the spool without to show it on the video u can use the statament NEW-PAGE:

PARAMETERS: P_BUKRS TYPE T001-BUKRS.

DATA: PARAMS LIKE PRI_PARAMS,
      VALID.

START-OF-SELECTION.

* List not included in automatic spool:

write: 'This abap list not in spool'.


* List included in automatic spool


  CALL FUNCTION 'GET_PRINT_PARAMETERS'
       EXPORTING
            DESTINATION    = 'LOCL'
            COPIES         = 1
            LIST_NAME      = 'TEST'
            LIST_TEXT      = 'Test NEW-PAGE PRINT ON'
            IMMEDIATELY    = SPACE
            RELEASE        = 'X'
            NEW_LIST_ID    = 'X'
            LINE_SIZE      = 79
            LINE_COUNT     = 23
            LAYOUT         = 'X_PAPER'
            SAP_COVER_PAGE = SPACE
            NO_DIALOG      = ' '
       IMPORTING
            OUT_PARAMETERS = PARAMS
            VALID          = VALID.

  IF VALID <> SPACE.
    NEW-PAGE PRINT ON PARAMETERS PARAMS NO DIALOG.

    WRITE: / 'SELECTION-SCREEN',
           / 'Company code:', P_BUKRS.
  ENDIF.

Max

5 REPLIES 5

Former Member
0 Kudos

Hi

U need to change the code of that report in order to write the data of selection-screen, if you want to generate automatically the spool without to show it on the video u can use the statament NEW-PAGE:

PARAMETERS: P_BUKRS TYPE T001-BUKRS.

DATA: PARAMS LIKE PRI_PARAMS,
      VALID.

START-OF-SELECTION.

* List not included in automatic spool:

write: 'This abap list not in spool'.


* List included in automatic spool


  CALL FUNCTION 'GET_PRINT_PARAMETERS'
       EXPORTING
            DESTINATION    = 'LOCL'
            COPIES         = 1
            LIST_NAME      = 'TEST'
            LIST_TEXT      = 'Test NEW-PAGE PRINT ON'
            IMMEDIATELY    = SPACE
            RELEASE        = 'X'
            NEW_LIST_ID    = 'X'
            LINE_SIZE      = 79
            LINE_COUNT     = 23
            LAYOUT         = 'X_PAPER'
            SAP_COVER_PAGE = SPACE
            NO_DIALOG      = ' '
       IMPORTING
            OUT_PARAMETERS = PARAMS
            VALID          = VALID.

  IF VALID <> SPACE.
    NEW-PAGE PRINT ON PARAMETERS PARAMS NO DIALOG.

    WRITE: / 'SELECTION-SCREEN',
           / 'Company code:', P_BUKRS.
  ENDIF.

Max

0 Kudos

it is giving an error as relational operator space is not supported and my requirement is The spool is to include following details:

a. Selection-screen data - whatever is not-initial (i.e. all the criteria entered by User) in different lines

b. Total no. of records downloaded

c. Actual output file data records

generate the spool for the report .

0 Kudos

Hi

Sorry! it seems this editor can't show the sign for not equal, anyway u can use INITIAL:

IF NOT VALID IS INITIAL.
    NEW-PAGE PRINT ON PARAMETERS PARAMS NO DIALOG.
 
    WRITE: / 'SELECTION-SCREEN',
           / 'Company code:', P_BUKRS.
  ENDIF.

Max

Edited by: max bianchi on Jun 5, 2008 10:58 AM

0 Kudos

Do as said by Max ...

And get selections from ..

call function 'PRINT_SELECTIONS'

exporting

mode = ' '

rname = sy-cprog

rvariante = sy-slset

tables

infotab = i_varinfo.

IF VALID EQ SPACE.

NEW-PAGE PRINT ON PARAMETERS PARAMS NO DIALOG.

*write the selections ...

loop at i_varinfo.

*--Write each selection variable

write: / i_varinfo-line.

endloop.

*to write the record count

describe table itab lines v_lines .

write 😕 'Total no of records' , v_lines.

*to write the records

loop at itab.

write 😕 itab-field1 ......

endloop.

0 Kudos

where should i write fm print_selections .