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

how to set name of file to be sent through mail

hi ,

i am using FM 'SO_DOCUMENT_SEND_API1' for sending some file.

now my question is how to set the name of file to be sent?

thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 05:10 AM

    Hi,

    declare a work area like wa_doc_data LIKE sodocchgi1.

    Pass the name like below :

    wa_doc_data-obj_name = 'SAPREPORT'.

    and then pass the work area in the FM

    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'

    EXPORTING

    document_data = wa_doc_data

    .. this will work

    thanks

    Nitin Sachdeva

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      You can write a code as below and pass it to FM.

      DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.

      • Name of attachment

      objhead = 'Invoice.PDF'.

      APPEND objhead.

      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

      TABLES

      object_header = objhead

      Thanks,

      Srilakshmi.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 05:31 AM

    Hi,

    DATA: it_objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.

    it_objpack-obj_descr = file-name.

    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

    EXPORTING

    document_data = doc_chng

    • PUT_IN_OUTBOX = c_x

    commit_work = c_x

    TABLES

    packing_list = it_objpack contains file name

    Thanks,

    Krishna..

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 05:08 AM

    hi,

    In that function module there is an exporting parameter

    Document_data = /* pass the name of excel sheet here*/

    Rgds.,

    subash

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 05:09 AM

    Hi Rahul

    Check this link

    Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface

    how-to-send-mail-to-with-in-sap-

    Regards,

    Syf

    Edited by: syfulla shaik on Dec 22, 2008 10:44 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 05:19 AM

    hi,

    you need to define work area

    data: wa_doc LIKE sodocchgi1.

    and then assign the value

    wa_doc-obj_name = 'NAME'.

    then u need to call fm 'SO_DOCUMENT_SEND_API1'

    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'

    EXPORTING

    document_data = wa_doc

    thanks

    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.