on 04-17-2007 4:38 PM
Hi All ,
I just want to ask how to use a Table UI in webdynpro ABAP to insert , change and delete rows ?? and can we give a drop down facility in table columns ? . This is really urgent .
Thanks in advance.
Regards,
LAS
Hi LAS,
Everything is possible. I am providing the logic here which will help you a lot.
For insert, Change, Delete:
Just get the all the elements into temp internal table and get the lead slected index. Now instrt one row in the lead selected index position. then again bind the temporary internal table to your table node. Thats all it works like inserting the row.
In the same way you can do the change and delete rows also.
For Dropdown:
Here i am providing the code for Dropdown. It will help you out.
Just create the Dropdown view for the columns for which you want dropdown. And do the coding for that.
Here in my scenario IT is the Table node which holds the information. And i am providing the dorpdown key for the column "BSCHL".
If you have any dobts just reply to me . i will respond it.
Code:
data : ls_outtab type /kyk/s_fb01_line,
lt_outtab type table of /kyk/s_fb01_line,
lv_node_sd type ref to if_wd_context_node,
lv_node_it type ref to if_wd_context_node,
lv_node_info type ref to if_wd_context_node_info,
lv_node_sapmf05a_0106 type ref to if_wd_context_node,
lv_node_waers type ref to if_wd_context_node,
lv_node_layout type ref to if_wd_context_node,
lv_rowcount type i,
lv_buzei type i,
lv_waers type waers,
lt_bschl_set type wdy_key_value_table,
bschl_key_item type wdy_key_value.
bind to context
lv_node_sd = wd_context->get_child_node( name = 'SD' ).
lv_node_it = lv_node_sd->get_child_node( name = 'IT' ).
call method lv_node_it->bind_table
EXPORTING
new_items = lt_outtab.
fill Dropdown Help for posting Key
bschl_key_item-key = '40'.
bschl_key_item-value = cl_wd_utilities=>get_otr_text_by_alias( '/KYK/FIN_FI/DEBIT_GL_ACCOUNT' ).
insert bschl_key_item into table lt_bschl_set.
bschl_key_item-key = '50'.
bschl_key_item-value = cl_wd_utilities=>get_otr_text_by_alias( '/KYK/FIN_FI/CREDIT_GL_ACCOUNT' ).
insert bschl_key_item into table lt_bschl_set.
bschl_key_item-key = '21'.
bschl_key_item-value = cl_wd_utilities=>get_otr_text_by_alias( '/KYK/FIN_FI/DEBITVENDOR' ).
insert bschl_key_item into table lt_bschl_set.
bschl_key_item-key = '31'.
bschl_key_item-value = cl_wd_utilities=>get_otr_text_by_alias( '/KYK/FIN_FI/CREDITVENDOR' ).
insert bschl_key_item into table lt_bschl_set.
lv_node_info = lv_node_it->get_node_info( ).
lv_node_info->set_attribute_value_set( name = 'BSCHL' value_set = lt_bschl_set ).
Warm Regards,
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.