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

cl_gui_alv_grid onf4 event handler

Former Member
0 Likes
1,629

Has anyone got a nice, tight, example of an ONF4 event handler using CL_GUI_ALV_GRID that they'd be willing to share?

I'm trying to figure out the example in BCALV_EDIT_08. But, it's very difficult to follow.

If BCALV_EDIT_08 is indicative of how much work you have to do to enable this event ... phew, that's a lot of code you have to enter just for this 'simple' task.

Has anyone got a nice, tight, example of an ONF4 event handler using CL_GUI_ALV_GRID that they'd be willing to share?

I'm trying to figure out the example in BCALV_EDIT_08. But, it's very difficult to follow.

If BCALV_EDIT_08 is indicative of how much work you have to do to enable this event ... phew, that's a lot of code you have to enter just for this 'simple' task.

4 REPLIES 4
Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
888

Hi Ed

You can make use of the tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an%20easy%20reference%20for%20alv%20grid%20control.pdf">"An Easy Reference for ALV Grid Control"</a>.

Regards

*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

Read only

0 Likes
888

Thanks for replying Serdar.

I've got that pdf file. I'll experiment with it.

Read only

Former Member
0 Likes
888

Hi,

Try this one

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_layout.

PERFORM f230_value_request.

FORM f230_value_request.

DATA: lv_exit TYPE c,

lw_variant LIKE w_variant.

w_variant-report = sy-repid.

w_variant-username = sy-uname.

  • Invoke function to provide drop down entries

CALL FUNCTION 'REUSE_ALV_VARIANT_F4'

EXPORTING

is_variant = w_variant

i_save = c_a

IMPORTING

e_exit = lv_exit

es_variant = lw_variant

EXCEPTIONS

not_found = 1

program_error = 2

OTHERS = 3.

IF sy-subrc IS INITIAL.

IF lv_exit IS INITIAL.

p_layout = lw_variant-variant.

ENDIF.

ELSE.

MESSAGE i037. "'No layouts found'

ENDIF.

ENDFORM. " f230_value_request

Thanks & Regards,

Judith.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
888