cancel
Showing results for 
Search instead for 
Did you mean: 

How to send an e-mail to sold to party on creating a sales order?

Former Member
0 Kudos

Hi

Please tell me the procedure of configuration so that an email will be sent out to the sold-to party on creating the sales order.

I've created the action profile by using order_messages. Also the transaction type: ISBB have been used.

Still the mail is not going to the sold to party id.

Thanks & Regards

Neetu Makhloga

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Neetu,

This can be achieved in multiple ways...

1. Through action profiles, which has been explained in the above replies.

2. The other way is to configure an event and trigger a call back function module, where you can trigger a mail in any preferred format. However, this method needs coding, while the first can be acheived only through configuration and standard e-mail template is available.

FYI.

Regards,

Kris.

Former Member
0 Kudos

Thanks Kris...

Will try the second suggestion.

Regards

Neetu Makhloga

praveen_kumar194
Active Contributor
0 Kudos

or you can use ORDER_SAVE BADI . you can create new implementation for it. when sales order gets saved this implementation will be triggered. here you can get the guid of the transaction so you can use it if you want to read any details of transaction. you can place email code also here. this is the sample code for sending email.

send_request = cl_bcs=>create_persistent( ).

document = cl_document_bcs=>create_document(

i_type = c_raw

i_text = l_mailtext

i_subject = l_subject ).

TRY.

lt_text = it_send1.

CALL METHOD document->add_attachment

EXPORTING

i_attachment_type = c_attch_type

i_attachment_subject = c_attch_subject1

i_att_content_text = lt_text.

CATCH cx_document_bcs .

ENDTRY.

  • Add document to send request

CALL METHOD send_request->set_document( document ).

  • Get Recipient Object

CLEAR l_recipient.

l_recipient = wa_log-mes.

recipient = cl_cam_address_bcs=>create_internet_address( l_recipient ).

CALL METHOD send_request->add_recipient

EXPORTING

i_recipient = recipient.

  • Set that you don't need a Return Status E-mail

CALL METHOD send_request->set_status_attributes

EXPORTING

i_requested_status = c_status1

i_status_mail = c_status1.

CALL METHOD send_request->set_send_immediately( c_flagx ).

CALL METHOD send_request->send( ).

COMMIT WORK.

Former Member
0 Kudos

Hi,

yes, you can use action profile ORDER_MESSAGES with action definition ORDER_CONFIRMATION for your requirement. When you use processing time 'processing using selection report' you can process the action with action monitor tx. crmc_action_job or via backround job. As the action is partner dependent please also see note 621183 and its explanations on crm_action_badi.

I hope this information is helpful.

Best regards

Marion

Former Member
0 Kudos

Thanks Marion

But I've already done the SMTP settings, defined the action profile (ORDER_MESSAGES) & copied the smartforms.

Still neither the entry is appearing in the SOST transaction nor the recipient is able to receive the mail on creating the sales order.

Please suggest something for the same.

Thanks & Regards

Neetu

Former Member
0 Kudos

Hi Neetu,

did you deactivate crm_action_badi? When you check the document is the action scheduled? Was it processed? Are errors visible?

Best regards

Marion

Former Member
0 Kudos

Hi Marion

I've not activated crm_action_badi. I've selected the processing time as 'on saving the document'.

Schedule Condition: Status Open

Start Condition: Status Open

In the sales order document, the action part is showing error saying that 'incorrectly processed'. But we can't see any e-mail entry in sost transaction also.

Kindly suggest me.

Thanks & Regards

Neetu

Former Member
0 Kudos

Dear All

On creating a sales order, I'am getting errors in action tab saying that the action is incorrectly processed.

The error messages are as follows:

Message no. SPPF_MEDIA043 (error when sending to 'e-mail id')

Message no. SO619 (error during send process)

Message no. SPPF_MEDIA002 (Action could not be successfully executed)

Kindly suggest.

Thanks & Regards

Neetu Makhloga