Smartform attachment in IW21

Hi Experts,
I am trying to send an email notification to outlook in IW21 using QQMA0014 enhancement.I created a function module and written code in it.Its working fine.Can I attach the smartform which is getting generated in this Tcode to mail ids? How can i get the smartform name in the function module?
Regards,
Sam

Hi Experts,
how to fetch data from standard tcode using RFC function module?
Regards,
Sam

Similar Messages

  • Business Context - Smartform Attachment

    Hi Experts,
    I recently upgraded from CRM 6.0 to CRM 7.0 EHP2. In the business context section in interaction center for complaint there is link for smartform attachment.
    On clicking the link the attachment does not show up in the new window. This works well in CRM 6.0 system. Could this be a configuration or there is some other reason? Thank you for your time.
    Regards,
    Dhruv Kashyap

    Hi Vijay
    One solution is to, you define the attachments such as resource then you can use the resources to get the number of attachment for each event type.
    Regards,
    Shirin

  • OTF attachment in IW21

    Hi Experts,
    I am getting an OTF attachment to SAP inbox while executing IW21 Tcode.Is this a smartform or SAP Script?
    Can I make any changes in its display?I want to send a mail along with this modified OTF format.I have written code for triggering mail using BAdi.But was unable to find this OTF form.
    Can any one help me in finding this form and making necessary display changes to send it to as an attachment to the users?
    Regards,
    Sam

    Hi K.K,
    Thanx for ur inputs.
    I tried above method.Eventhough I was unable to open the pdf attachment in mail.
    Following is my code
    Data:it_otfdata            TYPE STANDARD TABLE OF itcoo,
    wa_otfdata            LIKE LINE OF  it_otfdata,
    V_PDF_XSTRING    TYPE        XSTRING.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format                = 'PDF'
    max_linewidth         = 132
    IMPORTING
    bin_filesize          = bin_filesize
    TABLES
    otf                   = it_otfdata
    lines                 = it_lines132
    EXCEPTIONS
    err_max_linewidth     = 1
    err_format            = 2
    err_conv_not_possible = 3
    err_bad_otf           = 4
    OTHERS                = 5.
    Later I used following functions also
    CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
          TABLES
            content_in                  = it_lines132
            content_out                 = it_lines255
          EXCEPTIONS
            err_line_width_src_too_long = 1
            err_line_width_dst_too_long = 2
            err_conv_failed             = 3
            OTHERS                      = 4.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
          EXPORTING
            BUFFER     = V_PDF_XSTRING
            TABLES
            BINARY_TAB = it_otfdata.
    But I am getting error message:Acrobat could not open pdf because it is either not a supported file type or because the file has been corrupted.
    I am using following steps to send attachment through mail
    document = cl_document_bcs=>create_document(
                          i_type    = 'PDF'
                          i_hex     = pdf_content
                          i_text    = text
                          i_length  = '12'
                         i_subject = 'Subject').
    CALL METHOD send_request->edit(
              i_hide_note     = 'X'
              i_starting_at_x = 12
              i_starting_at_y = 5
              i_ending_at_x   = 97
              i_ending_at_y   = 22 ).
    call method send_request->send.
    Regards,
    Sam
    Edited by: sam24 on Sep 5, 2010 2:49 PM

  • Display smartform attachment contents

    Hi,
    Is it possible to display the contents of an attachment in a smartform printout and fax? If yes, how do we do it?
    Thanks and Regards,
    Mick

    Hi Mick,
    In the print program of Smartform, use GUI_UPLOAD to upload the file. This FM would upload the data from the file into an internal table. Pass the internal table to the Smartform. In the smartform read that table and display the contents as required.
    Best regards,
    Prashant

  • Smartform Attached to ME21N

    Hello Frnds,
    MEDRUCK is the form attached to ME21N ,
    But where do we attach it? which Function Module?
    Thanks & Regards

    Hi ,
    Go to transaction code NACE
    there select application EF,
    click on the output types,
    there you will get a list of output types that have  been attached to this application,
    select the output type that is active currently.
    you may find the currently active output type by going to transaction me23n there click on the tab message type and the message type will show you the output type.
    Once you select that output type and press the processing routines you will go to the screen showing the driver program and the form attached to it.
    you may then change the form and the driver program attaching you smartform and its driver program.
    Regards,
    Sunmit.

  • Smartform attachment too big

    Hi all,
    I'm sending a smartform via mail as a PDF with the CRM_ORDER standar transaction, and I observe that the size of the PDF attached varies randomly between 1 and 2 Megas.
    Can I do something to reduce this size?
    Best regards...
    Message was edited by: Jorge Tamayo Moreno

    Thanks MRUTYUN, but I can't do this because the PDF pass automatically via the SCOT transaction and it's imposible to manage this file.
    I've tried to modify the configuration of the SCOT transaction for the Sapscripts/Smartforms using other types of formats, but the others destroy all the styles of my smartform.
    There's any manner to especify(aproximately) the desired size of the PDF file?
    Greetings
    Jorge
    Message was edited by: Jorge Tamayo Moreno
    Message was edited by: Jorge Tamayo Moreno

  • Smartform attachment

    hello
    I need one help, my requirement is :
    my Z program have selecting selection screen and based on the input entered in screen,
    samrtform is callied...till this is it done. now they want to see in smartform in print prview
    and if it is ok than it is send as email attachment to user.
    kindly tell me how that print prview and email work simultaneously.
    it is going as attachmet but not coming in print preview.
    kindly suggest.

    Please refer the below thread....it says how to preview the smartform when called...........
    How can I make the Smart Forms to display a print preview by default without displaying the popup for print parameters?
    https://wiki.sdn.sap.com/wiki/display/ABAP/Smart+Forms?showChildren=false
    What you can do is, keep a button in the application tollbar...which says to Email...
    Once the button is clicked, the email should go....
    Please refer the below thread for sending the smartform as attachment..
    https://wiki.sdn.sap.com/wiki/display/Snippets/SmartformtoMailasPDF+attachment
    https://wiki.sdn.sap.com/wiki/display/Snippets/ConvertSmartformtoPDFformat
    Hope it helps!

  • URGENT: Smartform - Attaching Font to Device Type and Printing

    Hello Smarform Gurus,
    I have uploaded CORPOS font to SAP and using in SMARTFORMS. Whenever the PDF is called for invoice, it should print immediately.
    When I open the smartform and then print, the printout is coming fine with CORPOS font.
    Problem: When Invoice is created and PDF is called immediately, the prinout is not coming properly. It's because the printer device type KYOFS150 we are using does not support CORPOS. Pls let me know the options we have. We have also referred to SAP note 12462.
    Thanks in advance,
    Abhishek

    Hi
    U need to update the printer device type KYOFS150 or use another one supports that font
    Max

  • Smartform to OTF to PDF attached to an email ERROR

    Hi everyone... I have this problem... I need to send a smartform attached to an email... I'm doing the following:
    - Create the OTF using the smartform function importing job_output_info.
    - Convert the OTF (job_output_info-otfdata) to PDF using CONVERT_OTF_2_PDF.
    - Change the table line's width using SX_TABLE_LINE_WIDTH_CHANGE.
    - Send the email using SO_NEW_DOCUMENT_ATT_SEND_API1.
    Everything seems to be OK. But When I check the PDF file attached in the email and open it, everything there is a mess. The letters are superimposed over each other and the grills are not painted (instead it shows a black block).
    Any ideas how to solve this???
    Thanks a lot!!!

    Try this out..!
    <removed by moderator>
    To convert the script out put to PDF.
    CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF' u201C FOR out put format
          max_linewidth         = 132 u201CFor ASCII format: Number of lines in LINES-TDLINE
        IMPORTING
          bin_filesize          = gv_bin_filesize u201CFile size reference
        TABLES
          otf                   = gt_otf u201CInput table with OTF format
          lines                 = gt_pdf_tab " Output table with target format
    To mail Order in PDF format:
    Data declaration part :
    DATA: gt_reclist TYPE TABLE OF somlreci1, " SAPoffice: Structure of the API Recipient List
           gt_pdf_tab TYPE TABLE OF tline, " SAPscript: Text Lines
           gt_otf TYPE TABLE OF itcoo, " OTF Structure
           gt_objbin TYPE TABLE OF solisti1, " SAPoffice: Single List with Column Length 255
           gt_objpack TYPE TABLE OF sopcklsti1. " SAPoffice: Description of Imported Object Components
    DATA: gv_form_name TYPE rs38l_fnam, " Used to store the function module generated by Smartform
    gv_bin_filesize TYPE i, " Store the file size
    gv_pos TYPE i,
    gv_len TYPE i,
    gv_tab_lines TYPE i.
    DATA : gc_text(11) TYPE c VALUE 'Form Output',
    gc_tst(3) TYPE c VALUE 'TST',
    gc_testing(30) TYPE c VALUE 'Zellar Sales Document'.
    1. Assigning the Description of the object sent in the mail
      CLEAR gs_docdata.
      gs_docdata-obj_name = gc_tst.
      gs_docdata-obj_descr = gc_testing.
    Assigning the email id to Structure of the API Recipient List table
      CLEAR : gt_reclist, gs_reclist. u201C variables used
      gs_reclist-receiver = mail address'. u201CTo whom this mail should go
      GS_RECLIST-REC_TYPE = 'U'.
      APPEND gs_reclist TO gt_reclist. u201C Internal table for storing mail address
    2.Passing the Smart form  text lines to SAP office: Single List with Column Length 255 table ,this logic is used to get all the data into PDF file while you send an attachment through mail..
    CLEAR: gs_objbin, gs_pdf_tab.
      LOOP AT gt_pdf_tab INTO gs_pdf_tab. u201CLoop the content of PDF table
        gv_pos = 255 - gv_len.
        IF gv_pos > 134. "length of pdf_table
          gv_pos = 134.
        ENDIF.
        gs_objbin+gv_len = gs_pdf_tab(gv_pos).
        gv_len = gv_len + gv_pos.
        IF gv_len = 255. "length of out (contents_bin)
          APPEND gs_objbin TO gt_objbin.
          CLEAR: gs_objbin, gv_len.
          IF gv_pos < 134.
            gs_objbin = gs_pdf_tab+gv_pos.
            gv_len = 134 - gv_pos.
          ENDIF.
        ENDIF.
      ENDLOOP.
      IF gv_len > 0.
        APPEND gs_objbin TO gt_objbin. u201CTable contains Single List with Column Length 255 table
      ENDIF.
    3. Filling the details in SAPoffice: Description of Imported Object Components table
    DESCRIBE TABLE gt_objbin LINES gv_tab_lines.
      CLEAR gs_objbin.
      READ TABLE gt_objbin INTO gs_objbin INDEX gv_tab_lines.
      IF sy-subrc = 0.
        gs_objpack-doc_size = ( gv_tab_lines - 1 ) * 255 + STRLEN( gs_objbin ).
        gs_objpack-transf_bin = 'X'.
        gs_objpack-head_start = 1.
        gs_objpack-head_num = 0.
        gs_objpack-body_start = 1.
        gs_objpack-body_num = gv_tab_lines.
        gs_objpack-doc_type = 'PDF'.
        gs_objpack-obj_name = 'ATTACHMENT'.
        gs_objpack-obj_descr = 'test'.
        APPEND gs_objpack TO gt_objpack.
      ENDIF.
    4. Sending the Form Output in the PDF format to email
    data: WK_OBJHEAD TYPE SOLI_TAB.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' u201Cfunction module used for sending mail
        EXPORTING
          document_data              = gs_docdata u201CAttributes of new document
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = gt_objpack u201CInformation about structure of data tables
          OBJECT_HEADER              = WK_OBJHEAD u201CHeader data for document (spec.header)
          contents_bin               = gt_objbin   u201CData which is to be sent as pdf attachment
          receivers                  = gt_reclist  u201Cmailing list
        EXCEPTIONS                                 u201CException Handling
          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.
      ELSE.
        WRITE 'Sent Successfully'.
      ENDIF.
    Edited by: Thomas Zloch on Jul 16, 2010 10:38 PM

  • How to findout smartforms names attached to Standard T-Codes.

    Dear Gurus
    Is there anyway to find out which smartform is added to standard t-code
    Like in T-Code VF02
    there is a smartform attached when we click on the ISSUE OUTPUT.
    i want to know what is the name of that smartform..
    Regards
    Saad Nisar

    Hi Khatib,
    Use TNAPR table and provide program name to PGNAM and execute it. If it is attached to any output type configured through NACE then you will get script/smart form attached to this program but I am not sure there is an direct way to get output type for transaction code.
    As suggested by others, In NACE you can find output types based on Application. Select one of the application and click on output types to know the output types under an application.
    Thanks,
    Vinay

  • How to change the size and font of my text in SMARTFORMS

    Hello gurus,
    I have a smartform as image below:
    I want to know how can I change the font size, and if is there a way to auto adjust text within its container or window?
    Thanls

    To maintain « Styles » in your Smart form, read first : Smart Forms >   Maintenance of Styles with the Style Builder.
    Transaction SMARTSTYLES
    if not already created, create a new style (e.g. copy the style assigned to your form)
    create a new paragraph format
    select alignment "BLOCK Justified"
    Then in transaction SMARTFORMS attach your style and use your new paragraph format.
    Regards,
    Raymond

  • Smartform output to be sent as pdf when billing document is saved(VF01)

    Hello all,
    I`m facing a problem in transaction VF01.The requirement is,when user will save the newly created billing document in VF01 transaction ,the corresponding smartform (attached to respective output type ) should be converted and sent as pdf to ship-to party e-mail address.
    I`ve done the coding so that smartform is converted and sent through transaction VF02/VF03.
    But I`m facing problem in understanding how the program is automatically triggered when billing document is created.In VF02/VF03 it can be understood that on "Issue output To" and selecting respective output type,driver program is triggered and processing starts for mentioned routine in NACE.
    waiting for your valuable inputs...

    I hope process will go like this...
    1) when you use VF01 / VF02 & save, automatically RSNAST00 standard program will be triggered.
              2) This program will fetch the driver program & form from NACE transaction & it will execute the driver program.

  • How to find my program in smartform

    Hi Guys
    There is a Zsmartform developed also created Z driver program for that. that is not yet assigned in NACE . How can i know the that form is called by driver program . i want know  what is the driver program creted for that like finding in sap script
    ravi

    hi
    If ur smartform attached to some Y or Z driver Program, then it is difficult to find out. Becauce FM for Smartform is changed at runtime. Our Y or Z Program get current FM for SmartForms by FM 'SSF_FUNCTION_MODULE_NAME'.
    In table TPANR, U can find those smartforms & Program names which are attached with some output type.
    And also look at the transaction code NACE, there you can find the Driver program and also the samrtform name under the output type
    From NACE, Select the application type. Normally for Slaes we have V1, smae way you will have the application type, seelct that and press utput types, then select the Output type then press processing routines, then you will get the Program name and the layout name

  • Pls help me to find smartform name

    Hi experts,,,
    Please tell me the smart form name.
    I have been given reprtmname as 'Order Confirmation'.
    Please help me .
    I will reward with full points.
    Thanks in advance

    Hi Jaya,
    You have to use application V1 - SALES in transaction NACE
    You can click on Output Types and then choose the output type that you have used for Order Confirmation and then click on processing routines and here you can see the form or smartform attached against this ouptout type.
    Hope this solves your query.
    Reward suitably if helpful.
    Regards
    Ravi

  • How find program to smartform

    Hi,
    If I have given smartform how could i check which program w se38 is connected with it and in which it is created?
    Regards,
    Joanna

    Hi,
    If ur smartform attached to some Y or Z driver Program, then it is difficult to find out. Becauce FM for Smartform is changed at runtime. Our Y or Z Program get current FM for SmartForms by FM 'SSF_FUNCTION_MODULE_NAME'.
    In table TPANR, U can find those smartforms & Program names which are attached with some output type.
    And also look at the transaction code NACE, there you can find the Driver program and also the samrtform name under the output type
    Regards
    Sudheer

Maybe you are looking for

  • Performance tunned report taking more time to execute - URGENT

    Dear Experts, In One Report Program is Taking long time to execute at background session, I am Taking That Report To Tune The Performance But This is taking 12 hours more to excute ......... The Code is given below. Before Tune. DATA  :  BEGIN OF ITA

  • Display HTML in JEditorPane

    Hi I am trying to display a String containing HTML text on a JEditorPane. I have downloaded the HTML from a webpage using sockets, and now I want to display the downloaded page. I have a project in school about sockets. This is why I can't use getPag

  • Roles in NetWeaver Portal 7.0?

    Hi,    I came across a Requirement, where I have to add 5-BSP iViews, under a Workset which comes under Employee Self-Service role. But the problem is, out of 5-BSP applications, The requirement is 3-BSP iViews are visible to all the employees includ

  • When i download apps on mac for iOS can i use them.

    I downloaded a app on my mac thats made for iOS from iTunes can i use that?!?

  • Excise Invoice Cancellation in STO

    Hello, In STO rejection scenario,(Inter company The excise Invoice at the receiving plant needs to be cancelled, system does not allow me to cancel. How to cancel the excise invoice in case of STO scenario..... IF material is Quality inspection then.