Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
yesrajkumar
Active Participant

In general, all the component configurations that we create for the Webdynpro components, we tend to assign it statically using component configuration in the application configurator of the Floor Plan Manager(FPM).

 

I was thinking how to make dynamic assignment of such configurations. This blog will explain you how to make dynamic  assignment of component configurations.

 

I have created a sample Webdynpro component using the flight information for the above scenario. The application will display different Webdynpro view based on the system user name.

 

I have created two Webdynpro component configurations for the Webdynpro component ZFLIGHT_LIST.

 

 

 

In the Component configuration ZFLIGHT_LIST_ONE, I have removed the search button. In ZFLIGHT_LIST_TWO, I removed the department city label and input box.

 

 

Every time  when I used the Object instance floor plan, I always made the static assignment as shown below.

  

 

 

I removed the static assignment of the component configurations in FPM and used the below logic to dynamically assign the component configurations based on the system user name.

 

 

DATA:  lo_api_controller       TYPE REF TO if_wd_component,
          lo_pers_manager      TYPE REF TO if_wd_personalization,
          ls_config_key           TYPE wdy_config_key.

           lo_api_controller = wd_comp_controller->wd_get_api( ).

           lo_pers_manager = lo_api_controller->get_personalization_manager( ).

        IF sy-uname EQ 'USER1'.

                 ls_config_key-config_id = 'ZFLIGHT_LIST_ONE' .
                 lo_pers_manager->load_config_by_key( ls_config_key ).
        ELSE.
                 ls_config_key-config_id = 'ZFLIGHT_LIST_TWO' .
                 lo_pers_manager->load_config_by_key( ls_config_key ).
        ENDIF.

 

 

 After dynamic assignment for USER1,

 

 

 

 

 

After dynamic assignment for USER2, 

 

 

 

 Regards,

 S.Rajkumar . 

9 Comments
Labels in this area