Skip to Content
author's profile photo Former Member
Former Member

how to delete the specified no. of days from custom table

dear freinds

ihave on selection screen a parameter where user will enter the no.of days ( ex : 5 days) then i want to delete from my custom table all the records with status

= INACTIVE for the past five days .

i have records in the custom table as follows :

userid status name aedtm

zzkiran Inactive raja 2008/06/15

zzrajan Inactive roma 2008/06/11

zzsunil Inactive rohan 2008/06/10

since the user has entered on the selection screen 5 ( i.e means i want to delete all

the past five days records starting form 11 th of june to 15th june).

i have written the below code it is not working can you please correct my code as it

is delete only the record with aedtm on 2008/06/11 .......but not the record

of 15th june. this record also should get deleted as it falls on the this 5 days.however

i can see in debug the internal table fp_custom_empdata is having the record of 2008/06/15.

l_date = sy-datum - p_days.

note :p_days are the no of days the user has entered on the selection screen.

loop at fp_custom_empdata INTO l_gps_del_emp_data

where STATUS = 'INACTIVE'

and AEDTM <= l_date.

delete zhr_gps_emp_data from l_gps_del_emp_data.

endloop.

Please help me this logic is urgent.

thanks & regards

madhuri

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 03:53 AM

    Dear Freinds,

    I got the solution .

    thanks

    madhuri

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.