Skip to Content
author's profile photo Former Member
Former Member

after executing the code im getting a spool no

hi to all experts,

im very new to printing in sap after generating the spool no where to give this spool no ..

my code

DATA : fm_name TYPE rs38l_fnam,
         control_parameters TYPE ssfctrlop,
         wa_job_output_info TYPE ssfcrescl,
         ssfcompin TYPE ssfcompin.

  ssfcompin-dialog = 'X'.

  CALL FUNCTION 'SSF_OPEN'
   EXPORTING
*     ARCHIVE_PARAMETERS       =
*     USER_SETTINGS            = 'X'
*     MAIL_SENDER              =
*     MAIL_RECIPIENT           =
*     MAIL_APPL_OBJ            =
*     OUTPUT_OPTIONS           =
      control_parameters       = control_parameters
*   IMPORTING
*     JOB_OUTPUT_OPTIONS       =
   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.

  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      formname           = 'ZMM_IM_002'
      variant            = ' '
      direct_call        = ' '
    IMPORTING
      fm_name            = fm_name
    EXCEPTIONS
      no_form            = 1
      no_function_module = 2
      OTHERS             = 3.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  control_parameters-no_open = 'X'.
  control_parameters-no_close = 'X'.


  LOOP AT it_smart INTO wa_smart.

    CALL FUNCTION fm_name
      EXPORTING
       control_parameters         = control_parameters

*   USER_SETTINGS              = 'X'
        wa_display                 = wa_smart
* IMPORTING
*   DOCUMENT_OUTPUT_INFO       =
*   JOB_OUTPUT_INFO            =
*   JOB_OUTPUT_OPTIONS         =
     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.



  ENDLOOP.

  CALL FUNCTION 'SSF_CLOSE'
    IMPORTING
      job_output_info  = wa_job_output_info
    EXCEPTIONS
      formatting_error = 1
      internal_error   = 2
      send_error       = 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.


ENDFORM.

" print_smartform2x4

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Feb 25, 2009 at 06:45 AM

    Tcode : SP01.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.