‎2007 Aug 10 5:55 AM
hi guru's,
i have fkdat in my selection screen. but it have to take input as month not to take date format. and in output it has to display records of the perticular month which i selected.
help me.
thanks in advance.
‎2007 Aug 10 5:57 AM
Declare FKDAT of type i.
& build the logic to retrieve data based on FKDAT value.
‎2007 Aug 10 5:57 AM
Declare FKDAT of type i.
& build the logic to retrieve data based on FKDAT value.
‎2007 Aug 10 6:00 AM
Hi,
You can take 2 charecter lenght field in the Screen for the Month,
then write the logic, like if the date+2(2) then get the data
Regards
Sudheer
‎2007 Aug 10 6:02 AM
‎2007 Aug 10 6:04 AM
PARAMETERS: P_MAAND(2) TYPE N, 'month
P_JAAR(4) TYPE N. 'year
AT SELECTION-SCREEN.
IF P_MAAND IS INITIAL
AND P_JAAR IS INITIAL.
IF SY-DATUM+4(2) = 01.
P_MAAND = 12.
P_JAAR = SY-DATUM(4) - 1.
ELSE.
P_MAAND = SY-DATUM+4(2) - 1.
P_JAAR = SY-DATUM(4).
ENDIF.
ENDIF.
IF P_MAAND < 01
OR P_MAAND > 12.
MESSAGE ID 'ZZ' TYPE 'E' NUMBER '000'
WITH 'Error : check selected month'(300).
ENDIF.
reward points to all helpful answers
kiran.M
‎2007 Aug 10 6:20 AM
Hi,
Try like this:
parameters: fkdat like vbrk-fkdat.
fkdat = fkdat+4(2).
write: 'Month is: ', fkdat.
Regards,
Bhaskar