12-28-2009 8:15 AM
Hello,
I would like to calculate beetween two coloumns and I don't find corect data element. The field which be calculated are dates (delivery date - posting GR date). I have choosen the data type NUMC_5, but this data type is also positive. I would like to have - (minus) if the gr is before the delivery date.
Which data element should I choose?
BR
Saso
12-28-2009 8:23 AM
Hi Saso Poljansek,
There is no dataelement with Sign
You can achieve it as below.. multiply the value by -1 (Negative 1) based on condition. so the value becomes negative
if gr_date < delivery_date.
diff = delivery_date - gr_date.
diff = diff * -1 .
else.
diff = gr_date - delivery_date .
endif.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya
12-28-2009 8:21 AM
12-28-2009 8:23 AM
Hi Saso Poljansek,
There is no dataelement with Sign
You can achieve it as below.. multiply the value by -1 (Negative 1) based on condition. so the value becomes negative
if gr_date < delivery_date.
diff = delivery_date - gr_date.
diff = diff * -1 .
else.
diff = gr_date - delivery_date .
endif.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya