on 06-05-2011 3:08 PM
Hi, all
I m new to web dynpro programming, im developing a page in which i want to get the data of the selected row. like for e.g
table has columns like
material code description
now i want to fetch only the material no. from the selected row and when i click it will show some data of that material no.
now the issue is i searched the forum and tried various but for each solution im getting stuck.
so can any one kindly help me out in the same.
details:
i have a function module attached to the context and in changing of that FM there is a table of which i want to select the row i.e. material no.
DATA : sel_rec type WDR_CONTEXT_ELEMENT_SET.
DATA : wa_selrow like LINE OF lt_c_zmat.
CALL METHOD lo_zmat->GET_SELECTED_ELEMENTS
RECEIVING
SET = lt_elementset.
CALL METHOD sel_rec->get_static_attributes
IMPORTING
static_attributes = wa_selrow
i have tried 2-3 ways in which i was failed one of them is this.
thanks you.
Hi,
You have not explained your problem completely so that we can help you.
Which UI element are you using ? I assume it is TABLE UI. If it is true then there is a event lead_selection. Use this event handler to get the selected element.
Use the code generator ctl+f7 to generate the code.
Select the context node,read attribute material number.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thaks baskaran for your reply,
im using the normal table under ROOTUIELEMENTCONTAINER. the thing is now i have written the code in the method which gives me details of that material but its every time giving me the first record not the one im selected here is the code,
DATA lo_nd_it_vttk TYPE REF TO if_wd_context_node.
DATA lo_el_it_vttk TYPE REF TO if_wd_context_element.
DATA ls_it_vttk TYPE wd_this->Element_ZMAT.
DATA lt_it_vttk TYPE wd_this->Elements_ZMAT.
DATA wa_vttk like LINE OF lt_it_vttk."TYPE ZMAT.
lo_nd_it_vttk = wd_context->path_get_node( path = `ZMTR_REPORT.CHANGING_1.ZMAT` ).
* get element via lead selection
lo_el_it_vttk = lo_nd_it_vttk->get_element( ).
* get all declared attributes
lo_el_it_vttk->get_static_attributes(
IMPORTING
static_attributes = ls_it_vttk ).
so kindly provide some help on the same can ask any doubt if you have to resolve my issue correctly
thanks a lot.
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.