Application Development 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: 

ALV: messages repeat when scrolling

michael_wallace2
Explorer
0 Kudos

I have created a report with an ALV output. Lines of the output are selectable and details can be used, in my case to send an email. If the email address cannot be found I have used an error message to tell the user that there is a problem.

MESSAGE e001(zr0608) WITH w_orders-ernam.

The user cancels the message, but if the list is more than a page and the scroll bar (or up and down arrows) are used, the error message reappears.

I have debugged the code and the message is not being reprocessed. This is also happening in other ALV programs, with similar error processing. It also happens with warnings.

MESSAGE w001(zr0608) WITH w_orders-ernam.

Can someone tell me why this is happening and what can be don about it. I suspect that it is some thing top do with the GUI (we are running Gui v7.1, but I have tried it out on the 4.7).

4 REPLIES 4

former_member188685
Active Contributor
0 Kudos

is it OOALV...? where are you rasing the error. are you using the protocol message..

michael_wallace2
Explorer
0 Kudos

No this is not an OOALV . I am raising the error in a separate subroutine, which is triggered by the user selecting an icon in the application toolbar. This subroutine loops through the ALV output table.

The error is created via the statement:

select single smtp_addr

from adr6

into w_email_addr

where persnumber = w_persnumber

and date_from le sy-datum

and flgdefault = 'X'.

if sy-subrc <> 0 .

message e001(zr0608) with w_orders-ernam.

endif.

Thanks for your interest...Mike

0 Kudos

then are you using the USER_COMMAND routine.

use selfield-refresh = 'X' and see.

form user_command using ucomm type sy-ucomm selfield type slis_selfield.

....
....
.....


selfield-refresh = 'X'.
endform.

0 Kudos

Yes this set as below.

FORM alv_user_command USING uco_ucomm TYPE syucomm

uco_sel TYPE slis_selfield.

CASE uco_ucomm.

WHEN 'ME22'. PERFORM ucomm_me22n.

.

.

.

WHEN 'SBWP'.

CALL TRANSACTION 'SBWP'.

EXIT.

WHEN 'EMAIL'.

PERFORM process_email.

ENDCASE.

uco_sel-refresh = 'X'.

uco_sel-col_stable = 'X'.

uco_sel-row_stable = 'X'.

ENDFORM. " alv_user_command