Skip to Content
author's profile photo Former Member
Former Member

How do I send reminders to customers thru email directly thru SAP

Please help me find a solution to a problem that : -

I want to send letters / statements / reminders directly to customers / vendors of smartforms thru email using SAP.

Kindly tell me how do I write program in ABAP. Is there any function module for sending smartforms thru email.

Please help me

Thanks in advance

SK Daniel

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2009 at 04:59 AM

    Hi Shuvir

    This can be easily done by Workflows...

    If you any idea of Workflows,you can do it easily.

    regards

    Sachin

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 27, 2009 at 04:59 AM

    Hi

    you can use FM

    ''SO_DOCUMENT_SEND_API1''

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2009 at 05:03 AM

    We can send smartforms thru mail.

    Find the below code.

    CONSTANTS: lc_getotf_ex TYPE tdgetotf VALUE 'X',

    lc_no_dialog TYPE tdsfflag VALUE 'X',

    lc_preview TYPE tdpreview VALUE 'X'.

    • Set Control Parameters and composer Parameters for requirement.

    gwa_control_param-no_dialog = space.

    gwa_control_param-preview = lc_preview.

    gwa_composer_param-tdimmed = gc_ex.

    • If the File Save Path Is Specified Smart Form to Covert to PDF.

    IF gv_fullpath IS NOT INITIAL.

    gwa_control_param-getotf = lc_getotf_ex.

    gwa_control_param-no_dialog = lc_no_dialog.

    ENDIF.

    • call Smart Form Function Module

    CALL FUNCTION gv_smart_form_fm

    EXPORTING

    control_parameters = gwa_control_param

    mail_recipient = gt_recipient

    mail_sender = gt_sender

    output_options = gwa_composer_param

    user_settings = space

    gv_summary = gv_summary

    gv_detail = gv_detail

    gv_multi = gv_multi

    IMPORTING

    job_output_info = gwa_job_output_info

    TABLES

    gt_costsheet = gt_costsheet

    gt_firstcost_sf = gt_firstcost_sf

    gt_costload_sf = gt_costload_sf

    gt_misc = gt_misc

    gt_cost = gt_cost

    gt_totals = gt_totals

    gt_zxparam = gt_zfico

    EXCEPTIONS

    formatting_error = 1

    internal_error = 2

    send_error = 3

    user_canceled = 4

    OTHERS = 5.

    IF sy-subrc <> gc_subrc.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    • If the File Save Path Is Specified

    • Function Module to Convert Smart Form Output to PDF Formate.

    IF gv_fullpath IS NOT INITIAL.

    LOOP AT gwa_job_output_info-otfdata INTO gwa_otf.

    APPEND gwa_otf TO gt_otf.

    ENDLOOP.

    • Function Module To Conver Smart Form To PDF Formate.

    PERFORM call_convert_otf_2_pdf.

    ENDIF.

    CONSTANTS: lc_tilt1(2) TYPE c VALUE '~ ',

    lc_tilt2(2) TYPE c VALUE ' ~'.

    DATA: lv_filesize TYPE i,

    lv_otf_cmd TYPE c VALUE 'X'.

    • Conversion From Smart Form to PDF Formate

    CALL FUNCTION 'CONVERT_OTF_2_PDF'

    EXPORTING

    use_otf_mc_cmd = lv_otf_cmd

    IMPORTING

    bin_filesize = lv_filesize

    TABLES

    otf = gt_otf

    doctab_archive = gt_doc

    lines = gt_lines

    EXCEPTIONS

    err_conv_not_possible = 1

    err_otf_mc_noendmarker = 2

    OTHERS = 3.

    IF sy-subrc <> gc_subrc.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    IF lv_filesize = 0.

    EXIT.

    ENDIF.

    LOOP AT gt_lines INTO gwa_lines.

    TRANSLATE gwa_lines USING lc_tilt2.

    CONCATENATE gv_buffer gwa_lines INTO gv_buffer.

    ENDLOOP.

    TRANSLATE gv_buffer USING lc_tilt1.

    DO.

    SHIFT gv_buffer LEFT BY 255 PLACES.

    IF gv_buffer IS INITIAL.

    EXIT.

    ENDIF.

    ENDDO.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2009 at 05:28 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2009 at 05:28 AM

    Check out this link,

    sending-email

    Refer the blogs:

    /people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface

    http://www.sapdevelopment.co.uk/reporting/email/attach_xlsmod.htm

    Regards,

    Joan

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.