on 04-24-2009 11:16 AM
Hello,
I am intending to populate and display the records using a table control.
Is table control existing in WD ?
Thx in advance
Sw+++
hi
I have right clicked on the table ui element which is under roouielementcontainer and selected create binding.
The selected Cell editor of table coloumn is Input Field.
Binding check box is set Name of Property is value.
I cant still edit any datesince the cells are not editable
@Mago where should your code must be inserted ?
Regards,
sw++
Edited by: spielwiese on Apr 24, 2009 3:13 PM
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 inersted your code as follows. But I get the error message
element_cn_try is unknown. My context node has the name ZHEAD .
DATA lo_nd_cn_try TYPE REF TO if_wd_context_node.
DATA lo_el_cn_try TYPE REF TO if_wd_context_element.
DATA ls_cn_try TYPE wd_this->element_cn_try. <cn_try is my node name here >
DATA ls_cn_try1 TYPE wd_this->elements_cn_try.
navigate from <CONTEXT> to <CN_TRY> via lead selection
lo_nd_cn_try = wd_context->get_child_node( name = wd_this->wdctx_cn_try ).
do 5 times.
clear ls_cn_try.
append ls_cn_try to ls_cn_try1.
lo_nd_cn_try->bind_table( ls_cn_try1 ).
enddo.
hi,
Replace cn_try with zhead in the below lines :
DATA ls_cn_try TYPE wd_this->element_cn_try.
DATA ls_cn_try1 TYPE wd_this->elements_cn_try.
lo_nd_cn_try = wd_context->get_child_node( name = wd_this->wdctx_cn_try ).
Use :
DATA ls_cn_try TYPE wd_this->element_zhead.
DATA ls_cn_try1 TYPE wd_this->elements_zhead.
lo_nd_cn_try = wd_context->get_child_node( name = wd_this->wdctx_zhead).
It will work.
hi,
this coding has worked .
DATA: lt_sflight TYPE if_main=>elements_zhead,
wa_sflight TYPE if_main=>element_zhead,
lv TYPE REF TO if_wd_context_node.
DO 14 TIMES.
APPEND wa_sflight TO lt_sflight.
ENDDO.
lv = wd_context->get_child_node( name = 'ZHEAD' ).
lv->bind_table( new_items = lt_sflight ).
Thx
sw+++
Edited by: spielwiese on Apr 24, 2009 4:14 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mago I have created a Table UI Element and binded it to the Context Node
but the problem is the table is not editable I cant insert data in it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
write this code to make table Editable :
DATA lo_nd_cn_try TYPE REF TO if_wd_context_node.
DATA lo_el_cn_try TYPE REF TO if_wd_context_element.
DATA ls_cn_try TYPE wd_this->element_cn_try. <cn_try is my node name here >
DATA ls_cn_try1 TYPE wd_this->elements_cn_try.
navigate from <CONTEXT> to <CN_TRY> via lead selection
lo_nd_cn_try = wd_context->get_child_node( name = wd_this->wdctx_cn_try ).
do 5 times.
clear ls_cn_try.
append ls_cn_try to ls_cn_try1.
lo_nd_cn_try->bind_table( ls_cn_try1 ).
enddo.
Do take Input Field inside the Table Column not textView.
Thanx.
Edited by: Saurav Mago on Apr 24, 2009 6:34 PM
Hi Mago
I have one question before I a m closing this thread.
In order to insert data I can set the properties at cell editor.
Which settings are there needed to insert data into the cells
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Your Q is not that much clear.
You want to insert data into your Table UI Element ?
If that is the case , you dont have to do any settings. Just write the code :
1. Fetch desired data into an internal table.
2. bind the internal table to the context Node. ( Context Node is binded to Table UI element).
You can write the below mentioned code in WDDoinit() :
Data : it_table type STANDARD TABLE OF sflight.
DATA lo_nd_for_table TYPE REF TO if_wd_context_node.
DATA lo_el_for_table TYPE REF TO if_wd_context_element.
DATA ls_for_table TYPE wd_this->element_for_table. < For_table is my Context Node which is binded to Table UI >
navigate from <CONTEXT> to <FOR_TABLE> via lead selection
lo_nd_for_table = wd_context->get_child_node( name = wd_this->wdctx_for_table ).
<here I am fetching carrid connid fldate from Standard table Sflight and putting it in Internal Table>
select carrid connid fldate from sflight into CORRESPONDING FIELDS OF TABLE it_table.
<Finally , I am binding whatever data is there in internal table to the Node>
lo_nd_for_table->bind_table( it_table ).
I hope it is clear.
Thanx.
Edited by: Saurav Mago on Apr 24, 2009 5:37 PM
hi mago i am trying to fill a DDIC table through table UI in WD
do you have an example to do that
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To fill the DDIC table from UI table, just get the data (present in the table UI) in an internal table and after that use ABAP insert/append/modify statement to fill the data in the database table.
To get the data in the internal table, simply read the node (that is binded to the table UI) with the help of code wizard (ctrl+ F7).
Regards
Arjun
Hi,
Once you have data in your table UI in WD, you can use the following code to update your DDIC table.
Data: l_node type ref to if_wd_context_node.
l_node = wd_context->get_child_node( 'Node Name' ). " Node bound to your table control
* get the contents of the table
l_node->get_static_attributes_table( table = lt_table ) .
Now lt_table will have the contents of your WD table control, use this to fill/update your DDIC table using modify/insert statements.
Hope this helps.
Hi,
Create Structure of type context node and then create internal table and work area of type context node
and after that create internal table and work area of type DDIC.
Then Put a loop on itab of type DDIC and keep transfering values from work area of Context node type to work area of DDIC typpe.
and keep appending values of work area to itab ot type DDIC.
then finally bind the itab of type DDIC with table using following code.
* Binding the internal table to node
lo_nd_cn_current->bind_table( itab_currentdetails ).
I hope it helps.
Regards,
Rohit
hi,
-> I hope you have the data in your Table UI Element.
-> If not , you can insert data inside the table by using Supply Funciton for the Nodes or by having the logic in Wd do init.
-> After that , you have to put this data in DDIC table.
->Create a button and on Action of button.
->In On Action Just read the Table data inside your Node by using Code Wizard(control + F7).
-> Finally Put the data inside your DDIC Table using Simple ABAP statement. (append/insert)
Once you have data in Table UI element , use below mentioned code :
DATA lo_nd_n2 TYPE REF TO if_wd_context_node.
DATA lo_el_n2 TYPE REF TO if_wd_context_element.
DATA ls_n2 TYPE wd_this->element_n2.
DATA IT_N2 TYPE STANDARD TABLE OF /BI0/PCS_UNIT.
navigate from <CONTEXT> to <N2> via lead selection
lo_nd_n2 = wd_context->get_child_node( name = wd_this->wdctx_n2 ).
get element via lead selection
lo_el_n2 = lo_nd_n2->get_element( ).
get all declared attributes
lo_el_n2->get_static_attributes(
IMPORTING
static_attributes = ls_n2 ).
CALL METHOD LO_ND_N2->GET_STATIC_ATTRIBUTES_TABLE
IMPORTING
TABLE = IT_N2.
MODIFY /BI0/PCS_UNIT from table IT_N2.
Thanx.
Edited by: Saurav Mago on Apr 24, 2009 4:52 PM
hi,
You are talking in ABAP terms about Table control.
In WD ABAP , there is Table only in which we are able to see the content. So you can work with Table UI element to see or populate data.
Thanx.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
sorry i am speaking about table control element as like sap dynpro and not of a table
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes
the table control exist in wd also.
Best regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
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.