on 09-17-2013 8:57 PM
Hi all,
We are working with the Compensation Planning iView that is part of MSS. We would like to hide the Print Version and Export buttons that show up. I have read numerous posts on how to hide them, but that is if you are coding. Since this is a standard delivered WD ABAP, we only want to hide the buttons for this application. We have looked in multiple places, but have not had any luck in figuring out where we need to do this.
Anyone else out there have this problem and have been able to figure it out?
Thanks,
Kevin
Hi Kevin,
I believe you are working on WD Comp 'HRECM00_PLANNING_UI'.
This component is based on OADP.
For disabling the buttons you can do the following:
Implement Post-Exit in Comp controller for method 'OADP_PLNG_CONFIGURE'.
and write the below code:
wd_this->go_oadp_plng_ui_settings->set_datatable_print_on( print_on = abap_false ).
wd_this->go_oadp_plng_ui_settings->set_datatable_export_on( export_on = abap_false ).
Let me know if this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know this post is marked as answered but I am hoping that it is still being monitored. I followed the suggestion to add the following code in the Post-Exit in Comp controller for WD 'HRECM00_PLANNING_UI' for method 'OADP_PLNG_CONFIGURE'.
and write the below code:
wd_this->go_oadp_plng_ui_settings->set_datatable_print_on( print_on = abap_false ).
wd_this->go_oadp_plng_ui_settings->set_datatable_export_on( export_on = abap_false ).
This removes the Print Version Button from "Plan Compensation Data" step but it does not review if from the multiple tables presented in the "Review and Submit" step.
Does anyone know how to remove the Print Version Button from the "Review and Submit" step of ECM Compensation Planning?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joyce,
You can go into method OADP_REV_INITIALIZE and create a post exit there. You'll see where the code assigns this... about line 158
lo_oadp_ui_settings->set_datatable_print_on( print_on = abap_true ).
lo_oadp_ui_settings->set_datatable_filter_on( filter_on = abap_true ).
lo_oadp_ui_settings->set_datatable_export_on( export_on = abap_true ).
Put these two lines into a post exist and chnge it to abap_false.
Hope this helps.
Cheers,
Kevin
Hi Kevin,
I haven't done much with OO coding and webdynpro ABAP. I tried adding the 2 lines as you suggested but get a system dump. I'm sure I need to add more code, just not sure what to add.
I noticed that lo_oadp_ui_settings is used later in the method to initialize the OADP. Seems like the post exit would need to do this also. I think I would also have to have the other data in the method call.
* Init the OADP
ls_oadp_reference-oadp_reference->init_data_from_dataview(
EXPORTING
cache_maxage = 0
initial_ui_settings = lo_oadp_ui_settings
instance_id = ls_oadp_reference-oadp_instance_id
dataview = ls_t71adm31_config-oadp_dataview
data_dest = ' '
user = wd_this->gv_current_user ).
Would it be better to create an overwrite exit? I would copy all of the code and change the value for the set_datatable_print_on to abap_false.
Kevin,
How did you deal with removing the Print Version from the "Review and Submit" step or did you leave it there?
I know that there is some risk with an overwrite exit if SAP makes changes to the base code for the method. As you mentioned, this is probably the easiest solution if it works but could cause issues down the road.
My lack of experience with the OO coding has made this a challenge for the Post Exit.
Thanks for your assistance and input.
Hey Joyce,
You can do an overwrite. The one thing with an overwrite is that if there is any updates to standard code for the method, then you won't get those updates in your code, but sometimes this is the easiest method.
I always try to do my coding in a post-exit, but I have done overwrites as well.
In this overwrite, you would only need to change the two values from true to false.
Give it a shot and if it works, great. You can always try to see if there is a way of doing it in a post exit.
Cheers,
Kevin
hi Kevin,
Please find the link, it might help you http://scn.sap.com/docs/DOC-5568
Thanks,
Sankaresh S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kevin,
You can use the Enhancement's in standard wd components to hide the buttons .
You can identify the method where exactly ALV is getting build and you can make the visibility as 01 to not show the export and print buttons.
When you use overwrite , copy the code from the method and use the same in your new method which overwrites and insert the below where ever necessary..
DATA: lt_functions TYPE salv_wd_t_function_std_ref.
DATA: ls_functions TYPE salv_wd_s_function_std_ref.
lv_value->if_salv_wd_mass_edit_settings~set_default_values_visible( EXPORTING value = abap_true ).
lt_functions = lv_value->if_salv_wd_function_settings~get_functions_std( ).
LOOP AT lt_functions INTO ls_functions.
CASE ls_functions-id.
WHEN 'SALV_WD_EXPORT'.
lv_value->if_salv_wd_function_settings~set_visible( 01 ).
ENDCASE.
Please let me know if you need more details..
With regards,
Meghasyam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kevin,
Open the respective Application/Application Configuration in SE80 and go to
Web Dypro configuration-> Test-> Execute in Administrator mode. Right click on the two buttons and select Settings for Current Configuration.
Now change the Visibility property to Invisible and save it to a TR. That's it.
Please let me know, are you able to resolve or you need some alternate way.
BR,
RAM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ram,
I had been in the configuration like this before. The problem here is that even if you right-click on the buttons, there are no properties for them, and therefore, no way to hide the buttons. I wish it was that easy.
This is what I see when I right click on the buttons:
There is nothing in there as you can see.
Thanks,
Kevin
Hi Kevin,
You are almost nearer to your result.
See you are now looking for the properties of the tabular column(Check, Notes, Employee,etc). But you need to modify the properties of the button(Totally six buttons) that resides just above to the tabular column..
So it's clear that you have been looking the properties of the tabular column. Please make sure that you check for the button properties.
With Regards,
RAM
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.