‎2008 Dec 15 9:10 AM
Hi All,
How do we create a hotspot using OOPs concept in ALV? Also tell me how to call a transaction code after doing a Hotspot click on a field.
‎2008 Dec 15 9:39 AM
‎2008 Dec 15 9:47 AM
‎2008 Dec 15 12:15 PM
Can u plz tell me what is the type of W_VALUE and W_GRID is TYPE REF TO what? I am not able to get into GET_CURRENT_CELL. It says GET_CURRENT_CELL is not found.
‎2008 Dec 15 10:07 AM
‎2008 Dec 15 2:03 PM
try factory methods like this:
form display .
Sort output table
sort it_out by vbeln_vl vbeln_vf fkart.
try.
Using Factory classes for output display
call method cl_salv_table=>factory
importing
r_salv_table = o_table
changing
t_table = it_out.
o_functions = o_table->get_functions( ).
o_functions->set_all( abap_true ).
To sort the table by Delivery, billing document.
o_sorts = o_table->get_sorts( ).
o_sorts->add_sort( columnname = 'VBELN_VL' subtotal = abap_true ).
o_sorts = o_table->get_sorts( ).
o_sorts->add_sort( columnname = 'VBELN_VF' subtotal = abap_true ).
To goto transaction*
o_cevents = o_table->get_event( ).
create object o_levents.
set handler o_levents->on_double_click for o_cevents.
Catch exceptions
catch cx_salv_msg into o_salv_msg.
message e184 with o_salv_msg->msgv1
o_salv_msg->msgv2
o_salv_msg->msgv3
o_salv_msg->msgv4.
catch cx_salv_not_found into o_salv_not_found.
message e184 with o_salv_not_found->object
o_salv_not_found->textid
o_salv_not_found->key
o_salv_not_found->method.
catch cx_salv_data_error into o_salv_data_error .
message e184 with o_salv_data_error->object
o_salv_data_error->textid
o_salv_data_error->key
o_salv_data_error->method.
catch cx_salv_existing into o_salv_existing .
message e184 with o_salv_existing->object
o_salv_existing->textid
o_salv_existing->key
o_salv_existing->method.
endtry.
Display
o_table->display( ).
endform. " display
*&----
*& Form disp_line_item
*&----
To display the delivery data using transaction VL03n*
on double click on any row.*
*----
form disp_line_item using fp_row type salv_de_row
fp_column type salv_de_column.
Read the output table*
read table it_out into wa_out index fp_row.
if sy-subrc eq 0 .
set parameter id 'VL' field wa_out-vbeln_vl.
call transaction 'VL03N' and skip first screen. " Call transaction vl03n
endif.
endform. " disp_line_item
Edited by: kartik tarla on Dec 15, 2008 7:35 PM
‎2008 Dec 15 2:21 PM
Hi,
Please Check out the demo program:
BCALV_GRID_01 Processing Print Events
BCALV_GRID_02 Display Detail List in Dialog Box Containe
BCALV_GRID_03 Detail List in Dialog Window
BCALV_GRID_04 Display Exceptions (LEDs or Traffic Lights
BCALV_GRID_05 Add a Self-Defined Button to the Toolbar
BCALV_GRID_06 Define Self-Defined Context Menu
BCALV_GRID_07 Define a Menu in the Toolbar
BCALV_GRID_08 Define a Menu with Default Pushbutton
BCALV_GRID_09 Saving Options for Layouts
BCALV_GRID_10 Load a layout before list display
BCALV_GRID_11 Test for new layout function modules
Thanks,
Chidanand