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: 

NEW-PAGE PRINT ON ERROR IN VERSION 46C

Former Member
0 Kudos
313

Hi All,

In version 46c i am getting an error for NEW-PAGE PRINT ON saying "NEW-PAGE PRINT ON should no longer be used to generate a print dialog box..........

kinly help me out.

The code ia follows.............

IF p_print IS INITIAL.

NEW-PAGE.

ELSE.

NEW-PAGE PRINT ON DESTINATION p_print.

ENDIF.

Thanks n Regards,

Indu.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
104

hi indumathi,

u need to use the FM GET_PRINT_PARAMETERS,

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

DESTINATION = p_print

LAYOUT = WK_SPOOL

  • LINE_COUNT = C_INT_UNKNOWN

  • LINE_SIZE = C_INT_UNKNOWN

LIST_NAME = TEXT-004

  • LIST_TEXT = C_CHAR_UNKNOWN

  • MODE = ' '

  • NEW_LIST_ID = C_CHAR_UNKNOWN

  • PROTECT_LIST = C_CHAR_UNKNOWN

NO_DIALOG = SPACE

IMPORTING

OUT_PARAMETERS = WK_PRIPAR

VALID = W_VALID

EXCEPTIONS

ARCHIVE_INFO_NOT_FOUND = 1

INVALID_PRINT_PARAMS = 2

INVALID_ARCHIVE_PARAMS = 3

OTHERS = 4.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

IF W_VALID <> SPACE.

NEW-PAGE PRINT ON PARAMETERS WK_PRIPAR NO DIALOG.

ENDIF.

do reward if it helps,

priya.

4 REPLIES 4

Former Member
0 Kudos
105

hi indumathi,

u need to use the FM GET_PRINT_PARAMETERS,

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

DESTINATION = p_print

LAYOUT = WK_SPOOL

  • LINE_COUNT = C_INT_UNKNOWN

  • LINE_SIZE = C_INT_UNKNOWN

LIST_NAME = TEXT-004

  • LIST_TEXT = C_CHAR_UNKNOWN

  • MODE = ' '

  • NEW_LIST_ID = C_CHAR_UNKNOWN

  • PROTECT_LIST = C_CHAR_UNKNOWN

NO_DIALOG = SPACE

IMPORTING

OUT_PARAMETERS = WK_PRIPAR

VALID = W_VALID

EXCEPTIONS

ARCHIVE_INFO_NOT_FOUND = 1

INVALID_PRINT_PARAMS = 2

INVALID_ARCHIVE_PARAMS = 3

OTHERS = 4.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

IF W_VALID <> SPACE.

NEW-PAGE PRINT ON PARAMETERS WK_PRIPAR NO DIALOG.

ENDIF.

do reward if it helps,

priya.

0 Kudos
104

Hi Priya,

Thanks for ur tip, but i need to know, how do i declare WK_SPOOL,WK_PRIPAR, W_VALID, as i am getting an error saying the above mentioned parameters "are neither in one of the specified tables nor defined by a data statement...............

Regards,

Indu

0 Kudos
104

hi,

declare as...

DATA: WK_PRIPAR TYPE PRI_PARAMS,

W_VALID TYPE C,

WK_SPOOL(16) TYPE C.

regards,

priya.

0 Kudos
104

Hi priya,

Thanks, solved the problem.

Regards,

Indu