Skip to Content
avatar image
Former Member

Print program for customized smartform.........

Hi Abapers,

I designed a 'Purchase recommendation note' form (zprn),by using smartforms.

To assign this to the output type, i want the print program for this form.

I want to know whether, i want to write the print program or the form itself created a print program.

If for mitself created the print program, then tell me how to find it.

If i want to write the print prorgam, suggest me how to write.....

I searched sdn before posting this, but i can't find it...

Thanks & Regards,

BDK.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Jun 23, 2009 at 05:32 AM

    Hi

    you need to write the print program for the smart form

    it just creates a function module which you need to call in the print program..

    you need to write the print program in this way

    DATA: fm_name TYPE rs38l_fnam.
    
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname           = 'ZPRN' "-->Give your smartform name here
      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.
    
    " Call the function module here that is the function module generated by smartform. 
    "You can get the name of the function module by going to 
    " environment in the menubar in the smartform -> function module name
    "change the function module name to variable declared above
    CALL FUNCTION fm_name  
     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.

    [Check this link for knowing more |https://wiki.sdn.sap.com/wiki/x/mAc]

    Thanks & Regards

    Sarves

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Ankur Parab

      Hi Ankur,

      I had checked as optional in form interface, and now i got the output...

      i want to give the purchase order number in runtime, so tat the user can give the PO number after executing this program and to get the print out of this form.....

      I had declared the parameter for ebeln as,

       parameters: iv_ekko like ekko-ebeln.
          

      But after giving the PO number in runtime, i m getting only the empty layout, not with the values of tat PO number....

      So, guide me how to do this...

      Thanks,

      BDK....

  • avatar image
    Former Member
    Jun 23, 2009 at 05:33 AM

    Hi

    You have to use standard print program or create your own.

    One can find example of print program from the program attached to the Output type in NACE Transaction.

    Regards

    Vijai

    Edited by: Vijai Dixit on Jun 23, 2009 7:34 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 23, 2009 at 05:35 AM

    To find the print program and output type;

    1) You can ask your MM consultant.

    2) Check tcode NACE

    3) Check table TNAPR with original smartform name.

    Regards

    Karthik D

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      >

      > I checked with tnapr table, but i cant find the print program for my form 'ZPRN'...

      > Can u reply in detail abt this.....

      I told you to check TNAPR table for the original form.

      Regards

      Karthik D

  • avatar image
    Former Member
    Jun 23, 2009 at 07:47 AM

    Hi,

    Take your output type name and then go to NACE TCODE and then with your output type you will find list of another output types just open them and then select any output type. Then double click on the Processing Routines there you will find the program name in the Standard Program column you can take that one as your standard program for your Output type.

    Hope this will help you,

    Regards,

    Venkat.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 07, 2009 at 07:26 AM

    Thnx for all the replies....

    Add comment
    10|10000 characters needed characters exceeded