Sei sulla pagina 1di 6

1. %SelectInit 2. %EffdtCheck(JRNLGEN_APPL_ID B, A, %CurrentDateIn) 3. %CurrentDateTimeOut 4. %DateOut(B.ACCOUNTING_DT) 5. %UpdateStats(RECV_HDR_TMP2) 6. INSERT INTO PS_RECV_SCHD_TMP( %Sql(PORECVACCRCOMMONSCHDFLDS) ) 7.

%InsertSelect(WTHD_1099_TBL, 1099_RPT_TMP, WTHD_SETID = %Bind(SETID), WT HD_RPT_ID = %Bind(WTHD_RPT_ID_M), WTHD_CNTL_ID = %Bind(WTHD_CNTL_ID), PROCESS_IN STANCE = %Bind(PROCESS_INSTANCE)) FROM PS_1099_RPT_TMP WHERE PROCESS_INSTANCE = %Bind(PROCESS_INSTANCE) 8. A.EFFDT = ( SELECT MAX(A_ED.EFFDT) FROM PS_PROFILE_DET_TBL A_ED WHERE A.SETID = A_ED.SETID AND A.PROFILE_ID = A_ED.PROFILE_ID AND A.BOOK = A_ED.BOOK AND A_ED.EFFDT <= %CurrentDateIn) &File = GetFile(&Path, "W", %FilePath_Absolute); Peoplecode import SCM_SAC_ERP_INTG:ERP_INTG_OPTION:*; Declare Function get_cur_xchng_rt PeopleCode FUNCLIB_PM_SQL.CURRENCY_CD FieldFor mula; Error MsgGet(10200, 38, "PO is being processed by match module. Maintenance not allowed until released by match module."); &SELECTION = MessageBox(1, &BANNER, 10200, 32, "Purchase order being processed b y batch programs. Transferring to inquiry panels."); Transfer( False, MenuName."MANAGE_PURCHASE_ORDERS", BarName."INQUIRE", ItemName. "PO_INQUIRY", Page."PO_LINE_INQ", "U", PO_HDR.BUSINESS_UNIT, PO_HDR.PO_ID); DoCancel(); If %CompIntfcName = "AUC_CREATE_PO" Then &Open_Contracts_Array = CreateArrayRept(" ", 0); &rs_POLineShip = GetLevel0()(1).GetRowset(Scroll.PO_LINE)(&line).GetRowset(Scrol l.PO_LINE_SHIP); For &ship = 1 To &rsPOLineShip.ActiveRowCount; Local PO:ChangeOrder:Common &ChangeOrder = create PO:ChangeOrder:Common(); &rcdCntChng = CreateRowset(Record.PO_CHNG_REASON); &rcdCntChng.Fill(" WHERE BUSINESS_UNIT=:1 AND PO_ID=:2", PO_HDR.BUSINESS_UNIT , PO_HDR.PO_ID); If &rcdCntChng.ActiveRowCount >= 1 Then &sqlPoLnShipMtch = GetSQL(SQL.PO_LN_SHIP_MTCH_ADD); &sqlPoLnShipMtch.BulkMode = True; &sqlPoLnShipMtch.Execute(PO_HDR.BUSINESS_UNIT, PO_HDR.PO_ID); &sqlPoLnShipMtch.Close(); SQLExec(ExpandSqlBinds("update PS_" Record.PO_HDR " SET PO_STATUS = :1 WHERE BUSINESS_UNIT = :2 AND PO_ID = :3", &POSTATUS, PO_HDR.BUSINESS_UNIT, PO_HDR.PO _ID)); &SQLmain = " SET LINE_NBR = LINE_NBR - :1 WHERE BUSINESS_UNIT=:2 AND PO_ID=:3 AN D LINE_NBR >=:4"; SQLExec(ExpandSqlBinds("update PS_" Record.PO_LINE &SQLmain, &DELTA , &BUSINESS_UNIT, &PO_ID, &LINE)); PO_HDR.OPRID_MODIFIED_BY = %UserId; PO_HDR.LAST_DTTM_UPDATE = %Datetime;

PO_HDR.ACTIVITY_DATE = %Date; ActiveRowCount AddAttachment(URLDestination, DirAndFileName, FileType, UserFile[, MaxSize [, Pr eserveCase[, UploadPageTitle[, AllowLargeChunks]]]] ) DeleteAttachment DetachAttachment GetAttachment PutAttachment ViewAttachment CopyRow(destination_row, source_row) CurrentLevelNumber() CurrentRowNumber([level]) DeleteRecord(level_zero_recfield) DeleteRow(scrollpath, target_row) DiscardRow() FetchValue(scrollpath, target_row, [recordname.]fieldname) InsertRow(scrollpath, target_row [, turbo]) PriorValue(fieldname) RecordChanged(scrollpath, target_row) RecordDeleted(scrollpath, target_row) RecordNew(scrollpath, target_row) RowFlush(scrollpath, target_row) RowScrollSelect(levelnum, scrollpath, RECORD.sel_recname [, sqlstr [, bindvars]] [, turbo]) &Sql1 = CreateSql("Select * from " &AAny = CreateArrayAny(); While &Sql1.Fetch(&AAny) /* Process the row in &AAny. */ ... End-While; &TableName);

CurrEffDt([level_num]) - CurrEffDt function to return the effective date of the specified scroll level as a Date value CurrentLevelNumber() CurrentRowNumber([level]) GetField([recname.fieldname]) GetLevel0() GetPageField GetRecord([RECORD.recname]) GetRow() GetRowset([SCROLL.scrollname]) SetTracePC(n) SetTraceSQL(options) SetDefault([recordname.]fieldname) DeleteRecord(level_zero_recfield) DeleteRow(scrollpath, target_row) DoCancel( ) DoModalComponent function to launch a modal component DoModal(PAGE.pagename, title, xpos, ypos, [level, scrollpath, target_row]) -Use the DoModal function to display a secondary page. Secondary pages a re modal, meaning that the user must dismiss the secondary page before continuin g work in the page from which the secondary page was called DoSave function to save the current page. DoSave defers processing to the end of

the current PeopleCode program event DoSaveNow function is designed primarily for use with remote calls. It enables a PeopleCode program to save page data to the database before running a remote pr ocess (most frequently a COBOL process) that will access the database directly. It is generally necessary to call DoSaveNow before calling the RemoteCall functi on. Encrypt(KeyString, ClearTextString) GetFile(filename, mode [, charset] [, pathtype]) FileExists(filename [, pathtype]) GenerateComponentContentURL(PORTAL.portalname, NODE.nodename, MENUNAME.menuname, MARKET.marketname, COMPONENT.componentname, PAGE.pagename, action, [, keylist]) GetLevel0() IsAlphaNumeric(String) SetSearchDefault([recordname.]fieldname) EndModal(returnvalue) SendMail(flags, recipients, CCs, BCCs, subject, text, [, attachment_filenames][, attachment_titles] [, Mail_From] [,mail_sep] [, Content_Type] [,Reply_To] [,Sender]) CreateSQL([{sqlstring SQL.SqlName}[, paramlist]])

record field - FieldChange FieldDefault FieldEdit FieldFormula PrePopup RowDele te RowInit RowInsert RowSelect SaveEdit SavePostChg SavePreChg SearchInit SearchSave Workflow COMPONENT RECORD PEOPLECODE FieldChange FieldDefault FieldEdit PrePopup Component Record Events RowDelete RowInit RowInsert RowSelect SaveEdit SavePostChg SavePreChg SearchInit SearchSave Component Events PostBuild PreBuild SavePostChg SavePreChg Workflow

Page Event Activate Menu Events ItemSelected Record.recordA.fielda.FieldEdit -> Component.recordA.fielda.FieldEdit -> Record.recordB.fieldb.FieldEdit -> Component.recordB.fieldb.FieldEdit -> Record.recordA.fielda.FieldChange -> Component.recordA.fielda.FieldChange -> Record.recordB.fieldb.FieldChange -> Component.recordB.fieldb.FieldChange -> Component Processor Behavior from Page Start to Page DisplayBefore a user select s a component, the system is in reset state, in which no component is displayed. The Component Processor s flow of execution begins when a user selects a componen t from a PeopleSoft menu. The Component Processor then: 1. Performs search processing, in which it obtains and saves search key values f or the component. 2. Retrieves from the database server any data needed to build the component. 3. Builds the component, creating buffers for the component data. 4. Performs any additional processing for the component or the page. 5. Displays the component and waits for user action. Default Processing Rowinit Post Build Activate Field-Level Default Processing During default processing, the Component Processor examines all fields in all ro ws of the component. On each field, it performs the following: 1. If the field is set to NULL (blank) for a character field, or set to 0 for a numeric field, the Component Processor sets the field to any default value speci fied in the record field properties for that field. 2. If no default value for the field is defined in the record field properties, then the Component Processor initiates the FieldDefault event, which triggers an y FieldDefault PeopleCode associated with the record field or the component reco rd field. 3. If an error or warning executes in any FieldDefault PeopleCode, a runtime err or occurs.

Search Processing in Update Modes If a user selects any of the update action modes (Update, Update/Display All, or Correction), the Component Processor begins update mode search processing, 1. The SearchInit PeopleCode event is initiated, which triggers any SearchInit P eopleCode associated with the record field or the component search record, on th e keys or alternate search keys in the component search record This enables you to control the search page field values or the search page appe arance programmatically, or to perform other processing prior to the appearance of the search page SetSearchDialogBehavior 2. The search page and prompt list appear 3. The user enters a value or partial value in the search page, and then clicks Search 4. The SearchSave PeopleCode event is initiated,

Normally, no system edits are applied when the user changes a field in the s earch page. However, if the SearchEdit property is executed for specific search page fields in SearchInit PeopleCode, the system edits are applied to those fiel ds after the user changes a field and either leaves the field or clicks Search. In addition, the SearchEdit property can also be set in metadata for the record field definition. 5. The Component Processor buffers the search key values Search Processing in Add Modes 1. The Component Processor runs default processing on the high-level keys that a ppear in the Add or Data Entry dialog box. 2. The Component Processor initiates the RowInit event, which triggers any RowIn it PeopleCode associated with the record field or the component record, on the A dd or Data Entry dialog box fields. 3. The Component Processor initiates the SearchInit event on dialog fields, whic h triggers any SearchInit PeopleCode associated with the record field or the com ponent search record. 4. The Component Processor displays the Add or Data Entry dialog box. 5. If the user changes a dialog box field, and then leaves the field or clicks O K, the following actions occur In add mode only, a field modification processing sequence occurs Default processing is run on the Add or Data Entry dialog box fields 6. When the user clicks OK in the dialog box, the SaveEdit event is initiated, w hich triggers any PeopleCode associated with the record field or the component r ecord 7.The Component Processor initiates the SearchSave event, which triggers any Sea rchSave PeopleCode associated with the record field or the component search reco rd. 8. The Component Processor buffers the search key values and continues processin g. IsSearchDialog %Mode Component Build Processing in Update Modes After the Component Processor has saved the search keys values for the componen t, it uses the search key values to select rows of data from the database server using a SQL Select statement. After the rows are retrieved, the Component Proce ssor performs these actions 1. Performs row select processing, in which rows of data that have already been selected from the database server can be filtered before they are added to the component buffer. 2. Initiates the PreBuild event, which triggers any PreBuild PeopleCode associat ed with the component record, enabling you to set global or component scope vari ables that can be used later by PeopleCode located in other events. The PreBuild event is also used to validate data entered in the search page, aft er a prompt list is displayed. 3. Performs default processing on all the rows and fields in the component. 4. Initiates the RowInit event, which triggers any RowInit PeopleCode associated with the record field or the component record. 5. Initiates the PostBuild event, which triggers any PostBuild PeopleCode associ ated with the component record, enabling you to set global or component scope va riables that can be used later by PeopleCode located in other events. 6. Initiates the Activate event, which triggers any Activate PeopleCode associat ed with the page about to be displayed, enabling you to programmatically control the display of that page. 7. Displays the component and waits for end-user action

Row Select Processing Row select processing enables PeopleCode to filter out rows of data after they h ave been retrieved from the database server and before they are copied to the co mponent buffers. Row select processing uses a SQL Select statement . Row select processing is a subprocess of component build processing in add modes . It also occurs after a ScrollSelect or related function is executed. 1. The Component Processor checks for more rows to add to the component. 2. The Component Processor initiates the RowSelect event, which triggers any Row Select PeopleCode associated with the record field or component record. This enables PeopleCode to filter rows using the StopFetching and DiscardRow fun ctions. StopFetching causes the system to add the current row to the component, and then to stop adding rows to the component. DiscardRow filters out a current row, and then continues the row select process 3. If neither the StopFetching nor DiscardRow function is called, the Component Processor adds the rows to the page and checks for the next row. The process continues until there are no more rows to add to the component buffe rs. If both StopFetching and DiscardRow are called, the current row is not added to the page, and no more rows are added to the page. Component Build Processing in Add Modes 1. Initiates the PreBuild event. 2. Runs default processing on all page fields. 3. Initiates the RowInit event on all fields in the component, which triggers an y RowInit PeopleCode associated with the record field or component record 4.Initiates the PostBuild event, which triggers any PostBuild PeopleCode 5. Initiates the Activate event

Potrebbero piacerti anche