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: 

Refresh in ALV

former_member200338
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

Hi,

Please clear your ok_code after deleting line.

best,

wojciech

0 Kudos

did that already.. no use

Former Member
0 Kudos

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

Former Member
0 Kudos

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