on 01-25-2008 9:09 AM
Hi,
I have created one table. How can i get the datas from kna1 table into table control. can you pls explain this with example?
Also you need initialize the data source in the method WDDOINIT of the view, please find sample codes as following:
method WDDOINIT .
data declaration
data:
Node_KNA1 type REF TO IF_WD_CONTEXT_NODE,
Itab_KNA1 type standard table of KNA1.
get data from table KNA1
select * from KNA1 into table Itab_KNA1.
navigate from <CONTEXT> to <KNA1> via lead selection
*KNA1_NODE is your defined node in the context of view mapped to one of component.
Node_KNA1 = wd_Context->get_Child_Node( Name = `KNA1_NODE` ).
bind internal table to context node <KNA1>
Node_KNA1->Bind_Table( Itab_KNA1 ).
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi shyja..........
create a node woth some attributes that hold the values of the fields of kna1 and give the cardinality as 0...n. bind this node to the table..... at wddoinit or in any method according to your logic..... select the values of kna1 into an internal table and bind it to this node using the method bind_table.
you can also make use of supply function...
check this link:
[link|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7a89b067-0801-0010-8192-a9896a60938e ]
---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 Shyja ,
you can do like this
1. In component controller create a node say tab_kna1, give dictianary structure name as kna1.
2. right clik the node -> create from container- select the attributes(fields you want)
3. save and activate comp controller
4.map the node tab_kna1 to your required view
5. then on the table control in the view -> onlayuout-> tablectrl prperties-> create binding -> map to the node tab_kna1
6. now it will display you all the attributes in the node as fields in tbctrl.
7. now in wddo init or in the method you want to populate tbctrl
create an itab of type kna1.
select your record to this itab.
using wizard or manual coding get focus to the node tab_kna1.
bind the itab to the node.
thats all
Regards
Sarath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
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.