cancel
Showing results for 
Search instead for 
Did you mean: 

Validity check code in ABAP

Former Member
0 Kudos

Hi Gurus,

Need to validate a date in a function module

I have Todate and Fromdate fields in the table. I have to return value of a field, if the input date lies with in the Fromdate and Todate.

Can anyone help me with the code for validating an input date.

Thanks,

Regards,

aarthi

aarthi.sap@gmail.com

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Aarthi,

You can use the following simple logic.

if input >= From date and if input <= To date

Successful.

else.

Failure.

endif.

Hope this helps.

Former Member
0 Kudos

Hi aarthi,

in simple way u can validate the input date by splitting and checking against first year then month and then date...just 3 if stmts...

apparao

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Aarthi,

You can check the function module RSSH_CHECK_DATES which takes DATEFROM and DATETO as input parameters which internally calls RSAR_DATE_CHECK_PLAUSIBILITY which validates for correct date..

Hope this helps.

Regards

Manga(Assign points)