‎2006 Nov 30 1:41 PM
Hi,
I have an ALV Grid Display using the FM 'REUSE_ALV_GRID_DISPLAY'. How can I enable the 'SAVE' button? I am using a report program for the grid.
Renjith.
‎2006 Nov 30 1:50 PM
Hi,
You need to do this:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = W_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = 'ALV_BACKGROUND'
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = W_LAYOUT
IT_FIELDCAT = W_FIELDCATALOG[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
<b> I_SAVE = 'U' /'A'</b>
IS_VARIANT =
IT_EVENTS = W_EVENTS[]
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
you can use these two options.
For saving the data you need to write this code:
&----
*& Form USER_COMMAND
&----
text
----
FORM USER_COMMAND using OK_CODE type SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE OK_CODE.
WHEN '&DATA_SAVE'.
Code for saving................
ENDCASE.
ENDFORM. "USER_COMMAND
You need to create a PF-STATUS where you need give DATA_SAVE' as the function code for SAVE button.
Regards,
Vinod.
‎2006 Nov 30 1:50 PM
Hi,
You need to do this:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = W_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = 'ALV_BACKGROUND'
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = W_LAYOUT
IT_FIELDCAT = W_FIELDCATALOG[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
<b> I_SAVE = 'U' /'A'</b>
IS_VARIANT =
IT_EVENTS = W_EVENTS[]
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
you can use these two options.
For saving the data you need to write this code:
&----
*& Form USER_COMMAND
&----
text
----
FORM USER_COMMAND using OK_CODE type SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE OK_CODE.
WHEN '&DATA_SAVE'.
Code for saving................
ENDCASE.
ENDFORM. "USER_COMMAND
You need to create a PF-STATUS where you need give DATA_SAVE' as the function code for SAVE button.
Regards,
Vinod.
‎2006 Nov 30 2:11 PM
Hi
The SAVE button is not active by default in GRID status, you should create an own status.
But if you mean the button to save a layout variant, you have to set the parameter <b>I_SAVE</b>:
SPACE = Display variants cannot be saved
Defined display variants (such as delivered display variants) can be selected for presentation regardless of this indicator. However, changes cannot be saved.
'X' = Standard save mode
Display variants can be saved as standard display variants.
Saving display variants as user-specific is not possible.
'U' = User-specific save mode
Display variants can only be saved as user-specific.
'A' = Standard and user-specific save mode
‎2006 Nov 30 2:19 PM