Below is a common function that can used to make pages in a component display only.
Function Componentdisplayonly()
&COMPONENT = %Component;
&PAGES = CreateSQL("SELECT PNLNAME FROM PSPNLGROUP WHERE PNLGRPNAME = :1", &COMPONENT);
While &PAGES.Fetch(&PAGE)
GetPage(@("PAGE." | &PAGE)).DisplayOnly = True;
End-While;
End-Function;