on 12-22-2009 11:48 AM
Hi experts,
I have a question for you. I have a table and I need to show a column with state required or not depending of the role of the user. Is it possible to realize this?
Tks a lot!
hi ,
u procced like this :
1 check the user , just read the context attribute which is bind to the field for user using get_attribute
2 now using set_attribute method , set the value to REQUIRED or NOT REQUIRED depending on the user value
here u wud set the context attribute which is binded to the table column to the value Required or Not Required
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi webdynpro.gc,
can you more elaborate your query.
As per my understanding you want to check the value in some column for specified role.
DATA lt_attr TYPE cl_wd_dynamic_tool=>t_check_mandattr_tab.
DATA ls_attr TYPE cl_wd_dynamic_tool=>t_check_mandattr_struct.
DATA lv_error TYPE wdy_boolean.
CASE user_role
WHEN 'ADMIN'.
ls_attr-attribute_name = 'MAND_ATTR1'.
ls_attr-element_empty_ok = abap_true.
APPEND ls_attr TO lt_attr.
CLEAR ls_attr.
WHEN 'SIMPLE'.
ls_attr-attribute_name = 'MAND_ATTR2'.
ls_attr-element_empty_ok = abap_true.
APPEND ls_attr TO lt_attr.
CLEAR ls_attr.
WHEN OTHERS.
ENDCASE.
lv_errors = cl_wd_dynamic_tool=>check_mandatory_attributes(
attribute_list = lt_attr
display_messages = 'X'
context_root = lo_nd_alv_data ).
Hope it will solve your query.
Nawal Kishor Mittal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.