on 09-13-2007 2:18 PM
I had created a table with input fields in webdynpro.I am not able to enter data into it while testing.Can anyone help me out?
thanks n regards
Hi,
Create table columns with input filelds.Then add the following code in doinit method,
IPrivateAView.ITableNode tnode =wdContext.nodeTable();
IPrivateAView.ITableElement tele=tnode.createTableElement();
tele.setT1("");
tele.setT2("");
tnode.addElement(tele);
(It just to set the inputfield editable).
Or u can set the bapi values through JCO or JCA.
Regards
Nandha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
<b>Create the Table Node:</b>
IPrivateAView.ITableNode tnode =wdContext.nodeTable();
<b>And create the Element For table Node(Which is bind with ur Table):</b>
IPrivateAView.ITableElement tele=tnode.createTableElement();
<b>Add the Values for The Table Element(Bapi values or empty values):</b>
tele.setT1("");
tele.setT2("");
<b>Add the Elements to the Table Node:</b>
tnode.addElement(tele);
Regards
Nandha
hi Suju,
create a button named 'Insert Row' and attach an event handler to it.
suppose your table UI element is binded to the node SFLIGHT.
then do the following code within your event handler:-
DATA:
node_sflight TYPE REF TO if_wd_context_node,
itab TYPE STANDARD TABLE OF sflight.
navigate from <CONTEXT> to <SFLIGHT> via lead selection
node_sflight = wd_context->get_child_node( name = wd_this->wdctx_sflight ).
node_sflight->get_static_attributes_table( IMPORTING table = itab ).
INSERT INITIAL LINE INTO TABLE itab.
node_table->bind_table( itab ).
Now whenever u click on the button 'Insert Row', one blank row will be inserted into the table and u can put value there if the cell editor is input field.
hope this will solve your problem.
Regards,
Subhasis.
<b>Reward points if helpful</b>.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi suju..........
first of all you have to insert an empty row into the table ( ie without now values ) . you can also do it in wddoinit method. once you insert that empty row....... the user will be able to enter records into that row....... incase if you nedd more such rows...... insert as much empty records..... it will work.
---regards,
alex b justin
Hello ,
To input the data in the table you haeto enter the initail values in the node.For this purpose.In the node of the component controller define a supply function. Fill tree.
And add the following code.the table will come in editable mode.
data:
stru_node2 type if_componentcontroller=>element_<name of node>,
table_struct type table of if_componentcontroller=>element_<name of node>.
** @TODO compute values
** e.g. call a data providing FuBa
stru_node2-ematn = ''. " sample only !
stru_node2-menge = ''. " sample only !
stru_node2-netpr = ''. " sample only !
stru_node2-werks = ''. " sample only !
stru_node2-ebelp = ''. " sample only !
stru_node2-tx_cd = ''. " sample only !
stru_node2-it_cat = ''. " sample only !
append stru_node2 to table_struct.
append stru_node2 to table_struct.
append stru_node2 to table_struct.
append stru_node2 to table_struct.
append stru_node2 to table_struct.
append stru_node2 to table_struct.
** bind a single element
node->bind_elements(
new_items = table_struct
* set_initial_elements = abap_true
* index = index
).
Hope this solve your problem.
Assign points for helpful answers.
Regards
Aashish Garg
hi suju.........
unless there are any values in the node to which this table is bound.... the table will be in display mode.... so create an empty record.... then you will be able yo enter values in the table......
-
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.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.