In this article we would see how to populate a Grid dynamically using PeopleCode. Here we use a Dynamic View
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
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 */
It is a very interesting and is filled up with knowledge.you can also visit www.mypeoplesoft.com for more interesting blogs and to gain your knowledge.
ReplyDeletePeoplesoft HRMS Key Concepts
ReplyDeletePeopleSoft Set Control Field
Adding and Maintaining Person Of Interest in PeopleSoft
Peoplesoft Row Level Security Search Records
Understanding Future dated security in PeopleSoft
Simplified Way to Provide a Page Access in PeopleSoft
SQL Query to Find Direct Reports for a Manager in PeopleSoft
'Override Position Data' and 'Use Position Data' Option in Job Data Page
How the Various Date Fields on Employement Data Page are Updated
PeopleSoft HRMS key Concepts
Understanding Dynamic Prompts in PeopleSoft
Parallel Processing using Temporary Record with Application Engine in PeopleSoft
titanium arts
ReplyDeleteTATONIC 출장샵 ART CUSTOMING mens titanium wedding bands · TATONIC ROCKING sol.edu.kg T-TATONIC ROCKING T-TATONIC ROCKING T-TATONIC. This unique and deccasino original https://septcasino.com/review/merit-casino/ design is crafted with the use of sustainable