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:
Local File &MYFILE;
Local string &str_cnt;
Local string &FPath;
&str_cnt = XXX_REC_AET.RECNAME.Value | Char (9) | XXX_REC_AET.COUNTER1.Value;
&FPath = "\\psapsftt\TTEF\OneSource\PC-Inbound\Record.xls";
&MYFILE = GetFile(&FPath, "W", %FilePath_Absolute);
&file.WriteLine (&str_cnt);
OUTBOUND Code with creating file Layout.
rem *****************************************************************;
rem * PeopleCode to Export Data from Record to File *;
rem *****************************************************************;
Global string &Filepath;
Local Record &Rec;
Local File &FILE;
Local SQL &SQL;
rem &FILE = GetFile(&Filepath | "PSPO_COST_COMP_" | %Date | ".txt", "w", %FilePath_Absolute);
&FILE = GetFile(&Filepath | "PSPO_COST_COMP.txt", "w", %FilePath_Absolute);
If &FILE.IsOpen Then
If &FILE.SetFileLayout(FileLayout.PSS_COST_COMP_FL) Then
&Rec = CreateRecord(Record.PSPO_COST_COMP);
&SQL = CreateSQL("%Selectall(:1)", &Rec);
While &SQL.Fetch(&Rec)
&FILE.WriteRecord(&Rec);
End-While;
Else
/* do error processing -; filelayout not correct */
End-If;
Else /* do error processing -; file not open */
End-If;
&FILE.Close();
Step:5:Peoplecode
Global File &file;
&file.Close();
Title | Under | Posted on |
---|---|---|
Component interface Error: no rows exist for the specified keys | PeopleSoft Technical | 03/15/2019 - 3:54am |
ADD 24 months starting from current month.(peoplesoft) | PeopleSoft Functional | 07/29/2018 - 8:44pm |
TRC values dropdown | PeopleSoft Technical | 04/04/2018 - 12:54am |
how to find missing sequence in GRID and print the mising sequence number while saving through peoplecode | PeopleSoft Technical | 09/11/2017 - 4:49am |
Recent comments
2 years 16 weeks ago
2 years 21 weeks ago
2 years 21 weeks ago
2 years 23 weeks ago
2 years 23 weeks ago
2 years 23 weeks ago
2 years 26 weeks ago
2 years 27 weeks ago
2 years 30 weeks ago
2 years 36 weeks ago