Problem in subtotals - smartforms

Hi ,
Iam have created a smartform where i need to calculate pagewise subtotal . i have declared a variable and used that variable in claculations tab in the main loop and used before loop iam getting subtotls but iam facing a problem it is for eg. if iam having 2 pages in the first page three line items and second page 2 items are displayed like
1 item desc 1000
2 item decs 1000
3 item desc 1000
then i should get the subtotal as 3000
second page
4 item desc 1000
5 item desc 1000
then subtotal should be 5000. l
ike this i should get but what iam getting is in the first page iam getting subtotal as 4000 and second page getting subtotal as 5000 which is wrong. please help me in this .thanks...

Hi,
The problem is due to processing of next record was already done by the time it reaches page end, so that is the reason first record of next page is also getting added into previous page total. To avoid this just substract the same value(which is already pocessed in your actual varibles) from total variable. But this shoul not happen for last page so compare page number variable with number of job pages variable simultaneously.
Hope this gives you some idea.
Regards,
Aswini Sammeta

Similar Messages

  • Problem with subtotals on Smartform. SRM 5.0

    Hello,
    Iam facing one serious problem with one smartform on SRM 5.0.
    Using the automatic "calculation" of one table in main window i have set the subtotal calculation. This calculation is not working because the form is getting always the item from the next page on pagebreack moment...
    How could i control this bug from sap?

    The reason for this is the the systematic of the form interpreter on how to check if a page break has been done.
    Items and other stuff get printed in MAIN window.
    So e.G. you have 4 items while 3 fit on one page. so he prints 3 items, all is fine, no page break detected so he continues with MAIN window printing.
    Now he prints item 4 and WHILE printing it he detects that there is not enough space on the page to print it. Page break gets triggered, but item 4 has already been in process and so values of item 4 are added.
    I never ran into this problem with the auto subtotal calculation of smartforms and i really wonder that this makes problems in Standard as well.
    I suspect you can find a SAP-note on this subject, since this is the standard having issues, and i guess they are solved by now.

  • Alignment problem in converting smartform printpreview into PDF

    Hi all,
    I am getting some alignment problem in converting smartform printpreview into PDF format, i.e the format of PDF is different from printpreviw of smartform.
    kindly suggest something so that alignment is not changed while converting to PDF.
    Regards,
    Sumalatha

    use below f.m to convert it into 255 characters....
         CALL FUNCTION 'QCE1_CONVERT'
            TABLES
              t_source_tab         = i_tline
              t_target_tab         = so_ali[]
            EXCEPTIONS
              convert_not_possible = 1
              OTHERS               = 2.

  • Problem printing a smartform!

    Hi Everybody!
    I have a problem with my smartform! In the main window I have a dinamic table, the problem is when the table is full the rest of the data don't go to another page, How can I make another page? I'm doing this with the transaction smartform and I don't know If I need a new page...and if I need, how can I make this and how can I put the same things that in the first?
    Moreover, I need to put one field only in  the last page...How can I control this?
    Thanks very much,
    Regards,
    Rebeca

    Hello to everybody and thanks for answer my doubt!
    I've done the second page but the problem is still there, In main window in page first I've two tables, and three templates, is something like this:
    Concepto | Mensual | Atrasos | Reintegro | Total |
    Retribuciones........................................| 9.741|
    Sueldo    | 1135      |               |              |  1135 |
    Cpto Des|  12         |               |              |      12 |
    Deducciones.........................................| 148,60|
    muface |  45,25       |               |              |   45,25|
    Liquido a percibir...................................|    4587|
    This is an example of my table, the structure is: The first line (concepto, mensual...) is a template because this is always the same, the second line is also a line, the third is a table because this is the changing thing, in this table I can have as minimum one field and for maximum 8 fields, but the problem is when I have for example 10 fields, the table cut the fields and only show the first 8.
    The fourth line is also a template because this is always the same, the fifth line (muface..) is a table and has the same conditions to the other line and the last one (liquido a percibir) is a template that I only have to show when the table third and fifht are full...
    Is this way to make my main window correct? How can I make this?
    Thanks a lot
    Regards,
    Rebeca

  • Problem while assigning smartform in NACE

    Hi all,
    I am getting the following error while trying to assign a Z-smartform in NACE transaction. Rewards assured
    <b>Diagnosis</b>
    For output type NEU and transmission medium 8 an entry has been maintained in the table of processing programs, but in this entry no processing program has been specified.
    <b>System Response</b>
    When the output will be processed later on, it cannot be issued.
    <b>Procedure</b>
    Specify at least one processing program and one processing routine in this program.

    Hello Jai,
    I just received the same error while updating our PO. 
    In my case, the problem was that medium "Special function" had an entry line with no program assigned.  This was set up in the original configuration of the system, and since I had only changed the "Print output" entry, I wasn't sure what was causing the message. 
    Since the "Special function" entry was blank, I tested that to see if it was the issue.  Removing that entry did eliminate the message.
    Since the message I received was an informational message, an alternative method to proceed was by simply hitting "Enter" when the message appeared.  I don't see why a blank entry would be required, but since I didn't do the original system configuration, this was the method I chose so as to not change any existing settings other than for the Smartform on which I was working.
    This is an old thread, but I thought I would add this information in case anyone stumbles across it while searching for information about this error (which is how I found the thread.)
    Blaine

  • Problem in mailing smartforms output using SO_DOCUMENT_SEND_API1

    Hi all,
    Iam using the function module SO_DOCUMENT_SEND_API1 to email purchase order through driver program.
    the code goes like this:
    first iam calling the function module of smartform
    CALL FUNCTION lv_fm_name
    where iam passing the desired paramets.
    from where iam taking the otfdata returned from the fm
    like:
    IMPORTING
             job_output_info  = w_return
    where w_return is declared as TYPE ssfcrescl.
    then iam writing this code
    i_otf[] = w_return-otfdata[].
    DELETE w_return-otfdata WHERE tdprintcom = '//'.
    READ TABLE i_otf WITH KEY tdprintcom = 'EP'.
    my_tabix = sy-tabix + 1.
    INSERT lines of w_return-otfdata INTO i_otf INDEX my_tabix.
    then iam calling the fm
          CALL FUNCTION 'CONVERT_OTF'
            EXPORTING
              format                = 'PDF'
              max_linewidth         = 132
            IMPORTING
              bin_filesize          = v_len_in
            TABLES
              otf                   = i_otf
              lines                 = i_tline
            EXCEPTIONS
              err_max_linewidth     = 1
              err_format            = 2
              err_conv_not_possible = 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.
    then converting it to 255 using
    DATA: gd_buffer TYPE string.
    DATA: w_cnt TYPE i,
                i_record LIKE solix OCCURS 0 WITH HEADER LINE.
          LOOP AT i_tline.
            TRANSLATE i_tline USING ' ~'.
            CONCATENATE gd_buffer i_tline INTO gd_buffer.
          ENDLOOP.
          TRANSLATE gd_buffer USING '~ '.
          DO.
            i_record-line = gd_buffer.
            APPEND i_record.
            SHIFT gd_buffer LEFT BY 255 PLACES.
            IF gd_buffer IS INITIAL.
              EXIT.
            ENDIF.
          ENDDO.
    the to test whether its converting into pdf iam using the fm
    CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              bin_filesize = bin_filesize
              filename     = 'C:\TESTPDF.PDF'
              filetype     = 'BIN'
            TABLES
              data_tab     = i_record.
    then calling my main fm
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
            EXPORTING
              document_data              = w_doc_chng
             put_in_outbox               =  'X'
           sender_address              = sender
           sender_address_type         = 'INT'
           commit_work                  = 'X'
            TABLES
              packing_list               = it_packing_list
              object_header              = w_objhead
            CONTENTS_BIN               = I_OBJBIN
              contents_txt               = i_objtxt
             contents_hex                = i_objbin            
              receivers                  = it_receivers
    EXCEPTIONS
       too_many_receivers               = 1
       document_not_sent                = 2
       document_type_not_exist          = 3
       operation_no_authorization       = 4
       parameter_error                  = 5
       x_error                          = 6
       enqueue_error                    = 7
       OTHERS                           = 8
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    all the parametrs for the above fm are passed correctly like populating  it_packing_list,w_objhead, i_objtxt, i_objbin,it_receivers.iam using this fm because i need to pass sender email id.
    the first problem iam facing is when iam using the fm gui_download iam not able to view the smartform
    the error is "adobe reader could not open "test.pdf" as it is not supported etc..."
    second is same problem iam facing while trying to open the attachment in pdf which is emailed to reciever.
    i think there is some problem in converting 132 to 255 characters.
    can some one please help on this.(might be a problem where iam passing DO
            i_record-line = gd_buffer.)
    thanks in advance.
    regards
    sunil

    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = <b>255 "132</b>
    IMPORTING
    bin_filesize = v_len_in
    TABLES
    otf = i_otf
    lines = i_tline
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 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.
    I guess it will solve your problem.
    CLose the thread if your question is answered.
    Regards,
    SaiRam

  • Problem in displaying smartform as pdf in mail attachment

    Hi Gurus,
    I have generated a Smartform, converted to PDF and sent as attachment to email, upto this everything working fine.
    Now the email is generated with the PDF attachment but Adobe Reader encounters an error when opening.
    Error display as below mentioned
    Adobe Reader could not open 'abc_X.PDF' because it is either not a supported file type or because the file has been damaged(for  example, it was sent as an email attachment and wasn't correctly decoded).
    The program cods as below mentioned
    TYPES:BEGIN OF ty_viqmel,
          qmnum TYPE viqmel-qmnum,
          qmart TYPE viqmel-qmart,
          objnr TYPE viqmel-objnr,
          qmtxt TYPE viqmel-qmtxt,
          erdat TYPE viqmel-erdat,
          erzeit TYPE viqmel-erzeit,
          aenam TYPE viqmel-aenam,
          aufnr TYPE viqmel-aufnr,
          qmdab TYPE viqmel-qmdab,
          swerk TYPE viqmel-swerk,
          END OF ty_viqmel.
    TYPES: BEGIN OF ty_t001w,
           werks TYPE werks,
           name1 TYPE name1,
           END OF ty_t001w.
    DATA:IT_VIQMEL TYPE TABLE OF TY_VIQMEL,
         WA_VIQMEL TYPE TY_VIQMEL,
         IT_T001W TYPE TABLE OF TY_T001W,
         WA_T001W TYPE TY_T001W,
         IT_FINAL TYPE TABLE OF ZPM_T_MAINTENACE,
         WA_FINAL TYPE ZPM_T_MAINTENACE.
    data: it_diff like it_viqmel,
            wa_diff like line of it_diff.
    Smartforms data declarations
    DATA: lv_fmname   TYPE rs38l_fnam, "value 'ZPM_F_MAINTENANCE_REQUEST'.
         w_cparam     TYPE ssfctrlop ," To display smart form in arabic.
          w_compop type ssfcompop,
          W_bin_filesize TYPE i, " Binary File Size
    w_FILE_NAME type string,
    w_File_path type string,
    w_FULL_PATH type string,
    WA_BUFFER TYPE STRING. "To convert from 132 to 255
    Internal table to hold the OTF data
    DATA:
    t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    Internal table to hold OTF data recd from the SMARTFORM
    t_otf_from_fm TYPE ssfcrescl,
    Internal table to hold the data from the FM CONVERT_OTF
    T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    Objects to send mail.
    data:I_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
    I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
    I_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
    I_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
    I_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
    WA_OBJHEAD TYPE SOLI_TAB,
         WA_DOC_CHNG TYPE SODOCCHGI1.
    DATA: V_LEN_IN LIKE SOOD-OBJLEN,
    I_TLINE TYPE TABLE OF TLINE WITH HEADER LINE,
    V_LEN_OUT LIKE SOOD-OBJLEN,
    V_LEN_OUTN TYPE I,
    V_LINES_TXT TYPE I,
    V_LINES_BIN TYPE I.
    START-OF-SELECTION.
    SELECT QMNUM
           QMART
           QMTXT
           ERDAT
           ERZEIT
           AENAM
           AUFNR
           QMDAB
           SWERK
           OBJNR
      FROM VIQMEL
      INTO CORRESPONDING FIELDS OF TABLE IT_VIQMEL
                   WHERE aufnr = SPACE
                   and qmdab = '00000000'
                   AND ( QMART EQ 'M1' OR QMART EQ 'M2' OR QMART EQ 'M3' ).
      IF SY-SUBRC = 0.
        sort it_viqmel by qmnum.
        ENDIF.
        loop at it_viqmel into wa_viqmel.
          perform 72hours.
    endloop.
    SELECT WERKS
           NAME1 FROM T001W INTO TABLE IT_T001W
                 FOR ALL ENTRIES IN IT_diff
                 WHERE WERKS = IT_diff-SWERK.
      IF SY-SUBRC = 0.
        LOOP AT IT_diff INTO WA_diff.
       READ TABLE IT_T001W INTO WA_T001W WITH KEY WERKS = WA_diff-SWERK.
       IF SY-SUBRC = 0.
         WA_FINAL-QMNUM = WA_diff-QMNUM.
          WA_FINAL-QMTXT = WA_diff-QMTXT.
          WA_FINAL-ERDAT = WA_diff-ERDAT.
            WA_FINAL-ERZEIT = WA_diff-ERZEIT.
             WA_FINAL-SWERK = WA_diff-SWERK.
              WA_FINAL-NAME1 = WA_T001W-NAME1.
               WA_FINAL-AENAM = WA_diff-AENAM.
               APPEND WA_FINAL TO IT_FINAL.
               CLEAR WA_FINAL.
               ENDIF.
               ENDLOOP.
               ENDIF.
    clear:w_cparam,w_compop.
    w_cparam-langu = 'AR'.
    w_cparam-getotf = 'X'.
    w_cparam-no_dialog = 'X'. " Suppressing the dialog box
    W_COMPOP-TDNOPREV = 'X'.
    w_compop-tddest = 'LP01'.
    W_COMPOP-TDPRINTER = 'PRINTER'.
                CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
                 EXPORTING
                   formname                 = 'ZPM_F_MAINTENANCE_REQUEST'
                 VARIANT                  = ' '
                 DIRECT_CALL              = ' '
                IMPORTING
                  FM_NAME                  = lv_fMNAME
                EXCEPTIONS
                  NO_FORM                  = 1
                  NO_FUNCTION_MODULE       = 2
                  OTHERS                   = 3
               IF sy-subrc <> 0.
    Implement suitable error handling here
               ENDIF.
    CALL FUNCTION lv_fmname
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = w_cparam
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
       OUTPUT_OPTIONS             =  w_compop
      USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
       JOB_OUTPUT_INFO            = t_otf_from_fm
      JOB_OUTPUT_OPTIONS         =
      TABLES
        it_final                   = it_final
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 4
       OTHERS                     = 5
    IF sy-subrc <> 0.
    Implement suitable error handling here
    ENDIF.
    t_otf[] = t_otf_from_fm-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = 'PDF'
       MAX_LINEWIDTH               = 132
      ARCHIVE_INDEX               = ' '
      COPYNUMBER                  = 0
      ASCII_BIDI_VIS2LOG          = ' '
      PDF_DELETE_OTFTAB           = ' '
      PDF_USERNAME                = ' '
    IMPORTING
       BIN_FILESIZE                = w_bin_FILESIZE
      BIN_FILE                    =
      TABLES
        otf                         = T_OTF
        lines                       = T_PDF_TAB
    EXCEPTIONS
       ERR_MAX_LINEWIDTH           = 1
       ERR_FORMAT                  = 2
       ERR_CONV_NOT_POSSIBLE       = 3
       ERR_BAD_OTF                 = 4
       OTHERS                      = 5
    IF sy-subrc <> 0.
    Implement suitable error handling here
    ENDIF.
    LOOP AT T_PDF_TAB.
    TRANSLATE T_PDF_TAB USING '~'.
    CONCATENATE WA_BUFFER T_PDF_TAB INTO WA_BUFFER.
    ENDLOOP.
    TRANSLATE WA_BUFFER USING '~'.
    DO.
    I_RECORD = WA_BUFFER.
    APPEND I_RECORD.
    SHIFT WA_BUFFER LEFT BY 255 PLACES.
    IF WA_BUFFER IS INITIAL.
    EXIT.
    ENDIF.
    ENDDO.
    Attachment
    REFRESH: I_RECLIST,
    I_OBJTXT,
    I_OBJBIN,
    I_OBJPACK.
    CLEAR WA_OBJHEAD.
    I_OBJBIN[] = I_RECORD[].
    Create Message Body Title and Description
    I_OBJTXT = 'Maintenance Request'.
    APPEND I_OBJTXT.
    DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
    READ TABLE I_OBJTXT INDEX V_LINES_TXT.
    WA_DOC_CHNG-OBJ_NAME = 'ZPM_F_MAINTENANCE_REQUEST'.
    *WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
    WA_DOC_CHNG-OBJ_DESCR = 'Maintenance Request'.
    WA_DOC_CHNG-SENSITIVTY = 'F'.
    WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
    Main Text
    CLEAR I_OBJPACK-TRANSF_BIN.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    I_OBJPACK-BODY_NUM = V_LINES_TXT.
    I_OBJPACK-DOC_TYPE = 'RAW'.
    APPEND I_OBJPACK.
    Attachment (pdf-Attachment)
    I_OBJPACK-TRANSF_BIN = 'X'.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
    READ TABLE I_OBJBIN INDEX V_LINES_BIN.
    I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
    I_OBJPACK-BODY_NUM = V_LINES_BIN.
    I_OBJPACK-DOC_TYPE = 'PDF'.
    I_OBJPACK-OBJ_NAME = 'ZPM_F_MAINTENANCE_REQUEST'.
    I_OBJPACK-OBJ_DESCR = 'Maintenance Request'.
    APPEND I_OBJPACK.
    CLEAR I_RECLIST.
    I_RECLIST-RECEIVER = '[email protected]'.
    I_RECLIST-REC_TYPE = 'U'.
    APPEND I_RECLIST.
    ENDLOOP.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
      EXPORTING
        document_data                    = WA_DOC_CHNG
       PUT_IN_OUTBOX                    = 'X'
      SENDER_ADDRESS                   = SY-UNAME
      SENDER_ADDRESS_TYPE              = 'B'
       COMMIT_WORK                      = 'X'
    IMPORTING
      SENT_TO_ALL                      = w_sent_all
      NEW_OBJECT_ID                    =
      SENDER_ID                        =
      tables
        packing_list                     = I_OBJPACK
       OBJECT_HEADER                    = WA_OBJHEAD
       CONTENTS_BIN                     = I_OBJBIN
       CONTENTS_TXT                     = I_OBJTXT
      CONTENTS_HEX                     =
      OBJECT_PARA                      =
      OBJECT_PARB                      =
        receivers                        = I_RECLIST
    EXCEPTIONS
       TOO_MANY_RECEIVERS               = 1
       DOCUMENT_NOT_SENT                = 2
       DOCUMENT_TYPE_NOT_EXIST          = 3
       OPERATION_NO_AUTHORIZATION       = 4
       PARAMETER_ERROR                  = 5
       X_ERROR                          = 6
       ENQUEUE_ERROR                    = 7
       OTHERS                           = 8
    IF sy-subrc <> 0.
    WRITE:/ 'Error When Sending the File', SY-SUBRC.
    ELSE.
    WRITE:/ 'Mail sent'.
    ENDIF.
    ENDIF.
    ENDIF.
    Please let me know what could be the problem.
    Thanks in advance.
    vs.sarvan.

    Hi Sarvan,
    Post the code in code format.Check on the right side for example.
    Sy-subrc  = 0
    Regards,
    Madhu.

  • Problem in converting smartform to PDF

    Hi Experts,
    I am facing the issue while converting the smartform to pdf form with the help of FM convert_otf_2_pdf .
    Problem is that
    CH3OH4OD7     3 , 4 and 7 are the subscipts in SMARTFORM like in a chemical formula ,but after conveting to PDF # is replacing the subscripts like CH#OH#OD# .
    Kindly help in this issue.
    Thanks
    Sachin
    Edited by: Rob Burbank on Feb 6, 2012 10:13 AM

    Try this example it will be help full
    REPORT  YSAMPLE5.
    DATA:
    w_form_name TYPE tdsfname VALUE 'YSAMPLE2',
    w_fmodule TYPE rs38l_fnam,
    w_cparam TYPE ssfctrlop,
    w_outoptions TYPE ssfcompop,
    W_bin_filesize TYPE i, " Binary File Size
    w_FILE_NAME type string,
    w_File_path type string,
    w_FULL_PATH type string.
    Internal tables declaration
    Internal table to hold the OTF data
    DATA:
    t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    Internal table to hold OTF data recd from the SMARTFORM
    t_otf_from_fm TYPE ssfcrescl,
    Internal table to hold the data from the FM CONVERT_OTF
    T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    This function module call is used to retrieve the name of the Function
    module generated when the SMARTFORM is activated
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = w_form_name
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    fm_name = w_fmodule
    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.
    Calling the SMARTFORM using the function module retrieved above
    GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
    format of the output
    w_cparam-no_dialog = 'X'.
    w_cparam-preview = space. " Suppressing the dialog box
                                                        " for print preview
    w_cparam-getotf = 'X'.
    Printer name to be used is provided in the export parameter
    OUTPUT_OPTIONS
    w_outoptions-tddest = 'LP01'.
    CALL FUNCTION w_fmodule
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = w_cparam
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    output_options = w_outoptions
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    job_output_info = t_otf_from_fm
    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.
    t_otf[] = t_otf_from_fm-otfdata[].
    Function Module CONVERT_OTF is used to convert the OTF format to PDF
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    IMPORTING
    BIN_FILESIZE = W_bin_filesize
    BIN_FILE =
    TABLES
    otf = T_OTF
    lines = T_pdf_tab
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 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.
    To display File SAVE dialog window
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    CHANGING
    filename = w_FILE_NAME
    path = w_FILE_PATH
    fullpath = w_FULL_PATH
    USER_ACTION =
    FILE_ENCODING =
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 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.
    Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
    presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_bin_filesize
    filename = w_FULL_PATH
    FILETYPE = 'BIN'
    tables
    data_tab = T_pdf_tab
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Problem during printing smartforms

    Hi,
    We are using Epson 9 pin printer for printing. We have custom page layout used in our sap script and smartforms with size 12 inch / 9 inch (80 column dot matrix printing).
    We are using SWIN (windows default printing) driver. Problem we are facing are -
    1. The second page doesnt start properly from scond page. It starts at the end og first page only.
    2. If there are more than one page, then a blank page is printed after each page.
    Please suggest how to contrl this and do printing setting in SAP.
    RR

    Hi,
    Do you use a custom page format for the 12 x 9 inch page size? if so check the thread below.
    Re: Correct preview, but wrong print out.
    You probably also need to create the default windows page format.
    Regards,
    Aidan

  • Problem in displaying smartform as pdf in portal

    Hi all,
    We  created a smartform and we are displaying as a pdf in portal.Everything is fine and pdf  is coming.But there is arabic data in the form .
    Some of the arabic data is coming perfectly.
    But some data is coming in Japanese or chinese and some data is coming like
    F,D'! 9(/'D1-EF (F 5'D- 'D3JA 叉â
    Department 'D%/'1) 'D9'E) DDEH'1/ 'D(41J).
    Please let me know what could be the problem.
    Thanks and Regards,
    Rajesh

    hi Rajesh.....
    Could you explain me how 2 display SMARTFORM as PDF in portal..... please.....
    I have the requirement as follows.....
    By pressing a button the smartform must be generated.....
    SO what must be the RFC o/p from ABAP.... I am ABAPER basically
    and what the portal guys must do.....
    pleaseeee

  • Problem when displaying smartform in chinese language

    Hi ,
    I have copied a standard smart form into Z smartform and added few fields in it  as per the requirement .
    When I display form in english or german it prints correctly .
    when I print it in Chinese it prints the workarea name which I am using to print the values of the fileds .
    it prints as below
    &wa_vbak-budat&
    please help , I tried changing the font type and size but it still shows the same.
    Regards,
    Gayatri Hemnur

    Hi Gouri,
    The first step for translation is that u have to change the regional settings in your computer. Or You should logon with Chinese language.
    If you have done that already, i think the problem may be that in the reoport the length of the field is smaller than the space required for the chinese characters.
    Even if it is done i think you can try doing this, go to se63 translate the field once again and save it. I think this should solve your problem.
    BR
    Dep

  • Problem In Displaying Smartform Text Field In Qual & Prd Server

    Hi All,
    I am working on a smartform in which i am checking the field which is displaying fine in quality server but when it is transported to PRD server it is displaying text field  in the smartform having ms word document which is giving me problem in displaying in the PRD Server.
    Please provide me guideline for it..

    Hi Sarvan,
    Post the code in code format.Check on the right side for example.
    Sy-subrc  = 0
    Regards,
    Madhu.

  • Problem with standar smartform ( Program RLE_DELNOTE)

    Hello everybody.
    I´ve made a smartforms for a deliveries. I use the standard program called RLE_DELNOTE. The problem is that the structure IS_DLV_DELNOTE in the smartform is not correctly informed and I just can get the header data and items data are missing.
    Could anybody help me???  I´ve read something similar but I couldnt get the solution... If somebody know some sap note I´ll be very happy too!!
    PD: Im Spanish and my English is not very good!! Sorry!!

    check sap note 858495
    Symptom
    You cannot print the order item number for the delivery item using the RLE_DELNOTE print program for printing the delivery note if you start the print or the print preview in Transactions VL02N or VL03N.

  • Problem with a smartform

    Hi, I would like to show on a invoice form an issuer name. I have defined in global definitions variable called "gv_name_text". In program lines of SIGN_CREATOR Signs I have putted value of sy-uname into my variable. I've placed my variable in SIGN_CREATOR,but nothing appears on the form when I'm testing it.What could be the problem?
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Jan 7, 2009 11:38 AM

    Hi,
    I'm beginner with smartforms.How can I do that.I right clicked on SIGN_CREATOR->Create->Flow Logic->Program lines. Is that correct?
    Thanks,
    Stefan

  • Problem with layout smartform

    Hello all,
    I have a problem with the layout of smartform.
    My smartform is composed of a window (main).
    Within the main window, there is a loop where they are
    printed a series of tables which are associated with a frame.
    When the smartform printed on the next page, it is incapable to
    to manage the frames in their entirety.
    Thanks.

    Hi,
    my smartform is composed as follows:
    Page 1
      Main
         Loop
            Table 1
            Table 2
            Table n
    Each table consists of a frame.
    The problem is that when the smartform go to the next page, I can not handle frames.
    Part of frame is displayed on the first page, the other party to the second page.
    I tried to put the flag protection page on the tables, but the frame has not been successful.
    I hope someone help me.
    Regards,
    Maurizio.

Maybe you are looking for

  • Can't Print in C6280 all in one

    A few days ago I tried to print out a map and directions from mapquest. It's about 1.3 mb. It wouldn't print and I'm unable to delete it. The choices I'm given are pause, resume, cancel, restart and properties. I've tried them all to no avail. Now I

  • End Item Substitution & Substitute Components

    Dear Experts, Need your expert advise on Item Substitution Set & Substitute Component We have defined Item Relationship for an End Item and defined Planning Details mentioning partial fulfillment and applicable to all customers. We have also defined

  • Rebate condition record T code VBO1-Error Message

    Hi, I am getting error message while creating rebate condition record T code-VBO1-Error Msg-862 system cannot read the structure for table,because of this i could not create condition record. (This error has occured while i am testing rebate process

  • Very slow GUI in web browser application

    Hello, I am trying to write a web browser application and I have a problem with the GUI. When the page is being loaded and set on the JEditorPane the GUI becomes very slow (actually it freezes). I don't know if this happens because of my swing implem

  • Could not complete your request because the result would be too big - cs3

    I exported 1.32 minute of quicktime movie file from FCP into photoshop CS3 about five weeks ago.  Since then I've been diligently working on each individual frame.   I've about 10 seconds left to the end of file.  Unfortunately, I turned off my mac t