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

Refresh in ALV

Former Member
0 Likes
824

Hi,

i have ALV report. i am having many records in it. (say 1000). I have created custom button in PF status.

Now when i select a line and press some button on the application bar ( Say Delete), i am deleting the selected line. i am displaying the success message in the status bar.

Now the problm is, after deleting the record, when i scroll down the page, the success message is displayed again and again.

How to avoid this? i have used the refresh in user command. no use..

PS: points will awarded for sure, if my query is solved

Regards,

Niyaz

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
798

Hi Niyaz,

Try this way,

DATA : LV_UCOMM LIKE SY-UCOMM.

LV_UCOMM = SY-UCOMM.

CASE 'LV_UCOMM'.

WHEN 'DEL'.

Delete entry from internal tabe and show status

CLEAR LV_UCOMM.

MESSAGE S000(ZMES).

WHEN 'OTHER'.

Do nothing.

ENDCASE.

Hopes it will solve your problem.

Ali

Hi,

i have ALV report. i am having many records in it. (say 1000). I have created custom button in PF status.

Now when i select a line and press some button on the application bar ( Say Delete), i am deleting the selected line. i am displaying the success message in the status bar.

Now the problm is, after deleting the record, when i scroll down the page, the success message is displayed again and again.

How to avoid this? i have used the refresh in user command. no use..

PS: points will awarded for sure, if my query is solved

Regards,

Niyaz

4 REPLIES 4
Read only

Former Member
0 Likes
798

Hi,

Please clear your ok_code after deleting line.

best,

wojciech

Read only

0 Likes
798

did that already.. no use

Read only

Former Member
0 Likes
798

Check where you are displaying the message - is it only after the delete is successful, or is it every time the USER_COMMAND event form is triggered?

I suggest you put a BREAK-POINT command in the user command form and debug through it when you delet a record and then when you scroll down a line. check the UCOMM field passed into the form is being cleared and see what path the code takes in the two circumstances.

Post the code of your user command form for people to look at if you are still unable to find the error.

Andrew

Read only

Former Member
0 Likes
799

Hi Niyaz,

Try this way,

DATA : LV_UCOMM LIKE SY-UCOMM.

LV_UCOMM = SY-UCOMM.

CASE 'LV_UCOMM'.

WHEN 'DEL'.

Delete entry from internal tabe and show status

CLEAR LV_UCOMM.

MESSAGE S000(ZMES).

WHEN 'OTHER'.

Do nothing.

ENDCASE.

Hopes it will solve your problem.

Ali