2007 Jul 03 7:59 AM
HI,
WITH OUT CREATING A SCREEN AND CUSTOM CONTROL IN IT , IS IT POSSIBLE CREATE GRID ALV . IF IT IS POSSIBLE EXPLAIN PLEASE
THANK YOU
ASHOK KUMAR
2007 Jul 03 8:01 AM
Hi Ashok,
If you are using Object oriented concept to create ALV report then only Screen and Custom Control is used
otherwise call FM "REUSE_ALV_GRID_DISPLAY" and pass the field catalog and internal table to this FM to display your ALV report.
Mukesh Kumar
Hi Ashok,
If you are using Object oriented concept to create ALV report then only Screen and Custom Control is used
otherwise call FM "REUSE_ALV_GRID_DISPLAY" and pass the field catalog and internal table to this FM to display your ALV report.
Mukesh Kumar
2007 Jul 03 8:01 AM
Hi Ashok,
If you are using Object oriented concept to create ALV report then only Screen and Custom Control is used
otherwise call FM "REUSE_ALV_GRID_DISPLAY" and pass the field catalog and internal table to this FM to display your ALV report.
Mukesh Kumar
2007 Jul 03 8:03 AM
yes its possible using FACTORY classes
refer to the following code
-
*
Local variables (l_)
----
DATA: l_sap_bool TYPE sap_bool.
TYPES: begin of g_type_s_hyperlink,
handle type salv_de_hyperlink_handle,
hyperlink type service_rl,
end of g_type_s_hyperlink.
----
Local objects (lo_)
----
DATA:
lo_table TYPE REF TO cl_salv_table,
lo_functions TYPE REF TO cl_salv_functions,
lo_display_settings TYPE REF TO cl_salv_display_settings,
lo_layout TYPE REF TO cl_salv_layout,
ls_key TYPE salv_s_layout_key,
lo_columns_table TYPE REF TO cl_salv_columns_table,
lo_column TYPE REF TO cl_salv_column,
lo_column_table TYPE REF TO cl_salv_column_table,
lo_functional_settings type ref to cl_salv_functional_settings,
lo_hyperlinks type ref to cl_salv_hyperlinks.
DATA: lt_column_names TYPE salv_t_column_ref,
ls_column_names TYPE salv_s_column_ref.
DATA: l_restrict TYPE salv_de_layout_restriction.
----
Local variables (l_)
----
DATA: l_ltext TYPE scrtext_l ,"Broker code long text
l_mtext TYPE scrtext_m ,"Broker code medium text
l_stext TYPE scrtext_s ,"Broker code short text
ls_color TYPE lvc_s_colo.
*--> Table for drop down
DATA: lt_ddval TYPE STANDARD TABLE OF g_type_s_hyperlink.
*--> work area for dropdown
DATA: ls_ddval TYPE g_type_s_hyperlink.
ls_key-report = cl_abap_syst=>get_current_program( ).
TRY.
CALL METHOD cl_salv_table=>factory
EXPORTING
list_display = if_salv_c_bool_sap=>false
IMPORTING
r_salv_table = lo_table
CHANGING
t_table = gt_alv_output.
CATCH cx_salv_msg.
ENDTRY.
CALL METHOD lo_table->set_screen_status
EXPORTING
report = ls_key-report
pfstatus = 'SALV_TABLE_STANDARD'
set_functions = lo_table->c_functions_all.
lo_layout = lo_table->get_layout( ).
lo_layout->set_key( ls_key ).
lo_layout->set_default( /rio/zcl_constants=>c_true ).
allow saving options for all
l_restrict = if_salv_c_layout=>restrict_none.
set Layout save restriction
lo_layout->set_save_restriction( l_restrict ).
lo_functions = lo_table->get_functions( ).
lo_table->display( ).
Reward points if helpful
2007 Jul 03 8:03 AM
Hi Ashok,
There are two ways to develop an ALV.
Through ALV OOPS and Classical.
In classical you can use, REUSE_ALV_GRID/LIST_DISPLAY
And in OOPS
You have to create Custom Control.
Reward if useful!
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |