‎2008 Dec 30 8:57 PM
HI ,
i have a VIEW and i want to avoid from the user the option to delete specific combination for that in the view code i keep the table extract before the modify and after and then i have 2 internal tables one with original data and the second with data after modifying.
i give example.
Assume i want to avoid from the user to delete the combination a1 b1 c1 mail.
and the user mark the line in the view to delete, i see in second table that i get mark sign.
itab before
field1 field 2 field 3 description
a1 a2 a3 mail
b1 b2 b3 notif
c1 c2 c3 mail
d1 d2 d3 notif
a1 a2 a3 task
f1 f2 f3 notif
itab after
field1 field 2 field 3 description mark
a1 a2 a3 mail
b1 b2 b3 notif
c1 c2 c3 mail
d1 d2 d3 notif
a1 a2 a3 notif M
f1 f2 f3 task
Another thing i want to give the user option to delete the combination just if in the table
there is no entry with the combination but different description i.e.
if in the table i have for the combination :
a1 a2 a3 mail
a1 a2 a3 notif
the user can't delete it.
but if he have in table just one entire like below with description mail :
a1 a2 a3 mail
he can delete it .
what is the best way to do that ?
Regards
‎2008 Dec 30 9:43 PM
Hi Michael,
The best thing to do is to use [table maintanance events|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc].
I think in your case you can use 03 event - Before deleting the data displayed. In the routine you just check appropriate conditions like if certain combinations of records exists.
This should help you
Marcin
‎2008 Dec 30 9:43 PM
Hi Michael,
The best thing to do is to use [table maintanance events|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc].
I think in your case you can use 03 event - Before deleting the data displayed. In the routine you just check appropriate conditions like if certain combinations of records exists.
This should help you
Marcin
‎2008 Dec 30 10:11 PM
HI,
Thanks ,
What if the user Modify the combination and after that he push to delete it,
i want also to avoid that any idea?
u have idea how to do the loop i new to abap.
Best Regards
‎2008 Dec 31 6:21 AM
Hi ,
Assume i want to do that in the screen (i don't want to use event for this issue) i need some help with the loop on the 2 table assume i have itab_before and itab_after,
i any appreciate help with that .
Best Regards
Michael A
Edited by: Michael A on Dec 31, 2008 7:59 AM