on 04-15-2014 10:17 AM
Hi,
I am wondering whether it is possible to call a custom function of an ALV from a method because I don't want to repeat coding.
Best regards,
ts
Hi ts,
Yes, you can call as long as R_PARAM is filled accordingly.
Any way what kind of custom functions are you looking for ?
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ts,
Option 1:
You can use class CL_SALV_WD_TABLE_FUNCTION to create object R_PARAM.
Sample Code:
data lo_r_param type ref to cl_salv_wd_table_function.
data lo_event type ref to cl_wd_custom_event.
"Create r_param object
create object lo_r_param.
"Create wdevent object & fill event parameters
create object lo_event
exporting
id = 'ADD' .
WD_THIS->ON_ADD_LINE(
exporting
wdevent = lo_event
r_param = lo_param ).
Note: here ON_ADD_LINE is the event handler method triggered for alv table function
Option 2
Also, you can make the parameter R_PARAM as optional in event handler method, so that you no need to pass r_param while calling the event handler method explicitly.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
26 | |
9 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.