2007 Sep 19 12:46 PM
Hi All,
Can any body help me in this regard.....
i need to display the Selection screen parameters in the Header of the Grid Dispaly.
i am usin both the FM's REUSE_ALV_COMMENTARY_WRITE and
REUSE_ALV_GRID_DISPLAY.
Thanx in advance.
2007 Sep 19 12:51 PM
FEVENTS to handle the events TOP OF PAGE & USER_COMMAND
FEVENTS TYPE TABLE OF SLIS_ALV_EVENT WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0,
FHEADER is used for List header
FHEADER TYPE TABLE OF SLIS_LISTHEADER WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0.
FHEADER-TYP = 'H'.
FHEADER-INFO = 'ORDER FILL RATE'.
APPEND FHEADER.
CLEAR FHEADER.
CLEAR FHEADER-KEY.
for PERFORMANCE RATE
FHEADER-TYP = 'S'.
FHEADER-INFO = S_RATE.
FHEADER-KEY = 'PERFORMANCE RATE PERCENTAGE'.
APPEND FHEADER.
CLEAR FHEADER.
CLEAR FHEADER-KEY.
----
FORM Z_TOPOFPAGE. "#EC NEEDED
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = FHEADER[].
ENDFORM. " FORM Z_TOPOFPAGE
IN 'REUSE_ALV_GRID_DISPLAY' USE IN TOP OF PAGE Z_TOPOFPAGE.
IT SURELY RESOLVE YOUR PROBLEM.
REWARD IF USEFUL.
AMIT SINGLA
2007 Sep 19 12:51 PM
FEVENTS to handle the events TOP OF PAGE & USER_COMMAND
FEVENTS TYPE TABLE OF SLIS_ALV_EVENT WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0,
FHEADER is used for List header
FHEADER TYPE TABLE OF SLIS_LISTHEADER WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0.
FHEADER-TYP = 'H'.
FHEADER-INFO = 'ORDER FILL RATE'.
APPEND FHEADER.
CLEAR FHEADER.
CLEAR FHEADER-KEY.
for PERFORMANCE RATE
FHEADER-TYP = 'S'.
FHEADER-INFO = S_RATE.
FHEADER-KEY = 'PERFORMANCE RATE PERCENTAGE'.
APPEND FHEADER.
CLEAR FHEADER.
CLEAR FHEADER-KEY.
----
FORM Z_TOPOFPAGE. "#EC NEEDED
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = FHEADER[].
ENDFORM. " FORM Z_TOPOFPAGE
IN 'REUSE_ALV_GRID_DISPLAY' USE IN TOP OF PAGE Z_TOPOFPAGE.
IT SURELY RESOLVE YOUR PROBLEM.
REWARD IF USEFUL.
AMIT SINGLA
2007 Sep 19 12:55 PM
OTHERWISE YOU CAN USE HERE Z_TOPOFPAGE.IN EVENTS PART.
FORM Z_ALV_EVENTS.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = FEVENTS[].
READ TABLE FEVENTS WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC = 0.
FEVENTS-FORM = 'Z_TOPOFPAGE'.
MODIFY FEVENTS INDEX SY-TABIX.
CLEAR FEVENTS.
ENDIF. " IF SY-SUBRC = 0.
2007 Sep 19 1:02 PM
THIS IS THE PART WHERE YOU CAN APPEND YOUR SELECTION SCREEN VARIABLES.
FHEADER-TYP = 'S'.
FHEADER-INFO = <b>S_RATE.</b>
FHEADER-KEY = 'PERFORMANCE RATE PERCENTAGE'.
APPEND FHEADER.
CLEAR FHEADER.
CLEAR FHEADER-KEY
FHEADER-TYP = 'S'.
FHEADER-INFO = <b>P_VBELN.</b>
FHEADER-KEY = 'SALES DOCUMENT'.
APPEND FHEADER.
CLEAR FHEADER.
CLEAR FHEADER-KEY