10-16-2008 5:15 PM
Hello experts,
I have created an ALV grid to display a simple list.
The ALV grid is displayed successfully.
The problem is that the menu buttons "back", "cancel" etc are disabled.
How can I fix this?
cheers
10-16-2008 5:20 PM
are you using the ALV grid function...?
if so look for status for parameter
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'STATUS' "comment this
IT_FIELDCAT = IT_FCAT
i think you are passing the status_set parameter but didn't provide the dynamic routine for it. check it once.just comment that parameter and see.
10-16-2008 5:20 PM
are you using the ALV grid function...?
if so look for status for parameter
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'STATUS' "comment this
IT_FIELDCAT = IT_FCAT
i think you are passing the status_set parameter but didn't provide the dynamic routine for it. check it once.just comment that parameter and see.
10-16-2008 6:53 PM
Thanks for your reply, but I'm using objects.
Basicly, I have copied the code from BCALV_GRID_DEMO and modified it to work on my tables instead.
The ALV is displayed, but unfortunately the menu buttons are disabled.
I also tried copying the exact code from BCALV_GRID_DEMO and only create:
screen 100
Gridcontainer with screen painter
PF-STATUS
But still no buttons...
PROGRAM TEST.
DATA: OK_CODE LIKE SY-UCOMM,
GT_SFLIGHT TYPE TABLE OF SFLIGHT,
G_CONTAINER TYPE SCRFNAME VALUE 'BCALV_GRID_DEMO_0100_CONT1',
GRID1 TYPE REF TO CL_GUI_ALV_GRID,
G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
----
MAIN *
----
SELECT * FROM SFLIGHT INTO TABLE GT_SFLIGHT.
CALL SCREEN 100.
----
MODULE PBO OUTPUT *
----
MODULE PBO OUTPUT.
SET PF-STATUS 'MAIN100'.
IF G_CUSTOM_CONTAINER IS INITIAL.
CREATE OBJECT G_CUSTOM_CONTAINER
EXPORTING CONTAINER_NAME = G_CONTAINER.
CREATE OBJECT GRID1
EXPORTING I_PARENT = G_CUSTOM_CONTAINER.
CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING I_STRUCTURE_NAME = 'SFLIGHT'
CHANGING IT_OUTTAB = GT_SFLIGHT.
ENDIF.
ENDMODULE.
----
MODULE PAI INPUT *
----
MODULE PAI INPUT.
to react on oi_custom_events:
call method cl_gui_cfw=>dispatch.
CASE OK_CODE.
WHEN 'EXIT'.
PERFORM EXIT_PROGRAM.
WHEN OTHERS.
do nothing
ENDCASE.
CLEAR OK_CODE.
ENDMODULE.
----
FORM EXIT_PROGRAM *
----
FORM EXIT_PROGRAM.
CALL METHOD G_CUSTOM_CONTAINER->FREE.
CALL METHOD CL_GUI_CFW=>FLUSH.
LEAVE PROGRAM.
ENDFORM.
10-16-2008 7:09 PM
MODULE PBO OUTPUT.
SET PF-STATUS 'MAIN100'. "see the status MAIN100 is active or not.
"double click on it and save and activate the staus.
"and test now
i feel it is copied , but not in active state. check it once.
10-16-2008 7:17 PM