on 02-06-2008 6:15 AM
Hi,
In my table first field is cost center & second field is Company code.Cost center field has search help. So based on the cost center i have selected corresponding company code should come in the company code field. So i have written code inside onenter action. My problem is based on cost center i am getting company code. But it is coming in all the table fields. How can i avoid that one.
hi hima.......
what you can do is...... when you are filling the compony code... fill it only for the row to whic it is required... pass it only to that row.. you might be passing it to the whole table... instead pass it to only one row.
---regards,
alex b justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi hima.....
anyway you are getting the value that is stored in the first column....
by getting so you can also get the index....
with that index update the internal table with the correct value.
or
update the whole internal table column2 with respect to the column1 value.
---regards,
alex b justin
Hi,
Actually me also have written the code like that only. Using index i have set the attribute . But then also i am getting values in all the rows. why its happening like that..
I have written the code like this.
data: lr_node type ref to if_wd_context_node,
itemlist type standard table of if_view5=>element_MAINTABLE,
w_itemlist like line of itemlist,
lt_csks type STANDARD TABLE OF csks,
w_csks like line of lt_csks,
v_index type i VALUE 1,
v_text type string,
v_text1 type string.
lr_node = wd_context->get_child_node( 'MAINTABLE' ).
lr_node->get_static_attributes_table( IMPORTING table = itemlist ).
v_index = lr_node->get_lead_selection_index( ).
CLEAR w_itemlist.
READ TABLE itemlist INTO w_itemlist INDEX v_index.
v_text = w_itemlist-attr1.
select bukrs from csks into v_text1 where kostl = v_text.
select bukrs from csks into CORRESPONDING FIELDS OF TABLE lt_csks where kostl = v_text.
READ TABLE lt_csks INTO w_csks INDEX v_index.
v_text1 = w_csks-bukrs.
wd_context->set_attribute( EXPORTING index = v_index value = v_text1 name = 'ATTR2' ).
Actually im stuck up with that one..
Can u give any suggestion regarding this code.
hi hima......
consider changing your code a liitle.... such that..
initialy your itab will be like
cost centre company code
12213
13443
so once you load the company code... it will be like
cost centre company code
12213 1000
13443 1100
so bind it again to the same node using bind_table method.
it works.
---regards,
alex b justin
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.