on 10-15-2008 9:57 PM
Hi,
I need to hide the field STRUC.BP_GROUP only when the bp is gonna be updated.
Do you know how can I do this?
Thanx in advanced.
Hi,
Create two configuration for your bp. Call configuration with this code. This will work.
Best regards
PAnkaj kumar
METHOD do_config_determination.
**********************************************************************
Switch configuration that is used based on field value.
**********************************************************************
DATA:
lv_value TYPE char2,
lv_object_type TYPE bsp_dlc_object_type VALUE '<DEFAULT>',
lv_object_subtype TYPE BSP_DLC_OBJECT_SUB_TYPE value '<DEFAULT>',
lr_node TYPE REF TO if_bol_bo_property_access.
CALL METHOD super->do_config_determination
EXPORTING
iv_first_time = abap_false.
lr_node = typed_context->some_node->collection_wrapper->get_current( ).
CHECK lr_node IS BOUND.
lr_node->get_property_as_value(
EXPORTING
iv_attr_name = 'SOME_ATTRIBUTE'
IMPORTING
ev_result = lv_value ).
*
lv_object_type = 'MY_UI_OBJECT_TYPE'.
CASE lv_value .
WHEN 'SOME_VALUE1'.
lv_object_subtype = 'JIMBOB'.
WHEN 'SOME_VALUE2'.
lv_object_subtype = 'BUBBA'.
ENDCASE.
me->set_config_keys( iv_object_type = lv_object_type
iv_object_sub_type = lv_object_subtype
iv_propagate_2_children = abap_true ).
ENDMETHOD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don't ask me why (hehe). The story is...
The first time you create a BP instead of choosing a Role you select a Group.
There is a validation that depending of the Group the Role is atached to the BP.
The point is... When you update the BP you can change the Role but you can't change the Group.
To avoid confusing they want to hide the Group onlye when you are updating the BP because the Group may not correspond to the Role.
Thanx in advanced.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
Two useful notes in this context:
[Note 1257009 - Role-dependent field modification not supported|https://service.sap.com/sap/support/notes/1257009]
[Note 999092 - CRM WebClient: Field & screen modification|https://service.sap.com/sap/support/notes/999092]
Best regards
Arno
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
You can do the same by checking bp id field. Check for the condition if bp id is equal to null(BP not yet saved). if bp id not equal to null(BP saved) then make rv_disable= ' TRUE' in get_I_ method of your field name.
Hope your pbm is solved.
Best regards
Pankaj Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
The solution mentioned by Pankaj will only enable or disable the field based on the condition. But the requiremetn here is to hide/unhide the field.
I would say that this can be achieved by multiple configuration, but this would be a little risky as it is always recommended to use the sap delivered configurations.
Probably please explain the requirement with more details, it would be helpful.
Regards,
Vinay
User | Count |
---|---|
5 | |
1 | |
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.