Sending smartform as email

Hi All
I have a requirement like we are sending a smart form as a body of email . For this we copied a class CL_DOC_PROCESSING_CRM_ORDER into YCL_DOC_PROCESSING_CRM_ORDER and in that there is one method ie CRM_ORDER_EXEC_SMART_FORM , In this method we are calling smart form to trigger this as an automatic mail.
we are passing subject line to field  SSFCOMPOP-TDTITLE . But this field length is currently 50 chars.
We need to extend this field length to 150 chars.
So could you please guid  me the solution if any one faces this type of issue in their career or can you please advice me is there any alternate solution for this.
Regards,
CHANDU

HI CHANDUPANDAVULA,
You can send smartform directly right . Is there any issue in that.
Regards,
Madhu.
Edited by: madhurao123 on Feb 22, 2011 4:29 PM

Similar Messages

  • Send smartforms via email using action profiles

    hi,
    i am trying to send smartforms via email using action profiles and i would like to know if anyone has any document or know any steps to do the same. i have created the smartform and i created the action in an action profile. i selected the option "Smartforms Mail". and i have mentioned my smartform in it.
    I have previously worked with action profiles to trigger workflows which sent a mail. That was relatively easier as i could mention that the mail be sent to my mailbox. But in the smartforms option, i dont know how to give the instruction that it be sent to my mailbox.. is there any place i can set it? The action is not person dependant and is done whenever saving a document.
    Please guide.
    Thanks,
    Nisha

    Hi Nisha,
    As u worked on Action profiles, i recommend u use action profile with permitted Process type as Smart Forms Mail to send the mails which contains the data in Smartform u created.
    Use below mail setting
    Form Name              (u r ZSmartform)
    Processing Class      CL_DOC_PROCESSING_CRM_ORDER
    Processing Method    CRM_ACTIVITY_EXEC_SMART_FORM
    Archive Mode            1 Mail only User
    In Action definition details u can mentioned the Processing time, Partner dependent for action to who u want to send the mail, further in action condition using schedule and start condition u can set the criteria to mail trigger.
    Hope it'll help u.
    Regards,
    Dipesh.

  • Send Smartform as Email body not PDF attachment

    Hello Experts,
    I have a requirement where I need to send Smartform as Email body and NOT as PDF attachment.
    I have spool ID generated for the smartform, how can I send this spool in Email body rather than as an attachment.

    Hi K C
    Try this.. Get the OTF data from the SMARTFORM, use the OTF data and pass this to FM'CONVERT_OTF', and use the format as PDF.
    Then use the resultant converted PDF data as attachment while calling the  'SO_NEW_DOCUMENT_ATT_SEND_API1' FM.
    let us know if this works.
    Thanks
    Rajesh Chowdary

  • Sending smartform through email as PDF attachment

    Hi,
    I want to send a smartform through email as pdf attachment.In the code I have hardcoded the receiver mail id.But I don't want this to be sent only to a particular receiver.I want this to be sent as many people as I can without hardcoding their mail id's in the program.How can I do that?
    Regards,
    Hema

    **Data Declarations
    **Internal Table
    DATA : BEGIN OF it_spfli OCCURS 0,
              carrid LIKE spfli-carrid,
              connid LIKE spfli-connid,
           END OF it_spfli.
    DATA:   it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            it_contents     LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    storing receivers      
            it_receivers    LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    **storing file attachment data
            it_attachment   LIKE solisti1 OCCURS 0 WITH HEADER LINE,                    gd_doc_data     LIKE sodocchgi1,
            gd_error        TYPE sy-subrc,
            l_gntxt         LIKE t357g_t-gntxt,
            lv_message(100) TYPE c.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE. "storing mail body
    DATA : psubject(30) TYPE c VALUE 'Sample Mail'. "subject of the mail
    DATA : ld_format TYPE so_obj_tp , "file format
           ld_attfilename TYPE so_obj_des, "file name
           w_cnt TYPE i.
    **Selecting the data
    SELECT carrid connid INTO TABLE it_spfli FROM spfli WHERE carrid EQ 'AA'.
    **Perform for populating mail body
    PERFORM populate_message.
    **Perform for populating file attachment
    PERFORM populate_attachment.
    **Perform for populating mail characteristic info
    PERFORM populate_pack.
    **Perform for populating receivers
    PERFORM populate_receivers.
    **Perform to send mail
    PERFORM send_mail.
    *&      Form  populate_message
          text
    -->  p1        text
    <--  p2        text
    FORM populate_message .
    **Populating the body
      lv_message = 'Sample mail for testing purpose.'.
      APPEND lv_message TO it_message.
    ENDFORM.                    " populate_message
    *&      Form  populate_attachment
          text
    -->  p1        text
    <--  p2        text
    FORM populate_attachment .
    **Populating the attachment file with the data from final intenal table
      CONCATENATE 'CARRIER ID'
                  'CONNECTION ID'
                  INTO it_attachment SEPARATED BY
                  cl_abap_char_utilities=>horizontal_tab.
      CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO
      it_attachment.
      APPEND it_attachment.
      LOOP AT it_spfli.
        CONCATENATE it_spfli-carrid it_spfli-connid INTO it_attachment SEPARATED BY
                 cl_abap_char_utilities=>horizontal_tab.
        CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO
        it_attachment.
        APPEND it_attachment.
      ENDLOOP.
    ENDFORM.                    " populate_attachment
    *&      Form  populate_receivers
          text
    -->  p1        text
    <--  p2        text
    FORM populate_receivers .
    **Populating Mail Recepients
    **If there are more than one mail recepient then loop and append them to it_receivers
      it_receivers-receiver = '[email protected]'.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      it_receivers-express = 'X'.
      APPEND it_receivers.
    ENDFORM.                    " populate_receivers
    *&      Form  populate_pack
          text
    -->  p1        text
    <--  p2        text
    FORM populate_pack .
    **File Type
      ld_format = 'XLS'.
    **File Name
      ld_attfilename = 'File1'.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject .
      gd_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR gd_doc_data.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      READ TABLE it_attachment INDEX w_cnt.
      gd_doc_data-doc_size = ( w_cnt - 1 ) * 255 + STRLEN( it_attachment ).
      gd_doc_data-obj_name  = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    Describe the body of the message
      CLEAR it_packing_list.
      REFRESH it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      APPEND it_packing_list.
    **Describe the attachment info
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_attachment LINES  it_packing_list-body_num.
      it_packing_list-doc_type = ld_format.
      it_packing_list-obj_name = ld_attfilename.
      it_packing_list-obj_descr = ld_attfilename.
      it_packing_list-doc_size = it_packing_list-body_num * 255.
      APPEND it_packing_list.
    ENDFORM.                    " populate_pack
    *&      Form  send_mail
          text
    -->  p1        text
    <--  p2        text
    FORM send_mail .
    **Function Module to send mail
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = gd_doc_data
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = it_packing_list
          contents_bin               = it_attachment
          contents_txt               = it_message
          receivers                  = it_receivers
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
    ENDFORM.                    " send_mail

  • How to send smartform as email (smartform content in the email body)

    Hi,
    When I call my smartform, I want to send the smartform content as email. I am seeing one structure : MAIL_RECIPIENT.
    I have the mail id in my hand : xyz. However, based on this email id, how to populate the structure MAIL_RECIPIENT since it has Object ID, Object type and descrption. But No field for Email ID.
    Can any one help me out, in this.
    Thanks,
    Sandeep

    Hi,
    No not the PDF. The content it self should go as email.
    For that only we need to populate MAIL_RECIPIENT structure.
    But my doubt is how to populate this structure. It has no field for email ID.
    Thanks,
    Sandeep

  • Send SmartForm as Email Body

    Hi All!
    I need to send a SmarForm by email as an email body.
    The SmartForm is a simple plain text form.
    Does someone know how to do it?
    Regards,
    Alejandro.

    hi,
    try this link u will have two codes.
    Email Body
    even if u dont understand check this code.
    Here is the code to send the Smartform to mail as PDF attachment.
    REPORT ZTEST_PDF_MAIL.
    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,
    Work Area declarations
    WA_OBJHEAD TYPE SOLI_TAB,
    W_CTRLOP TYPE SSFCTRLOP,
    W_COMPOP TYPE SSFCOMPOP,
    W_RETURN TYPE SSFCRESCL,
    WA_DOC_CHNG TYPE SODOCCHGI1,
    W_DATA TYPE SODOCCHGI1,
    WA_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'
    EXPORTING
    FORMNAME = 'ZTEST'
    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 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.
    ENDIF.
    LOOP AT I_TLINE.
    TRANSLATE I_TLINE USING '~'.
    CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
    ENDLOOP.
    TRANSLATE WA_BUFFER USING '~'.
    DO.
    I_RECORD = WA_BUFFER.
    APPEND I_RECORD.
    SHIFT WA_BUFFER LEFT BY 255 PLACES.
    IF WA_BUFFER IS INITIAL.
    EXIT.
    ENDIF.
    ENDDO.
    Attachment
    REFRESH: I_RECLIST,
    I_OBJTXT,
    I_OBJBIN,
    I_OBJPACK.
    CLEAR WA_OBJHEAD.
    I_OBJBIN] = I_RECORD[.
    Create Message Body Title and Description
    I_OBJTXT = 'test with pdf-Attachment!'.
    APPEND I_OBJTXT.
    DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
    READ TABLE I_OBJTXT INDEX V_LINES_TXT.
    WA_DOC_CHNG-OBJ_NAME = 'smartform'.
    WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
    WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
    WA_DOC_CHNG-SENSITIVTY = 'F'.
    WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
    Main Text
    CLEAR I_OBJPACK-TRANSF_BIN.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    I_OBJPACK-BODY_NUM = V_LINES_TXT.
    I_OBJPACK-DOC_TYPE = 'RAW'.
    APPEND I_OBJPACK.
    Attachment (pdf-Attachment)
    I_OBJPACK-TRANSF_BIN = 'X'.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
    READ TABLE I_OBJBIN INDEX V_LINES_BIN.
    I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
    I_OBJPACK-BODY_NUM = V_LINES_BIN.
    I_OBJPACK-DOC_TYPE = 'PDF'.
    I_OBJPACK-OBJ_NAME = 'smart'.
    I_OBJPACK-OBJ_DESCR = 'test'.
    APPEND I_OBJPACK.
    CLEAR I_RECLIST.
    I_RECLIST-RECEIVER = 'mail id'.
    I_RECLIST-REC_TYPE = 'U'.
    APPEND I_RECLIST.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = WA_DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    COMMIT_WORK = 'X'
    TABLES
    PACKING_LIST = I_OBJPACK
    OBJECT_HEADER = WA_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.
    WRITE:/ 'Error When Sending the File', SY-SUBRC.
    ELSE.
    WRITE:/ 'Mail sent'.
    ENDIF.
    If you want to send some text as Body of the Mail then follow this once
    when u r callin the FM'SO_NEW_DOCUMENT_ATT_SEND_API1'.. points to remember
    1.u have to pass the body of content in table CONTENTS_TXT(ia m using I_OBJBIN) (each line a record) then. suppose i have appended 11 records to the table CONTENTS_TXT .
    2.PACKING_LIST(iam usign I_OBJPACK) table u ahve to append a redord as follows
    I_OBJPACK-TRANSF_BIN = ' '.
    I_OBJPACK-HEAD_START = 000000000000001.
    I_OBJPACK-HEAD_NUM = 000000000000001.
    I_OBJPACK-BODY_START = 000000000000002
    I_OBJPACK-BODY_NUM = 000000000000010.
    I_OBJPACK-DOC_TYPE = 'RAW'.
    append I_OBJPACK-.
    by the above code system treat the first line in table I_OBJBIN as header and the 2nd line to 10 lines tread as body.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = WA_DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    TABLES
    PACKING_LIST = I_OBJPACK
    OBJECT_HEADER = WA_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.
    reward me ig helpful.

  • Sending Smartforms by Email

    Hi,
    I am trying to e-mail a smartform as attachement through mail. I am using the FM
    SO_NEW_DOCUMENT_ATT_SEND_API1. On the execution of the program, the mail goes and sits in the outbox of my sap bussiness workplace and does not go to the external email address specified. Are there any parameters to be set, The mail is not going to external address specified.
    Thanks,
    Navneeth K.

    *& Report  ZEMAIL_GM
    REPORT  zemail_gm.
    *********Variable Declarations *****************************
    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.
    ********Constants *******************************************
    Data : gc_text(11) type c value 'Form Output',
           gc_tst(3) type c value 'TST',
           gc_testing(7) type c value 'Testing'.
    *********Work Area Declarations *****************************
    DATA: gs_docdata TYPE sodocchgi1,     " Data of an object which can be changed
          gs_ctrlop TYPE ssfctrlop,       " Smart Forms: Control structure
          gs_outopt TYPE ssfcompop,       " SAP Smart Forms: Smart Composer (transfer) options
          gs_otfdata TYPE ssfcrescl,      " Smart Forms: Return value at end of form printing
          gs_reclist TYPE somlreci1,      " SAPoffice: Structure of the API Recipient List
          gs_pdf_tab TYPE tline,          " Workarea for SAP Script Text Lines
          gs_objbin TYPE solisti1,        " SAPoffice: Single List with Column Length 255
          gs_objpack TYPE sopcklsti1.     " SAPoffice: Description of Imported Object Components
    *********Internal tables Declarations *****************************
    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
    CLEAR : gv_form_name,
            gs_ctrlop,
            gs_outopt,
            gs_otfdata,
            gv_bin_filesize,
            gv_pos,
            gv_len,
            gv_tab_lines.
    START-OF-SELECTION.
    Generate Function Module name
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = 'ZPDF_G'
        IMPORTING
          fm_name            = gv_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.
    Assigning values to Form Control Structure and Form Composer
      gs_ctrlop-getotf = 'X'.
      gs_ctrlop-no_dialog = 'X'.
      gs_outopt-tdnoprev = 'X'.
    Getting the OTFDATA
      CALL FUNCTION gv_form_name
        EXPORTING
          control_parameters = gs_ctrlop
          output_options     = gs_outopt
          user_settings      = 'X'
        IMPORTING
          job_output_info    = gs_otfdata
        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.
    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.
    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.
      gs_reclist-receiver = '[email protected]'.
      gs_reclist-rec_type = 'U'.
      APPEND gs_reclist TO gt_reclist.
    Passing the SAP Script text lines to SAPoffice: Single List with Column Length 255 table
      CLEAR : gs_objbin, gs_pdf_tab.
      LOOP AT gt_pdf_tab INTO gs_pdf_tab.
        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.
      ENDIF.
    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.
    Sending the Form Output in the PDF format to email
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data                    = gs_docdata
         put_in_outbox                    = 'X'
         commit_work                      = 'X'
        TABLES
          packing_list                     = gt_objpack
          contents_bin                     = gt_objbin
          receivers                        = gt_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.
      ELSE.
        WRITE 'Sent Successfully'.
      ENDIF.
      SUBMIT rsconn01
      WITH mode EQ 'INT'
      AND RETURN.
    END-OF-SELECTION.
    Rewards if useful................
    Minal

  • Send smartforms via email

    Hi,
    can anyone tell me how to send an smartform to an external email.
    Here my DISPLAY report:
    TABLES: MARA.
    DATA: SSFCTRLOP LIKE SSFCTRLOP.
    DATA: SWOTOBJID like SWOTOBJID.
    DATA: IMARA TYPE TABLE OF MARA.
    INITIALIZATION.
      SSFCTRLOP-NO_DIALOG = 'X'.
      SSFCTRLOP-PREVIEW   = 'X'.
    START-OF-SELECTION.
      SELECT * FROM MARA INTO TABLE IMARA UP TO 10 ROWS.
      CALL FUNCTION '/1BCDWB/SF00000003'
        EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
          CONTROL_PARAMETERS = SSFCTRLOP
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             = SWOTOBJID
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
          ADRNR              = '0000012427'
          STR_POBOX          = 'S'
        TABLES
          TMARA              = IMARA.
    END-OF-SELECTION.
    i will send the smartform for example direct to [email protected]
    Is that possible, and when yes, wich paramater must i fill?
    thanks.
    Regards, Dieter

    Hi Dieter,
    Check the following code. It sends the smartfrom output as Email.
    START-OF-SELECTION.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname = 'Z_SMTF
        IMPORTING
          fm_name  = v_fname.
      CALL FUNCTION v_fname
        EXPORTING
          control_parameters = x_ctrl_p
        IMPORTING
          job_output_info    = x_output_data.
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
          max_linewidth         = 134
        IMPORTING
          bin_filesize          = v_size
        TABLES
          otf                   = x_output_data-otfdata
          lines                 = it_lines
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          OTHERS                = 4.
      CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
        EXPORTING
          line_width_dst              = 255
        TABLES
          content_in                  = it_lines
          content_out                 = it_soli
        EXCEPTIONS
          err_line_width_src_too_long = 1
          err_line_width_dst_too_long = 2
          err_conv_failed             = 3
          OTHERS                      = 4.
      CALL FUNCTION 'ZFUNC_CONVERT_DATA_ODC01'
       EXPORTING
         iv_byte_mode       = 'X'
       TABLES
         it_data            = it_lines
         et_data            = it_table.
    *-----To caluculate total number of lines of internal table
      DESCRIBE TABLE it_table LINES v_lines.
    *-----Function module to download the output file.
      CALL FUNCTION 'DOWNLOAD'
        EXPORTING
          bin_filesize = v_size
          filename     = ' '
          filetype     = 'BIN'
        IMPORTING
          act_filename = v_filename
        TABLES
          data_tab     = it_lines.
    *-----Create Message Body and Title and Description
      it_mess =
    'i have successfully converted smartform from otf format to pdf' .
      " and i have attached that in mail'.
      APPEND it_mess.
      wa_doc_data-obj_name   = 'smartform'.
      wa_doc_data-expiry_dat = sy-datum + 10.
      wa_doc_data-obj_descr  = 'smartform'.
      wa_doc_data-sensitivty = 'F'.
      wa_doc_data-doc_size   = v_lines * 255.
      APPEND it_pcklist.
    *-----PDF Attachment
      it_pcklist-transf_bin = 'X'.
      it_pcklist-head_start = 1.
      it_pcklist-head_num = 0.
      it_pcklist-body_start = 1.
      it_pcklist-doc_size =  v_lines_bin * 255 .
      it_pcklist-body_num = v_lines.
      it_pcklist-doc_type = 'PDF'.
      it_pcklist-obj_name = 'smartform'.
      it_pcklist-obj_descr = 'smart_desc'.
      it_pcklist-obj_langu  = 'E'.
      it_pcklist-doc_size   = v_lines * 255.
      APPEND it_pcklist.
    *-----Giving the receiver email-id
      CLEAR it_receivers.
      it_receivers-receiver = '[email protected]'.
      it_receivers-rec_type = 'U'.
      APPEND it_receivers.
    *-----Calling the function module to sending email
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = wa_doc_data
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = it_pcklist
          contents_txt               = it_mess
          contents_hex               = it_table
          receivers                  = it_receivers
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
      IF sy-subrc = 0.
        SUBMIT rsconn01   WITH mode       = 'INT'
                          WITH output     = 'X'
                          WITH rfcgroup   = 'iwdf7ytc_YD3_94'
                          AND RETURN.
        REFRESH: it_receivers,
                 it_mess,
                 it_pcklist.
      ENDIF.
    Ashvender

  • Sending smartform through email or fax

    Hi,
    I have to send the smartform output through email if the email address is present else it has to be sent through fax.
    When I tested the program it is giving information message as 'Output was successfully issued'.But I am not able to see any entry in SOST transaction.What would be the reason for this?

    In SAP Table USR21, put enter the username in field BNAME, from there you will get the ADDRNUMBER

  • New output type to be triggered to send smartform through email

    Hi,
    Currently we are using Milwaukee printer (USJC-PM03) as default for out put type ZURD. When this output get created in the invoice with the printer as USJC-PM03, the iinvoices get printed on the Milwaukee printer.
    When someone tries to print an invoice by copying the ZURD, then system should trigger the newly created output ZUPG with the printer setting as u2018LOCLu2019 and medium u2018External Sendu2019, Communication strategy = u2018CS01u2019,dispatch time = 1.
    When again the user tries to print the same  invoice by copying the ZUPG output type,the system should trigger the output type ZUPG with medium u2018Print outu2019, Logical Destination = u2018LOCLu2019 and Dispatch time = u20181u2019.
    How the output type ZUPG be triggered even if the user select the output type ZURD.
    If anyone has come across this type of requirement please let me know.

    This can be done with the standard form itself.
    first find out the output type u r using.
    Then goto T-code NACE and then choose EF- purchase order and then select the output type u r using.
    Then goto the 'processing Routines' at the lefe side of the screen.
    There u can find out the output forms for this output typr u r using. Here add 'Simple mail-7' in the list and then give the program name and the smartform or the script u r using.
    We can also give the mail texts for this output form.
    After that goto ME22N and then choose the 'Messages' tab and then click the simple mail and in the 'communication method' kindly provide the mail id for which the PO mail has to be sent.
    And then the mail can be viewed in the inbox of the recipient.
    in this way we can sent the PO mail to the corresponding mail address,.
    I guess this will solve ur issue.
    Thanks and Regards
    Siva
    Edited by: Sivaprakash R on Apr 20, 2009 1:00 PM
    Edited by: Sivaprakash R on Apr 20, 2009 1:00 PM

  • Send Smartform Email via Action Profile

    Hello,
    We have an Action Profile with a few actisn athat a workign perfectly.  I have added a new action to send  smartform via email when the the transaction is saved.
    The Action profile is set upfor object type BUS2000115(Quotation) with the context class of CL_DOC_CONTEXT_CRM_ORDER.
    I have set up the Smartform Email action processing as follows:
    Permitted processign type fo Action - Smartform Email
    Mail Settings:
    Form Name                       YC3_SF_CRM_COMM_QUOTATION_V7
    Processing Class              CL_CRM_BP_UM_PROCESSING_PPF
    Processing Method           UM_EXEC_SMART_FORM
    Archive Mode                    Mail only
    there is no schedule or start condition as it is not required.
    When I Save the Quotation nothing is getting triggered.  If in the Quotation I Preview output and select 'Email Quotation; I get the message 'Smartform Error'.  Is there a way to debug the message further ?  I'm assuming this is the SAP standard method of achieving Smartform email as Pdf attachment, are some steps that I have missed ?
    Regards
    Chan

    The Processing class and Processing Method seem to be incorrect.
    Use the below;
    Processing Class  : CL_DOC_PROCESSING_CRM_ORDER
    Processing Method: CRM_ORDER_EXEC_SMART_FORM
    You can always refer to standard action profile for Quotations to see what SAP has delivered.

  • Smartform thru email

    If anybody aware of sending smartform thru email then pls mail me a sample document. I have a code which is generating mail request but finally i am not receiving the mail at the given id. Please help.
    Sutapa Sengupta
    [email protected]

    Thanks a lot for the quick response. I have tried this code. My mail request is getting created successfully but i cannot see any mail waiting in SCOT neither can i see it SO01 - outbox .  In this code in the third subroutine the object is not getting created. Please throw some light.
    Thanks again.

  • How to send smartform output in body of email?

    Hi all ,
    I have to send smartform output in body of email (not as an attachement in mail) .PLease help me in this regard.
    Thanks,
    Ananth S.

    Hi Ananth
    See these threads.
    [https://forums.sdn.sap.com/click.jspa?searchID=23497094&messageID=6889194]
    [https://forums.sdn.sap.com/click.jspa?searchID=23497094&messageID=6861330]
    [https://forums.sdn.sap.com/click.jspa?searchID=23497094&messageID=6855364]
    Regards
    Hareesh Menon

  • To send smartform output in an email without attachment

    Hi All,
      How to send smartform output in an email without attachment?
    Thanks & Regards,
    Mamta Gupta.

    Try this,
    DATA:
    ls_control_param TYPE ssfctrlop, "Control paramters
    ls_output_options TYPE ssfcompop. "Output options
    DATA:
    lv_ip_mailaddr TYPE so_name, "Address of a Mail Recipient
    lv_ip_type_id TYPE so_escape, "Recipient type
    ls_recipient_id TYPE swotobjid, "Structure for recvr obj ID
    ls_sender_id TYPE swotobjid. "Structure for sender obj id
    CONSTANTS:
    lc_ip_type_id TYPE so_escape VALUE 'U', "For internet address.
    lc_smartform TYPE tdsfname VALUE 'ZVSF_ASN_DELNOTE', "Smart form name
    lc_mail TYPE tddevice VALUE 'MAIL'. "Mail device
    Assign recipient
    lv_ip_mailaddr = gv_smtp_addr. "CSAM email id
    lv_ip_type_id = lc_ip_type_id. "External address
    Create Mail title
    CONCATENATE text-001
    nast-objky
    INTO ls_output_options-tdtitle.
    Create recipient object
    CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'
    EXPORTING
    ip_mailaddr = lv_ip_mailaddr
    ip_type_id = lv_ip_type_id
    IMPORTING
    ep_recipient_id = ls_recipient_id
    EXCEPTIONS
    invalid_recipient = 1
    OTHERS = 2.
    IF sy-subrc 0.
    cf_retcode = sy-subrc.
    PERFORM protocol_update.
    ENDIF.
    Get sender object id.
    CALL FUNCTION 'CREATE_SENDER_OBJECT_PPF'
    EXPORTING
    ip_sender = sy-uname
    IMPORTING
    ep_sender_id = ls_sender_id
    EXCEPTIONS
    invalid_sender = 1
    OTHERS = 2.
    IF sy-subrc 0.
    cf_retcode = sy-subrc.
    PERFORM protocol_update.
    ENDIF.
    Assign the smart form name
    w_ssfname = lc_smartform.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = w_ssfname
    IMPORTING
    fm_name = lf_fm_name
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3.
    IF sy-subrc 0.
    cf_retcode = sy-subrc.
    PERFORM protocol_update.
    ENDIF.
    For Print output:
    IF nast-nacha = '1'. "Print output
    ls_control_param-preview = 'X'.
    ls_control_param-no_dialog = 'X'.
    ENDIF.
    For Email output.
    IF nast-nacha = '2'. "Email
    Output options
    ls_output_options-tdteleland = gs_kna1-land1.
    ls_output_options-tdtelenum = gs_kna1-telfx.
    ls_output_options-tdfaxuser = sy-uname.
    ls_output_options-BCS_COMMIT = 'X'.
    ls_control_param-device = lc_mail.
    ENDIF.
    dynamically call Fm behind the Smart form
    CALL FUNCTION lf_fm_name
    EXPORTING
    control_parameters = ls_control_param
    mail_recipient = ls_recipient_id
    mail_sender = ls_sender_id
    output_options = ls_output_options
    user_settings = ' '
    TABLES
    delivery = gt_delivery
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    IF sy-subrc 0.
    cf_retcode = sy-subrc.
    PERFORM protocol_update.
    ENDIF.
    Regards,
    Joan

  • Convert SMARTFORM report to PDF and send as an email attachment

    Hi
    I am using the CONVERT_OTF function module to convert a SMARTFORM report in the "spool" to a PDF file. When I use the DOWNLOAD function module, the resulting file can be opened in acrobat.
    I would like to email the report in PDF format as an attachment. I am using the function module SO_NEW_DOCUMENT_ATT_SEND_API1 to create an attachment however the attached file is not being created correctly and When try to open, it gives 'File is damaged and could not be repaired' error message. I believe that somehow I am not using the SO_NEW_DOCUMENT_ATT_SEND_API1 function module correctly.
    Please help me to correct this
    Thanks
    Rohitha
    see my code below,
    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.
      ENDIF.
      LOOP AT I_TLINE.
        TRANSLATE I_TLINE USING '~'.
        CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
      ENDLOOP.
      TRANSLATE WA_BUFFER USING '~'.
      DO.
        I_RECORD = WA_BUFFER.
        APPEND I_RECORD.
        SHIFT WA_BUFFER LEFT BY 132 PLACES.
        IF WA_BUFFER IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
      REFRESH:  I_RECLIST,
                I_OBJTXT,
                I_OBJBIN,
                I_OBJPACK.
      CLEAR WA_OBJHEAD.
      I_OBJBIN[] = I_RECORD[].
      I_OBJTXT = 'PDF Attachment'.
      APPEND I_OBJTXT.
      DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
      READ TABLE I_OBJTXT INDEX V_LINES_TXT.
      WA_DOC_CHNG-OBJ_NAME = 'Smartform_to_PDF'.
      WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
      WA_DOC_CHNG-OBJ_DESCR = 'Smartform to PDF'.
      WA_DOC_CHNG-SENSITIVTY = 'F'.
      WA_DOC_CHNG-DOC_SIZE = STRLEN( I_OBJTXT ) + ( ( V_LINES_TXT - 1 ) * 255 ) .
      CLEAR  I_OBJPACK-TRANSF_BIN.
      I_OBJPACK-HEAD_START = 1.
      I_OBJPACK-HEAD_NUM = 0.
      I_OBJPACK-BODY_START = 1.
      I_OBJPACK-BODY_NUM = V_LINES_TXT.
      I_OBJPACK-DOC_TYPE = 'RAW'.
      APPEND I_OBJPACK.
      I_OBJPACK-TRANSF_BIN = 'X'.
      I_OBJPACK-HEAD_START = 1.
      I_OBJPACK-HEAD_NUM = 1.
      I_OBJPACK-BODY_START = 1.
      DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
      READ TABLE I_OBJBIN INDEX V_LINES_BIN.
      I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
      I_OBJPACK-BODY_NUM = V_LINES_BIN.
      I_OBJPACK-DOC_TYPE = 'PDF'.
      I_OBJPACK-OBJ_NAME = 'ATTACHMENT'.
      I_OBJPACK-OBJ_DESCR = 'test'.
      APPEND I_OBJPACK.
      CLEAR I_RECLIST.
      I_RECLIST-RECEIVER = 'my email address u2019.
      I_RECLIST-REC_TYPE = 'U'.
      APPEND I_RECLIST.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA              = WA_DOC_CHNG
          PUT_IN_OUTBOX              = 'X'
          COMMIT_WORK                = 'X'
        TABLES
          PACKING_LIST               = I_OBJPACK
          OBJECT_HEADER              = WA_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.
        WRITE:/ 'Error ', SY-SUBRC.
      ELSE.
        WRITE:/ 'Mail sent'.
      ENDIF.

    Hi rohitha.wijewardena ,
    Please find the below code which i followed and succeed ,
    CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
        EXPORTING
          pi_nast       = nast
          pi_country    = lv_dlv-land
          pi_addr_key   = lv_addr_key
          pi_repid      = sy-repid
          pi_screen     = lc_x
        IMPORTING
          pe_returncode = gv_retcode
          pe_itcpo      = lv_itcpo
          pe_device     = lv_device
          pe_recipient  = lv_recipient
          pe_sender     = lv_sender.
      IF gv_retcode = 0.
    *moving the data to composer and control parameters for output
        MOVE-CORRESPONDING lv_itcpo TO lv_composer_param.
        lv_control_param-device      = lv_device.
        lv_control_param-no_dialog   = lc_x.
        lv_control_param-preview     = lc_x.
        lv_control_param-getotf      = lv_itcpo-tdgetotf.
        lv_control_param-langu       = nast-spras.
        lv_composer_param-tdnoprint = space.
      ENDIF.
    *Getting the Smartform Function module using Standard Function module
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = lv_formname           "Smartform Name
       IMPORTING
         fm_name                  = lv_fm_name
       EXCEPTIONS
         no_form                  = 1
         no_function_module       = 2
         OTHERS                   = 3
      IF sy-subrc <> 0.
        gv_retcode = sy-subrc.
        PERFORM protocol_update.
        PERFORM add_smfrm_prot.
      ENDIF.
    **Smartform function module to get the output
      CALL FUNCTION lv_fm_name
        EXPORTING
       control_parameters         = lv_control_param
       mail_recipient             = lv_recipient
       mail_sender                = lv_sender
         output_options             = lv_composer_param
         user_settings              = ' '
          is_bil_invoice             = lv_bil_invoice
          gt_header                  = gt_header
       IMPORTING
         job_output_info            = gv_job_output
        TABLES
          gt_item                    = gt_item
       EXCEPTIONS
         formatting_error           = 1
         internal_error             = 2
         send_error                 = 3
         user_canceled              = 4
         OTHERS                     = 5
      IF sy-subrc <> 0.
        gv_retcode = sy-subrc.
        PERFORM protocol_update.
        PERFORM add_smfrm_prot.
      ENDIF.
      IF nast-nacha = lc_mail.
        gt_otfdata[] = gv_job_output-otfdata[].
    *           Converting Smartform to PDF                          *
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = lc_pdf
            max_linewidth         = 10
          IMPORTING
            bin_filesize          = gv_binfilesize
            bin_file              = gv_pdf_xstring
          TABLES
            otf                   = gt_otfdata[]
            lines                 = gt_pdftab[]
          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.
    *           Sending PDF to Email  using Class                     *
        IF NOT lv_email IS INITIAL .
          TRY.
             gv_send_request = cl_bcs=>create_persistent( ).
              gv_pdf_content = cl_document_bcs=>xstring_to_solix( gv_pdf_xstring ).
              gv_document = cl_document_bcs=>create_document(
                    i_type    = lc_pdf
                    i_hex     = gv_pdf_content
                    i_length  = gv_pdf_size
                    i_subject = lc_subject ).            "Subject for Email
              gv_send_request->set_document( gv_document ).
             gv_recipient = cl_cam_address_bcs=>create_internet_address( lv_email ).
              gv_send_request->add_recipient( gv_recipient ).
              gv_sent_to_all = gv_send_request->send( i_with_error_screen = lc_x ).
              COMMIT WORK.
              IF gv_sent_to_all IS INITIAL.
                MESSAGE i500(sbcoms) WITH lv_email.
              ELSE.
                MESSAGE s022(so).
              ENDIF.
            CATCH cx_bcs INTO gv_bcs_exception.
              MESSAGE i865(so) WITH gv_bcs_exception->error_type.
          ENDTRY.
        ENDIF.

Maybe you are looking for

  • How can i get my old contacts back?

    At first i signed up skype using my facebook account, but i couldn't log in on my andriod device, so i closed that account and created a new on using my e-mail, but now all my old contacts are gone, how can i get them back? ps. those old contacts are

  • Not able to open Configtool

    Hi, I have done a restoration of Java Stack system and there is a change in SID and Hostname in the target server. For changing the SID and hostanme, when i try to open configtool, i am getting error related to SecureStore. com.sap.sql.log.OpenSQLExc

  • How can we diferentiate the follow scenario

    hi friends can any one give me the solluation for the following scensrio Our client sells industrial salt (material) in the following three ways 1, the client produce the material and sell it to the customer 2, the client buy it form vendor and store

  • Web site not visible in iweb, where did it go?

    I created 2 web sites in iWeb. Posted 1 to mobilme. Now when i open iweb nothing appears and everything is greyed out in the top menu bar. Any idea where it has disappeared to and why i can't see it? Please help.

  • How to remove leading ' in workbook?

    Hi, we are reporting queries via workbooks. Yet, all values in the workbook (in the data area) start with 'xxx. eg. Instead of showing 3 it's showing: '3 as the content of excel cell. How can I change my workbook in such a way (maybe via Format -> St