Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Overlap of date range

Hi ,

I have a reqmnt of checking whether the two date ranges overlaps each other.

for e.g fromdate1 todate1 and fromdate2 todate2 should not intersect. Is there any FM for this, or can anyone help me with the logic please.

thanks

Points will be rewarded

Tags:
Former Member
Former Member replied

Dear Kantheri,

Your solution works of course very fine, but there is a simpler algorithm:

* Test date overlap
  IF  from_date LE wa_tab-to_date
  AND to_date   GE wa_tab-from_date.
*   It overlaps
*   ...
  ENDIF.

Actually this algorithm is used by SAP itself.

Regards,

Rob.

3 View this answer in context
Not what you were looking for? View more on this topic or Ask a question