cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a value b/w windows??

Former Member
0 Kudos

Hi

Can any one pls tell me how to pass the values from views of 1 window to view to another window.

I am calling a view for a window from view of another window,but need to do some validation on calling view based on the values from the called view,i m currenlty doing it by export/import,but in few cases the validation fails,so need to pass the values & keeps the memory of current views,untill all the validations are done.

pls tell me how to do this?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Check this Link: [Suspend/Resume Plugs|https://cw.sdn.sap.com/cw/servlet/JiveServlet/previewBody/117568-102-1-214781/How%20to%20navigate%20from%20one%20Web%20Dynpro%20Application%20to%20another%20Application%20and%20resume%20back%20the%20same%20Application%20in%20same%20browser.pdf] for Navigating from one application to another application, and you can pass parameters by adding them in the URL u are passing at the time of firing the PLUG.

the Internal table should of type :-

**-- Wa and Internal Table to pass parameters through URL

DATA it_parameters TYPE tihttpnvp.

DATA ls_parameters LIKE LINE OF it_parameters.*

Append the Parameters you want to pass in this parameter Table and while constructing URL to be called, pass this table to add them in the current url.

Thanks & Regards

Ankur Upadhyay

Former Member
0 Kudos

Hi Vipin ,

In case u want to read the attribute value of one view into another view , u can declare that attribute in ur component controller .

Attributes created in this way are global and can be accessed in any view of ur web dynpro ABAP component.

for creatting a global attribute , u need to follow these basic and simple steps :

1. In the attribute tab of ur component controller , create an attribute .

THe attribute can be of any type , it may be a string , a NUM type or anything , depending on ur requirement .

2 Check on the checkbox Public , the attributes created wud be accessed thn in several views .

3 Now u can access this attribute in any of ur view , using WD_COMP_CONTROLLER

eg I create an attribute of type NUM ,


wd_comp_Controller->gv = '00'

I hope it wud help

regards,

amit

Former Member
0 Kudos

Hi

I am working to pass the value of 1 window's view to another window's view.

but not able to understand how to retrieve the value in another view.

one more thing,my second view is in a different webdynpro application,no tin same application.

I am trying to pass the value b/w two diff applications.

Former Member
0 Kudos

u simply set the value in one view and get it into ur another view

Former Member
0 Kudos

Hi amit

i am able to set the value in 1 view,but not able to get the value in another view,as this view is in another separate application.

r u clear with my req now.

Former Member
0 Kudos

ok ..

Former Member
0 Kudos

Hi Vipin,

For working with more than one application , you have to use the concept of Assistance Classes.

1. Make an Assistance Class.

2. Use the same Assistance Class in both the component.

3. Make an Attribute of Assitance Class and set its value in View1 of first Application using :

wd_assist->Att1 = '<Value to be set'>

4. Now you can read this attribute's value in your View2 which is in another application.

To call the Attribute/method use the instance wd_assist.

Refer Online Help for Assitance Class :

http://help.sap.com/saphelp_nw70/helpdata/EN/43/1f6442a3d9e72ce10000000a1550b0/frameset.htm

Refer the Standard Component to know more on Assitance Classes : DEMO_COMMON_ASSISTANCE1

Edited by: Saurav Mago on Oct 12, 2009 10:47 AM

Former Member
0 Kudos

did you try putting the values in component controller and thus reading the same in other window's view.

Former Member
0 Kudos

Hi

I was trying to read the value of a attr of the context of 1 view,in another view,but how to do this.

I had made a attr in the context of a view,set it acc to my req,but no wno table to understand how to read it in the view of another window.

is there any way to do this.

pls let me know.

Former Member
0 Kudos

HI,

Attributes created in one view cannot be accessed in another view.

In order to read the attrbute in other view use Component controller :

1. Declare an Attribute of type String in Attributes TAB of Component Controller.

2. Set the value of this Attribute (Att1) in View 1 using :

wd_comp_controller->Att1 = <Value to be set>

3. Now you can read this attribute in other View say View 2 using :

data str type string.

str = wd_comp_controller->Att1.

This way you can read the Attribute's Value of Component Controller. Str has value which you have set in View1.

Note : USe component controller in case you are having more than 1 view and have to pass values from one view to another.

Component controller is accessible in all the view of a component.