Thursday, October 6, 2011

Agent assignment in Workflow

In development system, I had created a task, and also configure the agent assignment correctly:
A problem I always had was, when I transport this workflow into Quality system, the agent assignment setting is gone, and I got to configure the agent assignment manually in Quality and Production system:
This is very troublesome, and we need to check every task in both systems after the transport done. But, I found a very good post from SAPTechnical. I would like to keep the guideline in here as well, in case the link is gone:)

1. Go to Tcode "RE_RHMOVE30", and fill in the details as following:
    Object Type should be "TS" for Standard Task, and Object ID should be the standard task ID that contains the Agent Assignment that you wish to transport.
2. Execute it. At the next screen, SELECT all the object that you wish to transport, and then click "Transport/Delete":
3. Then, the system will prompt you for customizing request, you should select/create appropriate customizing request and then choose "Continue".
4. After this, the Agent Assignment of the standard task had been add into a customizing request. You can transport this request to Quality system and then Production system.
5. With this transport get into the next system, you no need to manually configure the Agent assignment for each of the standard task in Quality/Production system.

Whenever we create an Agent Assignment in Development system, we should also add this Agent Assignment setting to a transport at the same time, with the above steps.

User's email address

The user's email address that I mean here is the email address that maintained in transaction code SU01:


In order to get this email address in program, you can use BAPI "BAPI_USER_GET_DETAIL", this will be very handy.


But, which table keep this email address? The answer is ADR6, but by looking into the content of this table, it did not has a field for user id. The key field for this table is ADDRNUMBER and PERSNUMBER, and how can we can this number?


Go into table USR21, find the user's ADDRNUMBER and PERSNUMBER by searching with user id in keyfield BNAME. Then, get the email address from table ADR6 with these two fields.