cancel
Showing results for 
Search instead for 
Did you mean: 

Define recipient from Rule in sent mail

Former Member
0 Kudos

Hi

Could any one help me, how to mention the list of recipients determined via rule resolution in sent mail.

I read in a SAP book and it suggest to define one background task to get the list of recipient from FM: RH_GET_ACTORS based upon custom rule(AC90000001). Everything is working fine. But am facing problem to bind the value from FM to workflow container. The reason is the return value of FM is in “SWHACTOR“ structure but sent mail accept experssion in AAGENT BOR.

I really appreciate your help by rewarding points

Thanks

Kamal Babu

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hai,

I think what AK said is correct. I did a similar thing once.What I did was, I created a rule which used a custom FM. In FM, Pernr was Import parameter (TYPE PSKEY-PERNR) and UsrID was Export parameter (TYPE PA0105-USRID). As a rule, I had AC_CONTAINER STRUCTURE SWCONT and ACTOR_TAB STRUCTURE SWHACTOR.

Then, I used a subroutine to get the USRID from the Pernr using table PA0105. Something like:

PERFORM get_approvers

USING gv_level

CHANGING lv_found

After that, I appended the Actor_Tab and Object ID like:

actor_tab-otype = 'US'.

actor_tab-objid = gv_userid.

APPEND actor_tab.

Think, this is what you were speaking about.

Regards,

Jubish

Former Member
0 Kudos

Yaa we need to convert the Position Id or the Personnel Number you are retrieving from the Rule into SAP User Id.

You can get the SAP User Id from the Personnel Number by selecting from Infotype PA0105.

Once you get the SAP USER id you need to store this in a multiline container element concatenated with US in front.

From Position Id to Personnel number you can get it from Infotype pa0000

I feel you need to do these in a Method that will return you this multiline container element.

Thanks

Arghadip