‎2008 Jul 14 12:56 PM
Hello!
I need to write a simple program. The program has to check if 15th of month is.
IF lv_datum = 15 (of month)
do smth...
ENDIF.
Can anybody help me?
Thanks!
‎2008 Jul 14 12:58 PM
hi,
do this way ..
IF lv_datum+6(2) = '15'.
do smth...
ENDIF.
‎2008 Jul 14 12:57 PM
hi Andrei,
IF lv_datum+6(2) EQ '15'.
...
ENDIF.hope this helps
ec
‎2008 Jul 14 12:58 PM
This is very simple. You have your date in a variable declared as type DATUM? DATUM fields are always stored as yyyymmdd so you just need to use offsets to get the last two digits out of your date field and then check if they equal 15.
‎2008 Jul 14 12:58 PM
hi,
do this way ..
IF lv_datum+6(2) = '15'.
do smth...
ENDIF.
‎2008 Jul 14 1:19 PM
ok Thanks!
IF lv_datum+6(2) = '15'.
do last day of the month, but next month??
ENDIF.
e.g. 31.07.2008 and I need 31.08.2008??
Thanks!
‎2008 Jul 14 1:22 PM
‎2008 Jul 14 1:23 PM
IF lv_datum+6(2) = '15'.
Use FM BKK_ADD_MONTH_TO_DATE .. to get next month
ENDIF
‎2008 Jul 14 1:24 PM
hi,
Use RP_LAST_DAY_OF_MONTHS / LAST_DAY_OF_MONTHS for getting the last day of the month ..
Regards,
Santosh
‎2008 Jul 14 1:00 PM
Hi,
you can code like this
if lv_datum+6(2) = '15'
*your logic
endif.
Cheers
Kothand