Smartform print preview

Hi Experts,
     I am modifying an existing smartform print program,
after modifications, when  I am clicking on printpriview button after selecting the zee Output Type
in order to test the form, I am unable to see the preview,
Can anybody tell me what are the points to check?.
I already checked the parameters passed to control structures.
They are fine. Even i am not able to see the printpreview.
Kindly help.
The sf is for Delevary
and the transaction i am using isVL03N
Regards,
Noor.

hi,
     Put break points in your program and execute it or else check for address nodes read_text fm
There may be some error in smartforms or driver program,
just make the break point and trying to debugg that
We can consider many checks in this case.
1. Check whether the Local printer exists or not.
2. If you are using any Address NOdes, check whether the Address number is holding a value.
3. Also check whether a record exists with your condition type/Delivery in the NAST table.
4. You can see the default local printer in SU3.
Use SFTRACE tcode to trace the error.

Similar Messages

  • Error while displaying PO smartform print preview

    Hi,
    In th PO smartform iam trying to display the service PO. the data is coming in runtime but it is not displaying the print preview only for the service POs the error iam getting is "<b>system message 042 from work area SSFCOMPOSER does not exict</b>". other POs are displaying correctly. pl. help me inthis its urgent .. rewards for every correct guidence
    Message was edited by:
            satish k

    Hi
    pls check if you are using any checks or conditions under which a node gets executed only for service PO's. problem may be like some colums or rows may be missing in the table node etc.

  • Problem with smartform print preview.

    Hi Experts,
                     i have an rare problem i have requirement of  sending PO smartform mail as pdf ,and the smartform is configued to nace, and the tcode is  me23n.
    we checked it in development server everything went on well,and mail was sent without any error, after moving object to quality,
    we tested in the same process as in development, instead of mail 'Print preview' button was popped up.
    is it something to do  with NACE config or to do with my code ?

    Hi Prakash,
    As Mohit said default printer is not yet set for your user in QAL and on print preview screen output device field is mandatory that is why the pop up for print preview is coming.
    follow path given by Mohit and I think the pop up will not come again.
    Regards,
    Siddhesh Satghare.

  • Smart style is not effecting in smartforms print preview

    Hi All,
      i have created my smart style with HELVE font style and i have created paragraph formats for my smart style. And i assigned one of my paragraph format to header data-> standard format.
    I have used this smart style in my smart form. But while doing print preview, my smart form output is not effected by the smart style which i have given. Output is displaying in the form of  my smart styles-> header data-> standard format's  font wise. Not effecting the paragraph formats what i have given in my smart form text editor.
    could anyone  reply me how to solve this issue.
    Thanks in Advance.

    You can do one last thing from your side to ensure you are absolutely right. Open your smartstyle and create a paragraph format under paragraph node, with name P1 (for example). Now in P1, keep the font as Helve and save and ACTIVATE.
    Go back to your smartform, open the concerned text node. Select the text in it and from the drop down select P1. If you have not assigned this smartstyle to your form in attribute node, in that case you need to assign this smartstyle to your form (or in the output option tab of the text node) to get the P1 in the drop down.
    Save and activate the smartform. And let us know if it solves your issue.
    Cheers,
    Anid

  • Third page is not comming in smartform print preview

    Hi Gurus,
                 I have designed the smart  which has three pages first and third pages are constant so they
                dont have any main window but second page is variable so it has one main window
                but the problem is third page  is not comming in print preview though I have given the next page
                as page3 in page2  and also I have tried to create command on page2 and assigned next page
                as page3  and there is no condition so why it is not showing the third page.
                please guide if it is possible and also let me know if not possible.
    Thanks & Regards
    Mani

    Hi Mani
    Page 1 : Next page-->Page 2
    Page 2 : Next page --> Page 2 since it contains main window
    after the main window create the  command node
    go to next page : page 3.
    Page 3: Next page --> Blank.
    Regards,
    Sravanthi

  • How to view Smartform Print Preview

    Hi,
    I have a Sales Order, Print output   is issued which has smart form  &  Print Program. Can you explain me how to view the print preview again for the Sale Order for which ouptut has been issued in ECC 5.0.
    Many Thanks
    Lakshmi

    Hi Atish,
    I did tried by going VA03 Screen & then Selected
    Extras- Output - Header - Print Preview from Menubar
    but no luck I cannot see  Print Preview of the output.
    Thanks
    Lakshmi

  • Retain the alignment of print preview in download of smartform

    Hi ABAPers,
    I need to retain the alignment of the smartform print preview when I download the smartform as PDF.
    The text alignment is ok but the issue is with character "-".
    In print preview
    Shift Date Qty.Kgs Qty.Lts ST Fat% CLR SNF% Fat(Kg) Rate UOM Pay Farmer
    AM 29 42.00 40.77 G 7.00 23.80 7.78 2.94 17.50 KG 735.00
    Total Buf : 42.00 40.77 7.00 7.79 2.94 18.03 735.00
    Net Amount Payable Rs 735.00
    In downloaded PDF
    Shift Date Qty.Kgs Qty.Lts ST Fat% CLR SNF% Fat(Kg) Rate UOM Pay Farmer
    AM 29 42.00 40.77 G 7.00 23.80 7.78 2.94 17.50 KG 735.00
    Total Buf : 42.00 40.77 7.00 7.79 2.94 18.03 735.00
    Net Amount Payable Rs 735.00
    so how to retain the exact format in PDF as in print preview.
    -Dep
    Edited by: DeepakNandikanti on Dec 16, 2010 7:01 AM

    Hi friend,
    There are many questions posted in Forum saying printout is coming correct in PDF but not in print.
    The main reason for that is PDF accepts all kind of input its an universally accepted format Portable Device Format.
    So see whether you system supports both the languages. Check with your basis team about it. Also try using other languages which your system supports so that you will get to know where your problem exists.
    I think this will solve your issue please revert back to me if you have any issues i will help you.
    Thanks,
    Sri Hari

  • Polish characters on print preview are not correct, printing works well

    Hi gurus,
    i've got a problem with smartform print preview. Our programmer developed form, which is used in polish and english version. In polish version everything works fine - print and print preview has polish characters (ąłćźń etc). In english version, print preview has no polish characters in address paragraph, but when I print it, everything is on his place.
    Unfortunetly, system is non-unicode. I tried changing font to other (but in polish version with the same font, print preview is correct), changing size, even charset of printer. Works badly on I2SWIN, HP-PCL, and any other printer type.
    What should I do now? Removing polish letters or changing them into "normal" is not acceptable solution, especially that printing works fine (on I2SWIN and HP PCL type also).
    Polish is of course installed on the system.
    Thank you for your help.
    SAP ECC 6.0
    SAP_AP 700 013

    Hi Martin,
    another thought to solve the issue is to translate the form to pl in your system. I got a similar issue some time ago.
    I developed the form in DE and translated it just to English, because we wanted to set always English.
    Problem was, that french characters didn't show up in a proper way in print-preview. We solved the issue by translating the form also in FR and IT.
    It seemed, that the formlanguage passed just the native charactersets for this language.
    Maybe you are having the same issue. Otherwise would be nice, if you can share your solution if there is another one here
    ~Florian

  • Problem in Print preview of smart forms in different servers.

    Print preview is different in different systems(development and Quality) for the same smartform, though everything is same.
    both are seen on print preview of locl printer, and I have checked the settings of locl in spad also and this also has no difference, there is absolutely no difference in smartform ,style paragraph format or character format.
    Can anyone please let me know what could be the problem.
    Help is appreciated.

    Hi,
    check this link it might solve ur problem.
    Re: Smartforms Print Preview Problem
    it might be the same issue which u r facing with..
    Regards,
    Sana.
    reward poitns if found helpful..

  • Smartform to PDF, how to suppres Print/Preview dialog

    Hi Experts,
    Facing some issues in downloading PDF converted from Smartform.
    In the program I am trying directly download a smartform converted into PDF format and save it in local system.
    When ever I am trying to execute the program it shows up the Print/Preview dialog before showing the Save As dialog.
    I have passed control_parameters-getotf = 'X' to the smartform runtime FM, which ideally should have suppressed the Print/Preview dialog and return the otfdata.
    Here the entire code is...
    REPORT  yfr_invoice.
    TABLES :  t001, bsad, bsid, kna1,sscrfields .
    DATA : fm_name TYPE rs38l_fnam.
    DATA : it_bsad TYPE STANDARD TABLE OF bsad.
    DATA : BEGIN OF it_bseg OCCURS 0,
            belnr TYPE belnr_d,
           END OF it_bseg.
    DATA : error_flag.
    DATA: 
           cont_param TYPE ssfctrlop,
           out_param  TYPE ssfcompop,
           otfdata    TYPE ssfcrescl,
           t_tline    TYPE TABLE OF tline INITIAL SIZE 0,
           t_docs     TYPE STANDARD TABLE OF docs,
           v_filesize TYPE i,
           v_name     TYPE string,
           v_path     TYPE string,
           v_fullpath TYPE string,
           v_filename TYPE string,
           v_filter   TYPE string.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
    SELECT-OPTIONS : s_bukrs FOR t001-bukrs NO-EXTENSION NO INTERVALS OBLIGATORY.
    SELECT-OPTIONS : s_gjahr FOR bsid-gjahr NO-EXTENSION NO INTERVALS OBLIGATORY.
    SELECT-OPTIONS : s_rebzg FOR bsid-rebzg OBLIGATORY.
    SELECT-OPTIONS : s_kunnr FOR kna1-kunnr.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
    START-OF-SELECTION.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = 'YFF_INVOICE'
        IMPORTING
          fm_name            = fm_name
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    cont_param-getotf = 'X'.
    cont_param-no_dialog = 'X'.
    cont_param-preview = 'X' .
      CALL FUNCTION fm_name
        EXPORTING
          control_parameters = cont_param  "Passing getotf = 'X'
        IMPORTING
          job_output_info    = otfdata
        TABLES
          s_bukrs            = s_bukrs[]
          s_gjahr            = s_gjahr[]
          s_rebzg            = s_rebzg[]
          s_kunnr            = s_kunnr[]
        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'
            IMPORTING
              bin_filesize           = v_filesize
            TABLES
              otf                    = otfdata-otfdata
              doctab_archive         = t_docs
              lines                  = t_tline
            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.
          CONCATENATE 'filename' '.pdf' INTO v_name.
          CALL METHOD cl_gui_frontend_services=>file_save_dialog
            EXPORTING
              default_extension = 'PDF'
              default_file_name = v_name
              file_filter       = v_filter
            CHANGING
              filename          = v_name
              path              = v_path
              fullpath          = v_fullpath.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              bin_filesize            = v_filesize
              filename                = v_fullpath "'C:\Test.pdf'
              filetype                = 'BIN'
            TABLES
              data_tab                = t_tline
            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.
        ENDIF.
      ENDIF.
    The program other wise works absolutly fine .
    Please advise.
    Thanks
    Jahan

    Moderator message - Cross post locked
    Rob

  • Updation of table after Print and Print-Preview in smartform

    Hi,
    I am having a requirement where i need to print multiple deliveries with the sales order data each delivery on a new page using smartform.
    Now , i am using SSF_OPEN, SSF_CLOSE Fm's for the same. I need to update a Z table after the user clicks on PRINT from the pop-up or print from the print preview screen.
    I tried using the output_info parameter in the smartform where i read from a post that the OUTPUTDONE parameter becomes "X" in the job_output_info when the user clicks print wither in the two ways said before.
    This does not work out in case if the FM'S SSF_OPEN and SSF_CLOSE are used.
    Kindly help me on the same.
    Thanks in advance

    yes i tried that..using the AT new event for a Delivery and then a command to go to the NEW PAGE, but somehow when i execuet the form, i could not see the layout..so in the debug i saw the subrc after the FM is run..it says SUBRC = 2 i.e. internal error. I am not able to figure that out.
    So i had to use these open and close, nowi just want to update a z table if the user clicks on the print button (print preview screen) after using the print preview .
    Kindly suggest.
    Thanks.

  • Error while displaying print preview of smartform in VL03n

    Hi all,
    i created one smartform & print program . i assigned this in NACE tcode for ZD05 output type.
    Then i am trying to see the print preview in VL03n  while doing issue delivery output.
    But i am getting error like ' Output could not be issued'. Please suggest where i am doing mistake. Thanks.
    Regards
    sumitra

    Hi,
    Follow below Steps:
    1) Double Check your program and smartform names where you are attached in nace  transaction.
    2)check your templates and tables having formatting issues.
    3)Finally create dummy of your smartform. then delete one by one window in smartform check it and trace out in which window error is existing.
    even i faced same problem.
    in my case i gave wrong line and column numbers under the template node texts. it won't show the error in smart form but while executing transaction out put could not issued.
    Thanks,
    Satheesh.

  • To replace standard smartform by a custom form, to be used in PRINT PREVIEW

    Hi,
    I have a requirement in CRM 2007 webUI. If we try to create a sales order, then we have a toolbar option button with title "PRINT PREVIEW". It uses the custom smart form "CRM_ORDER_CONFIRMATION_01.
    I have to replace this standard form by a Z custom form. This form has soem additional data required for business needs.
    Field technical details of the button is :
    1. Component Name-  BT115H_SLSO
    2. View   - SOHOverview
    3. Context Node - THTMLB
    4. Attribute- BUTTON_8
    5. Role key - BP_POW_USR
    6. Comp. Usage - CUBT Sales Order
    7. Object Type - BT115_SLSO
    Please reply as soon as possible.

    To figure this out you need to do the following:
    First determine the action profile for the transaction in question in the IMG.
    CRM->Transactions->Basic Settings->Define Transaction Types
    Display the detials of the transaction and you will see the action profile.  Next copy that action profile by using transaction SPPFCADM.  Then in the action defintion for the print action, replace the standard smartform definition with your z-form. 
    Finally go back into the transaction definition and assign the z-profile to your transaction type.  Please note you should only do this with "z-transactions".
    I'm not going to go into further detail as this is basic CRM configuration and is valid for all releases.  Please look at the best practices guides, or do a search in the CRM General and Framework forum for further information on how to do the configuration steps.
    Take care,
    Stephen

  • Download smartform as PDF, suppress Print/Preview dialog

    Hi Experts,
    Facing some issues in downloading PDF converted from Smartform.
    In the program I am trying directly download a smartform converted into PDF format and save it in local system.
    When ever I am trying to execute the program it shows up the Print/Preview dialog before showing the Save As dialog.
    I have passed control_parameters-getotf = 'X' to the smartform runtime FM, which ideally should have suppressed the Print/Preview dialog and return the otfdata.
    Here the entire code is...
    Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
    The program other wise works absolutly fine .
    Please advise.
    Thanks
    Jahan
    Edited by: Rob Burbank on Apr 8, 2010 11:10 AM

    Helloo Guyz...
    I am exactly trying the same, but the Print Dialog is still coming ...
    See here is my code ..
    cont_param-getotf = 'X'.
    cont_param-no_dialog = 'X'.
    cont_param-preview = 'X' .
      CALL FUNCTION fm_name
        EXPORTING
          control_parameters = cont_param
        IMPORTING
          job_output_info  = otfdata
        TABLES
          s_bukrs             = s_bukrs[]
          s_gjahr              = s_gjahr[]
          s_rebzg             = s_rebzg[]
          s_kunnr             = s_kunnr[]
        EXCEPTIONS
          formatting_error  = 1
          internal_error      = 2
          send_error          = 3
          user_canceled    = 4
          OTHERS              = 5.
    even after this ..during execution the the Print Dialog is coming..
    I have no idea what esle I am missing..
    Thanks

  • Converting Smartforms to PDF and displaying Smartforms on print preview

    Hi,
    How to convert smartforms to pdf?
    How to attach this pdf to email?
    How to attach this pdf to the email and at the same time can print preview the smartforms?
    Thanks.

    Hi Navi,
    Code Snippet for Simple Mail
    *& Report  ZZ_TEST                                                     *
    REPORT  zz_test                                 .
    INCLUDE zz_test_top.
    INCLUDE zz_test01.
          FORM entry                                                    *
    -->  RETURN_CODE                                                   *
    -->  US_SCREEN                                                     *
    FORM entry USING return_code us_screen.
      CLEAR retcode.
      xscreen = us_screen.
      PERFORM processing USING us_screen.
      CASE retcode.
        WHEN 0.
          return_code = 0.
        WHEN 3.
          return_code = 3.
        WHEN OTHERS.
          return_code = 1.
      ENDCASE.
    ENDFORM.                    "entry
    *&  Include           ZZ_TEST_TOP                                      *
      TABLES : nast,
               tnapr.
    TYPES : BEGIN OF t_SOUDNAMEI1.
            INCLUDE STRUCTURE SOUDNAMEI1.
    TYPES : END OF t_SOUDNAMEI1.
    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,
      i_lips LIKE lips OCCURS 0 WITH HEADER LINE,
      i_SOUDNAMEI1 TYPE STANDARD TABLE OF t_SOUDNAMEI1.
    Work Area declarations
      DATA:w_objhead TYPE soli_tab,
      wa_control_parameters TYPE ssfctrlop,
      wa_output_options 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
      wa_SOUDNAMEI1 TYPE t_SOUDNAMEI1,
    Variables declarations
      w_form_name TYPE rs38l_fnam,
      w_len_in LIKE sood-objlen,
      w_len_out LIKE sood-objlen,
      w_len_outn TYPE i,
      w_lines_txt TYPE i,
      w_lines_bin TYPE i,
      retcode      TYPE sy-subrc,
      xscreen      TYPE c,
      w_spld TYPE usr01-spld,
      w_receiver TYPE SOXNA-FULLNAME,
      w_OBJ_RECORD TYPE OBJ_RECORD,
      w_user type sy-uname,
      w_email TYPE ad_smtpadr.
    Constants Declaration
      CONSTANTS : c_x TYPE c VALUE 'X',
                  c_atrate(1) TYPE c VALUE '@'.
    *&  Include           ZZ_TEST01                                        *
          FORM PROCESSING                                               *
    FORM processing USING proc_screen.
      SELECT * FROM lips
        INTO TABLE i_lips
        WHERE vbeln = nast-objky.
    Call Function module to Getfunction Module name Generated by Smartform
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = tnapr-sform
        IMPORTING
          fm_name            = w_form_name
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      IF sy-subrc <> 0.
        retcode = sy-subrc.
      ENDIF.
      CLEAR : wa_control_parameters,
              wa_output_options.
      CASE nast-nacha.
        WHEN '1'.
          wa_control_parameters-device    = 'PRINTER'.
        WHEN '7'.
          DATA: l_email TYPE ad_smtpadr.
          wa_output_options-tdnoprev = c_x.
          wa_control_parameters-getotf  = c_x.
    To get the default output device maintained in the
    User profile
         SELECT SINGLE spld FROM usr01
          INTO w_spld
          WHERE bname EQ nast-usnam.
          IF sy-subrc EQ 0.
            MOVE w_spld TO  wa_output_options-tddest   .
          ENDIF.
          wa_output_options-tdnoprev = c_x.
          wa_control_parameters-getotf  = c_x.
    To get the email address maintained for the particular output
          CALL FUNCTION 'NAST_GET_MESSAGE_OBJECT_RECV'
            EXPORTING
              pi_objkey             = nast-tdname
            IMPORTING
              pe_addr               = w_receiver
            CHANGING
              pc_objhandle          = w_obj_record
            EXCEPTIONS
              maildata_not_readable = 1
              OTHERS                = 2.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
           WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          IF w_receiver NA c_atrate.
    To retrieve the E-Mail Id in case we get the User name from NAST
            CLEAR wa_soudnamei1.
            REFRESH i_soudnamei1.
            MOVE w_receiver TO wa_soudnamei1-fullname.
    To get the user name
            CALL FUNCTION 'SO_NAME_CONVERT_API1'
              EXPORTING
                name            = wa_soudnamei1
              TABLES
                names           = i_soudnamei1
              EXCEPTIONS
                user_not_exist  = 1
                parameter_error = 2
                x_error         = 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.
            CLEAR wa_soudnamei1.
            READ TABLE i_soudnamei1 INTO wa_soudnamei1 INDEX 1.
            MOVE wa_soudnamei1-sapname TO w_user.
    To get the e-mail Id maintained in the user profile
            CALL FUNCTION 'FTR_CORR_CHECK_EMAIL_SAP_USER'
              EXPORTING
                i_user              = w_user
              IMPORTING
                e_email_address     = l_email
              EXCEPTIONS
                mail_address        = 1
                determination_error = 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.
            MOVE l_email TO w_receiver.
          ENDIF.
          MOVE  w_receiver TO w_email.
      ENDCASE.
      wa_control_parameters-no_dialog = c_x.
      wa_control_parameters-langu     = nast-spras .
      wa_output_options-tdteleland    = nast-tland.
      wa_output_options-tdtelenum     = nast-telfx .
      wa_output_options-tdsenddate    = nast-erdat .
      wa_output_options-tdsendtime    = nast-eruhr .
      wa_output_options-tddataset     = nast-dsnam .
      wa_output_options-tdsuffix1     = nast-dsuf1 .
      wa_output_options-tdsuffix2     = nast-dsuf2 .
      wa_output_options-tdimmed       = nast-dimme .
      wa_output_options-tddelete      = nast-delet .
      wa_output_options-tdautority    = nast-tdautority.
      wa_output_options-tdcovtitle    = nast-tdcovtitle .
      wa_output_options-tdcover       = nast-tdocover .
      wa_output_options-tdreceiver    = nast-tdreceiver.
      wa_output_options-tddivision    = nast-tddivision.
      wa_output_options-tdcopies      = nast-anzal .
      wa_output_options-tdnewid       = c_x.
      wa_output_options-tdarmod       = nast-tdarmod.
      wa_output_options-tdnoarmch     = c_x.
      CALL FUNCTION w_form_name
        EXPORTING
         archive_index      = toa_dara
         archive_parameters = arc_params
          control_parameters = wa_control_parameters
          output_options     = wa_output_options
          user_settings      = ' '
        IMPORTING
          job_output_info    = w_return
        TABLES
          it_lips            = i_lips
        EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
      IF nast-nacha EQ 7 AND sy-subrc EQ 0.
        i_otf[] = w_return-otfdata[].
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = 'PDF'
            max_linewidth         = 132
          IMPORTING
            bin_filesize          = w_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 w_lines_bin.
    Document information.
        w_doc_chng-obj_name = 'Smartform'.
        w_doc_chng-expiry_dat = sy-datum + 10.
        CONCATENATE 'Delivery' 'Note'
        INTO w_doc_chng-obj_descr.
    *w_doc_chng-obj_descr = 'Smart form output'.
        w_doc_chng-sensitivty = 'F'. "Functional object
        w_doc_chng-doc_size = w_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 = w_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-body_start = 1.
        i_objpack-body_num = w_lines_bin.
        i_objpack-doc_type = 'PDF'.
        i_objpack-obj_name = 'Smartform'.
        CONCATENATE 'Delivery' 'Note' '.pdf'
        INTO i_objpack-obj_descr.
        i_objpack-doc_size = w_lines_bin * 255.
        APPEND i_objpack.
    Document information.
        CLEAR i_reclist.
    e-mail receivers.
        i_reclist-receiver = w_email.
        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_bin               = 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.
      ENDIF.
    ENDFORM.                    "processing
    OTF to PDF
    ========================================================================
    Program1
    *& REPORT  zpmm_print1
    REPORT  zpmm_print1.
    DATA : gw_ssfcrescl TYPE ssfcrescl.
    DATA: gt_otf TYPE STANDARD TABLE OF itcoo ,
          gt_tline TYPE STANDARD TABLE OF tline,
          gv_len LIKE sood-objlen,
          gw_ssfctrlop TYPE ssfctrlop, "for CONTROL_PARAMETERS
          gw_ssfcompop TYPE ssfcompop. "for OUTPUT_OPTIONS
    DATA  fm_name TYPE rs38l_fnam.
    gw_ssfctrlop-getotf = 'X'.
    gw_ssfctrlop-no_dialog = 'X'.
    gw_ssfcompop-tdnoprev = 'X'.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname           = 'ZPMM_1'
      IMPORTING
        fm_name            = fm_name
      EXCEPTIONS
        no_form            = 1
        no_function_module = 2
        OTHERS             = 3.
    IF sy-subrc <> 0.
    <error handling>
    ENDIF.
    CALL FUNCTION fm_name
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       control_parameters         = gw_ssfctrlop
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
       output_options             = gw_ssfcompop
       user_settings              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
       job_output_info            = gw_ssfcrescl
      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.
    gt_otf[] = gw_ssfcrescl-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
      EXPORTING
        format                = 'PDF'
        max_linewidth         = 132
      IMPORTING
        bin_filesize          = gv_len
      TABLES
        otf                   = gt_otf
        lines                 = gt_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.
    DATA : gv_filename LIKE rlgrap-filename VALUE 'C:\swet.pdf'.
    CALL FUNCTION 'DOWNLOAD'
      EXPORTING
        bin_filesize     = gv_len
        filename         = gv_filename
        filetype         = 'BIN'
        filetype_no_show = 'X'
      IMPORTING
        act_filename     = gv_filename
        filesize         = gv_len
       cancel           = ''
      TABLES
        data_tab         = gt_tline.
    Program 2
    *& REPORT  zpmm_print2
    REPORT  zpmm_print2.
    DATA : gw_ssfcrescl TYPE ssfcrescl.
    DATA: gt_otf TYPE STANDARD TABLE OF itcoo ,
          gt_tline TYPE STANDARD TABLE OF tline,
          gv_len LIKE sood-objlen,
          gw_ssfctrlop TYPE ssfctrlop, "for CONTROL_PARAMETERS
          gw_ssfcompop TYPE ssfcompop. "for OUTPUT_OPTIONS
    DATA  fm_name TYPE rs38l_fnam.
    gw_ssfctrlop-getotf = 'X'.
    gw_ssfctrlop-no_dialog = 'X'.
    gw_ssfcompop-tdnoprev = 'X'.
    CALL FUNCTION '/1BCDWB/SF00000041'
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       control_parameters         = gw_ssfctrlop
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
       output_options             = gw_ssfcompop
       user_settings              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
       job_output_info            = gw_ssfcrescl
      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.
    gt_otf[] = gw_ssfcrescl-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
      EXPORTING
        format                = 'PDF'
        max_linewidth         = 132
      IMPORTING
        bin_filesize          = gv_len
      TABLES
        otf                   = gt_otf
        lines                 = gt_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.
    DATA : gv_filename LIKE rlgrap-filename VALUE 'C:\swet.pdf'.
    CALL FUNCTION 'DOWNLOAD'
      EXPORTING
        bin_filesize     = gv_len
        filename         = gv_filename
        filetype         = 'BIN'
        filetype_no_show = 'X'
      IMPORTING
        act_filename     = gv_filename
        filesize         = gv_len
       cancel           = ''
      TABLES
        data_tab         = gt_tline.
    =========================================================================
    Cheers
    Mohinder Singh Chauhan

Maybe you are looking for

  • Document Number ranges

    Dear All, Pls help me to solve the issue reg document number ranges. We have defiend the document number ranged for two company codes. Now ths issue is.. this document number range is being used/shared by both the company codes. For ex.. Invoice 01,

  • ITunes 10.3 wont crossfade

    Hi folks, got a brand new MacBook Air and installed the latest version (10.3) of iTunes (managing 5000 mp3 files/ 76 Gb). My problem is that the crossfade function, (properly activated in "playback preferences", doesn't work! It just don't fade. Any

  • Can't import a jpeg file to iPhoto

    Hello, I'm having trouble importing a jpeg file from another user to my iPhoto. We are both admins, file sharing is on for both users, read and write is on for both users. (I toggled file sharing on/off to see if it would update, and no changes). In

  • Am I likely to recieve problems with these stats?

    Hi Just recently ordered BT vision and even tho its not due to arrive for a few weeks, BT have kindly enabled the Assured Rate/QOS already ;-) Now the wife is a bit pessemestic as to whether it will work on our line as she has heard horror stories fr

  • Oracle portal import hangs - no errors

    I was trying to Import a newly developed page group into production environment from development environment. Running Script to Create an Export Dump File - no errors from portal or on backend. Running Script on Target System - No errors. Running imp