‎2006 Oct 06 9:23 PM
Hi Everyone,
I read various posts on this issue, and tried different things. But I have just one issue that has I have been trying to fix for the past few hours.
I have an ALV grid thats filled with data from different transparent tables. I have added a refresh button on the ALV toolbar and processed it with the USER_COMMAND subroutine.
I tried to submit the program again and it worked - but the only problem is that I have initialized one of the selection screen parameters in the INITIALIZE event. When I submit the program, it refreshes the data according to the initial selection screen.
Is there any way to override this?
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = V_CALLBACK_PROG
I_CALLBACK_USER_COMMAND = 'F_USER_COMMAND'
I_CALLBACK_PF_STATUS_SET = C_PFSTATUS_FORM
IT_FIELDCAT = I_FIELDCAT
I_SAVE = V_SAVE
IS_VARIANT = V_VARIANT
TABLES
T_OUTTAB = I_XREF
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
.
.
.
.
.
.
.
.
.
FORM F_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
IF R_UCOMM = '&REFR'.
SUBMIT <report name>
WITH S_DATE IN L_DATE
WITH S_TPEDEL IN L_TPEDEL
WITH S_SAPDEL IN L_SAPDEL.
ENDIF.
ENDFORM.
I tried SUBMIT <report name> without the selection screen parameters as well. I tried putting in a flag or something in INITIALIZE event, but since its INITIALIZE event - everything gets initialized. So there is no use.
Has someone experienced this before?
‎2006 Oct 06 9:38 PM
Jay, no need to resubmit the program, all you need to do is set some flags.
FORM F_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
IF R_UCOMM = '&REFR'.
<b>* Call the form which is getting the data into your
* internal table which is passed to ALV GRId
* Set the flags for refresh.
PERFORM get_data.
rs_selfield-refresh = 'X'.
rs_selfield-col_stable = 'X' .
rs_selfield-row_stable = 'X' .</b>
ENDIF.
ENDFORM.REgards,
Rich Heilman
‎2006 Oct 06 9:38 PM
Jay, no need to resubmit the program, all you need to do is set some flags.
FORM F_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
IF R_UCOMM = '&REFR'.
<b>* Call the form which is getting the data into your
* internal table which is passed to ALV GRId
* Set the flags for refresh.
PERFORM get_data.
rs_selfield-refresh = 'X'.
rs_selfield-col_stable = 'X' .
rs_selfield-row_stable = 'X' .</b>
ENDIF.
ENDFORM.REgards,
Rich Heilman
‎2006 Oct 09 1:20 PM
Hi Rich,
Thanks a ton, that did it!!
I rewarded the points to you, Thanks again.
-Jay.