Register today for Oracle CloudWorld. October 17th - 20th, Las Vegas

Register now

Hillel Cooperman, Senior VP of User Experience Design, has a message for you on Oracle CloudWorld

Watch now
Dependent Coverage End Date Fast Formula — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Dependent Coverage End Date Fast Formula

Accepted answer
16
Views
9
Comments
edited Jul 2, 2021 6:14AM in Benefits 9 comments

Summary

Need a Fast Formula for Dependent Coverage End Date

Content

We have a requirement, when dependent turns 30 years, the coverage should end on last day of the Year. I have writen below FF but it is not working. TO calculate the age of dependent I use a DBI, it is picking the employee's DOB. Can someone help me to improve this FF.

 

Version

21A

Code Snippet

DEFAULT FOR PER_PER_DATE_OF_BIRTH is '1951/01/01 0:00:00'(date)
DEFAULT FOR BEN_PIL_LF_EVT_OCRD_DT is '1950/01/01 00:00:00'(date)

l_age = 0
l_eff_date = BEN_PIL_LF_EVT_OCRD_DT
l_eff_date_year = TO_CHAR(BEN_PIL_LF_EVT_OCRD_DT,'YYYY')
l_cov_end_date = '12/31/'||l_eff_date_year
l_dob = PER_PER_DATE_OF_BIRTH

l_log_data = ESS_LOG_WRITE('FF Start BEN_DEP_CVG_END_DATE')
l_log_data = ESS_LOG_WRITE('l_eff_date: '||TO_CHAR(l_eff_date))
l_log_data = ESS_LOG_WRITE('l_eff_date_year: '||l_eff_date_year)
l_log_data = ESS_LOG_WRITE('l_cov_end_date: '||l_cov_end_date)
l_log_data = ESS_LOG_WRITE('l_dob: '||TO_CHAR(l_dob))
l_log_data = ESS_LOG_WRITE('Age: '||TO_CHAR(MONTHS_BETWEEN(l_eff_date,l_dob)))


IF ( MONTHS_BETWEEN(l_eff_date,l_dob) = 360 ) THEN
(
l_output = TO_DATE(l_cov_end_date)
)

l_log_data = ESS_LOG_WRITE('FF End BEN_DEP_CVG_END_DATE')

return l_output

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!