X0903 Return FYPN (F0008 Get Fiscal Year Period Number)
1 szCompany
2 jdTransactionDate
3
4
5
1 is the company you want
2 is the date you're interested in. So todays date or the DGJ date of the transaction (6 digit date)
I suspect if you are getting 0 then the dates aren't set up correctly for the company in F0008 F0010 etc
Example, My DV data is still stuck in 2012

My PY UT PD data is valid and in 2014
As for F0010 not being updated correctly, have a polite word with your finance dept as that's their job

(but maybe not in DV though)
It's moved on every month end so the GL is kept in synch etc
F0008 is a date pattern table that holds the actual period end dates (you get these by using X0903 F0008 Get Date)
So it depends what you're after. The actual current period in time (so month) or what E1 thinks the current period financially is.
This is a manual step after accounts have moved the month on correctly
Download JDE Object Browser from Patwel.com and play about with the BSFN