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: 

data alignment issue with function module SO_DOCUMENT_SEND_API1

Former Member
0 Kudos

Hi All,

I am using function SO_DOCUMENT_SEND_API1 to send email from SAP. What is happening is the internal table which contains the data of the email(Content of the email) is ok. That is data in internal table is in proper format as required. This table is passed to FM SO_DOCUMENT_SEND_API1. After execution of this FM, mail is sent but the format of the email content is not the same as the format of the data in internal table.

Can anyone guide me regarding this discrepancy in the data alignment or format in the actual email ?

Thanks in advance.

Regards,

Chetan

1 REPLY 1

Former Member
0 Kudos

Hi,

Pass the values like the following format,

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

document_data = docdata

put_in_outbox = 'X'

commit_work = 'X'

TABLES

object_content = objcont

receivers = intrcvers[].

CASE int_error.

WHEN 0.

MESSAGE s888(sabapdocu) with "Mail Sent Successfully...".

WHEN OTHERS.

MESSAGE s888(sabapdocu) with "Mail Not Sent...".

ENDCASE

I hope this will solve your problem.

Gothrough the following link,

https://forums.sdn.sap.com/click.jspa?searchID=14853082&messageID=5409233

Regards,

Harish