Step:1 PeopleCode:
Local File &MYFILE;
Local string &str_cnt;
Local string &FPath;
&str_cnt = "Record Name" | Char(9) | "Count";
&FPath = "\\psapsftt\TTEF\OneSource\PC-Inbound\Record.xls";
&MYFILE = GetFile(&FPath, "W", %FilePath_Absolute);
&MYFILE.WriteLine(&str_cnt);
Step2:Doselect
%SelectInit(RECNAME)
SELECT RECNAME
FROM %Table(PSRECDEFN)
WHERE RECNAME NOT IN (Record Names)
AND RECTYPE NOT IN (2,3,5) /*2 - Derived/Work 3- Sub-Record 5- Dynamic View */
Step:3:SQl
%SelectInit(COUNTER1)
SELECT COUNT(*)
FROM %Table(%bind(RECNAME))
Step:4:PeopleCode:
Write the code in PeopleCode Action:
Local File &MYFILE;
&PS_SERVDIR = (GetEnv("PS_SERVDIR")) | "/";
&FPath = &PS_SERVDIR | "file.txt";
&MYFILE = GetFile(&FPath, "W", %FilePath_Absolute);
&MYFILE.WriteLine(&Input);
&MYFILE.Close();
SQLExec(SQL.CSGC_DB_NAME, &NAME);
SQLExec("SELECT URL FROM %Table(:2) WHERE DISTNODENAME=:1", &NAME, Record.CDM_DIST_NODE, &URL);
&PRCSOUTPUTDIR = &URL | "/CSGC_CSHEET1.pdf";
ViewContentURL(&PRCSOUTPUTDIR);
ViewContentURL(“www.gmail.com”);
Write the code in PeopleCode Action:
&FileName =
&ret = GetAttachment("RECORD://CSGC_CSHT_ATACH", &FileName, "/" | &FileName, "PS_SERVDIR", True);
&PS_SERVDIR = (GetEnv("PS_SERVDIR")) | "/";
&FilePath = &PS_SERVDIR | &FileName;
If &ret = %Attachment_Success And
FileExists(&FilePath, %FilePath_Absolute) Then
&TxtFile = (GetFile(&FilePath, "R", %FilePath_Absolute));
While &TxtFile.ReadLine(&Input)
&Input = LTrim(RTrim(&Input, " "), " ");
End-While;
End-If;
&TxtFile.Close();
Write the code in RowInit:
Local Rowset &Xlat;
&FLD = GetRecord(Record.PY_IC_WRK1).GetField(Field.ACCOUNT_TYPE_DD);
&FLD.ClearDropDownList();
&Xlat = CreateRowset(Record.PSXLATITEM);
&Xlat.Fill("WHERE FILL.FIELDNAME = 'ACCOUNT_TYPE_DD' AND FILL.FIELDVALUE IN ('C','S')");
&Xlat_cnt = &Xlat.ActiveRowCount;
For &I = 1 To &Xlat_cnt
&CodeIn = &Xlat.GetRow(&I).GetRecord(1).FIELDVALUE.Value;
&DescIn = &Xlat.GetRow(&I).GetRecord(1).XLATLONGNAME.Value;
&FLD.AddDropDownItem(&CodeIn, &DescIn);
End-For;
If &MYRQST.Status = 0 Then /* if Schedule status is success */
&LOOP = 0;
While &LOOP = 0
SQLExec("SELECT A.DISTSTATUS, A.RUNSTATUSDESCR FROM PS_PMN_PRCSLIST A WHERE A.PRCSNAME = :1 AND A.PRCSINSTANCE = (SELECT MAX(B.PRCSINSTANCE) FROM PS_PMN_PRCSLIST B WHERE B.PRCSNAME = A.PRCSNAME)", &MyAppName, &POSTED, &STATUS);
If &STATUS = "Success" And
&POSTED = 5 Then /* Posted */
&LOOP = 1
End-If;
If &STATUS = "Success" And /* Not Posted */
&POSTED = 4 Then
Couple PeopleCode functions I came across. One insures a string consists of numbers and one insures a string consists of letters.
Below is a complete list of all PeopleTools object types with value number and description.
Today, I had my first 'Data Integrity Error (124,85)' in PeopleSoft.
It occured while I was trying to run a QA external check on the careers page for my client. I was not the only consultant who received this error - one of the others who I work alongside received the same error.
Use function
SetSaveWarningFilter( True);
| Title | Under | Posted on |
|---|---|---|
| how to send hyperlink with email in application engine program. | PeopleSoft Technical | 06/13/2013 - 12:55am |
| Saving records | PeopleSoft Technical | 06/04/2013 - 11:11am |
| can we alter a trigger in DB2 to add a new column | SQL & PL/SQL | 05/29/2013 - 1:31am |
| Required Peoplesoft HRMS Functional Training | PeopleSoft Functional | 05/07/2013 - 10:29pm |
Recent comments
1 week 6 days ago
7 weeks 2 hours ago
7 weeks 5 days ago
7 weeks 5 days ago
7 weeks 6 days ago
8 weeks 1 day ago
8 weeks 1 day ago
8 weeks 6 days ago
9 weeks 1 day ago
9 weeks 4 days ago