2007 Mar 13 10:41 AM
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.
2007 Mar 13 10:45 AM
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.
2007 Mar 13 10:45 AM
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.
2007 Mar 13 10:57 AM
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
2007 Mar 13 11:05 AM
hi,
declare as...
DATA: WK_PRIPAR TYPE PRI_PARAMS,
W_VALID TYPE C,
WK_SPOOL(16) TYPE C.
regards,
priya.
2007 Mar 13 11:10 AM