Professional Documents
Culture Documents
P4114 Dump
P4114 Dump
=======================================================================
FORM: Inventory Adjustments [HEADERLESS DETAIL] (W4114A)
=======================================================================
CONTROL: FORM
EVENT: Dialog is Initialized
----------------------------------------------------------------------evt_EnhancementExistance_MEOW
OPT: Using Defaults
0001 //
REVISION LOG
0002 //
0003 // Date
Programmer
SAR
Description
0004 // 11/02/00 EF5613421 4590116 Pinnacle - Dual UoM
0005 // 03/07/02 NS6859983 SAR 5848051 Don't autocall P4605, just set 053A
0006 // 05/20/02 NS6859983 SAR 5796511 Reverse Adustmts and Dual incorrect
0007 // 06/11/02 MR7026369 SAR 5613949- Config Item in Adjustments
0008 // 12/12/03 CA6859852 SAR 6880205 - F41021WF and Post Commit
0009 // 07/28/04 TT5459806 SAR 7247719 - Process Allowed Lot Status
0010 // 07/29/04 CA6859852 SAR 7257546 - License Plate Enhancement (LPN)
0011 // 02/23/05 IC9024640 SAR 7523277 Lot No. not returned
0012 // 05/11/05 AM5731857 SAR 7635199 Dup Doc Number
0013 // 12/14/05 IC8996050 7919950 Existing line g/l date wrong d
0014 // 08/08/06 JV7445740 8069897 'N' Batch in use if HTML
0015 // 12/18/06 IC8996050 8241319 ZBA after full reversal
0016 // 01/16/07 AP9050291 8249695 Zero Quantity Adjustments
0017 // 08/29/07 RN9050944 8506313 Inventory issue and Deleting R
0018 // 10/23/07
AP9050291 8599417 P4114 Matrix Parent
0019 // 08/19/08 RK9050936
8849121
TRDJ updated as blank at F4111
0020 // 03/19/09 GR9051146
8918848 P4114 - Multiple transactions
0021 // 04/26/11 RV9056609
11905201 PMPN Enhancements
0022 //
0023 Disable Control(HC &Journal Entries)
0024 //
0025 // ---------------------------------------------------------------------------0026 // Load form interconnects
0027 // ---------------------------------------------------------------------------0028 //
0029 FC Batch Number = FI Batchnumber
0030 // ---------------------------------------------------------------------------0031 // Initialize fields
0032 // ---------------------------------------------------------------------------0033 //
0034 FC ev01-BgnDocOnce(wf) = "0"
0035 FC dicj - Batch Date (wf) = date_today()
0036 Get Local Computer ID
FC CTID -Computer ID (wf) <> BF szMachineKey
0037 // SAR# 7919950 - Initialize the MaxGridRows to 1
0038 VA frm_MaxGridRows_MATH01 = "1"
0039 //
0040 // ---------------------------------------------------------------------------0041 // If Batch control is on, call Open Batch
0042 // Begin batch processing by calling OpenBatch for the F0911
0043 // ------------------------------------------------------------------------
----0044 //
0045 F4009 Get Distribution Constants
"41" <> BF szSystemCode
FC icri - Batch Control (wf) <> BF cBatchControl
0046 If FC icri - Batch Control (wf) is equal to "Y"
0047
FC ev08 - Cancel Batch Control (wf) = "0"
0048 Else
0049
FC ev08 - Cancel Batch Control (wf) = "1"
0050 End If
0051 //
0052 VA frm_EV01_DoNotCloseBatch = "0"
0053 If FI Batchnumber is not equal to <Zero> Or FC icri - Batch Control (wf) is
equal to "Y"
0054 !
F0011 Open Batch
!
FC EV01 - Batch stat (wf) <> BF cPrevBatchstatus
!
"N" -> BF szBatchtype
!
FC Batch Number -> BF mnBatchnumber
!
FC dicj - Batch Date (wf) <> BF jdBatchDate
!
FC ev08 - Cancel Batch Control (wf) <> BF cCancelBatchControl
0055
F0011 Write Batch Header
"N" -> BF szBatchType
FC Batch Number <> BF mnBatchNumber
FC EV01 - Batch stat (wf) <> BF cPreviousBatchStatus
FC dicj - Batch Date (wf) <> BF jdBatchDate
FC ev08 - Cancel Batch Control (wf) <> BF cBatchControlCancelFlag
0056
If SV Error_Status is not equal to CO SUCCESS
0057
VA frm_EV01_DoNotCloseBatch = "1"
0058
End If
0059 Else
0060
Hide Control(FC Batch Number)
0061
Hide Control(FC Group Box 49)
0062 End If
0063 // ---------------------------------------------------------------------------0064 //
Only display on a change.
0065 // ---------------------------------------------------------------------------0066 //
0067 Hide Control(FC Prev Doc Type)
0068 Hide Control(FC Prev Doc No)
0069 // ---------------------------------------------------------------------------0070 //
0071 // Begin SAR 4590116 - Dual UoM
0072 //
0073 Vertical Feature
"01" -> BF szVerticalEnhancement
VA evt_EnhancementExistance_MEOW <- BF cEnhancementExistance
0074 //
0075 If VA evt_EnhancementExistance_MEOW is not equal to "1"
0076
Hide Grid Column(FC Grid, GC Secondary Quantity)
0077
Hide Grid Column(FC Grid, GC Sec UoM)
0078 End If
0079 // End SAR 4590116
0080 //
0081 // Begin SAR 4980190
0082 Vertical Feature
"03" -> BF szVerticalEnhancement
VA frm_cVFS_MEOW <- BF cEnhancementExistance
0008 //
0009 If FC Prev Doc No is equal to <Zero>
0010
Hide Control(FC Prev Doc Type)
0011
Hide Control(FC Prev Doc No)
0012 Else
0013
Show Control(FC Prev Doc Type)
0014
Show Control(FC Prev Doc No)
0015 End If
0016 // -------------------------------------------------------------------------0017 // SAR 7362688 - Fix License Plate Transaction Processing Issue
0018 // Fetch the LPN Header Cache
0019 If PO cLicensePlateWindow is equal to "1" And VA frm_JobnumberA_JOBS is not
equal to <Zero>
0020
Cache License Plate Transaction Header
"1" -> BF szCacheActionCode
"1" -> BF mnNumberKeys
"1" -> BF nIndex
"1" -> BF cSuppressErrorMessage
VA frm_JobnumberA_JOBS -> BF mnJobNumber
VA evt_cDisplayAssignItemstoLPN <- BF cDisplayAssignItemFlag
0021
If VA evt_cDisplayAssignItemstoLPN is equal to "1"
0022
Call( App:P46L30 , Form:W46L30B , Ver: ZJDE0001 )
"1" -> FI cLoadCache
VA frm_JobnumberA_JOBS <> FI mnJobNumber
0023
End If
0024
// Terminate the LPN Cache
0025
Cache License Plate Transaction Header
"8" -> BF szCacheActionCode
"1" -> BF mnNumberKeys
"1" -> BF nIndex
"1" -> BF cSuppressErrorMessage
VA frm_JobnumberA_JOBS -> BF mnJobNumber
0026 End If
----------------------------------------------------------------------EVENT: Post Dialog is Initialized
----------------------------------------------------------------------OPT: Using Defaults
0001 //
0002 If SV Form_ Mode is equal to CO ADD_MODE
0003
// ---------------------------------------------------------------------------0004
// If in add mode, retrieve the default branch
0005
// ---------------------------------------------------------------------------0006
//
0007
F40095 Get Default Branch
FC Business Unit <> BF szBranch
0008
FC Doc Type = PO szDocumenttype
0009
Enable Control(FC Order Date)
0010
Enable Control(FC Explanation)
0011
Enable Control(FC Business Unit)
0012
Enable Control(FC Doc Type)
0013
Enable Control(FC Document Number)
0014
//
0015
VA frm_EV09_ValidateF4111DocNo = "1"
0016
// SAR 6093818 - Move this function call so it is done regardless of for
m
0017
// mode.
0018 !
Get GL MBF Version From JE Version
!
VA frm_GLMBFVersion_VER <- BF szGLMBFVersion
!
PO szJournalEntriesVersion -> BF szJEVersion
0019 Else
0020
// ---------------------------------------------------------------------------0021
// Show the Reverse button only in update mode
0022
// ---------------------------------------------------------------------------0023
//
0024
Disable Control(FC Document Number)
0025
Disable Control(FC Doc Type)
0026
Disable Control(FC Explanation)
0027
Disable Control(FC Business Unit)
0028
// SAR 4514076 - Do not disable the G/L Date.
0029 !
Disable Control(FC G/L Date)
0030
//
0031
FC Explanation = FI Explanationtransaction
0032
FC Prev Doc Type = FC Doc Type
0033
// SAR# 6484392, Blank out the GL date to default it to today's date in
0034
// begin doc.
0035 !
FC G/L Date = FI Dtforglandvouch1
0036
FC G/L Date = ""
0037
//
0038
// SAR 7576301 - Defaults todays date to validate in the header.
0039
FC G/L Date = date_today()
0040 End If
0041 // ----- ENDIF ADD_MODE ----0042 //
0043 // SAR 6093818 - Retrieve the GL MBF version whether in add mode or not.
0044 Get GL MBF Version From JE Version
VA frm_GLMBFVersion_VER <- BF szGLMBFVersion
PO szJournalEntriesVersion -> BF szJEVersion
0045 //
0046 // ---------------------------------------------------------------------------0047 //
Protect cost fields if processing option set
0048 //
1. If PO-ProtectCost = '1', disable grids Unit and Extended Cost
s
0049 //
2. If PO-ProtectCost = '2', do not display grid for Unit and Ext
ended
0050 // Costs.
0051 // ---------------------------------------------------------------------------0052 //
0053 If PO cProtectCosts is equal to "1"
0054
Disable Grid(FC Grid, <All Rows>, GC Unit Cost)
0055
Disable Grid(FC Grid, <All Rows>, GC Extended Amount)
0056
Disable Control(HC &Zero Cost)
0057
Disable Control(HC Canc&el Zero Cost)
0058 Else
0059
//
0060
If PO cProtectCosts is equal to "2"
0061
Hide Grid Column(FC Grid, GC Unit Cost)
0062
Hide Grid Column(FC Grid, GC Extended Amount)
0063
Disable Control(HC &Zero Cost)
0064
Disable Control(HC Canc&el Zero Cost)
0065
End If
0066
//
0067 End If
0120
0121
0122
0123
0124
0125
0126
0127
-------0029
//
0030
//
-------0031
//
0032
If
0033
0034
n instead
0035
0036
// of GC Production Number
F4108 Get Lot Master Information
GC Lot Description <- BF szLotDescription
GC Lot Expiration Date <- BF jdExpirationDate
BC Item Number - Short (F4111)(ITM) -> BF mnShortItemNumber
BC Business Unit (F4111)(MCU) -> BF szBranchPlant
BC Lot/Serial Number (F4111)(LOTN) -> BF szLotNumber
GC Memo Lot 1 <- BF szMemoLot1
GC Memo Lot 2 <- BF szMemoLot2
VA grd_BasedOnDate_BODJ <- BF jdBasedOnDate
VA grd_OnHandDate_OHDJ <- BF jdOnHandDate
GC Lot Effectivity Date <- BF jdLotEffectivityDate
VA grd_SellByDate_SBDJ <- BF jdSellByDate
VA grd_BestBeforeDate_BBDJ <- BF jdBestBeforeDate
VA grd_UserLotDate1_U1DJ <- BF jdUserLotDate1
VA grd_UserLotDate2_U2DJ <- BF jdUserLotDate2
VA grd_UserLotDate3_U3DJ <- BF jdUserLotDate3
VA grd_UserLotDate4_U4DJ <- BF jdUserLotDate4
VA grd_UserLotDate5_U5DJ <- BF jdUserLotDate5
GC Country of Origin <- BF szCountryOfOrigin
0037
// Bug# 14737812 End
0038
End If
0039
//
0040
If FC kco- DocKeyComp (wf) is equal to or empty <Blank>
0041
FC kco- DocKeyComp (wf) = BC Document Company (F4111)(KCO)
0042
End If
0043 End If
0044 //
0045 // If media objects exist - display paperclip
0046 //
0047 Media Object Structures(GT4111, <Default Media Object>, <Exist>, VA frm_Med
ia_Objects_Status, BC Document (Voucher, Invoice, etc.) (F4111)(DOC), BC Documen
t Type (F4111)(DCT), BC Document Company (F4111)(KCO), ...)
0048 If VA frm_Media_Objects_Status is equal to "1"
0049
Set Grid Text Indicator(FC Grid, <Current Row>, <Yes>)
0050 Else
0051
Set Grid Text Indicator(FC Grid, <Current Row>, <No>)
0052 End If
0053 // SAR 2490955 Begin
0054 // Business Function B4001040 is used to input Item Description into the Gr
id.
0055 F4101 Get Item Master Information
BC Item Number - Short (F4111)(ITM) -> BF mnShortItemNumber
GC Item Description <- BF szDescription
0056 // SAR 2490955 End
----------------------------------------------------------------------EVENT: Write Grid Line-Before
----------------------------------------------------------------------OPT: Using Defaults
0001 // ------------------------------------------------------------------------
----0002 // Disable all grid records that are written. No records can be changed.
0003 // Only a Reversal can occur to an already existing record.
0004 // ---------------------------------------------------------------------------0005 //
0006 Disable Grid(FC Grid, <Current Row>, <All Columns>)
0007 // ---------------------------------------------------------------------------0008 // Load a '1' to the Reversal OK field. This will indicate that the record
0009 // already existed and is eligible for a reversal.
0010 // ---------------------------------------------------------------------------0011 //
0012 GC ev01 - F4111 Record Exist (wf) = "1"
0013 GC lnid - Line Number (wf) = BC Line Number (F4111)(LNID)
0014 FC lnid - Prev Line No (wf) = BC Line Number (F4111)(LNID)
----------------------------------------------------------------------EVENT: Last Grid Record Has Been Read
----------------------------------------------------------------------OPT: Using Defaults
0001 //
0002 // ---------------------------------------------------------------------------0003 //
SAR #2770527
CDL
02/22/1999
0004 //
Prevent a new line to be added by hiding the blank line.
0005 // ---------------------------------------------------------------------------0006 If VA frm_EV01_DoNotCloseBatch is equal to "1"
0007
Hide Grid Row(FC Grid, <Current Row>)
0008 End If
----------------------------------------------------------------------EVENT: End Dialog
----------------------------------------------------------------------evt_cDisplayAssignItemstoLPN
OPT: Using Defaults
0001 // BUG 15842653 - Display the P46l30 screen in update mode also.
0002 // Fetch the LPN Header Cache
0003 If PO cLicensePlateWindow is equal to "1" And VA frm_JobnumberA_JOBS is not
equal to <Zero> And SV Form_ Mode is equal to CO UPDATE_MODE
0004
Cache License Plate Transaction Header
"1" -> BF szCacheActionCode
"1" -> BF mnNumberKeys
"1" -> BF nIndex
"1" -> BF cSuppressErrorMessage
VA frm_JobnumberA_JOBS -> BF mnJobNumber
VA evt_cDisplayAssignItemstoLPN <- BF cDisplayAssignItemFlag
0005
If VA evt_cDisplayAssignItemstoLPN is equal to "1"
0006
Call( App:P46L30 , Form:W46L30B , Ver: ZJDE0001 )
"1" -> FI cLoadCache
VA frm_JobnumberA_JOBS <> FI mnJobNumber
0007
End If
0008
// Terminate the LPN Cache
0009
Cache License Plate Transaction Header
"8" -> BF szCacheActionCode
"1" -> BF mnNumberKeys
"1" -> BF nIndex
"1" -> BF cSuppressErrorMessage
frm_mnUniqueKeyIDF41021WF_UKID
frm_cLPNMasterSwitch_LPNM
frm_cDisableGlDate_EV01
frm_cApparelActive_EV01
frm_cPMPNInstalled_EV01
frm_szProdNoJobNumber_JOB
frm_cProdNumInvCancelled_EV01
grd_szInitialLotStsCode_LOTS
grd_mnLotStsOverridden_INT01
=======================================================================
CONTROL: HYPITEM &OK
EVENT: Button Clicked
----------------------------------------------------------------------evt_GridRowMax
evt_CurrentGridRow
evt_NumberOfRows_INT01
evt_LotStatusCodefromF41021
evt_rowindex_INT01
OPT: Using Defaults
0001 //
0002 // ****** Begin SAR 7635199 ******
0003 // ---------------------------------------------------------------------------0004 //
Retrieving Document Number If Document Number is zero
0005 // 1) Get or validate document number from F4111 Item Ledger
0006 // 2) Call F0911 Get Next Document Number for interoperability
0007 // ---------------------------------------------------------------------------0008 //
0009 If FC ev01-BgnDocOnce(wf) is equal to "1"
0010
//
0011
//
0012
If SV Form_ Mode is equal to CO ADD_MODE
0013
// SAR 7635199 Call F0002 Get Item Ledger next number to get the next
number
0014
// in add mode or validate it if the user entered a number.
0015
F0002 Get Item Ledger Next Number
FC Document Number <> BF mnDocumentNumber
FC Doc Type -> BF szDocumentType
FC kco- DocKeyComp (wf) -> BF szKeyCompany
"2" -> BF mnNextNumberingIndexNo
"41" -> BF szSystemCode
FC G/L Date -> BF jdGLDate
0016
//
0017
If FC jobs - JobNoF0911 (wf) is not equal to <Zero> And FC jobs - Job
NoF0911 (wf) is not equal to <Null>
0018
// SAR 7635199 Call F0911 Get Next Document Number, even though th
e Doc Number
0019
// has been retieved, so the interoperability code is hit.
0020
//
0021
// SAR 8363640 - Document Number is just passed to F0911 Get Next
Document
0022
// Number, but is not retreived.
0023
F0911 Get Next Document Number
FC jobs - JobNoF0911 (wf) -> BF mnJobNumber
"2.00" -> BF mnNextNumberIndex
"41" -> BF szNextNumberSystemCode
FC Document Number -> BF mnDocNumber
0024
//
0025
// End SAR 8363640
0026
// ****** How the code looked before SAR 7635199 ******
0027 !
If FC Document Number is equal to <Zero> Or FC Document Number i
s equal to or empty <Null>
0028 !
F0911 Get Next Document Number
!
FC jobs - JobNoF0911 (wf) -> BF mnJobNumber
!
"2.00" -> BF mnNextNumberIndex
!
"41" -> BF szNextNumberSystemCode
!
FC Document Number <> BF mnDocNumber
0029 !
VA frm_EV09_ValidateF4111DocNo = "0"
0030 !
End If
0031
End If
0032 !
If VA frm_EV09_ValidateF4111DocNo is equal to "1"
0033 !
F0002 Get Item Ledger Next Number
!
FC Document Number <> BF mnDocumentNumber
!
FC Doc Type -> BF szDocumentType
!
FC kco- DocKeyComp (wf) -> BF szKeyCompany
!
"2" -> BF mnNextNumberingIndexNo
!
"41" -> BF szSystemCode
!
FC G/L Date -> BF jdGLDate
0034 !
End If
0035
// ****** End SAR 7635199 ******
0036
//
0037
End If
0038
//
0039
If SV Error_Status is equal to CO SUCCESS
0040
Show Control(FC Group Box 49)
0041
FC Prev Doc Type = FC Doc Type
0042
FC Prev Doc No = FC Document Number
0043
Show Control(FC Prev Doc No)
0044
Show Control(FC Prev Doc Type)
0045
End If
0046 End If
0047 // ---------------------------------------------------------------------------0048 //
Need this Work Field ICU for "END-DIALOG"
0049 //
Currently, FC-Batch Number goes back to "0" at "END-DIALOG".
0050 // ---------------------------------------------------------------------------0051 //
0052 FC ICU - BatchNo (wf) = FC Batch Number
0053 //
0054 // Begin BUG - 14049888 - Throw an warning if the Lot staus code in F41021
is
0055 // different from the one present in the grid. If the user is manually
0056 // entering the Lot staus code, skip the warning,
0057 //
0058 Get Max Grid Rows(FC Grid, VA evt_NumberOfRows_INT01)
0059 VA evt_rowindex_INT01 = "1"
0060 VA evt_NumberOfRows_INT01 = [VA evt_NumberOfRows_INT01]-1
0061 While VA evt_NumberOfRows_INT01 is greater than <Zero>
0062
Get Grid Row(FC Grid, VA evt_rowindex_INT01)
0063
F41021.Fetch Single
GC itm - Short Item No (wf) = TK Item Number - Short
GC Branch/ Plant = TK Business Unit
GC Location - File (wf) = TK Location
GC Lot/Serial = TK Lot/Serial Number
VA evt_LotStatusCodefromF41021 <- TK Lot Status Code
0064
If SV File_IO_Status is equal to CO SUCCESS And GC Lot Status is not eq
ual to VA evt_LotStatusCodefromF41021 And VA grd_mnLotStsOverridden_INT01 is not
equal to "1"
0065
Set Grid Cell Error(FC Grid, <Currently Selected Row>, GC Lot Status
, "41100")
0066
End If
0067
VA evt_NumberOfRows_INT01 = [VA evt_NumberOfRows_INT01]-1
0068
VA evt_rowindex_INT01 = [VA evt_rowindex_INT01]-1
0069 End While
0070 //
0071 // End BUG
14049888
----------------------------------------------------------------------EVENT: Post Button Clicked
----------------------------------------------------------------------evt_cEndDocDone_EV01
evt_cDisplayAssignItemtoLPN
evt_cLicensePlateBranchPlant
evt_cCloseBatch_EV01
OPT: Using Defaults
0001 VA evt_cEndDocDone_EV01 = "0"
0002 //
0003 // Get a UKID fort he F41021WF and write it to the cache to be used at End
0004 // Doc.
0005 Get Next Unique Key ID
"F41021WF" -> BF szObjectName
VA frm_mnUniqueKeyIDF41021WF_UKID <- BF mnUniqueKeyID
0006 Cache Process Unique F41021WF
FC JOBS - Inv Job Number (wf) -> BF mnJobnumber
FC CTID -Computer ID (wf) -> BF szComputerID
VA frm_mnUniqueKeyIDF41021WF_UKID -> BF mnUniqueKeyIDInternal
"2" -> BF szCacheActionCode
"3" -> BF mnNumberKeys
"1" -> BF cSuppressErrorMessage
0007 //
0008 Get F46L001 Records
FC Business Unit <> BF szCostCenter
VA evt_cLicensePlateBranchPlant <- BF cLPNMasterSwitch
0009 // LPN Enhancement - Write the LPN Header Cache
0010 Cache License Plate Transaction Header
"2" -> BF szCacheActionCode
"1" -> BF mnNumberKeys
"1" -> BF nIndex
"1" -> BF cSuppressErrorMessage
FC JOBS - Inv Job Number (wf) -> BF mnJobNumber
PO szLPNGenerationMethod -> BF szPO_LPNGenerationMethod
PO cLicensePlateWindow -> BF cPO_DisplayAssignItemWindow
PO cBuildStructure -> BF cPO_BuildDefaultStructure
"N" -> BF cPartialsAllowedYN
"EP4114" -> BF szProgramId
"IA" -> BF szLicensePlateTransactionT
0011 //
0012 If PO cLicensePlateWindow is equal to "1"
0013
If FC ev01-BgnDocOnce(wf) is equal to "1"
0014
F4114 End Document
"EP4114" -> BF szProgramID
FC Document Number -> BF mnDocumentNumber
FC CTID -Computer ID (wf) -> BF szComputerID
"1" -> BF cWriteCardex
FC Doc Type -> BF szDocumentType
"2.00" -> BF mnTransactionProcessType
FC jobs - JobNoF0911 (wf) -> BF mnF0911Jobnumber
0044
0045
0046
0047
0048
0049
0050
//
//
VA
//
FC
FC
//
=======================================================================
CONTROL: HYPITEM &Cancel
EVENT: Button Clicked
----------------------------------------------------------------------OPT: Using Defaults
0001 // ---------------------------------------------------------------------------0002 //
Load FC-Batch to ICU-Batch Work Field for "END-DIALOG".
0003 //
At "END-DIALOG", the BC are being cleared.
0004 // ---------------------------------------------------------------------------0005 FC ICU - BatchNo (wf) = FC Batch Number
0006 FC Prev Doc Type = FC Doc Type
----------------------------------------------------------------------EVENT: Post Button Clicked
----------------------------------------------------------------------OPT: Using Defaults
0001 // ---------------------------------------------------------------------------0002 //
Clear Work File
0003 //
0004 //
If the Batch had been opened by other application,
0005 //
Do not close the batch. If the batch is closed and
0006 //
it was opened by someone else, it will close their batch.
0007 // ---------------------------------------------------------------------------0008 If VA frm_EV01_DoNotCloseBatch is not equal to "1"
0009
If FI Batchnumber is not equal to <Zero>
0010
VA frm_cProcessCloseBatch_EV11 = "2"
0011
Else
0012
VA frm_cProcessCloseBatch_EV11 = "1"
0013
End If
0014
F4114 Clear Detail Stack
FC CTID -Computer ID (wf) -> BF szComputerID
FC Prev Doc Type -> BF szDocumentType
VA frm_cProcessCloseBatch_EV11 -> BF cProcessCloseBatch
FC ICU - BatchNo (wf) -> BF mnBatchNumber
FC EV01 - Batch stat (wf) -> BF cBatchStatus
FC jobs - JobNoF0911 (wf) -> BF mnF0911Jobnumber
FC JOBS - Inv Job Number (wf) -> BF mnInvJobNumber
0015 End If
=======================================================================
CONTROL: HYPITEM &Zero Cost
EVENT: Button Clicked
----------------------------------------------------------------------OPT: Repeat ER for Event
0001 If GC ev01 - F4111 Record Exist (wf) is not equal to "1"
0002
//
0003
GC ev09CostEntered(wf) = "1"
0004
//
0005
GC Unit Cost = "0"
0006
Set Grid Color(FC Grid, <Current Row>, GC Unit Cost, <Gray>)
0007
Disable Grid(FC Grid, <Current Row>, GC Unit Cost)
0008
//
0009
GC Extended Amount = "0"
0010
Set Grid Color(FC Grid, <Current Row>, GC Extended Amount, <Gray>)
0011
Disable Grid(FC Grid, <Current Row>, GC Extended Amount)
0012
//
0013 End If
=======================================================================
CONTROL: HYPITEM Canc&el Zero Cost
EVENT: Button Clicked
----------------------------------------------------------------------OPT: Repeat ER for Event
0001 If GC ev01 - F4111 Record Exist (wf) is not equal to "1"
0002
If GC ev09CostEntered(wf) is equal to "1"
0003
//
0004
GC ev09CostEntered(wf) = "0"
0005
Set Grid Color(FC Grid, <Current Row>, GC Extended Amount, <Default>)
0006
Enable Grid(FC Grid, <Current Row>, GC Unit Cost)
0007
//
0008
Set Grid Color(FC Grid, <Current Row>, GC Unit Cost, <Default>)
0009
Enable Grid(FC Grid, <Current Row>, GC Extended Amount)
0010
//
0011
End If
0012 End If
=======================================================================
CONTROL: HYPITEM &Delete
EVENT: Button Clicked
----------------------------------------------------------------------evt_Num_of_Rows
OPT: Repeat ER for Event
0001 // ---------------------------------------------------------------------------0002 //
Delete is not allowed if record exists in F4111 (Update Mode).
0003 // ---------------------------------------------------------------------------0004 If GC ev01 - F4111 Record Exist (wf) is equal to "1" And GC REVL_Reversal D
one (wf) is not equal to "1"
0005
// SAR#8241319- If a record wasn't written, then re-enable the OK button
.
0006
If GC ev06 - Rcd Written (wf) is not equal to "1"
0007
Enable Control(HC &OK)
0008
End If
0009
Stop Processing
0010 Else
0011
// ---------------------------------------------------------------------------0012
// Clear the detail stack records
0013
// ---------------------------------------------------------------------------0014
//
0015
If GC ev06 - Rcd Written (wf) is equal to "1"
0016
F4114 Clear Detail Stack
FC CTID -Computer ID (wf) -> BF szComputerID
GC lnid - Line Number (wf) -> BF mnFromLineNumber
GC lnid - Line Number (wf) -> BF mnThruLineNumber
"1" -> BF cDeleteDetail
0020
//
d the
0021
//
he Work
0022
//
0023
//
-------0024
If
0025
0026
0054
//
0055
//
----------------0056
If
0057
1
0058
End If
0059
End If
0060
End If
0061
// ------------ENDIF BegDocOnce----------------0062
//
0063
If FC ev01-BgnDocOnce(wf) is equal to "1"
0064
If SL CurrencyProcessing is equal to "Y,Z"
0065
Copy Currency Information(GC Extended Amount, FC ECST - Hold Cu
rrency Info (wf))
0066
End If
0067
//
0068
// SAR 6093818 - Pass the G/L MBF Version to Edit Line.
0069
// SAR 6484392, Pass in header level GL date to Editline
0070
// inorder to write GL entries with current date on the reversal
0071
// entries. Previously GC GLdate was being passed in.
0072
// BUG# 11905201 - PMPN Enhancements - Pass PMPN Fields to EditLin
e
0073
F4114 Edit Line
"3" -> BF cLineAction
FC CTID -Computer ID (wf) -> BF szComputerID
GC ev06 - Rcd Written (wf) <> BF cRecordWrittenToWorkFile
GC lnid - Line Number (wf) <> BF mnLineNumber
FC G/L Date -> BF jdGLDate
FC Explanation -> BF szGLExplanation
"1" -> BF cUpdateQuantityOnHand
PO cAllowQtyOverAvailable <> BF cAllowQtyOverAvailable
FC lnid - Prev Line No (wf) <> BF mnPreviousLinenumber
FC JELN -Last JE Line (wf) <> BF mnLastJELine
PO cEntera1todefaultfromprimary -> BF cDefaultFromPrimaryLocati
on
PO cAllowHeldLots -> BF cAllowHeldLots
FC Order Date -> BF jdTransactionDate
FC Doc Type -> BF szDocumentType
FC dicj - Batch Date (wf) -> BF jdBatchDate
FC Batch Number <> BF mnBatchNumber
FC EV01 - Batch stat (wf) <> BF cBatchStatus
GC Branch/ Plant -> BF szBranchPlant
GC Item Number -> BF szItemNumber
GC Location <> BF szDisplayedLocation
GC Location - File (wf) -> BF szLocation
GC Lot/Serial -> BF szLotNumber
GC UM -> BF szTransactionUOM
GC Quantity <> BF mnTransactionQty
GC Unit Cost -> BF mnTransactionUnitCost
GC Extended Amount <> BF mnExtendedAmount
"2.00" -> BF mnTransactionProcessType
GC Lot Potency <> BF mnLotPotency
GC Lot Grade <> BF szLotGrade
GC Lot Status <> BF cLotStatusCode
GC Lot Expiration Date <> BF jdLotExpirationDate
FC Document Number -> BF mnDocumentNumber
GC Lot Description -> BF szLotDescription
0006 //
0007 // -------------------------------------------------------0008 If GC WMS Line (wf) is equal to <Blank> Or GC WMS Line (wf) is equal to <Nu
ll> Or GC WMS Line (wf) is equal to <Zero>
0009
GC WMS Line (wf) = GC lnid - Line Number (wf)
0010 End If
0011 //
0012 // SAR 5848051 NS6859983 03/07/02 - Determine if Item is Dual
0013 F4101.Fetch Single
GC itm - Short Item No (wf) = TK Item Number - Short
VA evt_cDualUOMItem_DUAL <- TK Dual Unit Of Measure Item
0014 // If Dual, verify the UOMs entered are valid
0015 If VA evt_cDualUOMItem_DUAL is equal to "1,2"
0016
Verify Dual Unit of Measure
<Blank> -> BF cRelatedToSecondaryUoM
GC UM -> BF szUnitOfMeasureAsInput
GC Sec UoM -> BF szUnitOfMeasureSecondary
"1" -> BF cSuppressErrorMessage
VA evt_szErrorMsgID_DTAI <- BF szErrorMessageID
0017 End If
0018 // SAR 4410921Begin: Passin negative qty if reversal
0019 // SAR# 6201823, Mdified if condition to check grid variables for checking
0020 // reversal and secondary quantity.
0021 If VA grd_cReversalOn_EV01 is equal to "1"
0022
// Begin SAR 5848051 NS6859983 -- If there's no error from "Verify Dual
"
0023
// call, call the P4605 window
0024
If VA evt_szErrorMsgID_DTAI is equal to <Blank> Or VA evt_szErrorMsgID_D
TAI is equal to <Null>
0025
VA grd_SecondaryQty_SQOR = GC Secondary Quantity
0026
Call( App:P4605 , Form:W4605A )
GC itm - Short Item No (wf) -> FI mnShortItemNumber
GC Branch/ Plant -> FI szBranchPlant
GC Location - File (wf) -> FI szLocation
GC Lot/Serial -> FI szLot
FC Doc Type -> FI szOrderType
FC kco- DocKeyComp (wf) -> FI szKeyCompany
VA grd_mnRevQuantity_MATH01 -> FI mnTransactionQuantity
GC UM -> FI szTransactionUnitOfMeasure
FC JOBS - Inv Job Number (wf) -> FI mnJobnumberA
"1" -> FI cQuantityValidation
PO cAllowQtyOverAvailable -> FI cAllowNegativeAvailability
"1" -> FI cAllowNegativeOnHand
GC WMS Line (wf) <> FI mnWMSLineNumber
VA frm_cP4605WindowCanceled_EV01 <- FI cCancelled
GC ev06 - Rcd Written (wf) -> FI cAsynchProcessCompleted
VA grd_SecondaryQty_SQOR <> FI mnDualQuantity
GC Sec UoM -> FI szDualUnitOfMeasure
"EP4114" -> FI szProgramID
0027
End If
0028 Else
0029
If VA evt_szErrorMsgID_DTAI is equal to <Blank> Or VA evt_szErrorMsgID_D
TAI is equal to <Null>
0030
VA grd_SecondaryQty_SQOR = GC Secondary Quantity
0031
// SAR# 6201823, Not passing order number into P4605
0032
Call( App:P4605 , Form:W4605A )
GC itm - Short Item No (wf) -> FI mnShortItemNumber
GC Branch/ Plant -> FI szBranchPlant
GC Location - File (wf) -> FI szLocation
GC Lot/Serial -> FI szLot
End If
End If
// End SAR# 6201823
// SAR 4410921End
//
=======================================================================
CONTROL: HYPITEM &Display Config
EVENT: Button Clicked
----------------------------------------------------------------------evt_DTAI_ErrorMsgID
OPT: Using Defaults
0001 //
0002 If GC STKT - Stocking Type (wf) is equal to or empty <Blank> Or GC STKT Stocking Type (wf) is equal to or empty <Null>
0003
F4102.Open
0004
F4102.Fetch Single
GC itm - Short Item No (wf) = TK Item Number - Short
GC Branch/ Plant = TK Business Unit
GC STKT - Stocking Type (wf) = TK Stocking Type
0005
F4102.Close
0006 End If
0007 //
0008 If GC STKT - Stocking Type (wf) is equal to "C" Or GC STKT - Stocking Typ
e (wf) is equal to "c"
0009
//
0010
If GC CFGSID - Unique Configuration ID (wf) is equal to <Null>
0011
F41021.Open
0012
F41021.Fetch Single
GC itm - Short Item No (wf) = TK Item Number - Short
GC Branch/ Plant = TK Business Unit
GC Location - File (wf) = TK Location
GC Lot/Serial = TK Lot/Serial Number
0013
F41021.Close
0014
End If
0015
//
0016
If GC CFGSID - Unique Configuration ID (wf) is not equal to <Null> And G
C CFGSID - Unique Configuration ID (wf) is greater than <Blank>
0017
//
0018
VA evt_DTAI_ErrorMsgID = " "
0019 !
** Business Function NOT FOUND (F32942GetConfiguredStringDetail) **
!
VA evt_DTAI_ErrorMsgID <> BF szErrorMessageId
0020
Call( App:P32983 , Form:W32983B )
GC itm - Short Item No (wf) -> FI mnItemNumberShortKit
GC CFGSID - Unique Configuration ID (wf) -> FI szUniqueConfigurati
onID
0021
//
0022
If VA evt_DTAI_ErrorMsgID is equal to or empty <Blank> Or VA evt_DTAI
_ErrorMsgID is equal to or empty <Null>
0023 !
Call( App:P3298 , Form:W3298C )
!
***MISSING_NAME*** -> DS:W3298C:1
!
GC itm - Short Item No (wf) -> DS:W3298C:2
!
GC itm - Short Item No (wf) -> DS:W3298C:5
!
GC Branch/ Plant -> DS:W3298C:6
!
"5" -> DS:W3298C:7
0024
Else
0025 !
Call( App:P32981 , Form:W32981B )
!
***MISSING_NAME*** -> DS:W32981B:2
!
GC itm - Short Item No (wf) -> DS:W32981B:3
!
GC itm - Short Item No (wf) -> DS:W32981B:4
!
GC Branch/ Plant -> DS:W32981B:6
!
"5" -> DS:W32981B:7
0026
End If
0027
//
0028
End If
0029
//
0030 End If
=======================================================================
CONTROL: HYPITEM &Location Search
EVENT: Button Clicked
----------------------------------------------------------------------evt_EV01_FirstTimeLoadDone
evt_TRQT_PrimaryQty
evt_EV02_PositiveQty
OPT: Using Defaults
0001 // ---------------------------------------------------------------------------0002 //
If the record is already exist in F4111 and the Row exist did not
get
0003 //
performed, retrieve the Stocking Type.
0004 // ---------------------------------------------------------------------------0005 If GC STKT - Stocking Type (wf) is equal to or empty <Blank> Or GC STKT Stocking Type (wf) is equal to or empty <Null>
0006
If GC ev01 - F4111 Record Exist (wf) is equal to "1"
0007
End If
0008 End If
0009 //
0010 If GC ev01 - F4111 Record Exist (wf) is equal to "1"
0011
VA evt_EV01_FirstTimeLoadDone = "1"
0012
VA frm_UNCS_UnitCost = "0"
0013 Else
0014
VA evt_EV01_FirstTimeLoadDone = "0"
0015
VA frm_UNCS_UnitCost = GC Unit Cost
0016 End If
0017 //
0018 F4101 Get Item Master Information
GC itm - Short Item No (wf) -> BF mnShortItemNumber
VA frm_UOM1_PrimaryUOM <> BF szPrimaryUOM
"1" -> BF cSuppressErrorMessage
GC Branch/ Plant -> BF szBranchPlant
VA frm_TFLA_StandardUOMFlag <> BF szStandardUOMConversion
0019 F41002 Get Item UoM Conversion
GC Branch/ Plant -> BF szBranchPlant
GC UM -> BF szFromUnitOfMeasure
0053
//
0054
If VA evt_EV01_FirstTimeLoadDone is not equal to "1"
0055
GC Branch/ Plant = GB Branch/ Plant
0056
GC Location = GB Location
0057
GC Lot/Serial = GB Lot/Serial
0058
GC Item Number = GB Item Number
0059
GC UM = GB UM
0060
GC Quantity = GB Quantity
0061
GC Unit Cost = GB Unit Cost
0062
GC Extended Amount = "0"
0063
VA evt_EV01_FirstTimeLoadDone = "1"
0064
Else
0065
Insert Grid Buffer Row(FC Grid, <After Current Row>, <Yes>, <No
>, <Yes>, <Yes>, <Yes>)
0066
End If
0067
//
0068
End If
0069
//
0070
End While
0071
//
0072 End If
=======================================================================
CONTROL: HYPITEM &Select from histor
EVENT: Button Clicked
----------------------------------------------------------------------OPT: Using Defaults
0001 // ---------------------------------------------------------------------------0002 //
Retrieve CSID (Configured String ID) only the new line is being ad
ded
0003 //
and the stocking type of 'C'.
0004 // ---------------------------------------------------------------------------0005 If GC ev01 - F4111 Record Exist (wf) is not equal to "1"
0006
//
0007
If GC STKT - Stocking Type (wf) is equal to "C" Or GC STKT - Stocking
Type (wf) is equal to "c"
0008
// Disabled for B9 DB Change, Phase II until DSTR and fxns are modifi
ed
0009
Call( App:P3296 , Form:W3296D )
<Blank> X FI szProduct_Code_F3201
GC Branch/ Plant -> FI szBusiness_Unit_F3215
GC itm - Short Item No (wf) -> FI mnItem_Number__Short_F3215
GC CFGSID - Unique Configuration ID (wf) <- FI szUniqueConfigurati
onID
0010
End If
0011
//
0012 End If
=======================================================================
CONTROL: HYPITEM C&onfig Search
EVENT: Button Clicked
----------------------------------------------------------------------OPT: Using Defaults
0001 Call( App:P32202 , Form:W32202C )
GC itm - Short Item No (wf) -> FI ItemNumberShortKit
GC Branch/ Plant -> FI CostCenter
GC CFGSID - Unique Configuration ID (wf) <- FI szUniqueConfigurationID
=======================================================================
CONTROL: HYPITEM Lo&t Dates
EVENT: Button Clicked
----------------------------------------------------------------------evt_cOKPressed_EV01
OPT: Using Defaults
0001 If GC Item Number is not equal to <Blank> And GC Branch/ Plant is not equal
to <Blank> And GC Branch/ Plant is not equal to <Null> And GC Item Number is no
t equal to <Null> And GC Lot/Serial is not equal to <Blank> And GC Lot/Serial is
not equal to <Null> And FC Order Date is not equal to <Null Date>
0002
Call( App:P4108 , Form:W4108G )
GC Lot/Serial -> FI szLot
GC itm - Short Item No (wf) -> FI mnIdentifierShortItem
GC Branch/ Plant -> FI szCostCenter
VA grd_BasedOnDate_BODJ <> FI jdBasedOnDate
VA grd_OnHandDate_OHDJ <> FI jdOnHandDate
GC Lot Effectivity Date <> FI jdLotEffectivityDate
VA grd_SellByDate_SBDJ <> FI jdSellByDate
VA grd_BestBeforeDate_BBDJ <> FI jdBestBeforeDate
VA grd_UserLotDate1_U1DJ <> FI jdUserLotDate1
VA grd_UserLotDate2_U2DJ <> FI jdUserLotDate2
VA grd_UserLotDate3_U3DJ <> FI jdUserLotDate3
VA grd_UserLotDate4_U4DJ <> FI jdUserLotDate4
VA grd_UserLotDate5_U5DJ <> FI jdUserLotDate5
GC Lot Expiration Date <> FI jdDate - Lot Expiration
VA evt_cOKPressed_EV01 <- FI cOKPressed
0003
If VA evt_cOKPressed_EV01 is equal to "1"
0004
F41UI001 Update Expiration Date
FC CTID -Computer ID (wf) -> BF szComputerID
FC JOBS - Inv Job Number (wf) -> BF mnJobNumber
GC lnid - Line Number (wf) -> BF mnLineNumber
GC Lot Expiration Date -> BF jdDaterExpiration
VA grd_BasedOnDate_BODJ -> BF jdBasedOnDate
VA grd_OnHandDate_OHDJ -> BF jdOnHandDate
GC Lot Effectivity Date -> BF jdLotEffectivityDate
VA grd_SellByDate_SBDJ -> BF jdSellByDate
VA grd_BestBeforeDate_BBDJ -> BF jdBestBeforeDate
VA grd_UserLotDate1_U1DJ -> BF jdUserLotDate1
VA grd_UserLotDate2_U2DJ -> BF jdUserLotDate2
VA grd_UserLotDate3_U3DJ -> BF jdUserLotDate3
VA grd_UserLotDate4_U4DJ -> BF jdUserLotDate4
VA grd_UserLotDate5_U5DJ -> BF jdUserLotDate5
0005
End If
0006 End If
=======================================================================
CONTROL: HYPITEM &Attachments
EVENT: Button Clicked
----------------------------------------------------------------------OPT: Using Defaults
0001 //
0002 // If the document doesn't exist - error
0003 //
0004 If GC doc - Document Number (wf) is equal to <Zero> Or GC doc - Document Nu
mber (wf) is equal to <Null> Or GC lnid - Line Number (wf) is equal to <Zero> Or
GC lnid - Line Number (wf) is equal to <Null>
0005
Set Grid Cell Error(FC Grid, <Current Row>, <All Columns>, "2832")
0006 Else
0007
Media Object Structures(GT4111, <Edit>, VA frm_Media_Objects_Status, GC
doc - Document Number (wf), GC dct - Doc Ty (wf), GC kco - Doc Co (wf), GC lnid
0009 Get Selected Grid Row Number(FC Grid, FC MATH01-Item Search Grid Number (wf
))
0010 //
0011 If GC Item Number is not equal to <Blank> And GC Item Number is not equal t
o <Null>
0012
If FC MATH01-Item Search Grid Number (wf) is less than or equal to "1.00
"
0013
FC MATH01-Item Search Grid Number (wf) = [FC MATH01-Item Search Grid
Number (wf)]+1
0014
End If
0015 End If
0016 //
0017 While FC EV05-Done Unloading Cache (wf) is not equal to "1"
0018
//
0019
Clear Grid Buffer(FC Grid)
0020
// BUG 11836680 - Retrieve the Country of Origin also.
0021
Cache, Get Memory
GB Item Number <- BF szItemNumber
GB Branch/ Plant <- BF szBranchPlant
GB Location <- BF szLocation
GB Lot/Serial <- BF szLotNumber
FC EV05-Done Unloading Cache (wf) <- BF cLastRecordReadFlag
GB Quantity <- BF mnQuantity
GB UM <- BF szUnitOfMeasure
GB Memo Lot 1 <- BF szMemoLot1
GB Memo Lot 2 <- BF szMemoLot2
VA frm_CacheCursor_GENLNG <> BF idCacheCursor
GB Lot Expiration Date <- BF jdDateLayerExpiration
GB Lot Status <- BF cLotStatusCode
GC itm - Short Item No (wf) <- BF mnIdentifierShortItem
GB Lot Potency <- BF mnLotPotency
GB Lot Grade <- BF szLotGrade
GC Country of Origin <- BF szCountryOfOrigin
0022
//
0023
//
Only do an Isert Grid line if the Last Record Read is not '1'
0024
//
Otherwise, it will write a blank row
0025
//
0026
If FC EV05-Done Unloading Cache (wf) is not equal to "1"
0027
If FC MATH01-Item Search Grid Number (wf) is equal to "1.00"
0028
Update Grid Buffer Row(FC Grid, FC MATH01-Item Search Grid Number
(wf), <Yes>, <No>, <Yes>, <Yes>, <Yes>)
0029
Else
0030
Insert Grid Buffer Row(FC Grid, FC MATH01-Item Search Grid Number
(wf), <Yes>, <No>, <Yes>, <Yes>, <Yes>)
0031
End If
0032
FC MATH01-Item Search Grid Number (wf) = [FC MATH01-Item Search Grid
Number (wf)]+1
0033
End If
0034 End While
0035 Set Control Focus(FC G/L Date)
0036 //
=======================================================================
CONTROL: HYPITEM Item &Ledger
EVENT: Button Clicked
----------------------------------------------------------------------OPT: Using Defaults
0001 Call( App:P4111 , Form:W4111A , Ver: PO szItemLedgerVersion )
FC Business Unit -> FI Costcenter
=======================================================================
CONTROL: HYPITEM &Journal Entries
EVENT: Button Clicked
----------------------------------------------------------------------OPT: Using Defaults
0001 //
0002 // Call Journal Entries
0003 //
0004 Call( App:P0911 , Form:W0911I , Ver: PO szJournalEntriesVersion )
"N" -> FI Batchtype
FC Batch Number -> FI Batchnumber
FC Doc Type -> FI Documenttype
FC Document Number -> FI Docvoucherinvoicee
FC kco- DocKeyComp (wf) -> FI Companykey
=======================================================================
CONTROL: EDIT G/L Date
EVENT: Control Exited/Changed-Asynch
----------------------------------------------------------------------evt_CurrencyCode_CRCD
evt_cDocActionCode_ACTN
evt_MaxGridRows_MATH01
OPT: Using Defaults
0001 //
0002 // SAR 8918848- Initializing the evt_CurrencyCode_CRCD variable so that it
0003 // does not retain its previous value.
0004 VA evt_CurrencyCode_CRCD = " "
0005 // Call F0911 Begin Doc when the G/L date changes
0006 //
0007 // SAR 6484392, Check the DocActionCode and pass it into F0911 Begin Doc.
0008 If SV Form_ Mode is equal to CO ADD_MODE
0009
VA evt_cDocActionCode_ACTN = "1"
0010 Else
0011
VA evt_cDocActionCode_ACTN = "2"
0012 End If
0013 If FC jobs - JobNoF0911 (wf) is not equal to <Zero>
0014
// SAR 8918848 - Checking for null value of evt_CurrencyCode_CRCD also.
0015
//
0016
If VA evt_CurrencyCode_CRCD is equal to or empty <Blank> Or VA evt_Curre
ncyCode_CRCD is equal to <Null>
0017
F0010 Get Company Currency Code
FC kco- DocKeyComp (wf) -> BF szCompany
VA evt_CurrencyCode_CRCD <- BF szCurrencyCode
0018
End If
0019
F0911 Begin Document
FC jobs - JobNoF0911 (wf) <> BF mnJobNumber
VA evt_cDocActionCode_ACTN -> BF cDocAction
"1" <> BF cEditInstructionFlag
FC JELN -Last JE Line (wf) <> BF mnLastLineNumber
FC kco- DocKeyComp (wf) <> BF szCompanyKey
FC Doc Type <> BF szDocumentType
FC Document Number <> BF mnDocNumber
FC G/L Date <> BF jdGLDate
FC Batch Number <> BF mnBatchNumber
"N" <> BF szBatchType
FC dicj - Batch Date (wf) <> BF jdBatchDate
FC dicj - Batch Date (wf) <> BF jdBatchSystemDate
VA evt_CurrencyCode_CRCD <> BF szTransactionCurrency
FC Explanation <> BF szExplanation
VA evt_CurrencyCode_CRCD <> BF szBaseCoCurrency
0020
0021
0022
0023
0024
0025
usly
0026
0027
0028
0029
0030
0031
0032
0033
TH01
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
// enterd rows and update all newly entered rows with new G/L date
Get Max Grid Rows(FC Grid, VA frm_MaxGridRows_MATH01)
VA frm_MaxGridRows_MATH01 = [VA frm_MaxGridRows_MATH01]-1
VA frm_Index_MATH01 = "1"
Get Max Grid Rows(FC Grid, VA evt_MaxGridRows_MATH01)
VA evt_MaxGridRows_MATH01 = [VA evt_MaxGridRows_MATH01]-1
VA frm_Index_MATH01 = VA frm_MaxGridRows_MATH01
While VA frm_Index_MATH01 is less than or equal to VA evt_MaxGridRows_MA
he
0006 // ER sets the cDisableGlDate variable to 1 and when a quantity is entered
0007 // then that variable is set back to 0. If it is left at 1 then Begin Doc i
s
0008 // not called, and Edit Line is not called.
0009 //
0010 // SAR 8249695 - The user can enter a zero quantity but they must enter an
0011 // extended cost if they do.
0012 If GC Quantity is equal to <Zero> And GC Extended Amount is equal to <Zero>
0013
Set Grid Cell Error(FC Grid, <Currently Selected Row>, GC Quantity, "000
3")
0014 Else
0015
Clear Grid Cell Error(FC Grid, <Currently Selected Row>, GC Quantity)
0016 End If
0017 //
0018 If FC Business Unit is equal to or empty <Blank> And GC Branch/ Plant is eq
ual to or empty <Blank>
0019
Set Grid Cell Error(FC Grid, <Current Row>, GC Branch/ Plant, "0003")
0020
Set Edit Control Error(FC Business Unit, "0003")
0021 End If
0022 //
0023 If GC Branch/ Plant is not equal to <Blank>
0024
Clear Grid Cell Error(FC Grid, <Current Row>, GC Branch/ Plant)
0025 End If
0026 If GC Branch/ Plant is not equal to <Blank> And FC Business Unit is equal t
o or empty <Blank>
0027
FC Business Unit = GC Branch/ Plant
0028 End If
0029 //
0030 If FC Business Unit is not equal to <Blank> And FC Business Unit is not equ
al to <Null>
0031
//
0032
Clear Edit Control Error(FC Business Unit)
0033
//
0034
If GC Branch/ Plant is equal to or empty <Blank>
0035
GC Branch/ Plant = FC Business Unit
0036
End If
0037
//
0038
// SAR 6167573 - Move this if statement to after the check for GC Branch
Plant
0039
// being blank instead of before.
0040
// SAR 7576301 - Disable this condition.
0041 !
If FC ev01-BgnDocOnce(wf) is not equal to "1"
0042
// SAR 7576301 - New condition added to allow user to change G/L Date
before
0043
// disabling it once Qty in grid is changed.
0044
If FC ev01-BgnDocOnce(wf) is not equal to "1" And VA frm_cDisableGlDa
te_EV01 is not equal to "1"
0045
//
0046
F4114 Begin Document
FC CTID -Computer ID (wf) -> BF szComputerID
GC Branch/ Plant -> BF szBranchPlant
FC Batch Number <> BF mnBatchNumber
FC dicj - Batch Date (wf) <> BF jdBatchDate
FC JELN -Last JE Line (wf) <> BF mnLastJELineNumber
FC kco- DocKeyComp (wf) <> BF szDocumentKeyCompany
FC Doc Type <> BF szDocumentType
FC Document Number <> BF mnDocumentNumber
FC G/L Date <> BF jdGLDate
FC Order Date <> BF jdTransactionDate
----------------------------------------------------------------------evt_cP4605Cancelled
OPT: Using Defaults
0001 If GC ev01 - F4111 Record Exist (wf) is not equal to "1" And FC ev01-BgnDoc
Once(wf) is equal to "1"
0002
// ---------------------------------------------------------------------------0003
// Save entered lot fields. If returned from the master business funct
ions,
0004
// protect fields.
0005
// ---------------------------------------------------------------------------0006
//
0007
FC mmej - Ent Lot Exp Date (wf) = GC Lot Expiration Date
0008
FC lotp - Ent Lot Potency (wf) = GC Lot Potency
0009
FC lotg - EntLotGrade(wf) = GC Lot Grade
0010
FC ldsc - Ent Lot Desc (wf) = GC Lot Description
0011
// ---------------------------------------------------------------------------0012
// If the Reversal flag is not set, process the Row is Exited event.
0013
// ---------------------------------------------------------------------------0014
//
0015
// ---------------------------------------------------------------------------0016
//
PO-ProtectCost = 1 : Disable Cost
0017
//
PO-ProtectCost = 2 : Hide Cost
0018
//
0019
//
If UnitCostEnter flag is set to '1' , then ExtendedCost must be
0020
//
recalculated. This is because if the quantities changes, the
0021
//
ExtendedCost was never recalculated in the Inventory Transaction
Program
0022
//
Edit Line (F4111EditLine); and it will give an error.
0023
// ---------------------------------------------------------------------------0024
//
0025
If PO cProtectCosts is equal to "1,2"
0026
GC Unit Cost = "0"
0027
GC Extended Amount = "0"
0028
Else
0029
If VA grd_Old_ItemNumber is not equal to GC Item Number And VA grd_Ol
d_UnitCost is equal to GC Unit Cost And VA grd_Old_ItemNumber is greater than <B
lank>
0030
GC Unit Cost = "0"
0031
GC Extended Amount = "0"
0032
End If
0033
End If
0034
//
0035
If SL CurrencyProcessing is equal to "Y,Z"
0036
Copy Currency Information(GC Extended Amount, FC ECST - Hold Currency
Info (wf))
0037
End If
0038
//
0039
If GC Branch/ Plant is equal to or empty <Blank>
0040
GC Branch/ Plant = FC Business Unit
0041
End If
0042
//
0043
If GC G/L Date is equal to ""
0044
GC G/L Date = FC G/L Date
0045
End If
0046
0047
the
0048
the
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
054
0060
0061
//
// If the quantity is greater than zero, the amount is being added 'To'
// location. If it is less than zero, the amount is being taken 'From'
// location
//
If GC Quantity is greater than <Zero>
VA frm_FromTo = "T"
Else
VA frm_FromTo = "F"
End If
//
// BUG 11836680 - Pass the Country of Origin
// BUG# 11905201 - PMPN Enhancements
// Added PMPN Fields in Edit Line Call. Retrieve ProcessFlag to call P42
// for Inventory Tag update
F4114 Edit Line
FC CTID -Computer ID (wf) -> BF szComputerID
GC ev06 - Rcd Written (wf) <> BF cRecordWrittenToWorkFile
GC lnid - Line Number (wf) <> BF mnLineNumber
GC G/L Date -> BF jdGLDate
FC Explanation -> BF szGLExplanation
"1" -> BF cUpdateQuantityOnHand
PO cAllowQtyOverAvailable <> BF cAllowQtyOverAvailable
FC lnid - Prev Line No (wf) <> BF mnPreviousLinenumber
VA frm_FromTo -> BF cFromTo
FC JELN -Last JE Line (wf) <> BF mnLastJELine
PO cEntera1todefaultfromprimary -> BF cDefaultFromPrimaryLocation
PO cAllowHeldLots -> BF cAllowHeldLots
FC Order Date -> BF jdTransactionDate
FC Doc Type -> BF szDocumentType
FC dicj - Batch Date (wf) -> BF jdBatchDate
FC Batch Number <> BF mnBatchNumber
FC EV01 - Batch stat (wf) <> BF cBatchStatus
GC Branch/ Plant -> BF szBranchPlant
GC Item Number -> BF szItemNumber
GC itm - Short Item No (wf) <- BF mnShortItemNumber
GC Location <> BF szDisplayedLocation
GC Location - File (wf) <- BF szLocation
GC Lot/Serial <> BF szLotNumber
GC UM <> BF szTransactionUOM
GC Quantity -> BF mnTransactionQty
GC Unit Cost <> BF mnTransactionUnitCost
GC Extended Amount <> BF mnExtendedAmount
"2" -> BF mnTransactionProcessType
GC Lot Potency <> BF mnLotPotency
GC Lot Grade <> BF szLotGrade
GC Lot Status <> BF cLotStatusCode
GC Lot Expiration Date <> BF jdLotExpirationDate
FC Document Number <> BF mnDocumentNumber
GC Lot Description <> BF szLotDescription
GC Reason Code -> BF szReasonCode
FC jobs - JobNoF0911 (wf) <> BF mnF0911JobNumber
FC kco- DocKeyComp (wf) <> BF szKeyCompany
GC STKT - Stocking Type (wf) <- BF cStockingType
FC JOBS - Inv Job Number (wf) <> BF mnInvJobNumber
GC Memo Lot 1 <> BF szMemoLot1
GC Memo Lot 2 <> BF szMemoLot2
0062
//
0063
// SAR 5329956 - Mark that edit line was called.
0064
VA grd_cEditLineCalled_EV01 = "1"
0065
// End SAR 5329956
0066
//
0067 !
If GC STKT - Stocking Type (wf) is equal to "C" Or GC STKT - Stocking
Type (wf) is equal to "c"
0068 !
If GC CFGSID - Unique Configuration ID (wf) is equal to <Null>
0069 !
Set Grid Row Bitmap(FC Grid, <Current Row>, <Action Msg>)
0070 !
Else
0071 !
Set Grid Row Bitmap(FC Grid, <Current Row>, <Blank>)
0072 !
End If
0073 !
Else
0074 !
Set Grid Row Bitmap(FC Grid, <Current Row>, <Blank>)
0075 !
End If
0076
//
0077
// ---------------------------------------------------------------------------0078
//
If lot information returned and is different than the entered fi
elds,
0079
//
protect the columns
0080
// ---------------------------------------------------------------------------0081
//
0082 !
If FC mmej - Ent Lot Exp Date (wf) is not equal to GC Lot Expiration
Date
0083 !
Disable Grid(FC Grid, <Current Row>, GC Lot Expiration Date)
0084 !
End If
0085 !
//
0086 !
If FC lotp - Ent Lot Potency (wf) is not equal to GC Lot Potency
0087 !
Disable Grid(FC Grid, <Current Row>, GC Lot Potency)
0088 !
End If
0089 !
//
0090 !
If FC lotg - EntLotGrade(wf) is not equal to GC Lot Grade
0091 !
Disable Grid(FC Grid, <Current Row>, GC Lot Grade)
0092 !
End If
0093 !
//
0094 !
If FC ldsc - Ent Lot Desc (wf) is not equal to GC Lot Description
0095 !
Disable Grid(FC Grid, <Current Row>, GC Lot Description)
0096 !
End If
0097
// ---------------------------------------------------------------------------0098
//
Display Batch Group Box
0099
// ---------------------------------------------------------------------------0100
If FC Batch Number is not equal to <Zero>
0101
FC ICU - BatchNo (wf) = FC Batch Number
0102
Show Control(FC Batch Number)
0103
Show Control(FC Group Box 49)
0104
Disable Control(FC Batch Number)
0105
End If
0106
//
0107
// Begin SAR 7333203 - Initialize F0911 Job no. & BeginDoc Flag if JELN
is
0108
// blank/null/Zero.
0109
// SAR 7576301 - Disable all this code.
0110 !
If FC JELN -Last JE Line (wf) is equal to <Blank> Or FC JELN -Last JE
Line (wf) is equal to <Null> Or FC JELN -Last JE Line (wf) is equal to <Zero>
0111 !
FC jobs - JobNoF0911 (wf) = 0
0112
// SAR 7576301 - If the G/L Interface flag is not on in branch plant
constants
0113
// no J/E line numbers will be created. That does not mean processing
should
0114
// not continue.
0115 !
FC ev01-BgnDocOnce(wf) = "0"
0116 !
End If
0117
// End SAR 7333203
0118 End If
0119 // ----- ENDIF Reversal not equal to '1' ----0120 //
0121 VA grd_Old_ItemNumber = GC Item Number
0122 VA grd_Old_UnitCost = GC Unit Cost
0123 //
0124 // BUG - 14049888 - Copy the initial lot status code in the variable
0125 // nitialLotStatus
0126 VA grd_szInitialLotStsCode_LOTS = GC Lot Status
0127 // BUG# 11904715 - PMPN Enhancements - Begin
0128 // Inventory Tag file Integrity - Call P42054 for PN Consumption
0129 If VA frm_cPMPNInstalled_EV01 is equal to "1"
0130
If GC ProductionNumber ProcessFlag is equal to "1"
0131
If GC Production Number is not equal to <Blank> And GC Production Num
ber is not equal to <Null>
0132
Disable Control(HC Prod No. Consumption)
0133 !
Set Grid Cell Error(FC Grid, <Currently Selected Row>, GC Quanti
ty, "41OHT")
0134
Else
0135
Enable Control(HC Prod No. Consumption)
0136
Math Numeric to String, Convert
FC JOBS - Inv Job Number (wf) -> BF mnMathNumeric01
VA frm_szProdNoJobNumber_JOB <- BF szVideoConstant30A
0137
Call( App:P42054 , Form:W42054A )
GC itm - Short Item No (wf) -> FI mnIdentifierShortItem
GC Branch/ Plant -> FI szCostCenter
GC Location - File (wf) -> FI szLocation
GC Lot/Serial -> FI szLot
0138
0139
ity, "34401R")
0140
Else
0141
Clear Grid Cell Error(FC Grid, <Currently Selected Row>, GC Qua
ntity)
0142
End If
0143
End If
0144
Else
0145
If GC ProductionNumber ProcessFlag is equal to "3"
0146
Enable Control(HC Prod No. Consumption)
0147
Else
0148
Disable Control(HC Prod No. Consumption)
0149
End If
0150
End If
0151 End If
0152 // BUG# 11904715 - PMPN Enhancements - End
=======================================================================
CONTROL: GRIDCOL Item Number
EVENT: Visual Assist Button Clicked
----------------------------------------------------------------------OPT: Using Defaults
0001 If PO cItemSearchAndSelect_EV01 is equal to "1" And VA frm_cApparelActive_E
V01 is equal to "1"
0002
Suppress Default Visual Assist Form
0003
Call( App:PCW41011 , Form:WCW41011A )
GC Item Number <- FI szIdentifier2ndItem
0004 End If
----------------------------------------------------------------------EVENT: Col Exited & Changed - Inline
----------------------------------------------------------------------evt_cMatrixErrorCode_ERRC
evt_mnMatrixJobNumber_JOBS
evt_szMatrixUser_USER
evt_szMatrixLevelName_C9LVNM
evt_cMatrixItem_C9MXLN
evt_mnMatrixLevelNumber_C9LVNO
evt_szMatrixStructure_C9STRC
evt_szMatrixErrorID_DTAI
evt_mnQuantityControl_TRQT
evt_mnMatrixMaxGrid_MATH01
evt_idMatricCacheCursor_GENLNG
evt_mnIdentifierShortItem_ITM
evt_szTransactionUOM_UOM
evt_cSKULevelItem_EV11
evt_cStyleITEM_YN_EV01
OPT: Using Defaults
0001 //
0002 GC CFGSID - Unique Configuration ID (wf) = ""
0003 //
0004 // perform matrix item processing only if Apparel is active
0005 //
0007
0008
0009
0010
0011
0012
so
0013
0014
0015
(wf)
0016
0017
0018
0019
0020
0021
0001 //
0002 // If the document number, type and company are the same as the previous or
der,
0003 // suppress the grid line. Otherwise, save the current document number, ty
pe an
0004 // company for the next comparison.
0005 //
0006 // ---------------------------------------------------------------------------0007 //
SAR #1914071
1/23/1998
0008 //
Suppress Grid If Zero Balance Adjustment or Standard
0009 //
Cost Change Line
0010 // ---------------------------------------------------------------------------0011 //
0012 If BC Explanation - Transaction (F4111)(TREX) is equal to "Standard Cost Ch
ange" Or BC Explanation - Transaction (F4111)(TREX) is equal to "Zero Balance Ad
justment"
0013
Suppress Grid Line(FC Grid)
0014 Else
0015
If BC Document (Voucher, Invoice, etc.) (F4111)(DOC) is equal to FC DOC
- Doc No (wf) And BC Document Type (F4111)(DCT) is equal to FC DCT - Doc Type (
wf) And BC Document Company (F4111)(KCO) is equal to FC KCO - Doc Comp (wf) And
BC Batch Number (F4111)(ICU) is equal to VA frm_ICU_BatchNumber
0016
Suppress Grid Line(FC Grid)
0017
End If
0018
//
0019
//
0020
VA frm_ICU_BatchNumber = BC Batch Number (F4111)(ICU)
0021
GC Batch Number = BC Batch Number (F4111)(ICU)
0022
FC KCO - Doc Comp (wf) = BC Document Company (F4111)(KCO)
0023
FC DCT - Doc Type (wf) = BC Document Type (F4111)(DCT)
0024
FC DOC - Doc No (wf) = BC Document (Voucher, Invoice, etc.) (F4111)(DOC
)
0025 End If
----------------------------------------------------------------------EVENT: Variables
----------------------------------------------------------------------frm_ICU_BatchNumber
frm_ICUT_BatchType
frm_IST_BatchStatus
=======================================================================
CONTROL: HYPITEM &Select
EVENT: Button Clicked
----------------------------------------------------------------------evt_GLInterfaceOn
OPT: Repeat ER for Event
0001 Call( App:P4114 , Form:W4114A )
GC Document Number -> FI Docvoucherinvoicee
GC Do Ty -> FI Documenttype
GC Doc Co -> FI Companykey
GC G/L Date -> FI Dtforglandvouch1
GC Branch/ Plant -> FI Costcenter
GC Transaction Date -> FI Datetransactionjulian
GC Transaction Explanation -> FI Explanationtransaction
GC Batch Number -> FI Batchnumber
=======================================================================