How to Check FI period opended/closed use SAP ABAP

Sometimes, We need to check whether the FI period of Tc