Hi
I suppose the BAPI BAPI_EXCHANGERATE_GETDETAIL returns the last exchange rate valid for the date in the input
I don't know if there's a tools or a funtcion to calculate the avarage value, I believe you need to calculate by your self or it need to create a new rate type where it can save it
Max