Need Smartform materials in PDF Format

Hi Guys,
Please give me the links to download the SMARTFORM materials in PDF format.
I am new to smartforms so i need all the materials to learn SMARTFORMS.
Regards,
Chandru

for Smartforms material
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Re: Need FAQ's
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
Subtotals - Check the link...
Re: Subtotal with Table Node in smartforms
Go through these SAP Standard programs also,
sf_example_01
sf_example_02
sf_example_03.

Similar Messages

  • I have a problem in converting smartform output to pdf format.

    Hi,
    While converting the smartform output to pdf format.
    It is showing this error.
    otf end command // missing in otf data.
    I have used this function.
    Assigning the OTFDATA to OTF Structure table
        CLEAR gt_otf.
        gt_otf[] = gs_otfdata-otfdata[].
    Convert the OTF DATA to SAP Script Text lines
        CLEAR gt_pdf_tab.
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = 'PDF'
            max_linewidth         = 132
          IMPORTING
            bin_filesize          = gv_bin_filesize
          TABLES
            otf                   = gt_otf
            lines                 = gt_pdf_tab
          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.
    Please help me in this regard. Thanks in advance.

    Hi ,
    I am getting this exception "err_conv_not_possible"
    CALL FUNCTION f_name " '/1BCDWB/SF00000092'
          EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
            CONTROL_PARAMETERS       = st_control_parameters
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
         OUTPUT_OPTIONS             = st_output_options
      USER_SETTINGS              = 'X'
            ZST_TEXTSYMBOLS            = ZST_TEXTSYMBOLS
            wa_kna1                    = wa_kna1
            wa_claim_header            = wa_claim_header
       IMPORTING
         DOCUMENT_OUTPUT_INFO       = st_document_output_info
         JOB_OUTPUT_INFO            = st_job_output_info
         JOB_OUTPUT_OPTIONS         = st_job_output_options
          TABLES
            IT_CLAIM_VERSION           = IT_CLAIM_VERSION
            IT_CLAIM_ITEM              = IT_CLAIM_ITEM
            IT_CLAIM_PARTNER           = IT_CLAIM_PARTNER
            IT_FINAL                   = IT_FINAL
       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.
        ELSE.
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
          EXPORTING
             USE_OTF_MC_CMD               = 'X'
        ARCHIVE_INDEX                =
          IMPORTING
          BIN_FILESIZE   = v_bin_filesize
          TABLES
          OTF = st_job_output_info-OTFDATA[]
          DOCTAB_ARCHIVE = it_docs
          LINES  = it_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.
        ENDIF.
    HERE when i tried to debug it i got SY-SUBRC = 1.
    Please help me in this regard. Thanks in advance.

  • Chinese char issue in smartform preview as pdf format

    Hi chinese guy!!
    please help me with chinese char in smartform preview as pdf format
    i created smartform with chinese char and then when executing this smartform by t-code smartforms, it show as simplified chinese char, but when getting JOB_OUTPUT_INFO in order to convert OTF as pdf format, although smartforms performed as pdf format, only chinese char were broken. smartform with english or korean language does not have any issue, only chinese issue now.
    i got into r/3 as logon ZH by SAP GUI english version  and i used adobe acrobat reader chinese simplifed version. r/3 version is ecc60 unicode system***
    please help me,, any chinese guy there?
    1.  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    2.    CONTORL_PARAMETERS-NO_DIALOG = 'X'.
           CONTORL_PARAMETERS-GETOTF = 'X'.
           OUTPUT_OPTIONS-TDNOPREV = 'X'.
           CLEAR JOB_OUTPUT_INFO.
    3.    
    CALL FUNCTION FUNCTION
        EXPORTING
          CONTROL_PARAMETERS = CONTORL_PARAMETERS
          OUTPUT_OPTIONS     = OUTPUT_OPTIONS
        IMPORTING
          JOB_OUTPUT_INFO    = JOB_OUTPUT_INFO
        TABLES
          ITEM               = ITEM
        EXCEPTIONS
          FORMATTING_ERROR   = 1
          INTERNAL_ERROR     = 2
          SEND_ERROR         = 3
          USER_CANCELED      = 4.
      OTF_TAB[] = JOB_OUTPUT_INFO-OTFDATA[].
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = 'PDF'
        IMPORTING
          BIN_FILESIZE          = PDF_FSIZE
        TABLES
          OTF                   = OTF_TAB
          LINES                 = PDF_TABLE
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          OTHERS                = 4.

    hi,
    please see the notes 999712.
    thanks

  • Needed smartform to determine page format automatically.

    Hi
    I have a reqirement to print the smartform output in Letter format paper for one company code and it should print it in A4 size paper for rest of the company codes.
    I am using R/3 4.6c
    I tried with this code
    data: lx_sf_header(31) type c,
    field-symbols: <fs_header> type SSFFORMHD.
    if company_code = 'XXXX'.
    CONCATENATE '(' sy-repid ')%HEADER' into lx_sf_header.
    assign (lx_sf_header) to <fs_header>.
    <fs_header>-PAGEFORMAT = 'LETTER'.
    endif.
    but I am getting short dump & this logic is working fine in ECC.
    Please help me regarding this.......
    Thanks in advance
    Kiran.
    Edited by: kiran Pasala on Sep 30, 2008 4:44 PM

    Duplicate post.
    Needed smartform to determine page format automatically.

  • Smartform Printing in PDF format

    Hi all,
    I am looking to print standard SmartForms in PDF output.
    I have printed a standard SmartForm to the spool.  I convert the spool job to PDF using function module CONVERT_OTFSPOOLJOB_2_PDF.   From this I get a new spool request titled "#####(original spool no) converted to PDF format".
    My Basis team has create a new printer with device type PDF1 which I have used during this function module.
    However this PDF spool shows up as odd characters.  It also does not print as expected, again it prints the odd characters.
    Obviously I'm missing something - does anyone have any suggestions?
    Thanks-

    Within SP01, viewing the spool request, I see the following characters:
    &#9552;&#17478;&#11569;&#11827;&#3338;&#9698;&#58319;&#54029;&#2610;‰&#8303;&#25194;
    &#31088;&#25888;&#12116;&#31088;&#25905;&#3338;>
    &#12336;&#8241;&#12336;&#12320;&#12592;&#12336;&#8245;>
    &#8241;&#12336;&#12320;&#12320;&#12320;&#12320;>
    &#12848;&#8247;&#12848;&#8247;&#13872;&#8247;&#13872;>
    &#12097;&#29539;&#25966;&#29728;&#14130;>
    &#2607;&#19553;&#29556;&#17256;&#24946;&#8242;>
    &#13619;&#14368;&#13619;&#14368;&#14389;>    Etc.... 
    EDIT: I note that when I submit this post, the characters change.  I'm seeing 'symbols' mainly, some Asian characters (the form should be in English).
    When printing, it comes out with something like:
    %PDF-1.3
    %aDuE
    2 0 objtype /Type1
    /BaseFont /H00 1000 1000 520 1000 74 1000 0 0 0 0
    /CapHeight
         /LastChar 255
    %Charwid8 592 779 650 650.   etc
    /F002 6 0 R
    Date=(0000000)
    @SAP_OB    End TOA_DARA
    >>
    endob00327 00000 n
    and so on...
    For now we would like to validate the PDF printing before modifying any new print programs to automate the process.
    Thanks-
    Message was edited by: Chad Carter
    Message was edited by: Chad Carter

  • Smartform data in pdf format

    Hi all,
                 I want to extract the data from the invoice smartform and i should display it in pdf format.I have invoice number with me as input parameter.
    Can any  one solve my problem...it is urgent plz.........
    Thanks ,
    Rakesh.

    hi
    good
    please check this code
    By using FM we can convert smartform to PDF like CONVERT_PDF
    and GUI_DOWNLOAD.
    *& Report ZSRI_RE_02
    REPORT ZSRI_RE_02.
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETER: P_DATE LIKE SY-DATUM.
    PARAMETER: P_REA TYPE CHAR255.
    SELECTION-SCREEN:END OF BLOCK B1.
    *DATA:WS_UCOMM LIKE SY-UCOMM.
    DATA FORM_NAME TYPE rs38L_fnam.
    DATA: WA_CTRLOP TYPE SSFCTRLOP,
    WA_OUTOPT TYPE SSFCOMPOP.
    DATA: T_OTFDATA TYPE SSFCRESCL,
    T_PDF_TAB LIKE TLINE OCCURS 0 WITH HEADER LINE.
    DATA: t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
    DATA: w_filesize TYPE i.
    DATA: w_bin_filesize TYPE i.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    FORMNAME = 'ZSRI_FORM_01'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FORM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    wa_ctrlop-getotf = 'X'.
    wa_ctrlop-no_dialog = 'X'.
    wa_outopt-tdnoprev = 'X'.
    CALL FUNCTION FORM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS = WA_CTRLOP
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS = WA_OUTOPT
    USER_SETTINGS = 'X'
    MYDATE = P_DATE
    REASON = P_REA
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO = T_OTFDATA.
    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_otfdata-otfdata[].
    *Convert into PDF
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    PDF_DELETE_OTFTAB = ' '
    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 download into PC
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_BIN_FILESIZE
    CODEPAGE = ' '
    FILENAME = 'D:\SRI2.PDF'
    FILETYPE = 'BIN'
    MODE = ' '
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    COL_SELECT = ' '
    COL_SELECTMASK = ' '
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH = W_FILESIZE
    TABLES
    DATA_TAB = T_PDF_TAB.
    FIELDNAMES =
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_WRITE_ERROR = 2
    INVALID_FILESIZE = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    reward point if helpful.
    thanks
    mrutyun^

  • Needs content not in pdf format

    Hi all,,
    I have an ABAP program where i could send mails to the recipients.
    But the recipients are able to receive the content of the mails only in attached pdf format.
    But could not get into the body of the mail.
    I had passed packing_list-Document type = 'RAW' in  in so_document_send_API1
    What should i need to do in the settings..
    will be awarded..

    Hi Naveena,
    given below is a sample code to send mail with both body and an attachment.
    pack-doc_type is RAW for sending the body.
    vérifier qu'une adresse a été rentrée
      CHECK NOT s_execut IS INITIAL.
    Zone objet du mail
      CLEAR str_docdata.
      str_docdata-obj_name  = text-m01.
      str_docdata-obj_descr = text-m03.
    Alim table des destinataires
      LOOP AT s_execut.
        tbl_dest-rec_type = 'U'.
        tbl_dest-receiver = s_execut-low.
        APPEND tbl_dest.
        CLEAR  tbl_dest.
      ENDLOOP.
    Alim tbl_text pour corps du mail
    "ne pas répondre"
      CLEAR tbl_text.
      REFRESH tbl_text.
      tbl_text-line = text-m02.
      APPEND tbl_text.
      CLEAR tbl_text.
    saut de ligne
      APPEND tbl_text.
    nb de lignes lues / en anomalie / … qui seront dans le corps du texte
      WRITE p_filpar TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
      IF tbl_text-line IS INITIAL.
        tbl_text-line = '0'.
      ENDIF.
      CONCATENATE text-cr1 tbl_text-line INTO tbl_text-line
                                        SEPARATED BY space.
      APPEND tbl_text.
      CLEAR tbl_text.
      WRITE p_filali TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
      IF tbl_text-line IS INITIAL.
        tbl_text-line = '0'.
      ENDIF.
      CONCATENATE text-cr1 tbl_text-line INTO tbl_text-line
                                        SEPARATED BY space.
      APPEND tbl_text.
      CLEAR tbl_text.
      WRITE p_recycl TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
      IF tbl_text-line IS INITIAL.
        tbl_text-line = '0'.
      ENDIF.
      CONCATENATE text-cr2 tbl_text-line INTO tbl_text-line
                                        SEPARATED BY space.
      APPEND tbl_text.
      CLEAR tbl_text.
      WRITE w_enr_10 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
      IF tbl_text-line IS INITIAL.
        tbl_text-line = '0'.
      ENDIF.
      CONCATENATE text-cr3 tbl_text-line INTO tbl_text-line
                  SEPARATED BY space.
      APPEND tbl_text.
      CLEAR tbl_text.
      WRITE w_enr_20 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
      IF tbl_text-line IS INITIAL.
        tbl_text-line = '0'.
      ENDIF.
      CONCATENATE text-cr4 tbl_text-line INTO tbl_text-line
                  SEPARATED BY space.
      APPEND tbl_text.
      CLEAR tbl_text.
      APPEND tbl_text.
      WRITE text-cr5 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
      APPEND tbl_text.
      CLEAR tbl_text.
      CLEAR w_lines.
      DESCRIBE TABLE tbl_text LINES w_lines.
      CLEAR tbl_pack.
      REFRESH tbl_pack.
      tbl_pack-head_start = 1.
      tbl_pack-head_num   = 0.
      tbl_pack-body_start = 1.
      tbl_pack-body_num   = w_lines.
      tbl_pack-doc_type   = 'RAW'.
      tbl_pack-obj_name   = text-m01.  "Program name
      tbl_pack-doc_size   = ( w_lines - 1 ) * 255 + STRLEN( tbl_text-line ).
      APPEND tbl_pack.
    Alim tbl_text pour pièce jointe
    - en-tête des colonnes
      CLEAR tbl_text.
      CONCATENATE text-ti1 text-ti2 text-ti3 text-ti4
                  kst_retours
             INTO tbl_text-line SEPARATED BY ';'.
      APPEND tbl_text.
    contenu des colonnes
      LOOP AT tbl_compte_rendu.
        CLEAR tbl_text.
        CONDENSE tbl_compte_rendu-text1.
        CONCATENATE tbl_compte_rendu-text1
                    tbl_compte_rendu-text2
                    tbl_compte_rendu-text3
                    tbl_compte_rendu-text4
                    tbl_compte_rendu-text5
                    tbl_compte_rendu-text6
                    kst_retours
               INTO tbl_text-line SEPARATED BY ';'.
        APPEND tbl_text.
      ENDLOOP.
      DESCRIBE TABLE tbl_text LINES w_lines2.
      CLEAR tbl_pack.
      tbl_pack-head_start = 1.
      tbl_pack-head_num   = 0.
      tbl_pack-body_start = w_lines + 1.
      tbl_pack-body_num   = w_lines + w_lines2.
      tbl_pack-doc_type   = 'CSV'.
      tbl_pack-obj_name   = text-m07.
      tbl_pack-obj_descr  = text-m08.
      tbl_pack-doc_size   = ( w_lines2 - 1 ) * 255
                             + STRLEN( tbl_text-line ).
      APPEND tbl_pack.
    Envoi du mail
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = str_docdata
          put_in_outbox              = space
          commit_work                = 'X'
        TABLES
          packing_list               = tbl_pack
          contents_txt               = tbl_text
          receivers                  = tbl_dest
        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.
    Message was edited by:
            Alvaro Tejada Galindo

  • I need to change a pdf format to data? help?

    I really need to change a pdf tax return into a data return so I can amend it, the tax program I used will not let me transfer a pdf, I saw some choices when I went to save it under the name but I don't know which one would be data. Thanks hope someone can help,

    That's probably not possible at all. Contact the IRS for advice on how to file a new, correct return.

  • Logo in Smartform output to pdf format is coming as Junk Character

    Hi All,
    I have a requirement to generate the Smartform output in PDF file. But when i am doing that i am getting the LOGO as Junk character in the PDF file. Can any one help me to resolve this issue?.
    Thanks,
    Muruganand.K

    Yes check the spool and the output displayed correctly in the spool it means there is a problem when you convert OTF to PDF. Check that part of the code and try different options.

  • Ihave created a script, i need to email in pdf format.

    Hi Experts,
    There are 2 criterias...
    1. criteria
    I have created a script, i need to mail it. Please give me a step by step guide to perform it .. . Please give the comments in all the functional module to be used.
    Do we have to write a separate program to send email or in the same program. i'll post my program along with this mail. I'm using this program to display report after delivery on that particular date.
    REPORT  ZREPORTTOEMAIL LINE-SIZE 400.
    data : count, i  type i.
    TABLES :  VBFA,         "Sales Document Flow
              VBAK,
              KNA1,
              VBKD,
              VBAP,
              LIPS,
              LIKP,
              KONP,
              KOMK,
              KOMP,
              zkna1,
              konv.
    data : l_vbeln like vbfa-vbeln,
           l_posnr like vbfa-posnn,
           l_KNUMV like vbak-KNUMV,
           L_BILL_ITEM LIKE vbfa-posnn ,
           l_netwr like vbrp-netwr,
           l_MWSBP like vbrp-mwsbp.
    DATA: BEGIN OF TKOMV OCCURS 50.
            INCLUDE STRUCTURE KOMV.
    DATA: END OF TKOMV.
    DATA: BEGIN OF TKOMVD OCCURS 50.
            INCLUDE STRUCTURE KOMVD.
    DATA: END OF TKOMVD.
    TYPE-POOLS: SLIS.
    DATA: FIELDTAB TYPE SLIS_T_FIELDCAT_ALV,
          HEADING  TYPE SLIS_T_LISTHEADER,
          LAYOUT   TYPE SLIS_LAYOUT_ALV,
          EVENTS   TYPE SLIS_T_EVENT,
          REPNAME  LIKE SY-REPID,
          F2CODE   LIKE SY-UCOMM VALUE  '&ETA',
          G_SAVE(1) TYPE C,
          G_EXIT(1) TYPE C,
          G_VARIANT LIKE DISVARIANT,
          GX_VARIANT LIKE DISVARIANT.
    DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
    CONSTANTS: FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
    DATA: BEGIN OF itab occurs 0,
            kunnr like likp-kunnr,      "ship to party
            NAME2   LIKE  KNA1-NAME1,   "text
            ORT01   LIKE  KNA1-ORT01,   "City
            BSTNK   LIKE  VBAK-BSTNK,   "customer P O
            BSTDK   LIKE  VBAK-BSTDK,   "date
            vbeln like likp-vbeln,      "delivery
            ernam like likp-ernam,      "person
            vstel like likp-vstel,      "shipping point
            vkorg like likp-vkorg,      "sales org
            lfdat like likp-lfdat,      "delivery date
            kunag like likp-kunag,      "sold to party
            NAME1   LIKE  KNA1-NAME1,   "text
            bil_to like VBAK-KUNNR,
            name3 like kna1-name1,
            traid like likp-traid,      "transport/vehicle no
            BOLNR LIKE LIKP-BOLNR,
            wadat_ist like likp-wadat_ist, "good mov. date
            posnr like lips-posnr,      "item
            matnr like lips-matnr,      "material
            arktx like lips-arktx,      "item text
            matkl like lips-matkl,      "mat group
            werks like lips-werks,      "plant
            lgort like lips-lgort,      "stoage location
            lfimg like lips-lfimg,      "del qty
            MEINS LIKE LIPS-MEINS,
            vrkme like lips-vrkme,      "sales unit
            UMVKZ LIKE LIPS-UMVKZ,
            UMVKN LIKE LIPS-UMVKN,
            charg like lips-charg,      "batch
            vgbel like lips-vgbel,      "reference doc
            mtart like lips-mtart,      "mat type
            vkbur like lips-vkbur,      "sales office
            vkgrp like lips-vkgrp,      "sales group
            vtweg like lips-vtweg,      "Distribution Channel
            spart like lips-spart,      "division
            billno like vbak-vbeln,
            basic like komvd-kwert,
            budat like bkpf-budat,
            fin_amt like vbrp-NETWR,
    END OF itab.
    data : begin of jtab occurs 0,
    kunnr like likp-kunnr,
    name2 like kna1-name2,
    vbeln like likp-vbeln,
    zkunnr like zkna1-zkunnr,
    zname like zkna1-zname,
    end of jtab.
    SELECTION-SCREEN SKIP 1 .
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-003.
    SELECT-OPTIONS   : ABC FOR LIKP-WADAT_IST DEFAULT SY-DATUM
                                  NO INTERVALS   .
    SELECT-OPTIONS   : S_MATNR FOR  LIPS-MATNR NO INTERVALS   .
    SELECT-OPTIONS   : S_VKORG FOR  LIKP-VKORG NO INTERVALS.
    SELECT-OPTIONS   : S_VSTEL FOR  LIKP-VSTEL NO INTERVALS.
    SELECT-OPTIONS   : S_VKBUR FOR  LIKP-VKBUR NO INTERVALS.
    SELECT-OPTIONS   : S_VKGRP FOR  LIPS-VKGRP.
    SELECT-OPTIONS   : S_SPART FOR  LIPS-SPART.
    SELECT-OPTIONS   : S_VBELN3 FOR  LIKP-VBELN.
    SELECT-OPTIONS   : S_MATKL FOR  LIPS-MATKL NO INTERVALS,
                       S_KUNAG FOR LIKP-KUNAG.
    SELECTION-SCREEN  END OF BLOCK BLOCK1.
    select * from likp into corresponding fields of itab
                  WHERE  WADAT_IST IN ABC
                  AND    VBELN IN S_VBELN3
                  AND    VKORG IN S_VKORG
                  and VSTEL in S_VSTEL
                  AND VKBUR IN S_VKBUR
                  and lfart like 'Z%'
                  AND    VBTYP = 'J'
                  AND KUNAG IN S_KUNAG.
    select * from lips into corresponding fields of itab
                    WHERE VBELN =  ITAB-VBELN
                    AND   MATNR IN S_MATNR
                    AND   MATKL IN S_MATKL
                    AND VKBUR IN S_VKBUR
                    AND VKGRP IN S_VKGRP
                    AND SPART IN S_SPART.
    IF ITAB-VRKME = 'RM' AND ITAB-MEINS = 'KG'.
    ITAB-LFIMG = ITAB-LFIMG * ( ITAB-UMVKZ / ITAB-UMVKN ).
    ITAB-VRKME = 'KG'.
    ENDIF.
    SELECT SINGLE BSTNK BSTDK INTO (ITAB-BSTNK,ITAB-BSTDK) FROM VBAK
                     WHERE VBELN = ITAB-VGBEL.
    SELECT SINGLE NAME1 ORT01 FROM KNA1 INTO (ITAB-NAME2,ITAB-ORT01)
                                 WHERE KUNNR = ITAB-KUNNR.
    SELECT SINGLE NAME1 FROM KNA1 INTO ITAB-NAME1
                                 WHERE KUNNR = ITAB-KUNAG.
    *select single vbeln POSNN into (itab-billno,L_BILL_ITEM)  from vbfa where VBELV = itab-vbeln
    *and POSNV = itab-posnr and VBTYP_N in ('M','U').
    select vbeln POSNN from vbfa up to 1 rows into (itab-billno,L_BILL_ITEM)   where VBELV = itab-vbeln
    and POSNV = itab-posnr and VBTYP_N in ('M','U') order by vbeln DESCENDING .
    endselect.
    select single * from vbfa where vbelv = itab-billno and posnv = l_bill_item and
    vbtyp_n = 'N'.
    if sy-subrc = 0.
    clear : itab-billno, l_bill_item.
    endif.
    select single budat from bkpf into itab-budat where xblnr = itab-billno and
    blart = 'RV'.
    select single NETWR MWSBP into (l_netwr, l_MWSBP) from vbrp where vbeln = itab-billno
    and posnr = l_bill_item.
    itab-fin_amt = l_netwr + l_MWSBP.
    clear : l_netwr, l_MWSBP.
    select single kunnr from vbpa into itab-bil_to where
    vbeln = itab-BILLNO and PARVW = 'RE'.
    select single name1 into itab-name3 from kna1
    where kunnr = itab-bil_to.
    *select single VBELV POSNV from vbfa into (l_vbeln,l_posnr)
    *where VBELN = itab-vbeln and
    *POSNN = itab-posnr and VBTYP_N = 'J'.
    *select single VBELN POSNN from vbfa into (l_vbeln,l_posnr)
    *where VBELV = itab-vbeln and
    *POSNV = itab-posnr and VBTYP_N = 'M'.
    select VBELN POSNN from vbfa up to 1 rows into (l_vbeln,l_posnr)
    where VBELV = itab-vbeln and
    POSNV = itab-posnr and VBTYP_N = 'M' order by vbeln DESCENDING.
    endselect.
    select single * from vbfa where vbelv = l_vbeln and posnv = l_posnr and
    vbtyp_n = 'N'.
    if sy-subrc = 0.
    clear : l_vbeln, l_posnr.
    endif.
    if sy-subrc = 0.
    *select single KNUMv into l_KNUMv from vbak where vbeln = l_vbeln
    select single KNUMv into l_KNUMv from vbRk where vbeln = l_vbeln
    select * from konv where knumv = l_knumv and kposn = l_posnr and
    kschl in ('ZR00','ZR01','ZR02','ZOBC').
    itab-basic = itab-basic + KONV-KBETR.
    ENDSELECT.
    else.
    *select single KNUMv into l_KNUMv from ekko where ebeln = itab-vgbel.
    *select single KBETR from konv into itab-basic where knumv = l_knumv
    *and kposn = itab-posnr and kschl = 'P101'.
    select single KNUMv into l_KNUMv from VBRK where VBELN = itab-BILLNO.
    select * from konv where knumv = l_knumv and kposn = l_BILL_ITEM AND
    kschl in ('ZR00','ZR01','ZR02','ZOBC').
    itab-basic = itab-basic + KONV-KBETR.
    ENDSELECT.
    *zkna1-zkunnr = itab-kunnr.
    *insert zkna1.
    endif.
         clear : l_vbeln, L_BILL_ITEM, L_POSNR.
    APPEND ITAB.
    clear : itab-basic, itab-lfimg.
         ENDSELECT.
              clear : itab.
    ENDSELECT.
    <b>perform zscript.</b>
    *&      Form  zscript
          text
    -->  p1        text
    <--  p2        text
    FORM zscript .
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
       FORM                              = 'ZREPORT2EMAIL'
       LANGUAGE                          = SY-LANGU
      OPTIONS                           =
      MAIL_SENDER                       =
      MAIL_RECIPIENT                    =
      MAIL_APPL_OBJECT                  =
      RAW_DATA_INTERFACE                = '*'
      SPONUMIV                          =
    IMPORTING
      LANGUAGE                          =
      NEW_ARCHIVE_PARAMS                =
      RESULT                            =
    EXCEPTIONS
      CANCELED                          = 1
      DEVICE                            = 2
      FORM                              = 3
      OPTIONS                           = 4
      UNCLOSED                          = 5
      MAIL_OPTIONS                      = 6
      ARCHIVE_ERROR                     = 7
      INVALID_FAX_NUMBER                = 8
      MORE_PARAMS_NEEDED_IN_BATCH       = 9
      SPOOL_ERROR                       = 10
      CODEPAGE                          = 11
      OTHERS                            = 12
    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 ITAB.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'MANU'
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'MAIN'
    IMPORTING
      PENDING_LINES                  =
    EXCEPTIONS
      ELEMENT                        = 1
      FUNCTION                       = 2
      TYPE                           = 3
      UNOPENED                       = 4
      UNSTARTED                      = 5
      WINDOW                         = 6
      BAD_PAGEFORMAT_FOR_PRINT       = 7
      SPOOL_ERROR                    = 8
      CODEPAGE                       = 9
      OTHERS                         = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
    EXCEPTIONS
      UNOPENED                       = 1
      BAD_PAGEFORMAT_FOR_PRINT       = 2
      SEND_ERROR                     = 3
      SPOOL_ERROR                    = 4
      CODEPAGE                       = 5
      OTHERS                         = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " zscript
    The above one is first criteria just to understand how to send mail to the customers.
    <b>Second criteria</b> is i have to send the mail to the particular customer with only their details, the process should continue until it sends to all the customers with their details for that particular date.
    Please help me out.
    I have seen so many posts in the sdn but not able to understand the functional modules, how they declare that and how does it works...
    Please provide me a good material to understand the functional module and to declare them.
    Please solve this query i'll reward them with very good points.
    Thanks in advance.
    A.Rafique.

    Hi babar haroon,
    Thanks for the link.....
    I went through that link, i created smart form but i was not able to get the results because the pgm gets terminated after executing. I'll show u the code, the code is active. Please check out and tell me if  i have missed anything in the code...
    *& Report  ZZZ_TEST3
    REPORT  ZZZ_TEST3.
    *internal table declarations
    data: i_otf type itcoo occurs 0 with header line,
          i_tline type table of tline with header line,
          i_receivers type table of somlreci1 with header line,
          i_record like solisti1 occurs 0 with header line,
    *Objects to send mail.
          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,
    *workarea declaration.
          w_objhead TYPE soli_tab,
          w_ctrlop TYPE ssfctrlop,
          w_compop TYPE ssfcompop,
          w_return TYPE ssfcrescl,
          w_doc_chng typE sodocchgi1,
          w_data TYPE sodocchgi1,
          w_buffer TYPE string,"To convert from 132 to 255
    Variables declarations
          v_form_name TYPE rs38l_fnam,
          v_len_in LIKE sood-objlen,
          v_len_out LIKE sood-objlen,
          v_len_outn TYPE i,
          v_lines_txt TYPE i,
          v_lines_bin TYPE i.
    call function 'SSF_FUNCTION_MODULE_NAME'
    *call function '/1BCDWB/SF00000105'
          exporting
          formname = 'ZZZ_TEST2'
          importing
          fm_name = v_form_name
          exceptions
          no_form = 1
          no_function_module = 2
          others = 3.
          IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          w_ctrlop-getotf = 'X'.
          w_ctrlop-no_dialog = 'X'.
          w_compop-tdnoprev = 'X'.
         CALL FUNCTION '/1BCDWB/SF00000105'
          EXPORTING
            ARCHIVE_INDEX              =
            ARCHIVE_INDEX_TAB          = itab1
            ARCHIVE_PARAMETERS         =
            CONTROL_PARAMETERS         =
            MAIL_APPL_OBJ              =
            MAIL_RECIPIENT             =
            MAIL_SENDER                =
            OUTPUT_OPTIONS             =
            USER_SETTINGS              = 'X'
          IMPORTING
            DOCUMENT_OUTPUT_INFO       =
            JOB_OUTPUT_INFO            = wa
            JOB_OUTPUT_OPTIONS         =
          EXCEPTIONS
            FORMATTING_ERROR           = 1
            INTERNAL_ERROR             = 2
            SEND_ERROR                 = 3
            USER_CANCELED              = 4
            OTHERS                     = 5
         IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
    CALL FUNCTION v_form_name
          EXPORTING
          control_parameters = w_ctrlop
          output_options = w_compop
          user_settings = 'X'
          IMPORTING
          job_output_info = w_return
          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.
          i_otf[] = w_return-otfdata[].
          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.
          Convert PDF from 132 to 255.
          LOOP AT i_tline.
          Replacing space by ~
          TRANSLATE i_tline USING '~'.
          CONCATENATE w_buffer i_tline INTO w_buffer.
          ENDLOOP.
    Replacing ~ by space
          TRANSLATE w_buffer USING '~'.
          DO.
          i_record = w_buffer.
          Appending 255 characters as a record
          APPEND i_record.
          SHIFT w_buffer LEFT BY 255 PLACES.
          IF w_buffer IS INITIAL.
          EXIT.
          ENDIF.
          ENDDO.
          Refresh: i_reclist,
          i_objtxt,
          i_objbin,
          i_objpack.
          clear w_objhead.
          Object with PDF.
          i_objbin[] = i_record[].
         DESCRIBE TABLE i_objbin LINES v_lines_bin.
          Object with main text of the mail.
          i_objtxt = 'Find attached the output of the smart form.'.
          APPEND i_objtxt.
         DESCRIBE TABLE i_objbin LINES v_lines_txt.
          i_objtxt = 'Regards,'.
          APPEND i_objtxt.
          i_objtxt = 'J.Jayanthi'.
          APPEND i_objtxt.
          DESCRIBE TABLE i_objtxt LINES v_lines_txt.
          Document information.
          w_doc_chng-obj_name = 'Smartform'.
          w_doc_chng-expiry_dat = sy-datum + 10.
          w_doc_chng-obj_descr = 'Smart form output'.
          w_doc_chng-sensitivty = 'F'. "Functional object
          w_doc_chng-doc_size = v_lines_txt * 255.
          Pack to main body as RAW.
          Obj. to be transported not in binary form
          CLEAR i_objpack-transf_bin.
          Start line of object header in transport packet
          i_objpack-head_start = 1.
          Number of lines of an object header in object packet
          i_objpack-head_num = 0.
          Start line of object contents in an object packet
          i_objpack-body_start = 1.
          Number of lines of the object contents in an object packet
          i_objpack-body_num = v_lines_txt.
          Code for document class
          i_objpack-doc_type = 'RAW'.
          APPEND i_objpack.
          Packing as PDF.
          i_objpack-transf_bin = 'X'.
          i_objpack-head_start = 1.
         i_objpack-head_num = 1.
          i_objpack-head_num = 0.
          i_objpack-body_start = 1.
          i_objpack-body_num = v_lines_bin.
          i_objpack-doc_type = 'PDF'.
          i_objpack-obj_name = 'Smartform'.
          CONCATENATE 'Smartform_output' '.pdf'
          INTO i_objpack-obj_descr.
          i_objpack-doc_size = v_lines_bin * 255.
          APPEND i_objpack.
          Document information.
          CLEAR i_reclist.
          e-mail receivers.
         i_reclist-receiver = '[email protected]'.
          i_reclist-receiver = '[email protected]'.
          i_reclist-express = 'X'.
          i_reclist-rec_type = 'U'. "Internet address
          APPEND i_reclist.
          Sending mail.
          CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
          document_data = w_doc_chng
          put_in_outbox = 'X'
          TABLES
          packing_list = i_objpack
          object_header = w_objhead
          contents_hex = i_objbin
          contents_txt = i_objtxt
          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.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    Please reply me back, it is very urgent..
    Thanks and regards.
    A.Rafique

  • SMARTFORM TO PDF FORMAT

    Hi All,
    I have a requirement to get a print preview of the smartform in the pdf format and have the option to either print it or save it.
    meaning - the adobe application must automatically open and in it, there must be a window to display the smartform in the PDF format.
    the code i have so far is as below
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
           EXPORTING
                FORMNAME           = W_FORM_NAME
           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
    gst_output_options-tddest = 'FRNT_End_Print'. "Frontend printer
    gst_output_options-tdnewid = sy-prnew.
    gst_output_options-tdimmed = 'X'.
    gst_output_options-tddelete = sy-prrel.
    clear gst_control_parameters.
    gst_control_parameters-no_dialog = 'X'.
    gst_control_parameters-getotf = 'X'.
    gst_control_parameters-preview = 'X'. "Deactivate preview!
    *Call the original function module.
    call function w_fmodule
    exporting
    control_parameters = gst_control_parameters
    output_options = gst_output_options
    importing
    job_output_info = gt_job_output_info
    job_output_options = gt_output_options
    tables
    tbl_amt = final_tab
    exceptions
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4.
    if sy-subrc ne 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
      T_OTF[] = gt_job_output_info-OTFDATA[].
    call function 'SSFCOMP_PDF_PREVIEW'
    exporting
    i_otf = t_otf
    exceptions
    convert_otf_to_pdf_error = 1
    cntl_error = 2
    others = 3.
    if sy-subrc ne 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    The adobe application is launched but the window inside does not hold anything.
    i get a pop-up inside the adobe window with the message " FILE DOES NOT BEGIN WITH '%PDF-' ".
    Any suggestions are greatly appreciated.
    hoping to hear from you all.
    thank you.
    Sandeep

    Hi Sandeep,
              Plz try with this code this code is working properly.
    DATA: form_name TYPE rs38l_fnam.
    DATA: wa_ctrlop TYPE ssfctrlop,
    wa_outopt TYPE ssfcompop.
    DATA: t_otfdata TYPE ssfcrescl,
    t_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA: t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
    DATA: w_filesize TYPE i.
    DATA: w_bin_filesize TYPE i.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'ZSM_PDF_1'
    * VARIANT = ' '
    * DIRECT_CALL = ' '
    IMPORTING
    fm_name = form_name
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    wa_ctrlop-getotf = 'X'.
    wa_ctrlop-no_dialog = 'X'.
    wa_outopt-tdnoprev = 'X'.
    CALL FUNCTION form_name
    EXPORTING
    * ARCHIVE_INDEX =
    * ARCHIVE_INDEX_TAB =
    * ARCHIVE_PARAMETERS =
    control_parameters = wa_ctrlop
    * MAIL_APPL_OBJ =
    * MAIL_RECIPIENT =
    * MAIL_SENDER =
    output_options = wa_outopt
    user_settings = 'X'
    mydate = F_DATE
    IMPORTING
    * DOCUMENT_OUTPUT_INFO =
    job_output_info = t_otfdata
    * JOB_OUTPUT_OPTIONS =
    TABLES
         ITAB = ITAB
    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_otfdata-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    * ARCHIVE_INDEX = ' '
    IMPORTING
    bin_filesize = w_bin_filesize
    TABLES
    otf = t_otf
    lines = t_pdf_tab
    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.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    bin_filesize = w_bin_filesize
    * CODEPAGE = ' '
    filename = 'C:\Users\KO58\Desktop\test1.pdf'
    filetype = 'BIN'
    * MODE = ' '
    * WK1_N_FORMAT = ' '
    * WK1_N_SIZE = ' '
    * WK1_T_FORMAT = ' '
    * WK1_T_SIZE = ' '
    * COL_SELECT = ' '
    * COL_SELECTMASK = ' '
    * NO_AUTH_CHECK = ' '
    IMPORTING
    filelength = w_filesize
    TABLES
    data_tab = t_pdf_tab
    * FIELDNAMES =
    EXCEPTIONS
    file_open_error = 1
    file_write_error = 2
    invalid_filesize = 3
    invalid_type = 4
    no_batch = 5
    unknown_error = 6
    invalid_table_width = 7
    gui_refuse_filetransfer = 8
    customer_error = 9
    OTHERS = 10
    IF sy-subrc <> 0.
    MESSAGE i003(z00) WITH 'File not downloaded succesfully'.
    ELSE.
    MESSAGE i003(z00) WITH 'File Test.pdf downloaded succesfully '
    'under D drive'.
    ENDIF.
    If usefull plz give rewards.
    Cheers
    Anirudh

  • Smartform Output to PDF conversion

    Hi experts,
    i want to convert the smartform output to PDF Format and stored it in system level.But i got the following information message "OTF end command // missing in OTF data".
    I used "CONVERT_OTF" for conversion of smartform output and "WS_DOWNLOAD & GUI_DOWNLOAD".
    wt it means,can i make any changes,if tl me why it shows the message.
    points wl be rewarded.
    Thank you
    chandu
    Edited by: Chandu Valluri on Jan 4, 2008 12:56 PM

    hi,
    *& Report  ZPDF_DNLD_TEST2                                             *
    *& DEVK904540                                                                    *
    REPORT  ZPDF_DNLD_TEST2                         .
    data: i_otf LIKE itcoo OCCURS 100 WITH HEADER LINE,
          i_pdf LIKE tline OCCURS 100 WITH HEADER LINE.
    data: op_option type SSFCTRLOP,
          job_output type SSFCRESCL.
    op_option-getotf = 'X'.
    CALL FUNCTION '/1BCDWB/SF00000005'
      EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = op_option
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
       itab1                      = itab1
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
       JOB_OUTPUT_INFO            = job_output
      JOB_OUTPUT_OPTIONS         =
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 4
       OTHERS                     = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = 'PDF'
      MAX_LINEWIDTH               = 132
      ARCHIVE_INDEX               = ' '
      COPYNUMBER                  = 0
      ASCII_BIDI_VIS2LOG          = ' '
      PDF_DELETE_OTFTAB           = ' '
    IMPORTING
      BIN_FILESIZE                =
      BIN_FILE                    =
      TABLES
        otf                         = job_output-otfdata
        lines                       = i_pdf
    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.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        filename                        = 'c:\test_pdf_sf.pdf'
       FILETYPE                        = 'BIN'
      tables
        data_tab                        = i_pdf
      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.

  • 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.

  • Lines in pdf format

    Hi
    I have a report and in the template i have made only top lines of the frames visible for group breaks . This is working fine in the reports where each group is being seperated by a line( top edge of the frame) However when i convert this into pdf format i get all the lines visible and get an ugly box surrounding my report . This does not happen when i conver into rtf format ... i need my reports in pdf format only ... any suggestion in how these lines can vanish
    regards
    sudhir

    Hi Randy ,
    Thank you for your response . I am doing it the way you have said . But the problem is now i dont get any lines , i need the top lines to seperate one group from another .... right now i am drawing lines in the groups .... as the future reports are to be done by customer ( who is not an expert in reports ) i was wondering if i can set the property in template and give the template to him ... it would be less work for him .... anyway thanks for your inputs .... feels good to know that someone else has looked into your problem ... thanks
    bye
    sudhir

  • Arabic language Smartform given Wrong Output format.

    Hi,
    I have developed Arabic Language smartform and tested in  Print Privew  mode working fine .
    Problem with smartform Converted into PDF format and downloded to PC given wrong format.
    Pl let me know any changes required.

    Sorry I do not have answer to your question. But can you share with me how you managed to display Arabic language in Smartform?

Maybe you are looking for

  • How to extract the senders IP address of an email?

    How to extract the senders IP adress of an email using applescript ??

  • Empty boxes

    Hi Ppl,           I have prob in smartform. I have to display a empty box of size 1 character against, each record . Based on the number of records the boxes have to be displayed.           Please let me know if any idea ?           searched a lot fo

  • UDM on physical standby database in grid control 11.1

    I am getting Test Results ORA-06550: line 70, column 5: PLS-00201: identifier 'RAISE_APPLICATION_ERROR' must be declared ORA-06550: line 70, column 5: PL/SQL: Statement ignored While creating UDM on physical standby database in grid control 11.1. Ple

  • DB Back to a Specific Time with Archive Logs (Until cancel or time?)

    I'll try to be as clear as possible with my intended goals and the limitations of the system I'm working with: 1. We have a test instance of our Oracle DB that I would like to be able to refresh with data from the production instance at any time, wit

  • Receiving files from and sending files to a third party

    Hi I have the following scenario. A third party needs to send me an xml file, which I need to load into the database. Once the file has been processed, I need to send a success/failure indicator, as well as an error file if necessary, to the third pa