cancel
Showing results for 
Search instead for 
Did you mean: 

webdynpro with abap

Former Member
0 Kudos

Hi All,

How to pass local parameters between views in webdynpro abap ?.....plz help me..

Edited by: charan143 on Nov 11, 2011 5:53 AM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Charan,

Declare the variable in the attribute tab of component controller.

The instance of component controller will be automatically created in the attribute tab of view.(WD_COMP_CONTROLLER type ref to IG_COMPONENTCONTROLLER). We cal access the varibale declared in the compoennt controller by

loc_variable = WD_COMP_CONTROLLER->varible_name.

If we are declaring any variable in component controller, it will be avalable in all views. So this is the best method to pass varibale values in between views.

Regards,

Simi A M.

Former Member
0 Kudos

HI ,

If you want to pass parameters between two views in one component follow below steps :

1) In the Outbound plugs tab of first view enter the parameter names & associated types.

2) In the ONACTION***** method pass those parameters with in the WD_THIS->FIRE_MAIN_OUT1_PLG ( ) method .

eg: WD_THIS->FIRE_MAIN_OUT1_PLG( PKUNNR = LV_KUNNR ).

3) In the Inbound event handler method of the second view mention same parameters

( Mentioned in the outbound plug parameters )

4) use those parameters in that second view directly.

0 Kudos

In Componenet controller, attributes tab declare a variable.

Assign this varible the value from view A. Fetch this variable from component controller in View B .

Use the below code for assignment:

Let gv_x be the variable declared in attribute tab of component controller

View A (Method):

DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .

lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).

lo_componentcontroller->gv_x = 'X'.

View B:

DATA: lo_componentcontroller TYPE REF TO ig_componentcontroller,

Y TYPE string.

lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).

Y = lo_componentcontroller->gv_x .

ChandraMahajan
Active Contributor
0 Kudos

Hi,

Welcome to SDN !

for your question, refer http://wiki.sdn.sap.com/wiki/display/WDABAP/PassingLocalParametersbetweenviewsinanABAPWebDynproApplication and http://help.sap.com/saphelp_nw04s/helpdata/en/35/447741b0d6157de10000000a155106/content.htm

Thanks,

Chandra