on 06-29-2011 1:05 AM
Hi,
Can anybody guide me how to read text of a ALV tool bar button when it pressed..
If anybody can provide code also will be great.
Thanks
Edited by: subba rao on Jun 29, 2011 2:05 AM
Small modification in kris code.... like class name and method name..
data:
lr_button type ref to CL_SALV_WD_FE_A_BUTTON,
lr_function type ref to cl_salv_wd_function,
bname type string.
lr_function = l_alv_model->if_salv_wd_function_settings~get_function( ID = <your ID> ).
lr_button ?= lr_function->get_editor( ).
bname = lr_button->get_text( ).
Thanks and Regards
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Your coding is working fine but my actual requirement is i have designed 4 buttons on ALV like example
APPEND-A, APPEND-B , APPEND-C, APPEND-D.
These buttons have standard alv APPEND ROW funtionality.
when i click on those buttons it is appending new rows, that's what i also need.
but I need to write separate validation for each button when it is appending row.
When i am cliking on those buttons ON_DATA_CHECK event is trigging. But i am unable to catch which button id is triggering.
Each button have differend id's.
I know i can catch this button id's by ON_FUNCTION event, but this event is not triggering if i am using standard APPEND ROW
functionality..
Can you help me how to read button id's or button name when we click on APPEND-A or APPEND -B
in ON_DATA_CHECK event .
Thanks.
Edited by: subba rao on Jul 1, 2011 8:01 PM
Hi Subba rao,
Please check this...
On your alv model, first call if_salv_wd_function_settings~get_function( ID = <your ID> ). This will return you a reference of cl_salv_wd_function. If your function uses a button editor, do the following:
data:
lr_button type ref to CL_SALV_WD_FE_BUTTON,
lr_function type ref to cl_salv_wd_function.
lr_function = l_alv_model->if_salv_wd_function_settings~get_function( ID = <your ID> ).
lr_button ?= lr_function->get_editor( ).
lr_button->set_text( ).// this is to set your own text
you can check this also..
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.