‎2009 Feb 26 1:25 PM
Hi,
I generated a Report program, which displays output in ALV Grid format.
The logic works fine.
But, when I click 'ENTER' at selection-screen with all necessary data, the report is getting executed and ALV output is displayed.
I come back and again press 'ENTER' , the report is getting executed again and ALV output is displayed twice.
This continues as many times I press 'ENTER' on the selection-screen.
What should I do to avoid this problem?
Thanks,
Shivaa......
‎2009 Feb 26 1:33 PM
Put break-point on selection screen.Check the SY-UCOMM's value when you press enter.
Value of Sy-ucomm should be always space.If its ONLI there is some program.
If its Sy-ucomm = space use:
Use the codes to block ENTER.
TABLES:
spfli,sscrfields.
SELECT-OPTIONS:
s_carrid FOR spfli-carrid.
AT SELECTION-SCREEN.
IF s_carrid IS INITIAL.
CLEAR sscrfields-ucomm.
MESSAGE 'ENTER A VALUE' TYPE 'E'.
ENDIF.
CHECK sscrfields-ucomm = 'ONLI'.
START-OF-SELECTION.
WRITE:/ s_carrid-low.ESLEIF ONLI
check FCODE assignment .
<If not working paste selection screen codes>
Regards,
Gurpreet
‎2009 Feb 26 1:33 PM
Put break-point on selection screen.Check the SY-UCOMM's value when you press enter.
Value of Sy-ucomm should be always space.If its ONLI there is some program.
If its Sy-ucomm = space use:
Use the codes to block ENTER.
TABLES:
spfli,sscrfields.
SELECT-OPTIONS:
s_carrid FOR spfli-carrid.
AT SELECTION-SCREEN.
IF s_carrid IS INITIAL.
CLEAR sscrfields-ucomm.
MESSAGE 'ENTER A VALUE' TYPE 'E'.
ENDIF.
CHECK sscrfields-ucomm = 'ONLI'.
START-OF-SELECTION.
WRITE:/ s_carrid-low.ESLEIF ONLI
check FCODE assignment .
<If not working paste selection screen codes>
Regards,
Gurpreet
‎2009 Feb 26 1:34 PM
HI Shiva
After the FM or CALL SCREEN statement, write LEAVE LIST-PROCESSING.
Pushpraj
‎2009 Feb 26 1:35 PM
Hi Shiva,
First check if the ALV is bound or not. IF it is bound then you will have to refresh the table display otherwise display the complete ALV.
In your problem you are displaying a new ALV again and again so a new object is being creating again and again. So refreshing the ALV will solve your issue instead of displaying again.
If alvgrid is not initial.
Call method SET_TABLE_FOR_FIRST_DISPLAY,
Else.
Write another method REFRESH_TABLE_DISPLAY.
Endif.
Regards,
Komal
Edited by: Komal Prakashlal Lakhwani on Feb 26, 2009 7:07 PM
‎2009 Feb 26 1:45 PM