Skip to Content
avatar image
Former Member

How to get attribute values from one view to another

HI all,

Thx in Advance..

I have 2 view like v1,v2.In v1 i used one attribute values from "get single attribute" method.And i need the same values in v2 screen.For this i did in v1 outbound plugs , i mentioned the parameter name . How can i get the same values in v2.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jun 23, 2010 at 01:33 PM

    Hi chandru ,

    you said you declare the parameters in the Outbound Plug of V1. now go to view V2 inbound plug Tab and creat one inbound plug

    double click on the plug name .it will navigate you to the event handeler method . Now add the outbound parameter variables in the

    parameters

    For example : V1firing the navigation plug 
    a type string " defined in parameter 
      wd_this->fire_out_to_view2_plg(
        a =      'ABCD'                           " string
      ).
    
    you can retrive the value freely in v2 inbound event handeler 
    
    a type string " defined in parameter 
    
    *   set single attribute
        lo_el_context->set_attribute(
          name =  `TEXT`
          value =  a )." here you will get the 'ABCD'.

    regards

    Chinnaiya P

    Edited by: chinnaiya pandiyan on Jun 23, 2010 7:12 PM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 24, 2010 at 04:37 AM

    Hi - Chandramohan250 , Chinnaiya P answer is correct also do not forget to create the link between the plugs at the window level by draging outbound plug into inbound plug "drag n drop".

    But if you have both view in the same component (V1, V2 under 1 WDC) then you can easily create an attribute at the componentcontroller make that attribute public and in V1 you do:

    wd_comp_controler->GA_YOUR_GLOBAL_ATTRIBUTE_NAME = 'ABCD".

    and in V2 you do:

    lv_my_value_from_GA = wd_comp_controler->GA_YOUR_GLOBAL_ATTRIBUTE_NAME.

    thanks!

    Jason PV

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 24, 2010 at 10:00 AM

    Hi Chandramohan,

    I doubt if passing data through navigation plug is the efficient way,

    You could always maintain a parameter in attribute tab or as a attribute under context in one view and refer it thorugh another view.

    Regards

    Anurag Chopra

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 25, 2010 at 08:37 AM

    Way1

    Component controller has the same node with attribute of the view1. Now context binding to View1 component controller and view2. So now whenever you change the attribute in view1 it will reflect to view2 also.

    Way2.

    Create an parameter in the outbound plug of the view1. Now when fire the outbound plug of view1 to navigate to view2. pass the parameter vale with the attribute value.

    Now in view2 get the value forms the inbound plug parameter.

    Add comment
    10|10000 characters needed characters exceeded