Smartform Pages Problem

Hi,
I have developed a Smartform and that is working fine with all values
that form have terms and conditions and subtotals
if i have one page i need to display in the first page all the terms and conditions
if i  have more than one page i need to display in last page and remaining have doesnot have any space after main window
how to do this please suggest me

Hi
check the form page SFSY-FORMPAGES
that will contain max no of page
in CONDITION TAB
put condition
if it is 1.
check 'ONLY ON FIRST PAGE' check box
if more than 1
check 'ONLY AFTER END OF MAIN WINDOW' check box
or else you can also try
'ONLY AT THE PARAGRAPH END' check box
regards
Prabhu Shanmugham

Similar Messages

  • Smartform page numbering

    Hi experts,
    I am displaying notification numbers in the ALV format. when the user selects few of the notification numbers and click on display button it should display the notification details using smartform.
    I have to trigger a new page for every notification number.
    I had problem in numbering the smartform pages.
    For example if the user selects 3 notification numbers say 1st one takes 3 pages, second one takes one page and third one takes 2 pages then i have number the pages as below.
    1st notif:1of 3,2 of 3,3 of 3.
    2nd notif:1 of 1.
    3rd notif:1 of 2,2 of 2.
    Please give me some suggestion.
    Thank you.
    Regards,
    Bharat Kalagara.

    hi ,
    in the driver program based on on a check on notification number call smartform , and now in smartform where u are printing page number make that window as a final window , this will help in calculating total no of pages now create a text element and write &sfsy-page(3cz)& of &sfsy-formpages(3cz)&.
    hope this helps you !!!
    regards,
    prashanti

  • Smartforms transport problem

    My program (smartforms) shows different result between DEV and QA
    I added an export parameter when I called smartforms in abap program, and add an import parameter to smartforms. It works fine on DEV but short dump on QA server due to a parameter was missing.
    I checked import parameters in smartforms, they are correct.
    I push F8 button in smartforms page to go to Function Module page and I found an import parameter is missing on QA.
    Recently, other programs with smartforms that have been tranport to QA are also have this kind of problem.
    Any idea would be appreciated.

    The problem has been fixed.
    by go to SE38 (on QA) > at Menu bar > Program > Generate
    I still dont know the reason why does this problem occured and how does it could be fixed like this.

  • Smartform : How do i append o/p of  a report(ZA3C) as Smartform Pages

    Dear all
    I have three smartform pages with a Driver prog .
    Now i want 2 append the o/p of mere a report(not   SapScript) as smartform pages .
    I m trying 2 achieve that by the following BOLD part of my code .
      Throw some light on this
    Thnx in Advance
    Moni
    Have look at my code plz
    *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,
        VBFA,
        LIKP,
        LIPS,
        KONV,
        t005t,
        KNA1,
        t001w,
        T001,
        ADRC.
    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,
          T_OTF2 TYPE SSFCRESCL OCCURS 2000 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,
          ITNO     LIKE VBAP-POSNR.
    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(50).
        EXIT.
      ENDLOOP.
    *Buyer's Order No  Ref
      TIDNO = 'Z023'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-BUYER = mslines-tdline(50).
        EXIT.
      ENDLOOP.
    *Exporter Ref
      TIDNO = 'Z072'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-XPREF = mslines-tdline(50).
        EXIT.
      ENDLOOP.
    *Pre-Carraige By
      TIDNO = 'Z074'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PCRG = mslines-tdline(50).
        EXIT.
      ENDLOOP.
    *Place Of reciept by Pre-Carraige
      TIDNO = 'Z073'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PLPCRG = mslines-tdline(50).
        EXIT.
      ENDLOOP.
    *Vessel/Flight No
      TIDNO = 'Z075'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-VFNO = mslines-tdline(50).
        EXIT.
      ENDLOOP.
    *Port Of Loading
      TIDNO = 'Z077'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PLOAD = mslines-tdline(50).
        EXIT.
      ENDLOOP.
    *Port Of Discharge
      TIDNO = 'Z076'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PDISG = mslines-tdline(50).
        EXIT.
      ENDLOOP.
    *Final Destination
      TIDNO = 'Z070'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-FDEST = mslines-tdline(50).
        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.
        ITNO = VBAP-POSNR.
        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(40).
        EXIT.
      ENDLOOP.
    *Net Wieght
      TIDNO = 'Z079'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-NWT = mslines-tdline(40).
        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.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = 'ZSD_REP_MULTI_PRINT3'
      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.
    <b>*for capturing the o/p pages from ZPL3 and consolidating into table T_OTF to get single PDF
    SET PARAMETER  ID: 'AUN' FIELD SSORD ,
                       'APO' FIELD ITNO.
    CALL TRANSACTION 'ZPL3' AND SKIP FIRST SCREEN.
    IF SY-SUBRC NE 0.
       MESSAGE E001(ZQOTBANK).
    ENDIF.
    IMPORT (T_OTF2) FROM  MEMORY ID 'MEMID'.
    LOOP AT T_OTF2-OTFDATA INTO T_OTF.
        APPEND T_OTF.
    ENDLOOP.</b>
    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:\SD6.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

    Hello,
    You can find out the Spool Request w.r.t the Program by FM RSPO_FIND_SPOOL_REQUESTS.
    This Spool Request could be converted to PDF by FM CONVERT_ABAPSPOOLJOB_2_PDF.
    P.S.: The Import parameter 'NO_DIALOG' in FM CONVERT_ABAPSPOOLJOB_2_PDF is to be initial. You will be getting a Popup seeking the Path and name of the file to be created. This is because you can direct the Spool list to be created in the same PDF file by appending it into earlier created SSF/SAPScript PDF outputs.
    I hope this helps you.
    Regards, Murugesh AS

  • How can i know total number of lines in a smartform page?

    Hello All,
    1. How to find the total number of lines that can be printed on a smartform page?
    2. Need to determine the current line on which the text is goint to printed
    Depending upon the no of lines left for printing i need to call a new page explicitly?
    Answers will be rewared...
    Thanks and Regards,
    Josin George
    Edited by: Bhuvaneswari Mathuraiveeran on Jan 1, 2009 1:02 PM

    hi ,
    I think u have to decide no of lines by trial error menthod only ...
    u can use SY-TABIX  to decide , which line its printing ...
    hope its helps .....

  • Smartform upload problem (within same Version)

    i have download smartforms from 4.7 first and than uploading it in same 4.7 but error occurs as below:
    first:  "A serious error has occurred
    The transaction had to be terminated".
    than second: Internal error (illegal structure of data storage)
    Message no. SMARTFORMS002.
    i can uplodad smartform successfully than and check also successfully,
    but while i do final activation it causes above error.
    what can be problem, is due to smartforms style problem, but i tried removing all style of text elements, thought it creat that errors,
    if any can knhow how to upload smartform successfully and solve above error.
    regards,

    L.S.
    I just encounter a similar error when activating a smartforms. I had made some changes, maybe by copy nodes through memeory into another smartforms and/or deleting one %GRAPHICS1 and making another.... smartforms got confused somehow and gave me an abort error 002.
    I debugged the coding of activating smartforms and found out that ( in my case ) sap coding tries to insert duplicate entries in table stxfobjt.
    Here is the part of coding where you can put your breakpoint and adjust the internal table tobjt if you have the same problem.
    I made the line  insert stxfobjt from table t_objt.  BOLD ( in plain text with * : it s  not a remarked coding line )
    SAPLSTXBX                      / LSTXBXU36
    FUNCTION                       / SSF_SAVE_FORM      
    Speichern der Tabellen
      if i_active = space.                         " gesicherte Fassung
        export t_ntokens t_objt t_ltext t_noltext
               to database stxfconts(xx) id i_formname.
      else.                                        "     aktive Fassung
        delete from stxfobjt where formname = i_formname.
        try.
          insert stxfobjt from table t_objt.
        catch cx_sy_sql_error into l_exception.
          get reference of t_objt[] into l_dref.
          raise exception type cx_ssf_fb
                exporting textid     = cx_ssf_fb=>err_on_insert
                          table_dref = l_dref.
        endtry.
        perform save_ltext using i_formname t_ltext.
        export t_noltext t_ntokens unchecked = i_header-unchecked
               to database stxfcont(xx) id i_formname.
        delete from database stxfconts(xx) id i_formname.
      endif.
    Good luck all with debugging SAP's bugs
    Regards,
    Edwin Glaser
    doubleclickyourprogrammer [at] sap4u.nl

  • Smartform upload problem

    i have download smartforms from 4.7 first and than uploading it in same 4.7 but error occurs as below:
    first:  "A serious error has occurred
    The transaction had to be terminated".
    than second: Internal error (illegal structure of data storage)
    Message no. SMARTFORMS002.
    i can uplodad smartform successfully than and check also successfully,
    but while i do final activation it causes above error.
    what can be problem, is due to smartforms style problem, but i tried removing all style of text elements, thought it creat that errors,
    if any can knhow how to upload smartform successfully and solve above error.
    regards,

    i have tried deleting one by one elements and found that problem in address element,
    i have just delete it and active it that it got activated,
    and again after deletion i have put sam variable in address element for displaying adress dynamicaly and set length and width all same that it fot activated!
    than what the problem at first time activation?
    is there any runtime conflict or what?
    regards,

  • Insert and then show the result and refresh page problem

    hi all,
    I collect the form value and put them into db, and then display this student 's inform out from db including the one we just submit, first I do it on this way
      insertpayment(UserId, FeeType, DuteDate, OfficerReason, OtherReason, CompleteDate,
                            InterviewDate, ApprovalDate,PaymentYear);
                   studentRecords= getFound(UserId);
                     userSession.setAttribute("studentRecords", studentRecords);
                     RequestDispatcher disp;
                   // disp = getServletContext().getRequestDispatcher("/WEB-INF/jsp/   studentRecords= getFound(UserId);");
                     disp = getServletContext().getRequestDispatcher("/showPayment");
                    disp.forward(req, res); then whenever I refresh my showRecords.jsp" I call the insert function. THAT IS HORRIABLE.
    I try to move the studentRecords= getFound(UserId); to my showPayment servlet and then forward the result to showRecords.jsp, but I alwarys get error
    PWC4011: Unable to set request character encoding to UTF-8 from context /report, because request parameters have already been read, or ServletRequest.getReader() has already been called
    How should I handle this kind of problem??

    Karan, thank you for the link, i read a few articles, I only get the sample part part use res.sendRedirect("/myfolder/showPayment"); in my insert servlet and use forward to display the page
    userSession.setAttribute("studentRecords", studentRecords);
                  RequestDispatcher disp;
                  disp = getServletContext().getRequestDispatcher("/WEB-INF/jsp/secure/admin/showRecords.jsp");
                   disp.forward(req, res);   
    this solute the refresh page problem, but bring the new problem I can't use the following way to disable the back button. not the perter solution
    maybe I did not understand PRC more advice!!
    response.setHeader("Cache-Control","no-cache"); //Forces caches to obtain a new copy of the page from the origin server
    response.setHeader("Cache-Control","no-store"); //Directs caches not to store the page under any circumstance
    response.setDateHeader("Expires", 0); //Causes the proxy cache to see the page as "stale"
    response.setHeader("Pragma","no-cache"); //HTTP 1.0 backward compatibility

  • Smartform Pages issue

    Hi All,
    I have a strange issue on Smartform Pages,I have 4 pages in the smartform and i need all pages should be printed one after another,
    for that i have selected in GENERAL ATTRIBUTES next page as subsequent page,
    Eg:
    FIRST PAGE --> SECOND PAGE->THIRD PAGE->FOURTH PAGE and so on .
    but when i execute layout is displaying only 2pages,if i change the sequence also 2 pages,
    just to check i put command in the main window and in that i gave the page names even though always two pages.
    did i miss something?or this is an issue with some other issue like GUI etc....
    Please let me know your suggestions to resolve this.
    Thanks
    Surendra

    Hi Vara,
    By default there will be a value set by the administrator for the number of pages you can view in the spool. So to me it looks like this value is set to 33 in yoru case. You can go to setting from the same screen and change thsi setting to display all pages. But beware that this may take a long time some times and also give you a dump at times.
    -Guru

  • I have 10 UiWebView to load different charts and maps on an iPad,using UIScrollView to scroll through each page, problem is on loading of each UiWebView my UiScrollView does not scroll smoothly to other pages horizontally,so how to make the scroll smooth?

    I have 8-10 UiWebView's  to load different charts and maps on an iPad, i am using UIScrollView to scroll through each page, problem is while loading of each UiWebView my UiScrollView does not scroll smoothly to other pages horizontally, my query is can i load UiWebView on background and how to make sure the scoll of pages is smooth, even though the loading of UiWebViews may take time.
    Note :i have tried disabled scrolling on webview, so when i scroll on the page  the scroll event will be of UiScrollView, so believe no conflict with UiWebView.
    also in ios 6 i read about suppressesIncrementalRendering = True but i want to support ios5, also as UiWebViews are said to be running on main thread by default, i suspect when loading of webViews and when user tries to scroll the page, the main thread is busy, but i want the scroll of the page to be smooth  even though the loading of UiWebViews may take time.

    You will probably get a faster and more accurate answer if
    you repost in the Developers Forum.

  • My solution for cannot turn page problem in ADE

    It seems this problem has been there for a while. I have this problem in ADE 2.0 and 3.0. I solve this problem on my computer today.
    This problem is not a "turnning page" problem but an UI refresh problem, if you turn page, close ADE and reopen it, you will find the page actually turnned,  I guess this problem occurs on a computer which have two display card. On my laptop, a NVIDIA, and an integrated. ADE works fine on NVIDIA and not on the integrated one.
    So Here is my solution: Tell ADE not running on the integrated display card but on NVIDIA. You can do so by using NVIDIA's control panel program. "manage 3D settings" -> "program setting" tab, add ADE, and tell it running on NVIDIA.

    System: Windows 7; graphics (onboard Motherboard) Intel(R) HD Graphics 4600 Properties.
    I have the same problem:
    ADE does not turn page *unless* I resize the ADE window after turning the page.  After resizing the ADE window, the page will turn.
    I don't have multiple displays.  I don't know how to adjust my display setting to facilitate ADE.  Still looking for a solution... If you find a solution or a better product, let us know.

  • Next page problem -smartform

    Hi Experts
                 we have configured a output type for VF02 billing and assigned a smartform also. I defined the next page also in the smartform.
                 Its working for first page only, not working for more pages, not even display the first page also, what could be the reason, pls suggest me, its very urgent.
    Thanks in advance.
    Regards
    Rajaram

    Hi,
    initially check in preview if it is showing then there is some problem with printer ask the concerned person if u r not even getting it in preview also then call start form function module and assign each page numer there if two pages call 2 times start and end form.
    try this this might work.
    Regards,
    sana.

  • Smartforms -Page Skipping Problem in Continue Sheet Printing.....

    Hi Gurus,
    I face problem with multiple page printing in dot matrix printer for purchase order printing.
    Here are the details about my requirement
    Our client Purchase order pre-printed Paper size Width 303 mm Height 203 mm and continued sheet. I have created a z layout zpoprint for the above size and assigned it in smarforms and select DINA4 transverse in printer. Whenever we printing 2nd page it starts printing after 5 cm. My friends asked me to create a customized page format in server properties in printer. Is there any other way to overcome this issue? Anybody face this problem kindly reply to me. 
    By
    SP. Manavalan

    Hi
    Though you can double check the page layouts of both pages of your smartform, also keep in consideration that using a dot matrix printer to get the output of smartforms will have some impact of the positioning of the print as dot matrix printers are mechanical in nature(wheels are moving!).
    Whereas, in laser printers, the whole data is taken, formatted and then sent to print.
    Regards
    Raj

  • Smartforms - page protection problem

    Hi,
    I have made an invoice form with smartforms. To protect the positions of page breakes, I have made all position nodes in one folder note and set the page protection flag for that folder. Because in tables the page protection option is not working, I have made it all with paragraphs...
    This is my problem now:
    If the form has more than one page, I have to show the sum of all positions of the first page on the bottom of the page and one the top of the next page. Therefore I have calculated the sum inside the loop of the positions (at the end of the loop).
    This is normaly working... But if I have two pages and only <b>ONE</b> position does not fit on the first page, the calculated sum contains the sum of <b>ALL</b> positions, although the last position is shown on the next page!
    Any ideas, how I can only calculate the positions that fit on one page <b>FOR REAL</b>?
    Thank You very much!
    Cheers Arne

    Hi,
    I encountered a similar problem as ur doing.In dat scenario what i did was that I created a <b>Loop</b> instead of a table and secondly based on the page size please create a style with proper an appropriate tab and use this through out while displaying the line items.
    Using a tab will ensure equal spacing everywhere and the data will not overflow from any line and where ur writing a variable place an addition (C) at the end of that variables between the &. This also ensures that the data doesnt overflow and confines to the space.
    Hope this will help.
    Varun

  • Smartforms : page count problem

    Hi everyone,
    I am using the system variable SFSY-FORMPAGES and when the total pages is above 9, I get a star "*" instead of the real number of pages.
    Can someone help.
    Thanks in advance.

    Hi David,
      maybe there isn't enough space for the text in the field
    Try to use SFSY-FORMPAGES(C) (condense spaces) or try to give more space to the text.
    Let me know.
    Best regards,
    Manuel
    PS: please remember to close the thread and to reward points when your problem is solved. Thank you

Maybe you are looking for