How do you generate Interactive report using ALV's?
Answer Posted / nag
READ TABLE IST_EVENTS INTO WA_EVENT WITH KEY NAME =
'USER_COMMAND'.
*IF SY-SUBRC EQ 0.
*WA_EVENT-FORM = 'USER_COMMAND'.
*MODIFY IST_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE
NAME = WA_EVENT-NAME.
*ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = C_PF "'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_GRID_TITLE = G_TITLE
IS_LAYOUT = IST_LAYOUT
IT_FIELDCAT = IST_FIELDCAT[]
IT_SORT = IST_SORT
I_SAVE = 'A'
IT_EVENTS = IST_EVENTS
IS_PRINT = IST_PRNT
IMPORTING
E_EXIT_CAUSED_BY_CALLER = G_EXIT
ES_EXIT_CAUSED_BY_USER = IST_EXIT
TABLES
T_OUTTAB = IST_FINAL "sodtl
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
your code....
ENDFORM.
*for second click
READ TABLE IST_EVENTS INTO WA_EVENT WITH KEY NAME =
'USER_COMMAND1'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'USER_COMMAND1'.
MODIFY IST_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME
= WA_EVENT-NAME.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = C_PF "'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND1'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_GRID_TITLE = G_TITLE
IS_LAYOUT = IST_LAYOUT
IT_FIELDCAT = IST_FIELDCAT[]
I_SAVE = 'A'
TABLES
T_OUTTAB = IST_FINAL1.
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
What is difference between float and packed data type?
WHAT ARE THE INPUT PARAMETERS TO BE PASSED FOR THE BAPIS 'BAPI_CUSTMATINFO_GETDETAILM' AND 'BAPI_CUSTMATINFO_GETLIST'
How do you backup Sapscript layout sets? Can you download and upload? How?
Explain how data is stored in cluster table?
Can you define a field without a data element?
What is the difference between commit-work and rollback-work tasks?
What are the control break events in abap? : abap data dictionary
What is the difference between retroactive accounting period, earliest retroactive accounting period? : sap abap hr
What is meant by slab? How is indian slab and us slab? : sap abap hr
What are the different modes of processing batch input sessions? : abap bdc
What is the difference between the function module and a normal abap/4 subroutine?
Explain how to write a bdc - how do you go about it?
What are different ABAP editors? What are the differences?
What are the system table used in abap?
Update types in Call transaction method. What is the difference?