Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem at Selection-screen

Former Member
0 Likes
805

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......

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
672

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

4 REPLIES 4
Read only

Former Member
0 Likes
673

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

Read only

Former Member
0 Likes
672

HI Shiva

After the FM or CALL SCREEN statement, write LEAVE LIST-PROCESSING.

Pushpraj

Read only

Former Member
0 Likes
672

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

Read only

former_member156446
Active Contributor
0 Likes
672

make sure you use the start of selection event as well...