on 09-20-2008 11:56 AM
HI all,
I want to get the details from popup window.
i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
now i am able to display popup window with values.How to get the values from popup window now.
I can anybody explain me clearly.
Thanks&Regards
kranthi
Hi Kranthi,
Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://saptechnical.com/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
CK,
write a method onselect of the table in the popup view.
write the below code to get the values of the selected row in the table
DATA lr_element TYPE REF TO if_wd_context_element.
DATA lv_user_id TYPE STRING.
lr_element = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
lr_element->get_attribute(
EXPORTING
name = 'USER_ID` " Attribute Name in the Table
IMPORTING
value = lv_user_id ).
take the lv_user_id and bind it to an attribute and use that in your main view.
repeat the same process for all the fields
Thanks
Bala Duvvuri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kumar
Well its very easy and depends on how ur creating the windows
lets say u have created the pop up window by creating a new window and embeding the view inside tht and finally u r calling that window.
Now in that view as u said u have a table displaying some values.And u have selected some rows in that so u just need to get those selected values and close the current window and finally bind those values to componenet controller context
which would be mapped with your first views context
if any doubt ask
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
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.