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: 

PO email notification Issue

Former Member
0 Kudos

Hi Everyone,

I have a query where it is related to sending mail notification for PO.

My client is using the same mail address for 2 users. But the problem is even if both the users are creating the PO, the mail notification is triggering as if from only one user.That is the sender ID is same even if both the users are creating the PO.

Please help me how we can make the mails to be sent based on the PO creater or requester. The FM used for sending mails is SO_DOCUMENT_SEND_API1 only.

Rgds

Siva

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

you can use

SENDER_ADDRESS and SENDER_ADDRESS_TYPE parameters for sending mail addresses of users.

you can change mail notifications with diff users by passing user mail address in SENDER_ADDRESS parameter in FM SO_DOCUMENT_SEND_API1

6 REPLIES 6

Former Member
0 Kudos

Hi,

you can use

SENDER_ADDRESS and SENDER_ADDRESS_TYPE parameters for sending mail addresses of users.

you can change mail notifications with diff users by passing user mail address in SENDER_ADDRESS parameter in FM SO_DOCUMENT_SEND_API1

Former Member
0 Kudos

Hi,

The question is not clear can you post in detail. here according to your post is one PO created for two diffrent users? is it possible.

If not here if two PO`s are getting created for two users seperatly then mail will be sent seperatly.

Can you clarify my doubts.

Regards,

Goutam Kolluru.

0 Kudos

Hi Goutham,

It is not one PO that is created for 2 users.

For eg: let us take 2 users A and B. In my case both these users A and B are having the same email address as 123@123 .com

If both the users has the access to create the PO, then the standard function module is picking only the first user whose person number is least. that is if A and B has the person number as 1 and 2, then the system is picking the sender ID as A (person number is least) even if the PO is created by A or B.

My question is i want to make this email notification to be as per the requester or creater so that if A or B creates the PO, then the notification will be from A or B respectively and not from A alone as mentioned above.

Rgds

Siva

0 Kudos

Hi Siva,

First fetch the Requestor of the PO from EKPO-AFNAM.

It will return the User who requested the PO. Then by using the FM 'BAPI_USER_GET_DETAIL' get the mail ID maintained for that User.

  • Get email id from HR master by passing Requestor name

CALL FUNCTION 'BAPI_USER_GET_DETAIL'

EXPORTING

username = ls_ekpo-afnam

TABLES

return = lt_return

addsmtp = lt_email.

READ TABLE lt_return INTO ls_return WITH KEY type = 'E'.

IF sy-subrc <> 0.

READ TABLE lt_email INTO ls_email INDEX 1.

IF sy-subrc = 0.

sendor_email = ls_email-e_mail.

ENDIF.

ENDIF.

Hope this will help...

Edited by: karunapsreddy on Jan 12, 2012 4:55 AM

0 Kudos

If you're sending the PO through email you can just do it through standard IMG settings and maintain the same email address in the both the user profiles.

0 Kudos

Hi Jeevan,

Could u pls provide me the path of IMG settings required?