2010 Oct 09 7:37 AM
Hello Gurus
i am new to abap i have doubt regarding interactive alv . i wrote one but it gives runtime error . i taken reference to a sample program availiable please explain this code so i can write interactive alv effectively.
FORM POPULATE_EVENT.
READ TABLE ITAB_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'TOP_OF_PAGE'.
MODIFY ITAB_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-FORM.
ENDIF.
IF ITAB_EMPLOY-EMPID NE ''.
READ TABLE ITAB_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'USER_COMMAND'. MODIFY ITAB_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-NAME.
ENDIF.
ENDIF.
ENDFORM.
.
2010 Oct 09 8:20 AM
Hi,
Event form names are appended to an internal table and passed to the ALV. And whatever you write inside that form
can be called through the function module.
What you are trying to do is modify the internal table with the form name, which does not exsist. Instead of this append it.
There are lot of example of this ALV list events.
DATA: T_EVENT TYPE SLIS_T_EVENT,
W_EVENT TYPE SLIS_ALV_EVENT.
CLEAR W_EVENT.
W_EVENT-FORM = SLIS_EV_AFTER_LINE_OUTPUT.
W_EVENT-NAME = SLIS_EV_AFTER_LINE_OUTPUT."AFTER_LINE_OUTPUT event
APPEND W_EVENT TO T_EVENT.
Thanks & Regards,
Tapodipta Khan
Hello Gurus
i am new to abap i have doubt regarding interactive alv . i wrote one but it gives runtime error . i taken reference to a sample program availiable please explain this code so i can write interactive alv effectively.
FORM POPULATE_EVENT.
READ TABLE ITAB_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'TOP_OF_PAGE'.
MODIFY ITAB_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-FORM.
ENDIF.
IF ITAB_EMPLOY-EMPID NE ''.
READ TABLE ITAB_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'USER_COMMAND'. MODIFY ITAB_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-NAME.
ENDIF.
ENDIF.
ENDFORM.
.
2010 Oct 09 8:20 AM
Hi,
Event form names are appended to an internal table and passed to the ALV. And whatever you write inside that form
can be called through the function module.
What you are trying to do is modify the internal table with the form name, which does not exsist. Instead of this append it.
There are lot of example of this ALV list events.
DATA: T_EVENT TYPE SLIS_T_EVENT,
W_EVENT TYPE SLIS_ALV_EVENT.
CLEAR W_EVENT.
W_EVENT-FORM = SLIS_EV_AFTER_LINE_OUTPUT.
W_EVENT-NAME = SLIS_EV_AFTER_LINE_OUTPUT."AFTER_LINE_OUTPUT event
APPEND W_EVENT TO T_EVENT.
Thanks & Regards,
Tapodipta Khan
2010 Oct 09 3:02 PM
2010 Oct 09 4:06 PM