on 04-20-2012 5:40 AM
Hi,
I have a requirement for checking whether i have clicked on the hotspot or not in interactive ALV in WDA.
What is the sy-ucomm for that?
Hi,
There won't be any sy-ucomm value in WDA. Take one attribute( flag ) in component controller and set it to X in on_click event of ALV. ( You need to create an event handler method for on_click event of ALV and set the flag inside the method ).
Hope this helps u.,
Regards,
Kiran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have used the select-options for inputting vbeln field.
The primary listy of ALV contains header details of all vbeln field entered.
The secondary list should contain item details of each vbeln selected.
This was my requirement.
But if I enter vbeln as 51-55 as input.
The primary list is fine.
But when i click on 55 the item details of 51 will come.
When I click on 51 the details are fine.
So how to capture the vbeln value when iam clicking on the hotspot.
Below is the code which i used for on_click event for alv.
method ACTIONON_CLICK .
DATA lo_nd_header TYPE REF TO if_wd_context_node.
DATA lo_el_header TYPE REF TO if_wd_context_element.
DATA ls_header TYPE wd_this->element_header.
DATA lv_vbeln LIKE ls_header-vbeln.
* navigate from <CONTEXT> to <HEADER> via lead selection
lo_nd_header = wd_context->get_child_node( name = wd_this->wdctx_header ).
* get element via lead selection
lo_el_header = lo_nd_header->get_element( ).
* get single attribute
lo_el_header->get_attribute(
EXPORTING
name = `VBELN`
IMPORTING
value = lv_vbeln ).
* DATA lo_nd_header TYPE REF TO if_wd_context_node.
* DATA lo_el_header TYPE REF TO if_wd_context_element.
* DATA ls_header TYPE wd_this->element_header.
DATA lt_header TYPE wd_this->elements_header.
* navigate from <CONTEXT> to <HEADER> via lead selection
lo_nd_header = wd_context->get_child_node( name = wd_this->wdctx_header ).
* get element via lead selection
lo_el_header = lo_nd_header->get_element( ).
* get all declared attributes
lo_el_header->get_static_attributes(
IMPORTING
static_attributes = ls_header ).
DATA lo_nd_item TYPE REF TO if_wd_context_node.
DATA lo_el_item TYPE REF TO if_wd_context_element.
DATA ls_item TYPE wd_this->element_item.
DATA lT_item TYPE wd_this->elementS_item.
* navigate from <CONTEXT> to <ITEM> via lead selection
lo_nd_item = wd_context->get_child_node( name = wd_this->wdctx_item ).
* @TODO handle not set lead selection
IF lo_nd_item IS INITIAL.
ENDIF.
* get element via lead selection
lo_el_item = lo_nd_item->get_element( ).
* @TODO handle not set lead selection
IF lo_el_item IS INITIAL.
ENDIF.
SELECT * FROM VBAP INTO TABLE LT_ITEM WHERE VBELN = lv_vbeln.
data:
Node_cust type REF TO IF_WD_CONTEXT_NODE.
Node_cust = wd_Context->get_Child_Node( Name = `ITEM` ).
* bind internal table to context node <SFLIGHT>
Node_cust->Bind_Table( lt_ITEM ).
wd_this->fire_secondary_list_plg(
).
endmethod.
Hi,
dont use get_attribute method to get the selected value. the selected value will be available in r_param->value
use ,
field-symbols <fv_vbeln> type vbeln.
assign r_param->value->* to <fv_vbeln>.
Now <fv_vbeln> contains the clicked or selected value.
use the <fv_vbeln> and populate the item table.
Hope this helps u.,
Thanks & Regards,
Kiran.
Thanks Kiran.
It worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.