on 04-21-2008 5:46 AM
Hi All,
I want to comparision two dates..
I have Invoice Date and LR date..i want that LR Date must not be less than Invoice Date...what should be condition for it..
Ex:-
Invoice Date - 15.04.2008 ......LR Date 20.04.2008 - Correct
Invoice Date - 15.04.2008 ......LR Date 10.04.2008 - Wrong (should not taken).
Plz tell me coding part..
Thanks..
You can use the Function module
FIMA_DAYS_AND_MONTHS_AND_YEARS- This function module will give the difference of dates in days, months and years.
Pass 'Invoice date' to I_DATE_FROM parameter
and 'LR Date' to I_DATE_TO paramater of the function module.
Output will be as foolows:
If the LR date is greater than Invoice date
E_DAYS will be greater than 0.
So you can continue the logic by checking this condition.
( If E_DAYS > 0.)
Reward if useful.
Thanks & regards,
Swarna Munukoti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the operations LT,GT, LE,GE but both LR and Invoice dates should be of type Date and both are of same format
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use function module for calculate difference between two dates by DAYETWEEN_TWO_DATES..within this you just pass invoice date and LR date and get the result into some parameter like p_date.
write condition like:
p_date = invoice date - LR date.
if p_date LE 0.
error message.
endif.
try this...it may helps you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
do this way ...
if v_inv_dat ge v_lr_dat.
<<< do something >>>
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use normat LE and GE operators itself.
IF w_date GE w_invoicedate.
write 'Correct date'.
Else.
Write 'Incorrect date'.
ENDIF.
Thanks and Regards,
Lakshmi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.