08-19-2007 3:05 PM
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
08-19-2007 11:48 PM
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
08-19-2007 3:07 PM
08-19-2007 3:08 PM
08-19-2007 3:20 PM
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
08-19-2007 11:48 PM
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