Smartforms

hi experts,
i want to display all items of customer means open and closed items. but on which condition we will display.
reward points.

Hi,
Try this link :
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
Thanks to Hafeez(for letting me know about this link).
Regards,
Subramanian V.

Similar Messages

  • Filename in Webdynpro for a PDF created with Smartform

    Hi,
    I created a PDF with Smartform in my Webdynpro-Application.
    When I click the save button there is a default filename f.pdf .
    How can I change the filename?
    Regards
    Marcus Schug

    Hi Experts,
    any update on this?
    I am facing the same problem with ESS payslip (smartform/Hrform): my customer wants to have custom file name for download salery statements from the portal. Do you know how to change the default form name unknown.pdf to e.g.. "payslip_month_year"?
    I spent a lot of time to find any possibility to get and change the file name but without success till now.
    Please respond.
    Regards,
    Zdzislaw Kaczmarczyk
    Edited by: Zdzislaw Kaczmarczyk on Jun 14, 2010 4:41 PM

  • Sy-tabix for internal table in smartform

    Hi friends,
    How to capture the sy-tabix value for the entries in an internal table which has been looped into the loop of table node of a smartform?? I need to print something immedaitely after the end of the table
    For every record the value of sy-tabix is showing 1 !!
    Advance Thanks
    Aadarsh

    Hi Aadarsh,
    Give ur sy-tabix at the end of the loop.
    loop at itab.
    //table node populations.
    endloop.
    give a seperate loop for this.
    loop at itab.
    sy-tabix.
    endloop
    get the total no and print it after the table.
    If u r using do loop then give sy-index.
    Hope tihs helps u,
    Regards,
    Nagarajan.
    Message was edited by: Nagarajan Kumarappan

  • Dunning won't print to smartform

    Hey all,
    I've been trying to set up the Dunning process to print to the standard SAP dunning smartform (F150_DUNN_SF). Here's what I've done so far:
    1. Used transaction BF31 to change the function module for dunning to FI_PRINT_DUNNING_NOTICE_SMARTF.
    2. Used transaction SPRO under Financial Accounting->Accounts Receivable and Accounts Payable->Business Transactions->Dunning->Printout->Assign Dunning Forms to set the Form for our custon procedure for all 3 Dunning Levels to F150_DUNN_SF
    3. I then run the dunning report out of transaction F150. The Dunning list shows that the customer should receive the letter.
    When I try to print, the job terminates. When I check the job log in SM37, I get the following error: "Include text  does not exist (object TEXT, ID )" (Message class SSFCOMPOSER, Message No. 610). Everything looks like it is set up correctly. Did I miss a step?
    Thanks for your help!
    ~William

    Hi,
      Seems that the smartform that you are using has a standard text which is not avaliable check the smartform for standard texts being used and check if they are all avaliable in SO10.
    Regards,
    Himanshu

  • Smartforms: How 2 fire print & download 2 PDF simultaniously 4  my forms

    Dear Murugesh, Cristian
      The following is my piece of code which directly downloads my forms into PDF but not creating any spool 4 firing print ,
    1) I need the both to happen simultaniously .
    2) I need to include the o/p(either SAPScript/report o/p) as the Smartform pages with o/p of my Driver prog ,by calling another TCODE from my driver prog .
    Please throw some light on this .
    have a look into my code
    *Printing of Export Invoice, Packing List,Enclosure to Packing List &  *
    *Case Marking in one SMART FORMS Layout                                *
    REPORT ZSD_REP_MULTI_PRINT.
    TABLES :
        vbak,
        vbap,
        vbpa,
        vbfa,
        VBRK,
        VBRP,
        LIKP,
        LIPS,
        KONV,
        objk,
        tvko,
        ser01,
        sadr,
        equi,
        makt,
        mast,
        t005t,
        kna1,
        t001w,
        T001,
        ADRC,
        sscrfields,
        zpp_plcmi,      "Packing list history For Conf: Item data
        zplh,           "PACKING LIST HISTORY : HEADER DATA
        zpli.           "PACKING LIST HISTORY : ITEM DATA
    DATA: FM_NAME1  TYPE RS38L_FNAM,
          FM_NAME2  TYPE RS38L_FNAM,
          FM_NAME3  TYPE RS38L_FNAM,
          FM_NAME4  TYPE RS38L_FNAM,
          P_E_DEVTYPE TYPE RSPOPTYPE,
          P_JOB_OUTPUT_INFO TYPE SSFCRESCL OCCURS 2000 WITH HEADER LINE,
          T_OTF LIKE ITCOO OCCURS 0 WITH HEADER LINE,
          P_OUTPUT_OPTIONS TYPE SSFCOMPOP OCCURS 0 WITH HEADER LINE,
          P_CONTROL_PARAMETERS TYPE SSFCTRLOP OCCURS 0 WITH HEADER LINE ,
          P_DOC  LIKE DOCS OCCURS 2000 WITH HEADER LINE,
          P_LINES LIKE TLINE OCCURS 200,
          P_BIN_FILESIZE TYPE I,
          P_LANGUAGE TYPE SFLANGU,
          P_BIN_FILE TYPE XSTRING,
          OK_CODE LIKE SY-UCOMM.
    DATA: T_ITEM   TYPE  ZSD_TABL_LITEM,
          WA_ITEM  TYPE  ZSD_STRUCT_LITEM,
          T_ADRS   LIKE  ZSD_STRUCT_ADRS  OCCURS 0 WITH HEADER LINE,
          MSLINES  LIKE  TLINE OCCURS 1 WITH HEADER LINE,
          TIDNO    LIKE STXL-TDID,
          TNAME    LIKE STXL-TDNAME,
          TOBJT    LIKE STXL-TDOBJECT,
          SSORD    LIKE VBAK-VBELN,
          TOT      LIKE VBAK-NETWR,
          WORD     LIKE SPELL.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    PARAMETERS: P_DELNO LIKE  LIKP-VBELN OBLIGATORY,
                P_INVNO LIKE  VBRK-VBELN OBLIGATORY,
                P_DATE  LIKE  SY-DATUM.
    SELECTION-SCREEN END   OF BLOCK blk1.
    AT SELECTION-SCREEN.
      CLEAR T_ADRS.
      REFRESH T_ITEM.
      T_ADRS-INVNO = P_INVNO.
      T_ADRS-INVDAT = P_DATE.
      SELECT SINGLE VBELV INTO  VBFA-VBELV
                             FROM  VBFA
                             WHERE VBELN = P_DELNO
                               AND VBTYP_N = 'J'  .
      SSORD = VBFA-VBELV.
    *Exporter's  Address
      SELECT SINGLE BUKRS_VF INTO  VBAK-BUKRS_VF
                             FROM  VBAK
                             WHERE VBELN = VBFA-VBELV.
      SELECT SINGLE   ADRNR
                      INTO T001-ADRNR
                      FROM T001
                      WHERE BUKRS = VBAK-BUKRS_VF.
      SELECT SINGLE NAME1 STREET CITY1 POST_CODE1 COUNTRY
             INTO (T_ADRS-NAME1,T_ADRS-STREET,T_ADRS-CITY1,
                   T_ADRS-POST_CODE1, ADRC-COUNTRY)
             FROM  ADRC
             WHERE ADDRNUMBER EQ T001-ADRNR.
      SELECT SINGLE LANDX
                    INTO T_ADRS-COUNTRY
                    FROM T005T
                    WHERE     SPRAS = 'EN'
                          AND LAND1 = ADRC-COUNTRY.
    *Consignee Address & Buyer Other Than Consignee
      SELECT SINGLE KUNNR KUNAG INTO (LIKP-KUNNR, LIKP-KUNAG)
                                FROM LIKP WHERE VBELN = P_DELNO.
      IF LIKP-KUNNR = LIKP-KUNAG.
        SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
                  INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
                        T_ADRS-CCITY,  T_ADRS-CPCODE, T_ADRS-CREGIO,
                        T_ADRS-CTELF1, KNA1-ADRNR)
                  FROM  KNA1
                  WHERE KUNNR = LIKP-KUNNR.
        SELECT SINGLE COUNTRY INTO  ADRC-COUNTRY
                              FROM  ADRC
                              WHERE ADDRNUMBER EQ KNA1-ADRNR.
        SELECT SINGLE LANDX
                    INTO T_ADRS-CCOUNTRY
                    FROM T005T
                    WHERE     SPRAS = 'EN'
                          AND LAND1 = ADRC-COUNTRY.
        T_ADRS-ONAME1   =  T_ADRS-CNAME1 .
        T_ADRS-ONAME2   =  T_ADRS-CNAME2 .
        T_ADRS-OSTREET  =  T_ADRS-CSTREET .
        T_ADRS-OCITY    =  T_ADRS-CCITY.
        T_ADRS-OPCODE   =  T_ADRS-CPCODE .
        T_ADRS-OREGIO   =  T_ADRS-CREGIO.
        T_ADRS-OTELF1   =  T_ADRS-CTELF1 .
        T_ADRS-OCOUNTRY =  T_ADRS-CCOUNTRY.
      ELSE.
        SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
                  INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
                        T_ADRS-CCITY,  T_ADRS-CPCODE, T_ADRS-CREGIO,
                        T_ADRS-CTELF1, KNA1-ADRNR)
                  FROM  KNA1
                  WHERE KUNNR = LIKP-KUNNR.
        SELECT SINGLE COUNTRY INTO ADRC-COUNTRY
                              FROM  ADRC
                              WHERE ADDRNUMBER EQ KNA1-ADRNR.
        SELECT SINGLE LANDX
                    INTO T_ADRS-CCOUNTRY
                    FROM T005T
                    WHERE     SPRAS = 'EN'
                          AND LAND1 = ADRC-COUNTRY.
    *Buyer Other than Consignee
        SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
                   INTO (T_ADRS-ONAME1, T_ADRS-ONAME2, T_ADRS-OSTREET,
                         T_ADRS-OCITY,  T_ADRS-OPCODE, T_ADRS-OREGIO,
                         T_ADRS-OTELF1, KNA1-ADRNR)
                   FROM  KNA1
                   WHERE KUNNR = LIKP-KUNAG.
        SELECT SINGLE COUNTRY INTO  ADRC-COUNTRY
                              FROM  ADRC
                              WHERE ADDRNUMBER EQ KNA1-ADRNR.
        SELECT SINGLE LANDX
                    INTO T_ADRS-OCOUNTRY
                    FROM T005T
                    WHERE     SPRAS = 'EN'
                          AND LAND1 = ADRC-COUNTRY.
      ENDIF.
    *Other's Ref
      TIDNO = 'Z071'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-OREF = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Buyer's Order No  Ref
      TIDNO = 'Z023'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-BUYER = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Exporter Ref
      TIDNO = 'Z072'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-XPREF = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Pre-Carraige By
      TIDNO = 'Z074'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PCRG = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Place Of reciept by Pre-Carraige
      TIDNO = 'Z073'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PLPCRG = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Vessel/Flight No
      TIDNO = 'Z075'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-VFNO = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Port Of Loading
      TIDNO = 'Z077'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PLOAD = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Port Of Discharge
      TIDNO = 'Z076'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PDISG = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Final Destination
      TIDNO = 'Z070'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-FDEST = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Terms Of Delivery & Payment
      TIDNO = 'Z080'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-TERMS = mslines-tdline(50).
        EXIT.
      ENDLOOP.
    APPEND T_ADRS.
    *BODY SECTION FOR LINE ITEMS
      SELECT POSNR KWMENG VRKME WAERK
             INTO  (VBAP-POSNR, VBAP-KWMENG, VBAP-VRKME, VBAP-WAERK)
             FROM  VBAP
             WHERE VBELN = SSORD.
    *Mark/Case No
        TIDNO = '0002'.
        CONCATENATE SSORD
                    VBAP-POSNR
        INTO        TNAME.
        TOBJT = 'VBBP'.
        PERFORM FINDTEXT.
        LOOP AT MSLINES.
          WA_ITEM-MARKNO = mslines-tdline(40).
          EXIT.
        ENDLOOP.
    *Packing Type
        TIDNO = '0003'.
        CONCATENATE SSORD
                    VBAP-POSNR
        INTO        TNAME.
        TOBJT = 'VBBP'.
        PERFORM FINDTEXT.
        LOOP AT MSLINES.
          WA_ITEM-PACKTYP = mslines-tdline(40).
          EXIT.
        ENDLOOP.
    *Goods Description
        TIDNO = '0001'.
        CONCATENATE SSORD
                    VBAP-POSNR
        INTO        TNAME.
        TOBJT = 'VBBP'.
        PERFORM FINDTEXT.
        LOOP AT MSLINES.
          WA_ITEM-GDESC = mslines-tdline(40).
          EXIT.
        ENDLOOP.
    *Goods Quantity
        WA_ITEM-QTY = VBAP-KWMENG.
        WA_ITEM-VRKME = VBAP-VRKME.
    *Goods Rate
        SELECT SINGLE KNUMV INTO VBAK-KNUMV FROM VBAK WHERE VBELN = SSORD.
        SELECT SINGLE KBETR WAERS
                      INTO  (WA_ITEM-RATE, WA_ITEM-WAERS)
                      FROM  KONV
                      WHERE KNUMV = VBAK-KNUMV
                        AND KPOSN = VBAP-POSNR
                        AND KSCHL = 'PR00'.
    *Item Remarks
        TIDNO = 'ZREM'.
        CONCATENATE SSORD
                    VBAP-POSNR
        INTO        TNAME.
        TOBJT = 'VBBP'.
        PERFORM FINDTEXT.
        LOOP AT MSLINES.
          WA_ITEM-REMARK = mslines-tdline(40).
          EXIT.
        ENDLOOP.
    *Goods Amount
        WA_ITEM-AMOUNT = WA_ITEM-QTY * WA_ITEM-RATE.
        WA_ITEM-WAERK = VBAP-WAERK.
        TOT = TOT + WA_ITEM-AMOUNT.
        APPEND WA_ITEM TO T_ITEM.
      ENDSELECT.
      T_ADRS-TOT = TOT.
      CALL FUNCTION 'SPELL_AMOUNT'
       EXPORTING
         AMOUNT          = TOT
         CURRENCY        = VBAP-WAERK
      FILLER          = ' '
         LANGUAGE        = SY-LANGU
       IMPORTING
         IN_WORDS        = WORD
       EXCEPTIONS
         NOT_FOUND       = 1
         TOO_LARGE       = 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.
    *Gross Wieght
      TIDNO = 'Z078'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-GWT = mslines-tdline(15).
        EXIT.
      ENDLOOP.
    *Net Wieght
      TIDNO = 'Z079'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-NWT = mslines-tdline(15).
        EXIT.
      ENDLOOP.
      T_ADRS-TOT_WORDS = WORD-WORD.
      APPEND T_ADRS.
    START-OF-SELECTION.
      P_LANGUAGE = 'EN'.
      CALL   FUNCTION 'SSF_GET_DEVICE_TYPE'
        EXPORTING
          I_LANGUAGE    = P_LANGUAGE
          I_APPLICATION = 'SAPDEFAULT'
        IMPORTING
          E_DEVTYPE     = P_E_DEVTYPE.
      P_OUTPUT_OPTIONS-XSFCMODE = 'X'.
      P_OUTPUT_OPTIONS-XSF = SPACE.
      P_OUTPUT_OPTIONS-XDFCMODE = 'X'.
      P_OUTPUT_OPTIONS-XDF = SPACE.
      P_OUTPUT_OPTIONS-TDPRINTER = P_E_DEVTYPE.
      P_OUTPUT_OPTIONS-TDDEST = 'LOHP'.
      APPEND P_OUTPUT_OPTIONS.
      P_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
      P_CONTROL_PARAMETERS-GETOTF = 'X'.
      P_CONTROL_PARAMETERS-NO_CLOSE = SPACE.
      APPEND  P_CONTROL_PARAMETERS.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = 'ZSD_REP_MULTI_PRINT1'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
       IMPORTING
          FM_NAME                  = FM_NAME1
       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 FUNCTION FM_NAME1
       EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
        CONTROL_PARAMETERS         = P_CONTROL_PARAMETERS
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
        OUTPUT_OPTIONS             = P_OUTPUT_OPTIONS
        USER_SETTINGS              = 'X'
      IMPORTING
      DOCUMENT_OUTPUT_INFO       =
        JOB_OUTPUT_INFO            = P_JOB_OUTPUT_INFO
      JOB_OUTPUT_OPTIONS         =
      TABLES
        T_ADRS                     = T_ADRS
        T_ITEM                     = T_ITEM
    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.
      LOOP AT P_JOB_OUTPUT_INFO-OTFDATA INTO T_OTF.
        APPEND T_OTF.
      ENDLOOP.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = 'ZSD_REP_MULTI_PRINT2'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
       IMPORTING
          FM_NAME                  = FM_NAME2
       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 FUNCTION FM_NAME2
       EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
        CONTROL_PARAMETERS         = P_CONTROL_PARAMETERS
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
        OUTPUT_OPTIONS             = P_OUTPUT_OPTIONS
        USER_SETTINGS              = 'X'
      IMPORTING
      DOCUMENT_OUTPUT_INFO       =
        JOB_OUTPUT_INFO            = P_JOB_OUTPUT_INFO
      JOB_OUTPUT_OPTIONS         =
      TABLES
        T_ADRS                     = T_ADRS
        T_ITEM                     = T_ITEM
    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.
      LOOP AT P_JOB_OUTPUT_INFO-OTFDATA INTO T_OTF.
        APPEND T_OTF.
      ENDLOOP.
    <b>SET PARAMETER  ID: 'AUN' FIELD SSORD ,"VBAK-VBELN VALUE ,
                       'APO' FIELD ITNO."VBAP-POSNR.
    CALL TRANSACTION 'ZPL3' AND SKIP FIRST SCREEN.
    IF SY-SUBRC NE 0.
       MESSAGE E001(ZQOTBANK).
    ENDIF.
    *SET PARAMETER  ID: 'AUN' FIELD VBAK-VBELN,
                     'APO' FIELD VBAP-POSNR.
    *CALL TRANSACTION 'ZA3C' AND SKIP FIRST SCREEN.
    *IF SY-SUBRC NE 0.
    MESSAGE E001(ZQOTBANK).
    *ENDIF.
    IMPORT (T_OTF2) FROM  MEMORY ID 'MEMID'.
    LOOP AT T_OTF2 INTO T_OTF2.
        APPEND T_OTF2 TO T_OTF.
    ENDLOOP.
    </b>
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = 'ZSD_REP_MULTI_PRINT4'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
       IMPORTING
          FM_NAME                  = FM_NAME4
       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 FUNCTION FM_NAME4
       EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
        CONTROL_PARAMETERS         = P_CONTROL_PARAMETERS
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
        OUTPUT_OPTIONS             = P_OUTPUT_OPTIONS
       USER_SETTINGS              = 'X'
      IMPORTING
      DOCUMENT_OUTPUT_INFO       =
        JOB_OUTPUT_INFO            = P_JOB_OUTPUT_INFO
      JOB_OUTPUT_OPTIONS         =
      TABLES
        T_ADRS                     = T_ADRS
        T_ITEM                     = T_ITEM
    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.
      LOOP AT P_JOB_OUTPUT_INFO-OTFDATA INTO T_OTF.
        APPEND T_OTF.
      ENDLOOP.
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
      EXPORTING
        USE_OTF_MC_CMD               = 'X'
      ARCHIVE_INDEX                =
    IMPORTING
        BIN_FILESIZE                 = P_BIN_FILESIZE
    TABLES
        OTF                          = T_OTF
        DOCTAB_ARCHIVE               = P_DOC
        LINES                        = P_LINES
    EXCEPTIONS
       ERR_CONV_NOT_POSSIBLE        = 1
       ERR_OTF_MC_NOENDMARKER       = 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 FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        BIN_FILESIZE                    = P_BIN_FILESIZE
        FILENAME                        = 'C:\SD4.pdf'
        FILETYPE                        = 'BIN'
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = ' '
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
    IMPORTING
       FILELENGTH                      = P_BIN_FILESIZE
      TABLES
        DATA_TAB                        = P_LINES
      FIELDNAMES                      =
    EXCEPTIONS
      FILE_WRITE_ERROR                = 1
      NO_BATCH                        = 2
      GUI_REFUSE_FILETRANSFER         = 3
      INVALID_TYPE                    = 4
      NO_AUTHORITY                    = 5
      UNKNOWN_ERROR                   = 6
      HEADER_NOT_ALLOWED              = 7
      SEPARATOR_NOT_ALLOWED           = 8
      FILESIZE_NOT_ALLOWED            = 9
      HEADER_TOO_LONG                 = 10
      DP_ERROR_CREATE                 = 11
      DP_ERROR_SEND                   = 12
      DP_ERROR_WRITE                  = 13
      UNKNOWN_DP_ERROR                = 14
      ACCESS_DENIED                   = 15
      DP_OUT_OF_MEMORY                = 16
      DISK_FULL                       = 17
      DP_TIMEOUT                      = 18
      FILE_NOT_FOUND                  = 19
      DATAPROVIDER_EXCEPTION          = 20
      CONTROL_FLUSH_ERROR             = 21
      OTHERS                          = 22
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *&      Form  FINDTEXT
          text
    FORM FINDTEXT.
      REFRESH mslines.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                  = sy-mandt
          id                      = tidno
          language                = sy-langu
          name                    = tname
          object                  = tobjt
        TABLES
          lines                   = mslines
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
      DELETE mslines WHERE tdline IS INITIAL.
    ENDFORM.                    "FINDTEXT 
    Thnx
    moni
    Message was edited by: md monirujjaman
    Message was edited by: md monirujjaman

    Hello,
    I had thought that your 4th output of the Transaction is an output of a list and NOT from a SCRIPT.
    Now, if it is a SAP SCRIPT ourput, it is quite simple as you have to get the OTFDATA from the SCRIPT. But you may have to make the correction in your SAPSCRIPT driver program.
    Sample:
    CALL FUNCTION 'CLOSE_FORM'
         TABLES
              otfdata                  = te_otf_table
         EXCEPTIONS
              unopened                 = 1
              bad_pageformat_for_print = 2
              OTHERS                   = 3.
    Next you may EXPORT this OTF Data Internal Table to ABAP Memory.
    In your program where you are calling all the 3 forms + the transaction which outputs the SAPScript output, the exported data may be imported and appended into the MAIN Interal Table and single PDF could be generated.
    Secondly, The PRINT prieview of the SSFs could be generated by passing Export options of the SSF FM
    SAmple:
    ssfctrlop-no_dialog = ' '.
    CALL FUNCTION l_form
        EXPORTING
             control_parameters = ssfctrlop
             output_options     = ssfcompop
    I hope this helps you.
    Regards, Murugesh AS

  • How to print the superscript in smartform

    Hi gurus,
    Please tell me the procedure how to print the superscript in middle of the text displaying?
    when we are displaying the smartform its converted to some special character like & .
    please let me know procedure at the earliest
    Regards
    Raj

    Hi thanks for ur patience.
    see my requirment was to print TM as superscript for HLL ,already smartstyle is there, and also a character format with superscript is also defined.
    then aftet HLL how it prints as superscript.
    for HLL we are using another character format and for superscript we are using the another character format.
    If posiible send me the code to write in smartforms
    Regards
    RAj
    Points are awarded for useful answers.

  • How to print horizantal lines in smartforms?

    hi friends,
                       how to print horizantal lines in smartforms.
    waiting for ur valuble replies.
    Thanks,
    Kiran

    HI,
    If u use templates or table,then use borders to print the horizontal lines.
    Eg : Create template-->Table painter->click select pattern button->Display framed pattern->select 3rd one.it will display only horizantal lines.
    if want to print horizantal line under the text, then create one paragraph or character formate with Underline in smartstyles.Use that paragraph or character to u r text element

  • How to print a bullet in smartforms?

    Hi All,
    How to print a bullet in smartforms?
    I need it urgently.
    Any help would be appeciated.
    Regards,
    Mahesh.

    Hi,
    if i remember correct <600> is the value for bullets.
    you can insert this using sap system symbols ---> select bullets (before this place your cursor where ever you want the bullets.
    eg:
    P1  <600> test.
    Thanks,
    Sree.

  • How to print Check Box in smartform

    HI,
      How to print check box in smartforms. I am using Include Sap Symbol but in the print it is coming as #. Do we need to do any setting like we do for barcode?
    Thanks
    Raghavendra

    hi,
    u can print a check box in different ways.. by inserting symbols and making window as check box..
    once go through the thread u will get to k now differnt ways
    putting checkboxes in smartform?
    Please Close this thread.. when u r problem is solved. Reward all Helpful answers
    Regards
    Naresh Reddy K

  • Error while assigning Smartform in Sale Order

    Dear All,
    For taking the sale order printout, I do not want to create a SAP SCRIPT Form. So in NACE transaction, I have created one output type 'ZA01' and assigned a new Smartform to that output type.
    Now, after adding this output type in Sale Order, when I am going to print the sale order using ZA01 output type system is giving error that WRITE_FORM is invalid, START_FORM is missing.
    Please tell whether can we assign the Smartform to sale order or not. And if yes then how to correct the error.
    Kind Regards,
    Vishal

    Dear Raghu,
    I have checked it. And the entry is present in that table. But this error is coming only when I am giving Smartform. But system is not giving any error when I am giving script form.
    So the problem is only for SmartForm.
    Regards,
    Vishal

  • Error while Activating a Smartform!!

    This smartform was first developed in 4.6 version in german language. Now, its being done in ECC 6.0 version with changes in naming conventions of the fields and the hardcode values in the logic.
    After the changes made to the fields names or table names or hardcoded values. it resulted  with warnings. Now when i try to Activate it. It pops and information message stating that "A serious error has occurred
    The transaction had to be terminated
    Press the "Yes" button
    to download the data required for further support to the front end"
    If selected 'Yes' the error log is downloaded into a flat file which looks like stated as below " DZSD_INVOICE01_SF              GR%GRAPHIC1                             Hintergrundbild
    DZSD_INVOICE01_SF              PAFIRST                                 Erste Seite
    DZSD_INVOICE01_SF              GR%GRAPHIC4                             Neue Grafik 4
    DZSD_INVOICE01_SF              WIABB_LOGO                              ABB_LOGO
    DZSD_INVOICE01_SF              CD%CONDITION139                         Neue Alternative 139
    DZSD_INVOICE01_SF              OA%OUTATTRIB168                        
    DZSD_INVOICE01_SF              COSTEUERUNG_ABSENDERABGABE             
    DZSD_INVOICE01_SF              SEABSENDER_STANDARDAUSGABE             
    DZSD_INVOICE01_SF              CD%CONDITION228                         Neue Alternative 228
    DZSD_INVOICE01_SF              TISENDER_POSTFACH_DEUTSCH               Senderadresse Postfach
    DZSD_INVOICE01_SF              CD%CONDITION4                           Neue Alternative 4
    DZSD_INVOICE01_SF              OA%OUTATTRIB43                         
    DZSD_INVOICE01_SF              TISENDER_STRASSE_DEUTSCH                Senderadresse Strasse
    DZSD_INVOICE01_SF              CD%CONDITION5                           Neue Alternative 4
    DZSD_INVOICE01_SF              OA%OUTATTRIB52                         
    DZSD_INVOICE01_SF              TISENDER_POSTFACH_ENGLISCH              Senderadresse Postfach
    DZSD_INVOICE01_SF              CD%CONDITION239                         Neue ...."
    and so on...
    if selected 'NO', then an error message pops up stating " Internal error (illegal structure of data storage)" for which i need to either choose the 'EXIT' button which would take me out of the transaction.
    Please let me know as to resolve this problem and what could i do to get the smartform activated.
    Would appreciate an early response!!
    Thanks a lot!!,
    M. Keerthi Shanker

    Thanks to everyone here...
    Special Thanks to Jayanthi...
    I have changed the I_ITEMS's structure in Form Interfaces of the form.
    Now its working fine...
    Regards
    Pavan

  • Error while saving a smartform in pdf with action profile in service order

    Hi experts,
    I have a problem in saving a smartform which is converted in pdf.
    WHat i m doing is.
    The action profile is configured with new Z class and Z method. CL_DOC_PROCESSING_CRM_ORDER and CRM_SRVORDER_EXEC_SMART_FORM.
    But when i click the button in the Order, i m able to save the pdf in local drive, but an error is coming in the Order page(at the bottom) "Action could not be executed successfully".
    The action has been setup with "Printonly" and "Smartforms print" in customization.
    I have a dount whether, this action Printonly is only to print the smartform ??? Or can we use just to save the smartform in pdf.
    But when i remove the pdf conversion and save dialog and try to print it directly, Its printing the smartform. No errors are coming.
    But guys, please help me on this. I have tried all the tricks i know.
    I just want to save a smartform in pdf with action profile configured.
    Thanks in advance.
    <REMOVED BY MODERATOR>
    KK
    Edited by: Alvaro Tejada Galindo on Mar 19, 2008 4:26 PM

    Hi;
    Did you checked
    Queries Error With FRM-92101 In Many NLS Forms [ID 443922.1] << seems similar error like yours
    Forms FRM-92050, FRM-92100, FRM-92101, FRM-92102 Reference Guide [ID 444690.1]
    If its not help please enable trace
    How To Perform System Tracing For All Forms Runtime Processes? [ID 400144.1]
    Regard
    Helios

  • Error While Transporting Smartforms from 832 client to 834 client

    Hi
    I released my Smartform and Program...
    and i told our basis ppl to Transport the Code from 832 to 834
    but while transporting they are Getting this error
    Transport Control Program tp ended with error code 0212
    Errors:could not access file as supposed.
    My question is
    Y they r getting this error?
    is it link to Abap Program..
    bcz they are telling that there is a wrong in my Program...
    Bt my Program is working fine in 832 client...
    Can any one help me on this?

    Smitha,
    If you haven't done any changes in the program then there is no need but you are saying you have created error messages.Haven't you tagged the changes related to the smartform as well as the Error messages (ie message class) in the same request?
    If you have different requests one for error message and one for Smartform,then see to that both are transported.If smartform is using any of those error messages then you need to move the request which has got error messages first and then only the smartform related requests should be moved otherwise it will give a dump becuase by the time Smartform is moved to 834 the error messages request is not yet moved.Hence sequnece while moving the transport requests is very important.It is always advisable to have all the changes related to a program in one request.
    And added to that do check the link given by Gautam too.
    K.Kiran.

  • Need suggestion in smartform

    Hi,
    I am passing range of invoice numbers using select options from driver program.I have to get form(one per page) for each invoice number.ie form for first invoice number should be displayed in first page.form for 2nd invoice number should be displayed in 2nd page and so on..if i select 3 invoice numbers in select options i should get 3 forms in 3 pages..how to do this?if anybody knows kindly help me.
    Thanks in advance.
    kavitha

    It depends on how you would like to see the output
    If you also want to see them in print preview that way then
    You will have to create a loop in main window of yopur page
    The loop should contain all the logic for 1 invoice.
    At the end of each loop iteration place a command node to break to a new page
    Another way of doing this is trapping all the individual smartform outputs in one spool request. But u will have problems with print preview i think.

  • Can't send smartform to external mail address

    Hi, everyone.
    Now, after creating some self-defined smartforms, we want to send its
    PDF copy to
    our external mail address. From this point, I had some try.
    Reference to SAP Library, I make a testing program named 'YPDF_TEST'.
    However, one exception always exists when running and error message id
    is 'XS806' - means
    "No delivery to &, invalid recipient address"
    I filled the address with following fields.
    [ dev_mail_recipient-logsys = 'CLNT600'.
    dev_mail_recipient-objtype = 'RECIPIENT'.
    dev_mail_recipient-objkey = '[email protected]'. ]
    I just can't understand the real reason why it doesn't work.
    Through debugging, I found the error occurs when handling the following
    codes
    in function "SX_ADDRESS_TO_DEVTYPE".
    [ swc_create_object o_recipient 'RECIPIENT' recipient_id-objkey.
    swc_get_property o_recipient 'CommunicationType' m_recipient-type.
    get_property_longvalue o_recipient m_recipient-address. ]
    On the current situation, if can't come over this problem,
    we may not build the connection and don't provide information in time.
    Failed to send, I yet try another function - added the tail but on earthdidn't get it ~~~
    Would you give me some hints or advice ?
    Any help is appreciated.
    ====================
    <i>REPORT ypdf_test .
    DATA: fm_name TYPE rs38l_fnam.
    DATA: my_control_pars TYPE ssfctrlop. "for CONTROL_PARAMETERS
    DATA: my_output_info TYPE ssfcrescl. "for JOB_OUTPUT_INFO
    DATA: output_options TYPE ssfcompop.
    DATA: e_devtype TYPE rspoptype.
    DATA: gw_lcprint TYPE ziebsflc001.
    DATA: bin_file TYPE xstring,
    bin_filesize TYPE i,
    ndiv TYPE i, offset TYPE i,
    nmod TYPE i.
    DATA: BEGIN OF bin_table OCCURS 0,
    x TYPE xstring,
    END OF bin_table.
    DATA: lines LIKE tline OCCURS 0.
    DATA: dev_mail_sender LIKE swotobjid, "B20K061818
    dev_mail_recipient LIKE swotobjid.
    DATA: dev_mail_applobj_tab LIKE swotobjid OCCURS 10 WITH HEADER LINE.
    DATA: param LIKE itcpp.
    my_control_pars-no_dialog = 'X'.
    my_control_pars-getotf = 'X'.
    Get genereated function name of Smartform
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'ZDEMO_SMART_FORM_PPF'
    IMPORTING
    fm_name = fm_name
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    ENDIF.
    Get Device type
    CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
    EXPORTING
    i_language = sy-langu
    I_APPLICATION = 'SAPDEFAULT'
    IMPORTING
    e_devtype = e_devtype
    EXCEPTIONS
    no_language = 1
    language_not_installed = 2
    no_devtype_found = 3
    system_error = 4
    OTHERS = 5 .
    IF sy-subrc <> 0.
    ENDIF.
    output_options-tdprinter = e_devtype.
    set needed mail option
    my_control_pars-device = 'MAIL'.
    dev_mail_sender-logsys = 'CLNT600'.
    dev_mail_sender-objtype = 'RECIPIENT'.
    dev_mail_sender-objkey = 'CHI_DEV03'.
    dev_mail_recipient-logsys = 'CLNT600'.
    dev_mail_recipient-objtype = 'RECIPIENT'.
    dev_mail_recipient-objkey = '[email protected]'.
    CALL FUNCTION fm_name
    EXPORTING
    control_parameters = my_control_pars
    mail_recipient = dev_mail_recipient
    mail_sender = dev_mail_sender
    output_options = output_options
    ip_carrid = 'ID'
    ip_connid = '8290'
    ip_fldate = sy-datum
    ip_bookid = '12345678'
    ip_customid = '09876521'
    ip_luggweight = 90
    ip_wunit = 'KG'
    ip_smoker = 'X'
    IMPORTING
    job_output_info = my_output_info
    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.
    Another try ***
    *DATA: param LIKE itcpp.
    *DATA: BEGIN OF off_obj.
    INCLUDE STRUCTURE soodk.
    *DATA: END OF off_obj,
    ok TYPE c,
    msgid TYPE symsgid,
    msgno TYPE symsgno,
    msgv1 TYPE symsgv,
    msgv2 TYPE symsgv,
    msgv3 TYPE symsgv,
    msgv4 TYPE symsgv.
    *DATA: dev_mail_applobj_tab LIKE swotobjid OCCURS 10 WITH HEADER LINE.
    *CALL FUNCTION 'CONVERT_OTF_AND_MAIL'
    EXPORTING
    mailoptions = param
    mail_sender = dev_mail_sender
    mail_recipient = dev_mail_recipient
    IMPORTING
    office_objid = off_obj
    mail_ok = ok
    msgno = msgno
    msgid = msgid
    msgv1 = msgv1
    msgv2 = msgv2
    msgv3 = msgv3
    msgv4 = msgv4
    TABLES
    mail_application_object_ids = dev_mail_applobj_tab
    otf = my_output_info-otfdata.</i>

    Hi,
    You can follow a different approach. Send the output of the Smartform to the spool.
    You have a Function Module to read the spool and convert it to PDF . Then there is one more function module to attach the PDF and send it as a mail.
    You need to configure SMTP in Tcode : SCOT.
    Search the forum with emailpdfattachment
    You have umpteen postings available.
    Pls reward if useful.
    Regards,
    Laxman Nayak

  • In Footer text elements are spliting in smartform

    Hi,
    In smartform, I am using text elements for printing gross / net totals in the Main window -> Table -> Footer. Now problem I am facing is all the set of elements are breaking from page to page. I want it print in one page with out any page break. How should I do that. Please suggest.
    Thanks
    Ram

    Hi,
    In the footer text , in the output options tab ..there is a check box "Page protection".. Check that..
    Documentation for "Page protection"
    In some cases you may want to avoid that text is divided by a page    
    break. Therefore, you can protect text sections with a page protection.
    Thanks,
    Naren

Maybe you are looking for