cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass value from first screen to second screen

Former Member
0 Kudos

Hai,

How to pass value from first screen to second screen

Example:

***********

In first screen i have employee number, in second screen i should display employee detail based on which employee number i gave in first screen. How i can pass the employee number from first screen to second screen. If anybody know help me

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hai,

In first screen i have employee id, in second screen employe id and employe name is there, how i can assign conmponenet controller to first screen node and second second screen node. Because in first screen i have only one field and second screen i have empid and empname

Former Member
0 Kudos

Hi Udaya kumar Subramaniyan ,

create a node employee in component controller, then add 2 attributes emp_no and emp_name.

then in vew 1 goto context .. drag drop the node employee from comp controller to view 1's context.

do the same in view 2 also.

then in view 1 ..bind the input field employee number to attribute emp_no.

now in view 2.. just read the attribute emp_no using code wizard..

you can bind emp_name to any ui in view 2, so that after getting the name based on number. it can be displayed

Thats all..

Regards

Sarath

Former Member
0 Kudos

Hi,

Some of the tutorials for the ABAP WebDynPro

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02e1fa45-0801-0010-10a0-f1c...

for your question ,

1. you should have two views and a Node in the Component controller

2. In the first view you should bind the Component controller node attribute Employee ID.

3. In the second view also u should bind the Employee id attribute and get the value from that and process the employee id.

4. Display the employee Details in the Second view.

all the business Logic please write in the component conntroller.

the Data will pass like this

FirstView Context --> Component controller Context --> Second view Context.

here Component controller context is Global and can be visible to both the views.

Reward if usefull.

Regards,

Ravi.

Former Member
0 Kudos

hi uday,

one way is to make the employ number global(map it to the context of the component controller)

by doing so we can access that element from second screen, prior to that map that element to your

second screen context.

second way is when u r firing the plug to the second screen u can pass employ number as an imoprting

parameter for the inbound plug of second screen(which willl have a method which is implicitly created )

Former Member
0 Kudos

Hi Udaya kumar Subramaniyan ,

Map the node that is binded to the employee number input field to the second view also. so after binding just read the attribute that corresponds to the employee number.

if u have created the node in the first view itself, delete that and create a new node that contain an attribute employee number, then map the node to both views, and bind that attribute to emp_no input field of fist view, once this is done, then just read that attribute using code wizard in your second view, you will get the value entered in first view.

Regards

Sarath

Edited by: Sarath Satheesan on Jan 8, 2008 7:40 AM