PushChangeEquipmentInformation

Push Change Equipment Master Information

Minor Business Rule

Object Name: N1700235

Parent DLL: CCRIN

Location: Client

Language: NER

Functional Description

Purpose

The purpose of Push Change Equipment Master Information is update the ownership of equipment records with a prompt or automatically.  Generally, 

this process will be controlled at the processing option level.  


Setup Notes and Prerequisites


Special Logic

The Asset Information must be resolved before this BSFN is called.  Asset Number, and New vs. Old Ownership is required for this BSFN to work.  

This will typically be called with the help of processing options from the calling application.  


These fields are reserved for future use: cmode, szErrorMessageID, cSuppressErrors.




Technical Specification

0009 // ===============================================================

0010 //                            I N I T I A L I Z E          V A R I A B L E S

0011 //    ---Top Level Error  - Not enough information to process a request---

0012 //    ---Customer Top Level Error - Not enough information to process the

0013 //        customer side of the Equipment master update---

0014 //    ---Site Top Level Error - Not enough information to process the

0015 //        site side of the Equipment master update---

0016 //    ---Push Customer Change - To process a customer update through a form---

0017 //    ---Push Site Change - To process a site update through a form---

0018 //    ---Update Customer Change - To process a customer update

0019 //        automatically through a BSFN---

0020 //    ---Update Site Change - To process a site update

0021 //        automatically through a BSFN---

0022 //    ---Customer Number Update - the Customer number to be updated (default

0023 //        to  original)---

0024 //    ---Site Number Update - the site number to be updated (default to

0025 //        original)---

0026 //    ---evt_DateUpdated_UPMJ - This is effective date for automatically

0027 //        updating ownership---

0028 //    ---evt_mnTimeUpdated_UPMT - This is effective time for automatically

0029 //        updating ownership---

0030 // ===============================================================

0031 VA evt_cTopLevelErrors_EV01 = " "

0032 VA evt_CustomerTopLevelError_EV01 = " "

0033 VA evt_CustomerTopLevelError_EV01 = " "

0034 VA evt_cPushSiteChange_EV01 = " "

0035 VA evt_cUpdateCustomerChange_EV01 = " "

0036 VA evt_cUpdateSiteChange_EV01 = " "

0037 VA evt_cUpdateSiteChange_EV01 = " "

0038 VA evt_mnCustomerUpdate_AN8 = ""

0039 VA evt_mnSiteNumberUpdate_LANO = ""

0040 VA evt_jdDateUpdated_UPMJ = ""

0041 VA evt_mnTimeUpdated_UPMT = ""

0042 BF szErrorMessageID = " "

0043 //

0044 Get Audit Information

        UNDEFINED X szUserName

        VA evt_jdDateUpdated_UPMJ <- jdDate

        VA evt_mnTimeUpdated_UPMT <- mnTime

        UNDEFINED X szWorkstation_UserId

        UNDEFINED X szMachineKey

0045 // ===============================================================

0046 //

0047 // ===============================================================

0048 //                                       T O P - L E V E L

0049 //    -These fields are required for processing

0050 // ===============================================================

     If BF mnAssetItemNumber is equal to 

0051    VA evt_cTopLevelErrors_EV01 = "1"

0052 End If

0053 //

     If BF cUpdateCustomer is not equal to "1,2"

0054    VA evt_CustomerTopLevelError_EV01 = "1"

0055 End If

0056 //

     If BF mnEnteredCustomer is equal to  Or BF mnEnteredCustomer is equal to  Or BF mnEnteredCustomer is equal to 

0057    VA evt_CustomerTopLevelError_EV01 = "1"

0058 End If

0059 //

     If BF mnOriginalCustomer is equal to  Or BF mnOriginalCustomer is equal to  Or BF mnOriginalCustomer is equal to 

0060    VA evt_CustomerTopLevelError_EV01 = "1"

0061 End If

0062 //

     If BF cUpdateSite is not equal to "1,2"

0063    VA evt_SiteTopLevelError_EV01 = "1"

0064 End If

0065 //

     If BF mnEnteredSite is equal to  Or BF mnEnteredSite is equal to  Or BF mnEnteredSite is equal to 

0066    VA evt_SiteTopLevelError_EV01 = "1"

0067 End If

0068 //

     If BF mnOriginalSite is equal to  Or BF mnOriginalSite is equal to  Or BF mnOriginalSite is equal to 

0069    VA evt_SiteTopLevelError_EV01 = "1"

0070 End If

0071 //

     If VA evt_SiteTopLevelError_EV01 is equal to "1" And VA evt_CustomerTopLevelError_EV01 is equal to "1"

0072    VA evt_cTopLevelErrors_EV01 = "1"

0073 End If

0074 //

     If VA evt_cTopLevelErrors_EV01 is not equal to "1"

0075    // ===============================================================

0076    //               A U T O M A T I C           U P D A T E

0077    //    -Do Automatic updating first, so if one of the paramters is to update

0078    //     with the form, the newly updated customer/site will already have been

0079    //     resolved.  Check customer/site update for automatic.  If they are for

0080    //     form processing, this will run faster.  If Customer or Site has a top

0081    //     level error (not both), still process the other.

0082    // ===============================================================

0083    //

0084    // ---------------------------------------------------------------------------

0085    //     DEFAULT CUSTOMER/SITE NOT TO UPDATE

0086    // ---------------------------------------------------------------------------

0087    VA evt_mnCustomerUpdate_AN8 = BF mnOriginalCustomer

0088    VA evt_mnSiteNumberUpdate_LANO = BF mnOriginalSite

0089    // ---------------------------------------------------------------------------

0090    //

        If BF cUpdateCustomer is equal to "2" Or BF cUpdateSite is equal to "2"

0091       //

0092       //    ---Resolve if customer will be automatically updated, and save---

0093       //

           If VA evt_CustomerTopLevelError_EV01 is not equal to "1"

              If BF cUpdateCustomer is equal to "2" And BF mnEnteredCustomer is not equal to BF mnOriginalCustomer

0094             VA evt_mnCustomerUpdate_AN8 = BF mnEnteredCustomer

0095             VA evt_cUpdateCustomerChange_EV01 = "1"

0096          End If

0097       End If

0098       //

0099       //    ---Resolve if site will be automatically updated, and save---

0100       //

           If VA evt_SiteTopLevelError_EV01 is not equal to "1"

              If BF cUpdateSite is equal to "2" And BF mnEnteredSite is not equal to BF mnOriginalSite

0101             VA evt_mnSiteNumberUpdate_LANO = BF mnEnteredSite

0102             VA evt_cUpdateCustomerChange_EV01 = "1"

0103          End If

0104       End If

0105       //

0106       //    ---Update Automatically---

0107       //

           If VA evt_cUpdateCustomerChange_EV01 is equal to "1" Or VA evt_cUpdateSiteChange_EV01 is equal to "1"

0108          Update Customer Site

                 BF mnAssetItemNumber -> mnAssetItemNumber

                 UNDEFINED X mnUniqueKeyIDInternal

                 VA evt_mnSiteNumberUpdate_LANO -> mnAddressNumberLessor

                 UNDEFINED X cLocationHistOrSched

                 VA evt_jdDateUpdated_UPMJ -> jdDateBeginningEffective

                 VA evt_mnTimeUpdated_UPMT -> mnTimeStampBeginning

                 BF szProgramId -> szProgramId

                 UNDEFINED X szNameRemark

                 UNDEFINED X cUpdateChildren

                 VA evt_mnCustomerUpdate_AN8 -> mnAddressNumber

                 UNDEFINED X szDataItem

                 UNDEFINED X cErrorCode

                 "2" -> cSuppressErrorMessage

                 "1" -> cF1201Update

                  -> cDateTimeCheckOnly

0109       End If

0110    End If

0111    // ===============================================================

0112    //

0113    // ===============================================================

0114    //               F O R M    T O    U P D A T E

0115    //    -If one of the updating parameters is to use the form, the other one

0116    //     could possibly have already been updated.

0117    //    -Check customer/site update for automatic.  If they are for

0118    //     Automatic update processing, this will run faster.

0119    //    -If Customer or Site, has a top level error (not both), still process

0120    //     the other.

0121    // ===============================================================

0122    //

        If BF cUpdateCustomer is equal to "1" Or BF cUpdateSite is equal to "1"

0123       // ---------------------------------------------------------------------------

0124       //     ONLY RESOLVE IF THE PARAMETERS ARE TO PUSH FOR NOW

0125       // ---------------------------------------------------------------------------

0126       //

0127       //    ---Customer---

0128       //

           If VA evt_CustomerTopLevelError_EV01 is not equal to "1"

              If BF cUpdateCustomer is equal to "1" And BF mnEnteredCustomer is not equal to BF mnOriginalCustomer

0129             VA evt_cUpdateCustomerChange_EV01 = "1"

0130          End If

0131       End If

0132       //

0133       //    ---Site---

0134       //

           If VA evt_SiteTopLevelError_EV01 is not equal to "1"

              If BF cUpdateSite is equal to "1" And BF mnEnteredSite is not equal to BF mnOriginalSite

0135             VA evt_cPushSiteChange_EV01 = "1"

0136          End If

0137       End If

0138       // ---------------------------------------------------------------------------

0139       //

0140       // ---------------------------------------------------------------------------

0141       //     SET FORM INTERCONNECT BECAUSE USER WILL SEE THIS

0142       // ---------------------------------------------------------------------------

           If VA evt_cPushCustomerChange_EV01 is equal to "1" And VA evt_cPushSiteChange_EV01 is equal to "1"

0143          VA evt_mnCustomerUpdate_AN8 = BF mnEnteredCustomer

0144          VA evt_mnSiteNumberUpdate_LANO = BF mnEnteredSite

0145       Else

              If VA evt_cPushCustomerChange_EV01 is equal to "1"

0146             VA evt_mnCustomerUpdate_AN8 = BF mnEnteredCustomer

0147          Else

                 If VA evt_cPushSiteChange_EV01 is equal to "1"

0148                VA evt_mnSiteNumberUpdate_LANO = BF mnEnteredSite

0149             End If

0150          End If

0151       End If

0152       // ---------------------------------------------------------------------------

0153       //

0154       // ---------------------------------------------------------------------------

0155       //     IT IS POSSIBLE THAT CUSTOMER/SITE HAS ALREADY BEEN UPDATED

0156       //    AUTOMATICALLY

0157       // ---------------------------------------------------------------------------

           If BF cUpdateCustomer is equal to "2"

0158          VA evt_mnCustomerUpdate_AN8 = BF mnEnteredCustomer

0159       End If

           If BF cUpdateSite is equal to "2"

0160          VA evt_mnSiteNumberUpdate_LANO = BF mnEnteredSite

0161       End If

0162       // ---------------------------------------------------------------------------

0163       //

0164       // ---------------------------------------------------------------------------

0165       //    VERIFY THAT SOMETHING IS DIFFERENT ON THE EQUIP. RECORD

0166       // ---------------------------------------------------------------------------

           If VA evt_cPushCustomerChange_EV01 is equal to "1" Or VA evt_cPushSiteChange_EV01 is equal to "1"

0167          Call( App:P1704 , Form: W1704E )

                 UNDEFINED X mnUnique_Key_ID_Internal_F1731

                 BF mnAssetItemNumber -> mnAsset_Item_Number_F1731

                 "1" -> cType_of_Record_F1731

                 VA evt_mnCustomerUpdate_AN8 -> mnCustomerNumber_F1731

                 VA evt_mnSiteNumberUpdate_LANO -> mnSiteNumber_F1731

0168       End If

0169    End If

0170    // ===============================================================

0171    //

0172    // ===============================================================

0173    //             C O P Y       O U T P U T     P A R A M E T E R S

0174    // ===============================================================

        If VA evt_cUpdateCustomerChange_EV01 is equal to "1" Or VA evt_cUpdateSiteChange_EV01 is equal to "1"

0175       BF mnOriginalCustomer = VA evt_mnCustomerUpdate_AN8

0176    End If

0177    //

        If VA evt_cUpdateSiteChange_EV01 is equal to "1" Or VA evt_cPushSiteChange_EV01 is equal to "1"

0178       BF mnOriginalSite = VA evt_mnSiteNumberUpdate_LANO

0179    End If

0180    // ===============================================================

0181 End If




Data Structure

D1700235 - Push Change Equipment Master Information

Parameter NameData ItemData TypeReq/OptI/O/Both
mnAssetItemNumberNUMBMATH_NUMERICOPTINPUT

An 8-digit number that uniquely identifies an asset.

mnOriginalCustomerAN8MATH_NUMERICOPTNONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

mnEnteredCustomerAN8MATH_NUMERICOPTNONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

mnOriginalSiteLANOMATH_NUMERICOPTNONE

The address book number for the lessor, renter, or lending institution.

cUpdateCustomerEV01charOPTNONE

Blank = Do Not Update
'1' = Update With the use of the form

'2' = Update Automatically

cUpdateSiteEV01charOPTNONE

Blank = Do Not Update
'1' = Update With the use of the form

'2' = Update Automatically

cModeEV01charOPTNONE

An option that specifies the type of processing for an event.

szProgramIdPIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

szErrorMessageIDDTAIcharOPTNONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

cSuppressErrorsEV01charOPTNONE

An option that specifies the type of processing for an event.

mnEnteredSiteLANOMATH_NUMERICOPTNONE

The address book number for the lessor, renter, or lending institution.

Related Functions

None

Related Tables

None