on 04-13-2011 7:47 AM
Hi Experts,
I have developed one web dynpro application where I need to read the basic data from the primary table.Based on the on click event if i click on any row of this primary table i should get the details of this row.
For ex: In the first table which is ALV type and having the fields like MATNR etc ,if i click on MATNR then it should retrieve item details of corresponding material number from MARC table.
What i have done :
1.I have created an ALV table and created a link_to_action for the column MATNR.
2.I could trigger the on_click event.
Problem .
As the details of the particular clicked row is present in r_param , my problem is how to use this details in select statement so that i can use the value of the material number and select item details from MARC.
Please post your ideas and suggestions.
HI ,
You can directly retrieve the data from r_param.
field-symbols : <lv_id> type data.
assign R_PARAM->value->* to <lv_id>.
Now you can use this field symbol to get the vaules.
Regards
Kuldeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi manogna and kuldeep,
I have tried both ways .Both are working .Thanks alot.
Edited by: ch_ravi_sap on Apr 13, 2011 10:40 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In your event handler, R_PARAM->INDEX value gives you the index of the row from where you have clicked MATNR.
By using this index you can get the node element of ALV table and attribute value.
For reference go through the following example.
data lv_index type i.
data lv_matnr type mara-matnr.
data lo_element type ref to if_wd_context_element.
data lo_node type ref to if_wd_context_node.
lv_index = r_param->index.
get the node reference first & get the selected element of node
lo_node = wdcontext->get_node( 'ALV' ).
lo_element = lo_node->get_element( lv_index ).
lo_element->get_attribute( exporting name = 'MATNR' importing value = lv_matnr ).
Regards,
Manogna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.