Remove double date rows in assortment table

Profile: priyabratiter
Tags:
SAP ABAP
I have a requirement to delete double date rows in an assortment table for a given location and product and correct it. I have assortment table. It consists of fields like location, product, start date from ,start date to, time stamp. The program should check the zassortment table, if any double date exists for the given location, product (Note: for checking multiple entries - 1 location or 1 product at a time). If more than 1 product exists for the same location, and store date from less than today’s date and store date to greater than today’s date, then delete the product with the oldest start date. For e.g.: In the selection screen we gave location: 12345 and products: 98331 and 98555. The entries in the ZASSORTMENT table are as below: Location Product Store date from Store date to time stamp:
12345 98331 20.10.2012 31.12.9999 27.05.2013

12345 98331 29.05.2013 31.12.9999 28.05.2013

12345 98555 20.10.2012 31.12.9999 29.05.2013

12345 98555 25.05.2013 31.12.9999 30.05.2013
Here for product 98331 of location 12345, there are double entries of date.That is the first row product 98331, date lies from 20.10.2012 to 31.12.9999 and the second row product lies from 29.05.2013 to 31.12.9999 ,which is in between the date of first row product that is from 20.10.2012 to 31.12.9999. So we have to delete the row, which has oldest start date that is the first row which has start date from 20.10.2012 and we have to keep only the latest start date from that is 29.05.2013. Similarly we can do for product 98555 of location 12345. So below will be the result. Location Product Store date from Store date to time stamp:
12345 98331 29.05.2013 31.12.9999 28.05.2013

12345 98555 25.05.2013 31.12.9999 30.05.2013
Kindly help for this, how to write the report. Regards! Priyabrat

1 Reply to this discussion

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members reply.
  • mohammedkhalid
    only way to delete the field using table maintainance generate
    310 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: