Skip to Content
0
Aug 07, 2012 at 11:13 AM

smartform spool not created

755 Views

Hi

my code is as below.. but spool is not getting generated thru smartforms...

CONSTANTS : C_X TYPE CHAR1 VALUE 'X'.

DATA : V_PRINT_PARMS TYPE PRI_PARAMS.

CONSTANTS : LC_PAART LIKE SY-PAART VALUE 'X_65_132',

LC_LOCL TYPE SYPDEST VALUE 'LOCL'.

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

AUTHORITY = SPACE

IMMEDIATELY = SPACE

NEW_LIST_ID = C_X

NO_DIALOG = C_X

USER = SY-UNAME

IMPORTING

OUT_PARAMETERS = V_PRINT_PARMS

EXCEPTIONS

ARCHIVE_INFO_NOT_FOUND = 1

INVALID_PRINT_PARAMS = 2

INVALID_ARCHIVE_PARAMS = 3

OTHERS = 4.

IF V_PRINT_PARMS-PDEST = SPACE.

V_PRINT_PARMS-PDEST = LC_LOCL.

ENDIF.

V_PRINT_PARMS-PAART = LC_PAART.

NEW-PAGE PRINT ON PARAMETERS V_PRINT_PARMS NO DIALOG.

CALL FUNCTION M_FM

EXPORTING

CONTROL_PARAMETERS = V_PRINT_PARMS

* OUT_OPTIONS = OUT_OPTION

* USER_SETTINGS = ''

IMPORTING

JOB_OUTPUT_INFO = WA_JOB_OUTPUT_INFO

EXCEPTIONS

FORMATTING_ERROR = 1 " USER_SETTINGS = 'X'

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

IF SY-SUBRC <> 0.

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

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

ENDIF.

NEW-PAGE PRINT OFF.