05-26-2008 7:30 AM
Hi all,
Scenario:
I created a BAdI. There will be a button on the UI to call its implementation(s); while if there is no implementation with specified filter value, this button needs to be hidden. Thus I need to know if the implementation exist before calling it.
Question:
In the ABAP code, how to get whether implementation with specified filter value exists for a BAdI?
If it's possible, please help provide code.
Thanks and regards,
Said
05-26-2008 7:51 AM
I dont think that it would be possible to hide some buttons of standard TR's.... Is there any specific requirement for this. if yes please explain.. or are you just playing around in SAP
05-26-2008 8:13 AM
Hi Harmeet,
Thanks for you reply. To hide a button on UI is another issue; maybe I just disable the button.
What I'm concerned about now is how to know whether an implementation with specified filter value exists or not.
05-26-2008 8:16 AM
Hi,
See the help
http://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm
Regards
Kiran Sure
05-28-2008 8:01 AM
Problem solved:
data: r_badi type ref to YOUR_BADI,
badi_impl_num type i.
get badi r_badi
filters
flt_name = fit_val.
badi_impl_num = cl_badi_query=>number_of_implementations( badi = r_badi ).
if badi_impl_num > 0.
"there are badi implementation(s)
"...
endif.