on 02-17-2015 5:12 AM
Hello!
I have a problem:
I need to display one of stats (I1192) from list values of DDK_STAT_CHANGE (DropDownByKey) in view VI_DET_BAS_DPO only when user have Admin role (from tab Authorization). How I can view or doesn't view this stat?
Or I can go another way:
check the status = 'I1192' and user role = 'Admin' and clear the status, if user rule isn't 'Admin'.
But I don't now, how to do it.
Thanks a lot.
I did it!
We didn't have Note 1788564.
IF_DPR_STATUS_ELEMENT~GET_PERMITTED_ACTIVITIES
CLEAR:
cv_rc,
cs_msg.
CHECK ir_common IS BOUND.
IF flt_val EQ cl_dpr_co=>sc_ot_task
AND iv_status EQ cl_dpr_status_management=>sc_status_completed.
DATA: lv_guid TYPE dpr_tv_object_guid_char.
lv_guid = ir_common->get_guid( ).
DATA lr_auth_check TYPE REF TO cl_dpr_api_fast_authorization.
lr_auth_check = cl_dpr_api_fast_authorization=>get_instance( ).
DATA lv_has_auth TYPE boolean.
lv_has_auth = lr_auth_check->has_authorization(
iv_user_id = sy-uname
iv_activity = cl_aco_constants=>sc_authorization_own
iv_guid = lv_guid
).
IF lv_has_auth NE abap_true.
cs_msg-msgty = 'E'.
cs_msg-msgid = 'DPR_TASK'.
cs_msg-msgno = '019'.
cs_msg-msgv1 = 'Завершено'.
cv_rc = 4.
ENDIF.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Zhenbo.
Sorry, but I had a mistake yesterday: I need to do this task for "Task level", and I need it for status cl_dpr_status_management=>sc_status_completed ('I1702').
I went the second way:
I found BADI DPR_ATTRIBUTES and created enhancement implementation. I changed method IF_EX_DPR_ATTRIBUTES~CHANGE_STATUS_CHECK. This method works when we change status.
I tried to implement this method like in standard example. Although I sent error message in attribute cs_msg and error value (4) in attribute cv_rc, this the status has changed. What did I do wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
forget to mention, the responsible codes are in
CL_DPR_PROJECT_O
method IF_DPR_STATUS_ELEMENT~GET_PERMITTED_ACTIVITIES
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ivan,
no, there is only a BAdI (INM_EX_INITIATIVE_STATUS) for initiative to affect the possible status-activity.
And DDK_STAT_CHANGE contains the status activity (DX01 for release, DX03 for complete etc.)
The status activity carry out the status change, e.g. from I1700 -> I1701 .
The status 'I1192' is unknown for me, PPM project status start from I1700 till I1777. You may double check the entries in BS22.
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.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
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.