09-18-2012 3:39 PM
Hi experts,
is there any way to compare the
month and date of table field with month and date of
sy-datum .
for Example
By using the select statement
select pernr nachn vorna from pa0002 into TABLE itab where gbdat = sy-datum.
the query retrieving results in which the gbdat equal to sy-datum( no records are fetched because for ex gbdat =19800918 and sydatum = 20120918 )
but i want to compare only the month and date of gbdat field with month and date of
sy-datum .
Regards
Prasad
09-18-2012 3:55 PM
Did you try to consider date field as 8 characters long field.
TABLES: pa0002.
DATA: itab TYPE TABLE OF pa0002,
wildcard TYPE c LENGTH 8.
wildcard = sy-datum.
wildcard+0(4) = '____'.
SELECT * INTO TABLE itab
FROM pa0002
WHERE gbdat LIKE wildcard.
BREAK-POINT.
Happy birthday ?
Regards,
Raymond
09-18-2012 3:55 PM
Did you try to consider date field as 8 characters long field.
TABLES: pa0002.
DATA: itab TYPE TABLE OF pa0002,
wildcard TYPE c LENGTH 8.
wildcard = sy-datum.
wildcard+0(4) = '____'.
SELECT * INTO TABLE itab
FROM pa0002
WHERE gbdat LIKE wildcard.
BREAK-POINT.
Happy birthday ?
Regards,
Raymond
09-20-2012 11:07 AM