on 02-15-2009 2:57 PM
Hi,
When a TASK completed, I want to send a E-mail to its phase responsable.
I got ET_SUPERIOR_OBJECT table that have the phase GUID by call funtion BAPI_BUS2175_GET_DETAIL within a workflow item. I need read the EMailAddress attribute of a BUS2173, but I do not know how to get phase instance with its GUID.
Thanks.
Arrow Yang.
Hi Arrow,
The mail address of the BUS2173 is the mail address of the deciders, not the responsible, as far as I see the codes (copied in below), please try with the BAPI_BUS2173_GET_DETAIL, which deliver the name of the responsible, then swith to the user-id, and use user-id get the mail address.
Standard codes of the mail-address of RBUS2173:
LV_GUID = OBJECT-KEY-PHASE_GUID.
LV_OBJKEY = LV_GUID.
CALL FUNCTION 'BAPI_BUS2173_GET_DECIDERS'
EXPORTING
GUID = LV_GUID
TABLES
USERS = LT_USERS.
LOOP AT LT_USERS INTO LV_USER.
IF NOT LV_USER IS INITIAL.
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
USERNAME = LV_USER
TABLES
ADDSMTP = LT_ADDSMTP
RETURN = LT_RETURN
EXCEPTIONS
OTHERS = 01.
Kind regards,
Zhenbo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arrow,
You can use standard method: if_dpr_appl_object_mapper->get_application_object_by_guid
Please try the following:
DATA: lr_appl_object_manager TYPE REF TO CL_DPR_APPL_OBJECT_MANAGER,
lv_guid TYPE dpr_tv_guid,
lr_phase TYPE REF TO cl_dpr_phase_o.
lr_appl_object_manager = cl_dpr_appl_object_manager=>get_instance( ).
lv_guid = phase_guid.
TRY.
lr_phase ?= lr_appl_object_manager->mr_mapper->GET_APPLICATION_OBJECT_BY_GUID( IV_GUID = lv_guid ).
CATCH CX_DPR_OBJECT_MAPPING_ERROR.
ENDTRY.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.