on 11-23-2012 6:51 AM
Hi,
i am calling activty creation componnet (bt126h_appt) from activity closed list component (bp_bpbt) overview page.
here i am calling multiple configurations of bt126h_appt based on my selection buttons on bp_bpbt.
creation page is coming, but always it is coming same configuration, becuase i couldn't find which button clicked when my configuration changing in do_config_determination() of bt126h_appt.
here in bp_bpbt component when i am clicking on button i can read that event name into lv_variable. but i don't know how to pass this event name to other component.
someone suggested me creating valuenode in both components and pass the value, i don't know the procedure.
can anybody help me on this,
Thanks,
Neelam
Hi Neelam,
If you want to use value node follow below steps
interface.
CASE
iv_usage->usage_name.
WHEN 'CU_BP_BPBT'.
CALL METHOD iv_usage->bind_context_node
EXPORTING
iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'XXX' BP_BPBT context node
iv_node_2_bind = 'YYY'. "BT126H_APPT Context node
ENDCASE.
Regards
Rajarama U
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajarama,
Thanks, now i added the context node under comp.interface,
one more doubt, i am reading the event name ex:- button1 under on_new1() method. now i need to pass this value 'button1' to other component(bt126h_appt)) thru this value node of component bp_bpbt.
i have created one global varialble GV_VAR type string under view IMPL class in BP_BPBT.
i am passing this event name 'button1' to gv_var.
now inside the value node attribute get_button()
i am assigning this gv_var to value.
pls correct me if my approach is wrong.
Thanks,
Neelam
Hi Neelam,
Now you need to fill your context node collection.
Suppose you are taking the name of the event on click of the button,then you need set your value node collection in this method.Refer below code
DATA lr_struct_ref TYPE REF TO ls_button. "Structure of your context node
DATA lv_struct TYPE ls_button.""Structure of your context node
DATA lr_value_node TYPE REF TO cl_bsp_wd_value_node.
CREATE DATA lr_struct_ref.
CREATE OBJECT lr_value_node
EXPORTING
iv_data_ref = lr_struct_ref.
lv_struct-lv_botton = 'BUTTON_A'.
lr_value_node->if_bol_bo_property_access~set_properties( lv_struct ).
lr_coco->typed_context-><CONTEXT_NODE_NAME>->collection_wrapper->clear( ).
lr_coco->typed_context-><CONTEXT_NODE_NAME>->collection_wrapper->add( lr_value_node ).
Regards
Rajarama U
Hi Rajarama,
Thanks for your reply,
yes i have 2 buttons inside gt_button () method of IMPL class.
(1NEW, 2NEW)
my value node name under comp.context node is 'BUTTONNAME' under this i have created only one attribute as BUTTON type char20.
i copied your code inside of this get_BUTTON() of value node attribute.
but i am getting below error.
type "LS_BUTTON" is unknown
can you help me where it is wrong.
Thanks,
Neelam
Hi Neelam,
First go to event of 1NEW button and write code which is shown below.
TYPES: BEGIN OF str_button,
BUTTON TYPE char20,
END OF str_button.
DATA lr_struct_ref TYPE REF TOstr_button. "Structure of your context node
DATA ls_struct TYPE str_button.""Structure of your context node
DATA lr_value_node TYPE REF TO cl_bsp_wd_value_node.
CREATE DATA lr_struct_ref.
CREATE OBJECT lr_value_node
EXPORTING
iv_data_ref = lr_struct_ref.
ls_struct-BUTTON = '1NEW'.
lr_value_node->if_bol_bo_property_access~set_properties( ls_struct ).
"Get the reference of component controller ( lr_coco )"
lr_coco->typed_context->BUTTONNAME->collection_wrapper->clear( ).
lr_coco->typed_context->BUTTONNAME->collection_wrapper->add( lr_value_node ).
ls_struct-BUTTON = '2NEW'.
Regards
Rajarama U
Hi Rajarama,
Thanks for your code,
i have copied iniside my 1new button event
to get the reference of the comp.controller below lines i added
data: lr_coco type ref to ZL_BP_BPBT_BSPWDCOMPONENT_IMPL.
lr_coco ?= me->comp_controller.
and i added below two lines as you suggested.
lr_coco->typed_context->BUTTONNAME->collection_wrapper->clear( ).
lr_coco->typed_context->BUTTONNAME->collection_wrapper->add( lr_value_node ).
i am getting error says.... BUTTONNAME is unknown. but there is a field with the similer name "BUTTON_SAVE".
actually i created value node with name BUTTONNAME is available, but BUTTON_SAVE also available but it is in grey color.
anything wrong when creation of value node?
Thanks,
Neelam
Hi Rajarama,
i found that ....when i am checking the comp.interface....there under context this context node BUTTONNAME is showing as Model node, BUTTONSAVE is showing as value node.
if i see under component controller context....BUTTONNAME is showing value node icon,
one more thing what i observed is there is already context class cn00 is available for partner context node for this component controller.
for BUTTONNAME context node class also ends with CN00 showing....
is it the problem ???
pls help me on this.
Regards,
Neelam
User | Count |
---|---|
4 | |
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.