06-11-2010 1:27 PM
I have found a Class/method to disable or make invisible a button on a screen... yay! :lol:
anyway, this is what i have coded so far in my BAdi....
DATA: lc_dd_button_element TYPE REF TO cl_dd_button_element.
DATA: lc_dd_form_element TYPE REF TO cl_dd_form_element.
CREATE OBJECT lc_dd_form_element
EXPORTING
id = 'A1F1B5'.
CREATE OBJECT lc_dd_button_element
EXPORTING
id = 'A1F1B5'.
CALL METHOD lc_dd_button_element->disable_button.
the 'ID' is the button i am trying to disable...
can someone point me in the right direction? when i debug this, the id has a value, so i added the object lc_dd_form_element but it still short dumps...
the short dump is: Runtime Errors OBJECTS_OBJREF_NOT_ASSIGNED
06-11-2010 1:29 PM
the sap help is here:
http://help.sap.com/saphelp_bw32/helpdata/en/0b/11e1d104b311d4a7400000e83dd863/frameset.htm
i have gone for the tried and tested method of implementing the "where-used list" button and added the following code:
CREATE OBJECT lc_cl_dd_area
EXPORTING
id = 'a1f1b5'.
CALL METHOD lc_cl_dd_area->add_form
IMPORTING
formarea = form.
this is to allegedly populate the table that i am being told is Null...
when i call the method and add_form, the table is being populated, yet when it comes out of the method and into the the disable_button method, it is not populated....
i feel i am getting closer... but still at arms length....
07-22-2010 8:41 PM