on 10-12-2015 8:50 PM
Hello all,
We synchronize PPM with PS when user save his project. This works perfectly.
Now we would like to lock a Cproject when corresponding PS Project is opened. This means that Cproject should be opened in display mode and not in edit mode if PS project is opened.
I've created an enhancement on DPR_DET_DATA_PROJECT_O Webdynpro. I tried to code this in pre-exit of UPDATE_DATA_FROM_BE method (seems that we set up fields of dynpro here) :
DATA: lr_session TYPE REF TO cl_dpr_session_state.
lr_session = cl_dpr_session_state=>get_instance( ).
lr_session->set_change_mode( ' ' ).
It doesn't change anything, it still open in edit mode.
Maybe do you know a better way to do it or you know how to code this.
Thanks to all for helping me.
Yohann.
Hi Yohann,
Can you please check if lr_session is assgined or not.
Thanking you
Vengaiah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks again.
You are probably right, we should change display mode in the application but, for the moment, I've found a solution.
In pre-exit of method UPDATE_DATA_FROM_BE, I check lock entries for PS project. If there are lock entries, I set a specific attribute mv_lock to 'X'.
I've created an overwrite-exit of this method UPDATE_DATA_FROM_BE, copy all this method in the overwrite-exit.
Then I test my attribute mv_lock to determine if my fields are read_only or not.
IF wd_this->mv_lock = abap_true.
ls_prop_for_node-read_only = abap_true.
ELSE.
ls_prop_for_node-read_only = ls_fc-readonly.
ENDIF.
I did the same thing in WD for task and phase.
Certainly, there is a better solution but I was short at time and this solution is, for the moment, suitable.
Thanks for helping me.
Yohann.
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.