cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic binding ALV-buttons to component controller context

former_member557553
Participant
0 Kudos

Hello, do anybody know if I can do that and how does it work?!

here i've got a little code:


* ALV: create button
  DATA:
        lr_create_function    TYPE REF TO cl_salv_wd_function,
        lr_create_button      TYPE REF TO cl_salv_wd_fe_button.
  lr_create_function = lr_config->if_salv_wd_function_settings~create_function('PHIN_CREATE_NOTIF').
  CREATE OBJECT lr_create_button.
  lr_create_button->set_text( stru_texts-t204 ).
  lr_create_button->set_tooltip( stru_texts-t204 ).
*  lr_create_button->set_enabled( 'BODY.DISABLE_BUTTONS' ).
  elem_body->bind_enable( ).
  lr_create_button->set_enabled(  ).
  lr_create_function->set_editor( lr_create_button ).

I try to bind the enable property to the context of cc

best regards

Christian

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

why dont try to use :

lr_create_button type ref to cl_salv_wd_uie_button.

lr_create_button->set_enabled_fieldname( 'CONTEXT_ATTRIBUTE' ).

Regards,

Mayaa

former_member557553
Participant
0 Kudos

lr_create_function->set_editor( lr_create_button ). can't get a type of you solution.

can u explain me the differenz and how i can rewrite the code, please?

many thanks

christian

Former Member
0 Kudos

hi,

You are right, you can't use set_editor with that type of button.

Could you explain please what set_editor does ? and what do u need it for ?

Thanks and regards,

Mayaa

former_member557553
Participant
0 Kudos

hi,

it binds the function to the buttons. and it's also responsible that the buttons is display in the avl...

best regards christian