Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Retrieve spool request number

i want to retreive spool request number of smartform in my print program..can ny1 suggest how to do dat...

sy-spono is not showing me da current spool request number...

im passing da following parameters to smartform..

CONTROL-preview = ' '.

CONTROL-no_open = 'X'.

CONTROL-no_close = 'X'.

CONTROL-no_dialog = 'X'.

CONTROL-device = 'PRINTER'.

OUTPUT_OPTIONS-TDDEST = tdest.

OUTPUT_OPTIONS-TDNOPRINT = 'X'.

OUTPUT_OPTIONS-tdimmed = 'X'.

OUTPUT_OPTIONS-tdnewid = 'X'.

OUTPUT_OPTIONS-tddataset = 'XYZ'.

CALL FUNCTION 'SSF_OPEN'

EXPORTING

output_options = output_options

control_parameters = CONTROL

user_settings = ' '

EXCEPTIONS

formatting_error = 1

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.

*BREAK-POINT.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZSHR_PAYSLIP'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

fm_name = lf_fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

CALL FUNCTION lf_fm_name

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

CONTROL_PARAMETERS = control

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

OUTPUT_OPTIONS = OUTPUT_OPTIONS

USER_SETTINGS = ' '

  • wa = wa

IMPORTING

  • DOCUMENT_OUTPUT_INFO =

JOB_OUTPUT_INFO = w_return..............>dis is cuming blank

JOB_OUTPUT_OPTIONS = RESULT...>dis is also cumin blank

TABLES

header_tab = header_tab

tab = tab1

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5

.

IF sy-subrc eq 0.

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

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

CLEAR:wa,tab[],tab.

ENDIF.

CALL FUNCTION 'SSF_CLOSE'

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

OTHERS = 4.

IF SY-SUBRC NE 0.

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

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

ENDIF.

can ny1 suggest how to retreive da current spool request number..

points 'll b rewarded

Not what you were looking for? View more on this topic or Ask a question