03-15-2007 5:48 AM
Hi,
Why we dont use performs for
1.TOP OF PAGE
2.PF STATUS
3.USER COMMAND
03-15-2007 5:58 AM
As a matter of fact, we do not use a PERFORM statement for any of the events of the ALV. The reason being, the REUSE_ALV_*_DISPLAY function modules are build in such a way that there is a dynamic call made inside the FM to the FORM name that you associate with the EVENT.
Because the call is made internally by the Function Module, it is not required to have PERFORM statement.
Naveen,.
03-15-2007 6:00 AM
Hi Shreya,
We use perform for all these in grid display.
for top-of-page.
TOP-OF-PAGE.
PERFORM TOP_OF_PAGE.
TOP-OF-PAGE DURING LINE-SELECTION.
PERFORM TOP_OF_PAGE.
for pf status
FORM STATUS USING MYMENU.
SET PF-STATUS MYMENU.
ENDFORM.
FORM UCOMM USING UCOM STEXT.
CASE UCOM.
WHEN 'ABC'.
WRITE:/ 'YOU HAVE CLICKED ON ABC'.
WHEN 'XYZ'.
WRITE:/ 'YOU HAVE CLICKED ON XYZ'.
ENDCASE.
ENDFORM.
for user command
AT USER-COMMAND.
G_FIELD = SPACE.
GET CURSOR FIELD G_FIELD.
PERFORM USER_COMMAND.
regards,
Prajith
03-15-2007 6:00 AM
Hi
We use performs for Top-Of-Page.
For PF_status and user_command we won't use the performs as we use both for
User menus and User command purposes.
Regards,
kumar
03-15-2007 6:00 AM
In 'REUSE_ALV_GRID_DIsplay' or list display you already have performs for top of page like i_callback_top_of page etc . this calls your subroutine . So you do not need another perform for that.
Remember to pass ur subroutine name in I_CAllback_top_of_page though.
e.g.: i_callback_top_of_page = 'Top-of-page'.
this is like perform top-of-page.
03-15-2007 6:14 AM
as per your qery all those are events in your event tab which you are passing for alv display that contain two things that is event name and associated form name. so that when any event is triggered it is searching for the associated form(which is defined in the event tab) and execute that form. But for user command or pf-status sap provide us a easier way to define our form name for the perticular event in the export parameter itself .. But for both the cases the execution procedure is same.
regards
shiba dutta