cancel
Showing results for 
Search instead for 
Did you mean: 

How to call different Main Page in one Application

Former Member
0 Kudos

Hi Guys,

How to call different Main Page depending on the data?

Ex:

If the user is under Personnel Area 1, Main Page 1 will be displayed to their screen.

If the user is under Personnel Area 2, Main Page 2 will be displayed to their screen.


It's like having a dynamic screen.

Main Page 1 is an editable GUIBB Form.

Main Page 2 is a PDF display.

How to do it?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try below code.

DATA lo_event               TYPE REF TO cl_fpm_event.

   

lo_event ?= cl_fpm_event=>create_by_id( 'FPM_CHANGE_CONTENT_AREA' ).

    lo_event
->mo_event_data->set_value(

           
EXPORTING

              iv_key  
= 'TARGET_CONTENT_AREA'

              iv_value
= 'PAGE_2'

                  
).

    cl_fpm
=>get_instance( )->raise_event( lo_event ).

Hope this helps you.

Thanks

KH

Former Member
0 Kudos

Hello Navi,

You can achieve this using the configuration exit. For example, if your working with OVP floor plan implement the following interface in a separate class and respective method.

Interface name: IF_FPM_OVP_CONF_EXIT

Method: OVERRIDE_EVENT_OVP

In this method, based on your personnel area you can call the required page under FPM_START event.

Sample Code:

constants: lc_main_page_1  type  string  value  'PAGE_1',

                 lc_main_page_2  type  string  value  'PAGE_2'.

data: ls_pers_area type xxxx.(workarea)

case lo_event->mv_event_id.

     when cl_fpm_event=>gc_event_start.

       if  ls_pers_area EQ '1'.

                  lv_page_id = lc_main_page_1.

    

       elseif ls_pers_area EQ '2'.

            lv_page_id = lc_main_page_2.

      endif.

endcase.

After this goto your component configuration main screen, follow the below steps.

Goto general settings --> select floorplan settings (button choice option) --> select the Application controller settings (will get a pop up with application specific parameters) --> provide the ovp_exit class name ( Which is created at initial level).

Hope this will helps you.

Regards,

Naga