Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent comparison in date

former_member1284402
Participant
0 Kudos

hi all,

i have to compare two date for exa: ITAB - BSTDK less than or equal to 29.02.2008, can any one please tell me how can i do?

its urgent.

regards saurabh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

If your ITAB-BSTDK is of type DATS, then it's simple

data : dat type sy-datum.

dat = '20080229'

if itab-bstdk < dat.

....

endif.

Regards,

Mohaiyuddin

5 REPLIES 5

Former Member
0 Kudos

Hi,

If your ITAB-BSTDK is of type DATS, then it's simple

data : dat type sy-datum.

dat = '20080229'

if itab-bstdk < dat.

....

endif.

Regards,

Mohaiyuddin

0 Kudos

sorry forgot to mention =

if itab-bstdk <= dat.

...

endif.

regards,

Mohaiyuddin

Former Member
0 Kudos

IF ITAB-BSTDK LE '20080229'.

  • then do what you want

endif.

Former Member
0 Kudos

do one thing

data: date type bstdk.

date = 29.02.2008.

now compare based on this date.it will work for sure.

plz reward if useful

vivek

Former Member
0 Kudos

hi check this...

data: begin of itab occurs 0,

date type sy-datum,

end of itab.

itab-date = sy-datum .

append itab.

if itab-date = '20080418'.

write:/ 'this is working'.

endif.

it will depends on the date format given to the system..

regards,

venkat.