Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

attaching a excel file to a mail

rohit_kaikala
Participant
0 Kudos

Hi friends,

I need to send a mail for vendors with a excel file, which they fill all details and send it manually.

The issue is I cannot take into an internal table, as it consist of data within different table format.

Please help,

Regards,

Rohith

1 REPLY 1

Former Member
0 Kudos

Hi,

Pls have a look if it can help you.

*********************************************************************
* Send the document by calling the SAPoffice API1 module            *
* for sending documents with attachments                            *
*********************************************************************

    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data              = s_doc_chng
        put_in_outbox              = 'X'
        commit_work                = 'X'           "D30K961130i
      IMPORTING
        sent_to_all                = w_sent_to_all
      TABLES
        packing_list               = i_objpack
        object_header              = i_objhead
        contents_bin               = i_objbin
        contents_txt               = i_objtxt
        receivers                  = i_reclist
      EXCEPTIONS
        too_many_receivers         = 1
        document_not_sent          = 2
        operation_no_authorization = 4
        OTHERS                     = 99.

Regs,

Lokesh.