0% found this document useful (0 votes)
736 views

PeopleSoft Grid

PeopleSoft grids allow sorting and searching of data when enabled by the developer. A grid must be associated with a table or view to be complete. If using a derived record as the main record, an error will occur. Instead, use a dynamic view with an empty SQL definition as the main record. Grids can be populated dynamically using PeopleCode by creating a SQL object, rowset, fetching data, and inserting rows.

Uploaded by

chakrips
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
736 views

PeopleSoft Grid

PeopleSoft grids allow sorting and searching of data when enabled by the developer. A grid must be associated with a table or view to be complete. If using a derived record as the main record, an error will occur. Instead, use a dynamic view with an empty SQL definition as the main record. Grids can be populated dynamically using PeopleCode by creating a SQL object, rowset, fetching data, and inserting rows.

Uploaded by

chakrips
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

PeopleSoft Grid

PeopleSoft, by default, provide options to sort and search contents of the grid. Users can add / remove data from the grid when these features are enabled by the developer.

Peoplesoft Grid PIA

Peoplesoft Grid App Designer

Peoplesoft Grid Levels A major differentiation of PeopleSoft Grids from other objects on a PeopleSoft page is that a table or view needs to be associated with them for the definition to be complete. In short, you may not place a grid with the main record as a Derived / Work record on a page.

PeopleSoft Error: no data for scroll If the Main Record provided is a Derived / Work record, PeopleSoft Application Designer would throw an error stating No data for scroll. In such a case, the best alternative would be to use a Dynamic view with SQL Definition left blank as the main record and check the No Auto Select and No Auto Update on the Use tab of the Grid properties. You can then populate the grid using PeopleCode

Grid Properties

PeopleSoft Grid Properties Main Record

PeopleSoft Grid PeopleCode


In this article we would see how to populate a Grid dynamically using PeopleCode. Here we use a Dynamic View SGK_VCHR_DVW as the main record of the Grid. The grid is placed on level 1 of a secondary page and is populated using Peoplecode written in the Activate event of the secondary page. We use the SQL object &VCHRS_GRD_SQL to fetch some Voucher IDs and Vendor IDs from the database and populate the grid with these values.
Local SQL &VCHRS_GRD_SQL; /* SQL object for fetching the vouchers and vendors*/ Local Rowset &VCHRS_GRD_RS; /*Rowset for accessing the Grid*/ &VCHRS_GRD_SQL = CreateSQL("SELECT V.VOUCHER_ID, V.VENDOR_ID FROM PS_VOUCHER V WHERE V.BUSINESS_UNIT =:1 AND V.ACCOUNTING_DT > :2", &SGK_BU, &SGK_ACCTG_DT); /*creating the SQL statement*/ &VCHRS_GRD_RS = GetLevel0()(1).GetRowset(Scroll.SGK_VCHR_DVW); /*creating a rowset corresponding to the grid */ While &VCHRS_GRD_SQL.Fetch(&GRD_VOUCHER_ID, &GRD_VENDOR_ID) &VCHRS_GRD_RS(1).SGK_VCHR_DVW.VOUCHER_ID.Value = &GRD_VOUCHER_ID; /*assigning the voucher ID to the filed in the grid */ &VCHRS_GRD_RS(1).SGK_VCHR_DVW.VENDOR_ID.Value = &GRD_VENDOR_ID; /*assigning the Vendor ID to the filed in the grid */ &VCHRS_GRD_RS.InsertRow(0); /* inserting a new row at the beginning of the grid*/ End-While; &VCHRS_GRD_RS.DeleteRow(1); /* deleting the empty row left after all the insertions */ &VCHRS_GRD_SQL.Close(); /* closing the SQL object */

You might also like