cancel
Showing results for 
Search instead for 
Did you mean: 

Delete assignment block buttons

merveguel
Participant
0 Kudos

Hi All,

I have trying to delete my custom assignment block's buttons but it didnt work. I know its so basic but maybe because the assignment block is custom, the code samples that I tried didnt give me any solution.

Those buttons that I wanted to delete:

What I have done so far is :

I enhanced GET_OCA_T_TABLE method and delete the rt_actions table which didnt effect anything.

I also tried to add a new button to see what is gonna happen to the same method but it adds the button up here;

Accepted Solutions (1)

Accepted Solutions (1)

navn_metts
Active Participant
0 Kudos

Hi,

goto get_buttons method of _impl class and delete the entries from rt_buttons(gt_buttons) internal table.

Br,

Navn

merveguel
Participant
0 Kudos

Thanks for your prompt reply. It worked for me! But the problem that I am facing right now is because I added this code to the DO_PREPARE_OUTPUT method it adds those lines everytime when I make a click on the assignment block. Do you have any suggestion :S ?

Thanks,

Merve

navn_metts
Active Participant
0 Kudos

Hi,

Do_prepare_output is the method which will trigger every time when you perform any action in WebUI.

instead use do_init_context method.

Br,
Navn

merveguel
Participant
0 Kudos

I tried. But as you see my code sample below, I need to access to the get_iterator method. Because of that, the code gives error in the DO_INIT_CONTEXT method.

me->mv_min_empty_lines = 2.


call method super->do_prepare_output

     exporting

       iv_first_time = abap_false.

   lo_iterator ?= me->typed_context->ztab000020->collection_wrapper->get_iterator( ).

   if lo_iterator is bound.

     lo_current ?= lo_iterator->get_first( ).

     while lo_current is bound.

       if sy-tabix eq 1.

         lo_current->set_property_as_string( iv_attr_name = 'ZZA '  iv_value = 'A'  ).

       elseif sy-tabix eq 2.

         lo_current->set_property_as_string( iv_attr_name = 'ZZB '  iv_value = 'B'  ).

       endif.

* Get the next line

       lo_current ?= lo_iterator->get_next( ).

     endwhile.

   endif.

navn_metts
Active Participant
0 Kudos

Hi,

I think you got confused here. can you check the query you have asked in this thread once again please.

This thread is about removing the buttons in the assignment block.

Br,

Navn

Answers (0)