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
0057 VA evt_CustomerTopLevelError_EV01 = "1"
0058 End If
0059 //
If 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
0066 VA evt_SiteTopLevelError_EV01 = "1"
0067 End If
0068 //
If 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
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
D1700235 - Push Change Equipment Master Information
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnAssetItemNumber | NUMB | MATH_NUMERIC | OPT | INPUT |
An 8-digit number that uniquely identifies an asset. | ||||
mnOriginalCustomer | AN8 | MATH_NUMERIC | OPT | NONE |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
mnEnteredCustomer | AN8 | MATH_NUMERIC | OPT | NONE |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
mnOriginalSite | LANO | MATH_NUMERIC | OPT | NONE |
The address book number for the lessor, renter, or lending institution. | ||||
cUpdateCustomer | EV01 | char | OPT | NONE |
Blank = Do Not Update | ||||
cUpdateSite | EV01 | char | OPT | NONE |
Blank = Do Not Update | ||||
cMode | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
szProgramId | PID | char | OPT | NONE |
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry
| ||||
szErrorMessageID | DTAI | char | OPT | NONE |
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
| ||||
cSuppressErrors | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
mnEnteredSite | LANO | MATH_NUMERIC | OPT | NONE |
The address book number for the lessor, renter, or lending institution. |
None |
None |