07-03-2007 11:46 AM
HI,
WHAT IS THE USE OF <b>cl_salv_table=>factory</b> AND CLASS <b>cl_salv_selections</b>? .
PLEASE EXPLAIN
THANK YOU
ASHOK KUMAR
07-03-2007 11:51 AM
Hi Ashok,
FACTORY:
Functionality
You use the FACTORY method to create an instance of the class.
Result
R_SALV_TABLE
Object of type CL_SALV_TABLE
Parameters
T_TABLE
required
The table that you want to display with ALV; Type TABLE
LIST_DISPLAY
optional
Sets whether the table is output as a classic ABAP list; Type SAP_BOOL
The following two parameters are optional. However, if you do use them, you can only use them together:
R_CONTAINER
optional
If you want to display the table in its own container, specify the container here; Type CL_GUI_CONTAINER
Warning:
If you want to display the table in a container, the application must not run in batch mode. Use the IS_OFFLINE method to check whether the prerequisites for the container have been met.
CONTAINER_NAME
optional
Name of the container on your screen; Type STRING
Exceptions
CX_SALV_MSG
You have specified a container although you want to output the output table as a classic ABAP list.
....................................
CL CL_SALV_SELECTIONS
____________________________________________________
Short Text
Selections in List-Type Output Tables
Functionality
The selecting of cells, rows and/or columns allows you to handle these elements in a targetted manner. You use the CL_SALV_SELECTIONS class to control, in list-like tables,
whether and which elements can be selected simultaneously
which elements are currently selected
which elements you want to select
The CL_SALV_SELECTIONS class contains the following methods:
CONSTRUCTOR Instantiates the class
GET_CURRENT_CELL Returns the selection settings of a specific cell
SET_CURRENT_CELL Sets the selection settings of a specific cell
GET_SELECTED_CELLS Returns the cells that have been selected
SET_SELECTED_CELLS Selects cells
GET_SELECTED_COLUMNS Returns the selected columns
SET_SELECTED_COLUMNS Selects columns
GET_SELECTED_ROWS Returns selected rows
SET_SELECTED_ROWS Selects rows
GET_SELECTION_MO DE Returns the selection mode
SET_SELECTION_MODE Sets the selection mode
Reward if useful!
07-03-2007 11:49 AM
hi Ashok,
the class cl_salv_table=>factory returns you an object of the constructed alv.
then you can use this object to display the alv and perform many opns on alv like sort it, summation purpose etc..
regards,
Navneeth K.
07-03-2007 11:51 AM
Hi Ashok,
FACTORY:
Functionality
You use the FACTORY method to create an instance of the class.
Result
R_SALV_TABLE
Object of type CL_SALV_TABLE
Parameters
T_TABLE
required
The table that you want to display with ALV; Type TABLE
LIST_DISPLAY
optional
Sets whether the table is output as a classic ABAP list; Type SAP_BOOL
The following two parameters are optional. However, if you do use them, you can only use them together:
R_CONTAINER
optional
If you want to display the table in its own container, specify the container here; Type CL_GUI_CONTAINER
Warning:
If you want to display the table in a container, the application must not run in batch mode. Use the IS_OFFLINE method to check whether the prerequisites for the container have been met.
CONTAINER_NAME
optional
Name of the container on your screen; Type STRING
Exceptions
CX_SALV_MSG
You have specified a container although you want to output the output table as a classic ABAP list.
....................................
CL CL_SALV_SELECTIONS
____________________________________________________
Short Text
Selections in List-Type Output Tables
Functionality
The selecting of cells, rows and/or columns allows you to handle these elements in a targetted manner. You use the CL_SALV_SELECTIONS class to control, in list-like tables,
whether and which elements can be selected simultaneously
which elements are currently selected
which elements you want to select
The CL_SALV_SELECTIONS class contains the following methods:
CONSTRUCTOR Instantiates the class
GET_CURRENT_CELL Returns the selection settings of a specific cell
SET_CURRENT_CELL Sets the selection settings of a specific cell
GET_SELECTED_CELLS Returns the cells that have been selected
SET_SELECTED_CELLS Selects cells
GET_SELECTED_COLUMNS Returns the selected columns
SET_SELECTED_COLUMNS Selects columns
GET_SELECTED_ROWS Returns selected rows
SET_SELECTED_ROWS Selects rows
GET_SELECTION_MO DE Returns the selection mode
SET_SELECTION_MODE Sets the selection mode
Reward if useful!
07-03-2007 11:56 AM
hi
The cl_salv_table=>factory method will automatically pickup the field descriptions from the ABAP Dictionary
for more details refer to the link
regards
ravish