on 11-12-2009 5:33 AM
Dear Experts,
Im using a view container ui element in a view(view1) to show another view(view2).
My problem is i placed a save button in view1 and table UI , input fields is displayed in view2,
when i give inputs and save, the data is stored in database sucessfully, what i want to do is to show the data in table UI which is given by the user, after hitting the save button.
any suggestions regarding this?
thanks in advance
Arun.P
Hi Arun ,
try to change the Lifetime of view1 and view2 into when visible instead of framework controlled under views property
rgds,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I feel this can be achieved using outbound and inbound plugs between both the views.
Kedar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
What is the problem you are getting in this ?
1. Make an context node and put the attributes in it.
2. In layout, make in Table UI. Bind this table UI with Context node.
3. On the click of button, get the data in an internal table.
4. Bind the internal table with the Table UI.
select * from sflight into table itab.
DATA lo_nd_n2 TYPE REF TO if_wd_context_node.
lo_nd_n2 = wd_context->get_child_node( name = wd_this->wdctx_n2 ).
lo_nd_n2->bind_table( itab ).
n2 is my node created and binded with Table UI.
To get the values entered in Input field of View2 , map the attributes binded to Input field with component controller.
Now from comp controller, you can read the values of input field in View 1 also.
Edited by: Saurav Mago on Nov 12, 2009 11:11 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saurav
I already done what you have said, the data entered by the user is coming to internal table and passed into the node,
when the user presses save button every thing is working fine but the data is not showed in the table UI element.
when i refresh the page the data is shown in the table UI.
What im trying to do is after entering the data and press the save button the data must be shown in table UI.
Regards
Arun.P
Edited by: Arun Padmanaban on Nov 12, 2009 9:31 AM
Just before binding your node with new internal table values, invalidate first and then bind.
lo_nd->invalidate( ).
lo_nd->bind_table( itab ).
Also check before binding that you have reocrds in itab or not .
This should work. If not , plz paste your code here what you have written in OnAction of button.
Hi,
when i give inputs and save, the data is stored in database sucessfully, what i want to do is to show the data in table UI which is given by the user, after hitting the save button.
since the data is saved succesfully in DB read the values again from DB and bind it back to the table again.
Priya
Hi Saurav
Even though i invalidate and append the itab values, the data is not shown in table IU element, i also tried by putting the code in domodify method still it is not working,
i want to know that any other way is there to show the values to table
Hi Priya
if i do the same application ie. table ui element, inputbox and save button in a single view it is working fine for me.
but for my requirement is to show the table and inputfield in one view and save button in another view,
im showing the table and inputfields(view2) through view container ui element in view1
and doing the operations but it is not woking.
Regards
Arun.P
Hi,
You can do in the following way:
1.Create a attribute in comp controller (Attributes Tab) .
2.on action of save fill this attribute.
select * from Z_table into corresponding fields of table wd_comp_controller->table.
3.in the second view bind the table to this attibute.
call METHOD lo_nd_sap_prj_experience->bind_table(
new_items = wd_comp_controller->table).
Priya
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.