Z file check upload process
Listing of ER for Report: Report : Inventory Control Location (R550154A)
***********************************************************************
GLOBALS: Variables (Global)
***********************************************************************
rpt_DateEffective
rpt_PhoneAreaCode1
rpt_PhoneNumber
rpt_LineNumberID
rpt_NameGiven
rpt_NameSurname
rpt_FaxAreaCode1
rpt_FaxNumber
rpt_HubManagerCode1
rpt_Country
rpt_ZipCode_Num
rpt_LenZipCade
rpt_CustomerCode2
rpt_AddressNumber_Closed
rpt_DateClosed
rpt_DateClosedGE
rpt_GenericLong
rpt_GenericLong_Out
rpt_ReportCodeAddBook019
rpt_DateBeginningEffective_1
rpt_LedgType
rpt_IdentifierShortItem_41021
rpt_QtyOnHandPrimaryUn41021
rpt_TotalPrimaryUn
rpt_AmountUnitCost
rpt_IndItemPrice
rpt_TotaItemPrice
=======================================================================
SECTION: Address Book Update [COLUMNAR SECTION] (S1)
=======================================================================
OBJECT: SECTION
EVENT: Initialize Section
-----------------------------------------------------------------------
OPT: Using Defaults
0001 Get Input Output Env Handles
SL LoginEnvironment -> BF szInputEnvironment
VA rpt_GenericLong <- bf="" idinputenvhandle="" p=""> SL LoginEnvironment -> BF szOutputEnvironment
VA rpt_GenericLong_Out <- bf="" idoutputenvhandle="" p=""> SL LoginEnvironment -> BF szLoginEnvironment
0002 Delete All Rows From Table
"F550154" -> BF szTableName
VA rpt_GenericLong_Out -> BF idOutputEnvHandle
-----------------------------------------------------------------------
EVENT: Do Section
-----------------------------------------------------------------------
OPT: Using Defaults
0001 F0101 Get Effective Date
BC Address Number (F0101)(AN8) -> BF mnAddressNumber
VA rpt_DateEffective <- bf="" jddatebeginningeffective="" p="">0002 F0116 Get Next Effective Address
BC Address Number (F0101)(AN8) -> BF mnAddressNumber
VA rpt_DateEffective -> BF jdDateBeginningEffective
RV Address1 <- bf="" p="" szaddressline1=""> RV ZIP <- bf="" p="" szzipcodepostal=""> RV City <- bf="" p="" szcity=""> RV State <- bf="" p="" szstate=""> VA rpt_Country <- bf="" p="" szcountry="">0003 F0115 Get Primary Phone Number
BC Address Number (F0101)(AN8) -> BF mnAddressnumber
VA rpt_PhoneNumber <- bf="" p="" szphonenumber=""> VA rpt_PhoneAreaCode1 <- bf="" p="" szphoneareacode1="">0004 If VA rpt_PhoneNumber is equal to
0005 RV PhoneNo = ""
0006 Else
0007 RV PhoneNo = concat(concat(rtrim([VA rpt_PhoneAreaCode1],' ')," - "),ltrim([VA rpt_PhoneNumber],' '))
0008 End If
0009 //
0010 VA rpt_NameGiven = ""
0011 VA rpt_NameSurname = ""
0012 VA rpt_LineNumberID = 0
0013 F0111.Fetch Single
BC Address Number (F0101)(AN8) = TK Address Number
VA rpt_LineNumberID = TK Who's Who Line Number - ID
VA rpt_NameGiven <- -="" given="" name="" p="" tk=""> VA rpt_NameSurname <- -="" name="" p="" surname="" tk="">0014 RV Fname = [VA rpt_NameGiven]
0015 RV Lname = [VA rpt_NameSurname]
0016 //
0017 VA rpt_NameGiven = ""
0018 VA rpt_NameSurname = ""
0019 F0111.Fetch Single
BC Address Number - 1st (F0101)(AN81) = TK Address Number
VA rpt_LineNumberID = TK Who's Who Line Number - ID
VA rpt_NameGiven <- -="" given="" name="" p="" tk=""> VA rpt_NameSurname <- -="" name="" p="" surname="" tk="">0020 RV An81_Desc = concat(concat(rtrim([VA rpt_NameGiven],' ')," "),ltrim([VA rpt_NameSurname],' '))
0021 //
0022 VA rpt_NameGiven = ""
0023 VA rpt_NameSurname = ""
0024 F0111.Fetch Single
BC Address Number - 2nd (F0101)(AN82) = TK Address Number
VA rpt_LineNumberID = TK Who's Who Line Number - ID
VA rpt_NameGiven <- -="" given="" name="" p="" tk=""> VA rpt_NameSurname <- -="" name="" p="" surname="" tk="">0025 RV An82_Desc = concat(concat(rtrim([VA rpt_NameGiven],' ')," "),ltrim([VA rpt_NameSurname],' '))
0026 //
0027 VA rpt_NameGiven = ""
0028 VA rpt_NameSurname = ""
0029 F0111.Fetch Single
BC Address Number - 3rd (F0101)(AN83) = TK Address Number
VA rpt_LineNumberID = TK Who's Who Line Number - ID
VA rpt_NameGiven <- -="" given="" name="" p="" tk=""> VA rpt_NameSurname <- -="" name="" p="" surname="" tk="">0030 RV An83_Desc = concat(concat(rtrim([VA rpt_NameGiven],' ')," "),ltrim([VA rpt_NameSurname],' '))
0031 //
0032 VA rpt_NameGiven = ""
0033 VA rpt_NameSurname = ""
0034 F0111.Fetch Single
BC Address Number - 4th (F0101)(AN84) = TK Address Number
VA rpt_LineNumberID = TK Who's Who Line Number - ID
VA rpt_NameGiven <- -="" given="" name="" p="" tk=""> VA rpt_NameSurname <- -="" name="" p="" surname="" tk="">0035 RV An84_Desc = concat(concat(rtrim([VA rpt_NameGiven],' ')," "),ltrim([VA rpt_NameSurname],' '))
0036 // CMC2
0037 F0301.Fetch Single
BC Address Number (F0101)(AN8) = TK Address Number
VA rpt_CustomerCode2 <- 2="" code="" commission="" p="" tk="">0038 VA rpt_NameGiven = ""
0039 VA rpt_NameSurname = ""
0040 F0111.Fetch Single
VA rpt_CustomerCode2 = TK Address Number
VA rpt_LineNumberID = TK Who's Who Line Number - ID
VA rpt_NameGiven <- -="" given="" name="" p="" tk=""> VA rpt_NameSurname <- -="" name="" p="" surname="" tk="">0041 RV CMC2 = concat(concat(rtrim([VA rpt_NameGiven],' ')," "),ltrim([VA rpt_NameSurname],' '))
0042 //
0043 VA rpt_LineNumberID = 2
0044 F0115.Fetch Single
BC Address Number (F0101)(AN8) = TK Address Number
VA rpt_LineNumberID = TK Line Number ID - 5.0
VA rpt_FaxAreaCode1 <- p="" phone="" prefix="" tk=""> VA rpt_FaxNumber <- number="" p="" phone="" tk="">0045 If VA rpt_FaxNumber is equal to
0046 RV FaxNo = ""
0047 Else
0048 RV FaxNo = concat(concat(rtrim([VA rpt_FaxAreaCode1],' ')," - "),ltrim([VA rpt_FaxNumber],' '))
0049 End If
0050 F0301.Fetch Single
BC Address Number (F0101)(AN8) = TK Address Number
VA rpt_HubManagerCode1 <- 1="" code="" commission="" p="" tk="">0051 F0101 Get Alpha Name
VA rpt_HubManagerCode1 -> BF mnAddressNumber
RV HubManager <- bf="" p="" szaddressbookdescription="">0052 VA rpt_ZipCode_Num = [RV ZIP]
0053 VA rpt_LenZipCade = length([VA rpt_ZipCode_Num])
0054 If VA rpt_LenZipCade is equal to "4"
0055 RV ZIP = lpad([RV ZIP],'0',5)
0056 Else
0057 End If
0058 RV ZIP = lpad([RV ZIP],'0',5)
0059 //
0060 //
0061 //
0062 // Suppress Write
0063 //
0064 If RV State is equal to
Or RV State is equal to "" Or RV State is equal to Or RV State is equal to
0065 Suppress Section Write
0066 End If
0067 If RV State is equal to " ,AK,HI,PR"
0068 Suppress Section Write
0069 Else
0070 End If
0071 If VA rpt_Country is equal to "US"
0072 Else
0073 Suppress Section Write
0074 End If
0075 If RV Fname is equal to
Or RV Fname is equal to "" Or RV Fname is equal to Or RV Fname is equal to ""
0076 Suppress Section Write
0077 End If
0078 //
0079 //
0080 // Date Closed
0081 //
0082 //
0083 VA rpt_DateClosedGE = ""
0084 F550155.Fetch Single
BC Address Number (F0101)(AN8) = TK Address Number
VA rpt_DateClosed <- -="" date="" expired="" p="" tk="">0085 While SV File_IO_Status is equal to CO SUCCESS
0086 If VA rpt_DateClosed is greater than VA rpt_DateClosedGE
0087 VA rpt_DateClosedGE = VA rpt_DateClosed
0088 Else
0089 VA rpt_DateClosedGE = VA rpt_DateClosedGE
0090 End If
0091 F550155.Fetch Next
BC Address Number (F0101)(AN8) <- address="" number="" p="" tk=""> VA rpt_DateClosed <- -="" date="" expired="" p="" tk="">0092 End While
0093 RV DateClosed = [VA rpt_DateClosedGE]
0094 //
0095 //
0096 // End Date Closed
0097 //
0098 //
0099 VA rpt_LedgType = "02"
0100 VA rpt_TotaItemPrice = 0
0101 VA rpt_IndItemPrice = 0
0102 VA rpt_AmountUnitCost = 0
0103 VA rpt_QtyOnHandPrimaryUn41021 = 0
0104 F41021.Fetch Single
VA rpt_IdentifierShortItem_41021 <- -="" item="" number="" p="" short="" tk=""> BC Business Unit (F0101)(MCU) = TK Business Unit
VA rpt_QtyOnHandPrimaryUn41021 <- -="" hand="" on="" p="" primary="" quantity="" tk="" units="">0105 While SV File_IO_Status is equal to CO SUCCESS
0106 F4105.Fetch Single
VA rpt_IdentifierShortItem_41021 = TK Item Number - Short
BC Business Unit (F0101)(MCU) = TK Business Unit
VA rpt_LedgType = TK Cost Method
VA rpt_AmountUnitCost <- -="" amount="" cost="" p="" tk="" unit="">0107 VA rpt_TotaItemPrice = [VA rpt_TotaItemPrice]+([VA rpt_AmountUnitCost]*[VA rpt_QtyOnHandPrimaryUn41021])
0108 F41021.Fetch Next
VA rpt_IdentifierShortItem_41021 <- -="" item="" number="" p="" short="" tk=""> BC Business Unit (F0101)(MCU) <- business="" p="" tk="" unit=""> VA rpt_QtyOnHandPrimaryUn41021 <- -="" hand="" on="" p="" primary="" quantity="" tk="" units="">0109 End While
0110 //
0111 //
0112 //
0113 //
0114 //
0115 F550154.Insert
BC Address Number (F0101)(AN8) -> TK Address Number
BC Business Unit (F0101)(MCU) -> TK Business Unit
BC Name - Alpha (F0101)(ALPH) -> TK Name - Alpha
RV Fname -> TK Name - Given
RV Lname -> TK Name - Surname
RV HubManager -> TK Description
RV Address1 -> TK Address Line 1
RV City -> TK City
RV State -> TK State
RV ZIP -> TK Postal Code
RV PhoneNo -> TK Phone Number
BC Category Code - Address Book 29 (F0101)(AC29) -> TK Category Code - Address Book 29
RV FaxNo -> TK Case Fax Number 4
RV An81_Desc -> TK Address Line 2
RV An82_Desc -> TK Address Line 3
RV An83_Desc -> TK Address Line 4
RV An84_Desc -> TK Address Line 5
RV CMC2 -> TK Address Line 6
RV DateClosed -> TK Date Audit File Future Use
VA rpt_Country -> TK Country
VA rpt_TotaItemPrice -> TK Amount - Extended Price
VA rpt_DateClosed -> TK Date - Counted
0116 //
0117 //
0118 //
=======================================================================
SECTION: Wf- Inv. Control Location [COLUMNAR SECTION] (S3)
=======================================================================
OBJECT: SECTION
EVENT: Do Section
-----------------------------------------------------------------------
OPT: Using Defaults
0001 F0101.Fetch Single
BC Address Number (F550154)(AN8) = TK Address Number
VA rpt_DateBeginningEffective_1 <- -="" beginning="" date="" effective="" p="" tk=""> VA rpt_ReportCodeAddBook019 <- -="" 19="" address="" book="" category="" code="" p="" tk="">0002 Get UDC Description (Obsolete)
"01" -> BF szSystemCode
"19" -> BF szUserDefinedCodes
VA rpt_ReportCodeAddBook019 -> BF szUserDefinedCode
RV AC19Desc <- bf="" p="" szdescription01="">0003 ! VA rpt_ReportCodeAddBook019 = ltrim([VA rpt_ReportCodeAddBook019],'')
0004 ! Get UDC
! "01" -> BF szSystemCode
! "19" -> BF szRecordTypeCode
! VA rpt_ReportCodeAddBook019 -> BF szUserDefinedCode
! RV AC19Desc <- bf="" p="" szdescription001="">0005 F0116.Fetch Single
BC Address Number (F550154)(AN8) = TK Address Number
VA rpt_DateBeginningEffective_1 = TK Date - Beginning Effective
RV Add2 <- 2="" address="" line="" p="" tk="">0006 //
0007 RV Days = days_between([BC Date - Counted (F550154)(CNTJ)],[SL DateToday])
Wednesday February 17, 2016 08:43
->->->->->->->->->->->->->->->->->->->->->->->->->->->->->->->->->->->->->->->->->