Sometime, we will need to investigate in PeopleCode for debug. Here is a short introduction for doing so. 1. Use Getfile to debug PeopleCode. We simply use a file to log the data and variables. In PeopleCode syntax, items in keyword font indicate function names, method names, language constructs, and PeopleCode reserved words that must be included literally in the function call. Variable. In PeopleCode syntax, items in variable font are placeholders for arguments that your program must supply. ... Jul 31, 2019 · SQLExec("select roleuser from psroleuser where rolename='PeopleSoft Administrator' and roleuser=:1", &signonusername, &roleuser); If &userName = "" Then SetAuthenticationResult( True, Upper(&signonusername), "", False); After you have createda SQL definition, you can use it to populate a SQL object (using FetchSQL,Open, or GetSQL) You can also create a SQL statement in PeopleCode(using CreateSQL), save it as a SQL definition (StoreSQL), then accessit in Application Designer. Related Links.
A star is born amazon
Thank you guys for responding. The command was running fine from shell scripts but not from Peoplesoft. It turned out that the current folder on the application server was not correct. So I added a CD command as the first line in the shell script to change current folder to the correct folder. That worked. Thanks again. Can a function having SQLExec statements, be called from a peoplecode fieldformula event? According to peoplebooks, SQLExec statements can only be issued in saveprechange, workflow, savepostchange and/or fieldchange events.How does excel generate random numbers
Most of us here follow the good practice of executing our SQL statements directly against the database (using our favorite SQL editor, off course) before using them within an SQLExec in PeopleCode, a view or an SQL actions in App Engines. Even after following this, we might get hit in some situations.The PeopleCode Request and Response objects are available to the PeopleCode program through the system variables %Request and %Response. The PeopleCode program is then responsible for generating every aspect of the HTML page that is to be returned to the browser. Use %TextIn meta-sql for the bind variable that is used for inserting into a long field. For e.g. %TextIn(:1) %TextIn is documented in peoplebooks and is mandatory for all insertions/update of LongChar fields using sqlexec for all database platforms. Here are some resolutions that discusses this issue in Metalink – Oracle support site. The PeopleCode trace can be stopped by turning off all of the check boxes on the PeopleCode trace control panel and selecting the set push button. It can also be turned off within PeopleCode by passing the parameter zero to the SetTracePC built-in function. Executing SQL in PeopleCode. Where a SQLExec(built-in function) only delivers a single row, using the SQL class you can retrieve and process multiple rows. Instantiate a SQL object with the CreateSQL built-in function. Use CreateSQL("SQLString") to pass a text string to your SQL object. Use GetSQL(SQL.sqlname) to get the SQL from a SQL definition. Dec 05, 2013 · To audit the number of effected rows, during conversion/interface run %SQLROWS can be used.%SQLROWS returns the number of rows affected by the most recent UPDATE, DELETE, or INSERT executed through the SQLExec function.%SQLROWS can also be used after SELECT.