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


Please Help Members By Posting Answers For Below Questions

What does the insert statement in extract datasets do? : abap modularization

586


What are the system fields? Explain?

647


What is the difference between leave transaction and call transaction?

614


What are the disadvantages of using explicit enhancement?

1386


Explain what are the problems in processing batch input sessions? How is batch input process different from processing on line?

590






Explain what is sequence of event triggered in report?

558


Can you print decimals in type n?

570


How would you define the exponents for a type ‘f’ field?

626


What is size category?

561


Explain data dictionary in abap?

602


How collect statement is different from append?

539


How to specify a client for database table processing?

618


What are the commands used for interactive reports?

574


What are the functional areas? User groups? and how does ABAP query work in relation to these?

715


Give Some examples of reports generated in real time scenarion? Also give examples of standard reports in SAP used in real time?

2328