‎2018 Oct 08 12:03 PM
Hi Everyone,
Fresher here.
I wrote the similar code with oops and without oops. The issue while using oops is I'm not getting the fieldname(V1) in the get cursor line. In contrast i'm getting the Value (V2) while debugging.
AT LINE-SELECTION.
data : v1(15) type c,
v2(10) type c.
IF SY-LSIND = '1'.
get cursor field v1 value v2.
if v1 = 'LS-BUKRS'.
<Some statements.>
Thanks in Advance.
Regards,
Raj.
‎2018 Oct 08 12:34 PM
What do you mean by OOPs? Are you using CL_GUI_ALV_GRID or CL_SALV_TABLE? Or using the really old function modules?
If you're not using it already, try CL_SALV_TABLE. There are loads of examples of how to respond to a click or double click on the display table
Furthermore, when you're replying to an answer, use comment. Don't create another answer.
‎2018 Oct 08 12:36 PM
Hi Raj,
When it comes to OOPS ALV, Please use below method for interactive reporting Also please refer this OOPs ALV
CL_GUI_ALV_GRID->GET_SELECTED_ROWS( ).
‎2018 Oct 08 12:55 PM
Hi Raj,
1>You have to use the below code:
SET HANDLER gr_event_handler->handle_double_click FOR gr_alvgrid where gr_alvgrid TYPE REF TO cl_gui_alv_grid,
2> Implement the method handle_double_click USING i_row TYPE lvc_s_rowi_column TYPE lvc_s_colis_row_no TYPE lvc_s_roid.
‎2018 Oct 08 1:13 PM
Hello again,
I appreciate your responses, that one should always go through OOPS ALV, but I was trying this for general practice and got this kind of weird output.
I too prefer ALV, but for understanding purpose I tried this.
Please justify the problem with 'INTERACTIVE OOPS' if possible.
Thanks for your all responses.
Raj.
‎2018 Oct 08 1:40 PM
Please let us know your code after AT LINE SELECTION ?? Have you used any local classes ??
when copying code please use INSERT CODE block
‎2018 Oct 09 8:18 AM

1st image is without oops; 2nd image is with oops.
" Basic List has EBELN BEDAT and LIFNR to Display.
""" Displaying Basic list ""
At line-selection.
if sy-lsind = 1.
get cursor field v1 value v2.
if v1 = 'LS_EKKO-EBELN'.
"" calling methods to fetch the purchase order data based on V2.
elseif v1 = 'LS_EKKO-LIFNR'.
"" calling methods to fetch the vendor data based on v2.
endif.
endif.
"""End of the program"""
‎2018 Oct 09 8:16 AM