2006 Feb 07 12:42 AM
Hi
I am using "REUSE_ALV_GRID_DISPLAY" to display the output. Could you please suggest me how to add a button with out loosing the ALV given options like Sort etc
I tried giving a new PF-STATUS but its overriding ALV given status. But I want to retain it. Please let me know.
Thanks
2006 Feb 07 12:51 AM
Bobby,
From your program in SE80, hit the "Edit Object" button. Select the "Function Group" Tab and enter in "SALV". Now choose the "GUI Status" Radiobutton and hit the drop down. Select the "Standard" GUI. Now Click the "COPY" button. This will then ask you to which program you want to copy this GUI to. Enter in your Program name and then rename the GUI (starting with Z of course!). Now edit your newly created GUI as make sure your ALV FM calls it.
Hope this is more helpful.
Cheers,
Pat.
2006 Feb 07 12:45 AM
Bobby,
Copy the existing Standard ALV Status (from Function Group SALV, Status STANDARD) into your program and then modify it there.
Let me know if you need more info.
Cheers,
Pat.
Sorry, the FG is 'SALV'.
Message was edited by: Patrick Yee
2006 Feb 07 12:51 AM
Bobby,
From your program in SE80, hit the "Edit Object" button. Select the "Function Group" Tab and enter in "SALV". Now choose the "GUI Status" Radiobutton and hit the drop down. Select the "Standard" GUI. Now Click the "COPY" button. This will then ask you to which program you want to copy this GUI to. Enter in your Program name and then rename the GUI (starting with Z of course!). Now edit your newly created GUI as make sure your ALV FM calls it.
Hope this is more helpful.
Cheers,
Pat.
2006 Feb 07 1:05 AM
Hi Pat
Thanks for your reply. I did that but no status is coming up on the output. I made sure that its active. I need to work on it. Thanks for your help
Thanks
2006 Feb 07 1:14 AM
Bobby,
No prob. If you need more help, please paste your code here and I (or someone else) can help further.
Don't forget to use the I_CALLBACK_PF_STATUS_SET parameter in REUSE_ALV_LIST_DISPLAY...
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM = C_REPID
I_CALLBACK_PF_STATUS_SET = 'SET_STATUS'
I_CALLBACK_USER_COMMAND = 'PROCESS_COMMANDS'
IS_LAYOUT = ST_LAYOUT1
IT_FIELDCAT = TBL_FIELDCAT1
IT_SORT = TBL_SORTCAT1
I_DEFAULT = 'X'
I_SAVE = VARIANT_SAVE
IS_VARIANT = ST_VARIANT2
IT_EVENTS = TBL_EVENTS1
TABLES
T_OUTTAB = TBL_OUTPUT1
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
*---------------------------------------------------------------------*
* FORM SET_STATUS *
*---------------------------------------------------------------------*
* Define Customised GUI for the ALV Report
*---------------------------------------------------------------------*
* --> RT_EXTAB Excluding Functions
*---------------------------------------------------------------------*
FORM SET_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
DATA: LT_EXTAB TYPE SLIS_EXTAB.
LT_EXTAB-FCODE = '&ETA'. "Choose Detail
APPEND LT_EXTAB TO RT_EXTAB.
LT_EXTAB-FCODE = '%SL'. "Send
APPEND LT_EXTAB TO RT_EXTAB.
LT_EXTAB-FCODE = '&ALL'. "Select All
APPEND LT_EXTAB TO RT_EXTAB.
LT_EXTAB-FCODE = '&SAL'. "Deselect All
APPEND LT_EXTAB TO RT_EXTAB.
LT_EXTAB-FCODE = '&ABC'. "ABC Analysis
APPEND LT_EXTAB TO RT_EXTAB.
* lt_extab-fcode = '&LFO'. "List Status
* APPEND lt_extab TO rt_extab.
SET PF-STATUS 'ZSTANDARD' EXCLUDING RT_EXTAB.
ENDFORM.
Cheers,
Pat.
2006 Feb 07 1:56 AM
Hi
This is what i am doing
data: PFSTATUS TYPE SLIS_FORMNAME VALUE 'PF_STATUS_SET'.
________________________________________________________
FORM dislay_alv_report .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = g_repid
I_CALLBACK_PF_STATUS_SET = PFSTATUS
I_CALLBACK_USER_COMMAND = ''
I_STRUCTURE_NAME = ''
IS_LAYOUT =
it_fieldcat = gt_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = 'ZSORT'
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = 'A'
is_variant = gx_variant
IT_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
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = i_outputtab_2
EXCEPTIONS
program_error = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " dislay_alv_report
____________________________________________________
FORM PF_STATUS_SET USING RT_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'ZTEST1' EXCLUDING RT_EXTAB.
ENDFORM.
2006 Feb 07 2:21 AM
Bobby,
Ok, this is going to sound silly, but you ZTEST1 GUI belongs to program G_REPID right? Instead of using the variable PFSTATUS, enter 'PF_STATUS_SET'.
Let me know how this goes.
Cheers,
Pat.
2006 Feb 07 2:45 AM
2006 Feb 07 3:34 AM
Hi Srinivas,
thanx for the reply. thats the problem and fixed it
Pat,
Thanks for your help