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

Sending PO email using email id that is not ticked as standard

Hello All

Brief explanation:

We have Vendors setup with several email ids created against each vendor. One of the email id would be set as the "Standard number" for communication and sending of PO via email.

So, currently, when a PO is released, the email ticked as "Standard number" is automatically selected and a PO is sent via email. Smartform is used to create the PO layout.

We would like to change this.

We have Vendors setup with several emails. The email relevant for PO email has the description "PO" in the notes column. Now, we want to send the email to the email id whose description is set to “PO” and not the email id which is set as the “Standard number”.

On ABAP side, In the entry point entry_neu following FM 'WFMC_PREPARE_SMART_FORM' is used to set the print parameters and this is then passed to SMARTFORM call.

This FM gets the “Standard” email id and I can not see anyway of changing this so that is retrieves the email id using the “Description”.

pi_nast = nast
pi_addr_key = is_addr_key
pi_repid = lf_repid
pe_returncode = cf_retcode
pe_itcpo = ls_itcpo
pe_device = lf_device
pe_recipient = cs_recipient
pe_sender = cs_sender.

The parameter cs_recipient after the FM return can not be changed as it contains a converted number for the selected email id.

Has anyone done something similar and would appreciate any help on this issue.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Dec 17, 2013 at 02:19 PM

    Hi Raj,

    I have faced the same issue and below is the solution that i have implemented.

    INCLUDE <cntn01>.

    IF nast-nacha = 5.

    CONSTANTS: c_receiver_email(50) VALUE ''.

    DATA : l_receiver TYPE swc_object.

    swc_container lt_container.

    swc_clear_container lt_container.

    * create recipient

    swc_create_object l_recipient 'RECIPIENT' space.

    swc_set_element lt_container 'AddressString'


    swc_set_element lt_container 'TypeID' 'U'.

    swc_set_element lt_container 'NoIntern' 'X'.

    swc_call_method l_recipient 'CreateAddress' lt_container.


    Hope you would have already solved your issue.

    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.