Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

short dump when implementing CL_DD_BUTTON_ELEMENT

Former Member
0 Kudos

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
          id = 'A1F1B5'.

      CREATE OBJECT lc_dd_button_element
          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


Former Member
0 Kudos

the sap help is here:

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
          id = 'a1f1b5'.

      CALL METHOD lc_cl_dd_area->add_form
          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....

Former Member
0 Kudos

i modified SAP standard to not bypass my badi.