cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance standard webdynpro

Former Member
0 Kudos

Dear friends:

   With the help of some folks in this thread I had been able to adapt the webdynpro HRECM00_PLANNING_UI to suit my requirement, at least so far. Now I have to modify (disable and change the name) of a couple of buttons that are located in the upper part of the webdynpro (save draft and display progress):

I tried to access them from webdynpro HRECM00_PLANNING_UI but it looks like they are part of the webdynpro FPM_GAF_COMPONENT (based on the technical help that I get from one of the buttons) so the windows of WB HRECM00_PLANNING_UI do not have access to them:

I think I could enhance directly class FPM_GAF_COMPONENT but I'm not sure if that would affect also other webdypros that also inherit from this component?

Any help will be greatly appreciated,

Thanks in advance,

Federico.

Accepted Solutions (1)

Accepted Solutions (1)

former_member197475
Active Contributor
0 Kudos

Hi Federico,

Please follow the below steps to configure/change the button/UI properties.

1. Go to package - PAOC_ECM_ADM_PLANNING_UI.

2. Go to FPM Floorplan Configuration - ECM_AC_PLANNING_UI_GAF, now click on Start Configurator - Display Configuration.

3. You will get the new window and go to Additional Functoins - Enhance. Give your enhancement name and save it in your package.

4. In your newly enhanced screen select the second road map step and click on the buttons that you want to customize to your need. You will get the below properties and you can do your required changes.

or else

1. Go to FPM Application Configuration from package.

2. From the Tool bar, select Web Dynpro Configuration->Test->Execute in Administaration Mode. You will get a new window.

3. Right click on the button you want to make change and select Settings for Current Configuration.

4. Make the  required changes and save it in a TR.

Hope you are clear now:)

BR,

RAM.

Answers (2)

Answers (2)

Former Member
0 Kudos

Samuli / Ramakrishnan:

    Thank you so much for taking the time to help me out with this! I was able to achieve my req. with both your recommendations. I wish I could hug you both !!

Thank you once again fellas!!

Former Member
0 Kudos

You can configure the Floorplan Manager toolbar in the same way you can for the content areas. However usually the visibility of buttons and whether they are enabled or not is configured during runtime so you may need to also enhance code too. Pinging the space so that others can chip in as well.

Former Member
0 Kudos

Thank you Samuli! I tried to use the following code within one of the views of HRECM00_PLANNING_UI with no luck:

  data lr_lbl type ref to cl_wd_toolbar_button.

  lr_lbl ?= view->get_element( ID = '_CFG_BUTTON_8' ).

  IF  lr_lbl IS NOT INITIAL.

    lr_lbl->set_enabled( EXPORTING VALUE = abap_false ).

  endif.

Former Member
0 Kudos

In case of Web Dynpro component HRECM00_PLANNING_UI, the buttons are set by method FPM_SETUP_APPLICATION of the Component Controller. See the attached screenshot for the relevant Toolbar configuration.

Former Member
0 Kudos

Thank you Samuli!

    I accessed the configuration component but I was not able to modify it, looks like it is a SAP component.

    I was able to overwrite the method you told me and add the new text directly in the dfine_button method:

  lo_cnr_gaf->define_button(

    EXPORTING

      iv_mainstep_id    = 'GAF_STEP_PLANNING'

      iv_element_id     = 'FPM_BTN_SAVE'

      iv_function       = if_fpm_constants=>gc_button-other_function

      iv_enabled        = abap_true

      iv_visibility     = lv_save_visibility

********FM add new text

      iv_text = 'Save Recommendations'

****************

   However, I have not been able to disable the button display progress, I could not find this button in any other method (by the way, how do you do it to search globally within all methods of COMPONENTCONTROLLER?)

Thank you once again!

Former Member
0 Kudos

You have to make a copy of the SAP configurations (Application Configuration, Component Configuration) and refer the custom Application Configuration in either URL parameters or Launchpad, etc. I guess the button Display Progress is always displayed, simply disable it:


data lo_fpm     type ref to if_fpm.

data lo_cnr_gaf type ref to if_fpm_cnr_gaf.

lo_fpm = cl_fpm_factory=>get_instance( ).

lo_cnr_gaf ?= lo_fpm->get_service( cl_fpm_service_manager=>gc_key_cnr_gaf ).

lo_cnr_gaf->define_button(

  exporting

    iv_mainstep_id = 'GAF_STEP_PLANNING'

    iv_element_id = 'FPM_BTN_PROGRESS'

    iv_function   = if_fpm_constants=>gc_button-other_function

    iv_enabled    = abap_false

).

Former Member
0 Kudos

Dear Samuli: Thank you so much for taking the time to help me!

I tried your code in method FPM_SETUP_APPLICATION, but nothing changed in the webdynpro when I tried the service. I checked again the configuration application and that button does not have anything assigned in the field "element ID", could it be the reason why I can not reference it using iv_element_id?

It is not a big issue though, with the change of the text of the other button I'm more than done

Thanks again !

Former Member
0 Kudos

The configuration is per roadmap step so unless you want to create a custom config, you will probably have to enhance method WDDOMODIFYVIEW of view V_PLANNING to disable the button.