Application Development and Automation 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: 
Read only

SO_DOCUMENT_SEND_API1 - missing attachment name

Former Member
0 Likes
983

Hi,

I'm tested the below sample code to test the email sending functionality with the attachments and email body contents. It was working fine in system version 4.6C by called FM: SO_DOCUMENT_SEND_API1.

However, I did the same test to system with version SAP NetWeaver 2004s, the attachment file name is get missing and cant displayed. As the results, its only displayed as .XLS without the filename. Can anyone please advise if there any wrong with it?

Sample code for testing

refer to internet:

http://www.sapdev.co.uk/reporting/email/attach_xls.htm

5 REPLIES 5
Read only

Former Member
0 Likes
718

Hi Blue,

Use FM: SO_NEW_DOCUMENT_ATT_SEND_API1 for attachment sending.

check using this.

Regards,

Tutun

Read only

Former Member
0 Likes
718

Hi,

For sending attachments you can try using function module:

SO_NEW_DOCUMENT_ATT_SEND_API1 ,

in this FM you can create packing list internal table like:

data:objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE.

Hope it helps

Regards

Mansi

Read only

Former Member
0 Likes
718

Hi,

Use the following FM:


DATA:        i_objbin      LIKE solisti1 OCCURS 0 WITH HEADER LINE,
        i_objpack     TYPE sopcklsti1 OCCURS 0 WITH HEADER LINE,
        i_record      LIKE solisti1 OCCURS 0 WITH HEADER LINE,
        i_objhead     TYPE solisti1 OCCURS 0 WITH HEADER LINE,
        i_otfin       TYPE soli_tab,
        i_receivers   TYPE somlreci1 OCCURS 0 WITH HEADER LINE,
        i_mail_data   TYPE sodocchgi1 OCCURS 0 WITH HEADER LINE,
        i_objtxt      TYPE solisti1 OCCURS 0 WITH HEADER LINE.


    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data              = i_mail_data
        put_in_outbox              = c_x
      TABLES
        packing_list               = i_objpack[]
        object_header              = i_objhead[]
        contents_bin               = i_objbin[]
        contents_txt               = i_objtxt[]
        receivers                  = i_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.

Read only

Former Member
0 Likes
718

Hi Blue Sky,

I am facing the exact same problem.

How did u solve the problem ?

Thanks,

Vishal

Read only

fredericbasilius
Participant
0 Likes
718

Hi Blue,

Please use the class CL_BCS for sending emails.


Regards,

FB