Hi ,
I think you should do @ modeling level only create one z infoobject and add into datatarget.
Modify transfirmation for new infoobject source infoobject is fisacal period.create feild routine
and replace zero with 'P' and use this new infoobject in your query it will give you required output.
Regards,
Ganesh Bothe