Posts

PeopleCode records: PSPCMNAME and PSPCMPROG

Most techies who’ve looked under the covers will be aware of PSPCMPROG. It’s the underlying table where PeopleCode is stored.  This isn’t immediately useful however as the actual code itself is stored in the PROGTXT field in binary so it’s not easily accessible. For me, this field isn’t quite the most useful on PSPCMPROG.  You may have noticed that if you update the PeopleCode on a record, the record properties aren’t updated to reflect the change – I guess because the record definition itself hasn’t changed (although strangely Component and Page PeopleCode do update the timestamp on the corresponding Component/Page definition – so there’s a bit of an inconsistency there).  So how do you check when and by whom a piece of Record PeopleCode was last updated? If you check the LASTUPDDTTM and LASTUPDOPRID fields on the PSPCMPROG record via SQL then it’s all recorded there. This snippet of knowledge has saved me (or at least expedited troubleshooting by showing me the corre...

Peoplecode to print a BI Publisher report on the click of a push button

Here, I am sharing peoplecode which is to be used for printing report using a push button from the page. All you need to do is to give the following constraints like- &MyReportName="Name from Report Definition in PIA" &MyTemplate="Template name from Report definition/template tab "  e.g., REPORT_NAME_1 and query prompts to filter the data in the report- &rcdQryPrompts e.g.,&rcdQryPrompts.PO_DT.Value = PO_HDR.PO_DT.Value; --------------------------------------------------------------------------------------------------------------------- import PSXP_RPTDEFNMANAGER:*; &LanguageCd = "ENG"; &AsOfDate = %Date; &OutFormat = "PDF"; &MyReportName = "REPORT_NAME"; &MyTemplate = "REPORT_TEMPLATE_NAME"; Local PSXP_RPTDEFNMANAGER:ReportDefn &oReportDefn = create PSXP_RPTDEFNMANAGER:ReportDefn(&MyReportName); &oReportDefn.Get(); Local Record &rcdQryPrompts...