I was trying to get the compa-ratio for my query using PNCPE logical database. I found the following fields coming zero after selecting them
Min. grade level, Min. grade level, Max. grade level,Max. grade level, Compa-R, Midpoint of pay grade, Midpoint of pay grade
I guess I don't have compensation management in the company that would be the reason, but I need to atleast have compa-ratio from somewhere. Any ideas???

Are you looking at the compa-ratios fields on IT0008? If so, the planned comp type field (P0008-CPIND) must be an 'S'. This signals that there is a relationship from the employee back to the salary structure in Comp Management.

You need to make sure the integration between IT0008 (Basic Pay) and IT1005 (Planned compensation) is turned on. You do this by checking Table T77S0, Group PLOGI, Sem. Abbr. BSPAY. The setting should "X" to have the integration on or spaces to have it off.

Then the employee needs to be in a Position/Job that has the Planned Compensation infotype set-up with Pay Grade information. Compa-ratio won't work with Pay Scale or Direct planned comp.