cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get the context value from B OR C? Do you give a way?

Former Member
0 Kudos

Hi, All,

(I use the webdynpro for abap.)

Three component:A,B,C.

A is a component for logon page.

B is one component for the main page.

C is one component for the error page.

ACTION:

Component A has a context node that have 3 attribute: userid, password, and language. These attributes bind UI elements --- inputText each other.(Thus, when a customer logon the A page, he type userid, password and language. If correctly, then go to the B page that have "welcome, XXX" (XXX is the userid). If not, then go to the C page that have "sorry, XXX" (XXX is the userid). Thus, I have to transfer the userid, password, and language to component B and C.

That is,

I want to transfer the context node value of component A to the context node of component B or C which would use the value.

I try to transfer the context node value through context mapping -


embed A to component B or C, and create mapping the context node between A and B or C, but I don't get value from B or C.

How can I get the value of userid, password or language from B or C?

Do you give a way? Thanks a million.

How can I get the context value from B OR C?

Best regards,

tao

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sachi,

Thanks a lot for the helpful hint you gave.

I defined an outbound plug for a view in component A, and then I also defined a parameter for the plug. Secondly I defined an inbound plug for the window in component B and also defined the parameter in the parameter list. I think I can get the parameter value in Handledefault method. But I did not know how to pass the parameter value to the attribute of context in view of component B. Thanks a lot for your patient help!

Best regards,

Tao

former_member758419
Active Participant
0 Kudos

Hi Tao,

Reward all helpful answers, by clicking those little stars on the lefthand side

Cheers,

Former Member
0 Kudos

Hi, Sachidanand B,

We have resolve the problem. Thanks a lot.

My MSN is : wwangt_92@hotmail.com. Hope you insert my MSN to your MSN. I will very nice to meet you.

Best regards,

tao

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi, Sascha Dingeldey ,

Thanks a lot for Your kind information.

For the architect of the our application, we really need 3 components. I can define some methods as interface methods, and define component usages of B and C in component A. But I have no idea on how to get value from the methods. Counld you please give me some sample codes for it? Thanks in advance.

Best regards,

wang tao

former_member758419
Active Participant
0 Kudos

Hi,

Here is an example on how to pass parameters using Url of the webdynpro application,

http://appln.server.com:8000/sap/bc/webdynpro/sap/zexampleappln?sap-client=001&userid='111'&password='pass'&language='en'

You can catch these parameters in the default inbound plug of the webdynpro component.

For that u goto Handledefault method of the Window, and declare these parameters as the importing.

ex. userid Importing String.

Regards,

Sachi

Former Member
0 Kudos

Hi, Koen Labie,

Thanks a lot for Your kind information.

For the way of doing the navigation with outbound/inbound plugs and defining them as parameters, I have tried. But I don't know how to get value from the inbound plug methods. Counld you please give me some sample codes for it? Thanks in advance.

Best regards,

wang tao

Former Member
0 Kudos

Hi Tao.

First of all i do not think it is necessary to have three components to handle a login

process. You can use 3 views in one login component to do it.

But if you really need 3 components you can do it with parameters as already said

or you can define methods in the component controller of B and C to set the needed values. If you define this methods as interface methods you can define component usages of B and C in a and then use the wizzard to call these methods in the used controllers.

Another way would be do reverse mapping but this would be kind of strange in your case.

Hope this helps.

Cheers,

Sascha

Former Member
0 Kudos

Hi,

If you do the navigation with outbound/inboundplugs, you can define them as parameters,

so you can get them out of the context, into the plug and process them at your destination in de dohandle'plugname' method.

grtz

Koen