Skip to Content
0
Former Member
Jul 23, 2007 at 11:57 AM

exit program after new-page

19 Views

Hi,

What could be wrong with folowing code (part of longer program) :

FORM print_id.

DATA: valid TYPE c,

params LIKE pri_params.

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

destination = 'LOCL'

immediately = 'X' "<<< add this line - immediate print

new_list_id = 'X' "<<< add this line - new spool request

IMPORTING

out_parameters = params

valid = valid.

IF valid <> space.

NEW-PAGE PRINT ON PARAMETERS PARAMS NO DIALOG.

WRITE: 'dsds'.

ENDIF.

ENDFORM.

I result its print a page with 'dsds' text on pritner but then program exit to main sap menu with no any error message.

when I use:

NEW-PAGE.

instead of:

NEW-PAGE PRINT ON PARAMETERS PARAMS NO DIALOG.

new page report is display on screen with text 'dsds' but no exit occurs.