Wednesday, March 9, 2011

JD Edwards report for Order transfer to the warehouse

Listing of ER for Report: Report : Data-   [V] (R554268I)

***********************************************************************
     GLOBALS: Global Variables [V]
***********************************************************************
     rpt_DocumentOrderInvoiceE
     rpt_OrderType
     rpt_ABShipTo_Owner
     rpt_NameGiven
     rpt_NameSurname
     rpt_LineNumber
     rpt_PhoneNumberType
     rpt_PhoneAreaCode1
     rpt_PhoneNumber
     rpt_SequenceNumber70
     rpt_Count
     rpt_Count1
     rpt_CompanyKeyOrderNo
     rpt_StatusCodeNext
     rpt_LineType
     rpt_StatusCodeLast
     rpt_CompanyKeyOrderNo_Header
     rpt_LineNumberHeader
     rpt_UnitOfMeasure_1
     rpt_UnitOfMeasure_2
     rpt_RelatedUnitOfMeasure_1
     rpt_RelatedUnitOfMeasure_2
     rpt_ConversionFactor_1
     rpt_ConversionFactor_2
     rpt_DateBeginningEffective
     rpt_ReportCodeAddBook009
     rpt_ReportCodeAddBook008
     rpt_GroupUnitOfMeasure
     rpt_LineNumberDetail
     rpt_GroupUnitOfMeasureH1
     rpt_GroupUnitOfMeasureH2
     rpt_GroupUnitOfMeasureH3
     rpt_DateForDataExtr
     rpt_CountWOConf
     rpt_CallDetailWO_CF
     rpt_GT_DateForConf
     rpt_DateRequested_detail
     rpt_Qty_ship_C1
     rpt_Qty_ship_C2
     rpt_Qty_ship_C3
     rpt_ShippingConditionsCode_1
     rpt_AC03_YN
     rpt_AC07YN
     rpt_TimeLastUpdated
     rpt_CountLineNumber
     rpt_CountLineNumberTot
     rpt_QuantityTimeSeries01
     rpt_QuantityTimeSeries02
     rpt_QuantityTimeSeries03

=======================================================================
     SECTION: F4201 + F0101 + F0116 on  SHAN [GROUP SECTION] ()
=======================================================================
     OBJECT:  SECTION
     EVENT:  Initialize Section [V]
-----------------------------------------------------------------------
0001 VA rpt_CountLineNumber = 0
0002 VA rpt_DateForDataExtr = add_days(date_today(),1)
0003 Set Selection Append Flag( <Yes>)
0004 Set User Selection(BC Date - Requested (F4201),  <Less Than or Equal To>, VA rpt_DateForDataExtr,  <None>)

-----------------------------------------------------------------------
     EVENT:  Do Section [V]
-----------------------------------------------------------------------
0001 VA rpt_Count = 0
0002 VA rpt_CountLineNumber = 1
0003 ! RV RL5 = "."
0004 RV SHC5 = "."
0005 //
0006 VA rpt_CountWOConf = 0
0007 VA rpt_CallDetailWO_CF = ""
0008 //
0009 VA rpt_DocumentOrderInvoiceE = 0
0010 VA rpt_OrderType = ""
0011 VA rpt_StatusCodeLast = ""
0012 VA rpt_StatusCodeNext = ""
0013 VA rpt_StatusCodeNext = ""
0014 VA rpt_DateRequested_detail = ""
0015 ! VA rpt_Count = 0
0016 VA rpt_ReportCodeAddBook009 = ""
0017 VA rpt_ReportCodeAddBook008 = ""
0018 RV From_MCU = BC Business Unit (F4201)
0019 //
0020 F4211.Fetch Single
        VA rpt_CompanyKeyOrderNo_Header <- TK Order Company (Order Number)
        BC Document (Order No, Invoice, etc.) (F4201) =  TK Document (Order No, Invoice, etc.)
        BC Order Type (F4201) =  TK Order Type
        VA rpt_LineNumberHeader <- TK Line Number
        VA rpt_DateRequested_detail <- TK Date - Requested
        VA rpt_LineType <- TK Line Type
        VA rpt_StatusCodeNext <- TK Status Code - Next
        VA rpt_StatusCodeLast <- TK Status Code - Last
        RV SHC3 <- TK Route Code
0021 While SV File_IO_Status is equal to CO SUCCESS
0022    If VA rpt_LineType is equal to "S"
        And VA rpt_StatusCodeNext is equal to "540"
        And VA rpt_StatusCodeLast is not equal to "980"
0023       F5542324.Fetch Single
              VA rpt_CompanyKeyOrderNo_Header =  TK Order Company (Order Number)
              BC Document (Order No, Invoice, etc.) (F4201) =  TK Document (Order No, Invoice, etc.)
              BC Order Type (F4201) =  TK Order Type
              VA rpt_LineNumberHeader =  TK Line Number
0024       If SV File_IO_Status is equal to CO SUCCESS
0025       Else
0026          VA rpt_Count = 1+[VA rpt_Count]
0027          VA rpt_CountWOConf = VA rpt_Count
0028          //
0029          VA rpt_DocumentOrderInvoiceE = BC Document (Order No, Invoice, etc.) (F4201)
0030          VA rpt_OrderType = BC Order Type (F4201)
0031          VA rpt_CompanyKeyOrderNo = BC Document Company (Original Order) (F4201)
0032          //
0033       End If
0034    Else
0035    End If
0036    F4211.Fetch Next
           VA rpt_CompanyKeyOrderNo_Header <- TK Order Company (Order Number)
           BC Document (Order No, Invoice, etc.) (F4201) <- TK Document (Order No, Invoice, etc.)
           BC Order Type (F4201) <- TK Order Type
           VA rpt_LineNumberHeader <- TK Line Number
           VA rpt_DateRequested_detail <- TK Date - Requested
           VA rpt_LineType <- TK Line Type
           VA rpt_StatusCodeNext <- TK Status Code - Next
           VA rpt_StatusCodeLast <- TK Status Code - Last
0037 End While
0038 //
0039 // Date Requested
0040 ! RV DRQJ_Detail = VA rpt_DateRequested_detail
0041 RV DRQJ_Detail = BC Date - Requested (F4201)
0042 //
0043 // End Date Requested
0044 VA rpt_GroupUnitOfMeasureH1 = ""
0045 VA rpt_GroupUnitOfMeasureH2 = ""
0046 VA rpt_GroupUnitOfMeasureH3 = ""
0047 VA rpt_QuantityTimeSeries03 = 0
0048 VA rpt_QuantityTimeSeries02 = 0
0049 VA rpt_QuantityTimeSeries01 = 0
0050 F5541261.Fetch Single
        BC Document (Order No, Invoice, etc.) (F4201) =  TK Document (Order No, Invoice, etc.)
        BC Order Type (F4201) =  TK Order Type
        VA rpt_QuantityTimeSeries01 <- TK Quantity - Time Series 01
        VA rpt_QuantityTimeSeries02 <- TK Quantity - Time Series 02
        VA rpt_QuantityTimeSeries03 <- TK Quantity - Time Series 03
        VA rpt_GroupUnitOfMeasureH1 <- TK Group - Unit of Measure (Level 1)
        VA rpt_GroupUnitOfMeasureH2 <- TK Group - Unit of Measure (Level 2)
        VA rpt_GroupUnitOfMeasureH3 <- TK Group - Unit of Measure (Level 3)
0051 If SV File_IO_Status is equal to CO SUCCESS
0052    //
0053    If VA rpt_QuantityTimeSeries01 is equal to <Zero>
        And VA rpt_QuantityTimeSeries02 is equal to <Zero>
        And VA rpt_QuantityTimeSeries03 is equal to <Zero>
0054       VA rpt_Count = 0
0055    Else
0056    End If
0057 Else
0058    // 092804
0059    If VA rpt_CountWOConf is not equal to <Zero>
0060       VA rpt_CallDetailWO_CF = "99999"
0061    Else
0062    End If
0063    // End 092804
0064    VA rpt_Count = 0
0065 End If
0066 //
0067 // End F5541261
0068 //
0069 //
0070 F554247T.Fetch Single
        BC Document (Order No, Invoice, etc.) (F4201) =  TK Document (Order No, Invoice, etc.)
0071 If SV File_IO_Status is equal to CO SUCCESS
0072 Else
0073    VA rpt_Count = 0
0074 End If
0075 //
0076 //
0077 // Order Status
0078 RV OrderStatus = "N"
0079 //
0080 // 112304
0081 // Commented - Header Line Was Missing
0082 F5542324.Fetch Single
        BC Order Company (Order Number) (F4201) =  TK Order Company (Order Number)
        BC Document (Order No, Invoice, etc.) (F4201) =  TK Document (Order No, Invoice, etc.)
0083 If SV File_IO_Status is equal to CO SUCCESS
0084    VA rpt_Count = 0
0085    Suppress Section Write
0086 Else
0087 !    RV OrderStatus = "N"
0088 End If
0089 // 112304
0090 //
0091 // File F5541261 Test For Conf.
0092 //
0093 //
0094 //
0095 // Start IF For Cancled Line
0096 //
0097 If VA rpt_Count is not equal to <Zero>
0098    // Ship To BP
0099    F41001.Fetch Single
           RV Shipto_MCU <- TK Business Unit
           BC Address Number - Ship To (F4201) =  TK Address Number
0100    // End Ship To BP
0101    // Ship To Name
0102    VA rpt_LineNumber = 0
0103    F0111.Fetch Single
           BC Address Number - Ship To (F4201) =  TK Address Number
           VA rpt_LineNumber =  TK Who's Who Line Number - ID
           VA rpt_NameGiven <- TK Name - Given
           VA rpt_NameSurname <- TK Name - Surname
0104    RV ShipOwnerName = concat(concat(rtrim([VA rpt_NameGiven],' ')," "),ltrim([VA rpt_NameSurname],' '))
0105    // End Ship To Name
0106    //
0107    // Phone No
0108    VA rpt_PhoneAreaCode1 = " "
0109    VA rpt_PhoneNumber = " "
0110    VA rpt_SequenceNumber70 = 1
0111    VA rpt_LineNumber = 0
0112    RV PhoneNo = " "
0113    F0115.Fetch Single
           BC Address Number - Ship To (F4201) =  TK Address Number
           VA rpt_LineNumber =  TK Who's Who Line Number - ID
           VA rpt_SequenceNumber70 =  TK Line Number ID - 5.0
           VA rpt_PhoneAreaCode1 <- TK Phone Prefix
           VA rpt_PhoneNumber <- TK Phone Number
0114    If VA rpt_PhoneAreaCode1 is equal to <Blank>
0115       RV PhoneNo = [VA rpt_PhoneNumber]
0116    Else
0117       RV PhoneNo = concat(concat(rtrim([VA rpt_PhoneAreaCode1],' '),"-"),ltrim([VA rpt_PhoneNumber],' '))
0118    End If
0119    //
0120    // End Phone No
0121    //
0122 !    RV PhoneNo = ltrim([VA rpt_PhoneNumber],' ')
0123    VA rpt_DocumentOrderInvoiceE = BC Document (Order No, Invoice, etc.) (F4201)
0124    VA rpt_OrderType = BC Order Type (F4201)
0125    VA rpt_CompanyKeyOrderNo = BC Document Company (Original Order) (F4201)
0126    RV OrderDate_1 = concat(concat(concat(concat(lpad(date_month([BC Date - Order/Transaction (F4201)]),'0',2),"/"),lpad(date_day([BC Date - Order/Transaction (F4201)]),'0',2)),"/"),date_year([BC Date - Order/Transaction (F4201)]))
0127    RV DateRequested = concat(concat(concat(concat(lpad(date_month([BC Date - Requested (F4201)]),'0',2),"/"),lpad(date_day([BC Date - Requested (F4201)]),'0',2)),"/"),date_year([BC Date - Requested (F4201)]))
0128    RV SHC6_MCU = [BC Business Unit (F4201)]
0129    Add a Carrige Return to String
           RV CarriageRet <> szString
0130    //
0131    // Else Testing Next Status
0132    // No of Records
0133    VA rpt_CountLineNumberTot = [VA rpt_CountLineNumberTot]+[VA rpt_CountLineNumber]
0134 Else
0135    Suppress Section Write
0136    // 092804
0137 !    VA rpt_DocumentOrderInvoiceE = 0
0138 !    VA rpt_OrderType = ""
0139 !    VA rpt_StatusCodeLast = ""
0140 !    VA rpt_StatusCodeNext = ""
0141 !    VA rpt_StatusCodeNext = ""
0142 !    VA rpt_Count = 0
0143    // 092804
0144 End If
0145 // End Testing Next Status
0146 // 11/29/2004 ===== Ship To Address From F4008
0147 F4006.Fetch Single
        BC Document (Order No, Invoice, etc.) (F4201) =  TK Document (Order No, Invoice, etc.)
        BC Order Type (F4201) =  TK Order Type
0148 If SV File_IO_Status is equal to CO SUCCESS
0149    F4006.Fetch Single
           BC Document (Order No, Invoice, etc.) (F4201) =  TK Document (Order No, Invoice, etc.)
           BC Order Type (F4201) =  TK Order Type
           BC Name - Alpha (F0101) <- TK Name - Mailing
           BC Address Line 1 (F0116) <- TK Address Line 1
           BC Address Line 2 (F0116) <- TK Address Line 2
           BC Postal Code (F0116) <- TK Postal Code
           BC City (F0116) <- TK City
           BC State (F0116) <- TK State
           BC Country (F0116) <- TK Country
0150 Else
0151 End If
0152 //
0153 //
0154 //
0155 // End        11/29/2004 ===== Ship To Address From F4008
0156 RV SHC7_AN8 = [BC Address Number (F4201)]
0157 F0101.Fetch Single
        BC Address Number (F4201) =  TK Address Number
        RV AN8_CompanyName <- TK Name - Alpha
        VA rpt_DateBeginningEffective <- TK Date - Beginning Effective
0158 F0116.Fetch Single
        BC Address Number (F4201) =  TK Address Number
        VA rpt_DateBeginningEffective =  TK Date - Beginning Effective
        RV AN8_Add1 <- TK Address Line 1
        RV AN8_Add2 <- TK Address Line 2
        RV AN8_Zip <- TK Postal Code
        RV AN8_City <- TK City
        RV AN8_State <- TK State
        RV AN8_Country <- TK Country
0159 // Address Book - ShipTo
0160 //
0161 ! If BC Address Number (F4201) is equal to "296091,356091"
0162    F550145.Fetch Single
           BC Company (F4201) =  TK Order Company (Order Number)
           BC Document (Order No, Invoice, etc.) (F4201) =  TK Document (Order No, Invoice, etc.)
           BC Order Type (F4201) =  TK Order Type
0163    If SV File_IO_Status is equal to CO SUCCESS
0164       F550145.Fetch Single
              BC Company (F4201) =  TK Order Company (Order Number)
              BC Document (Order No, Invoice, etc.) (F4201) =  TK Document (Order No, Invoice, etc.)
              BC Order Type (F4201) =  TK Order Type
              RV SHAN_AC03 <- TK Category Code - Address Book 01
              RV SHAN_AC04 <- TK Category Code - Address Book 02
              RV SHAN_AC05 <- TK Category Code - Address Book 03
              RV SHAN_AC06 <- TK Category Code - Address Book 04
              RV SHAN_AC07 <- TK Category Code - Address Book 05
              RV SHC4 <- TK Category Code - Address Book 06
              RV ShipOwnerName <- TK Name - Alpha
              RV PhoneNo <- TK Phone Number
              RV SHAN_AC08 <- TK Delivery Instructions Line 1
              RV SHAN_AC09 <- TK Delivery Instructions Line 2
              RV SHAN_DEL1 <- TK Description 10
              RV SHAN_DEL2 <- TK Automatic Accounting Inst Purpose
              RV CompName_01A <- TK Company Name - ACHA
              RV Add1_01A <- TK Address Line 1
              RV Add2_01A <- TK Address Line 2
              RV City_01A <- TK City
              RV State_01A <- TK State
              RV Zip_01A <- TK Postal Code
              RV Counrty_01A <- TK Country
0165    Else
0166 !    Else
0167       F03012.Fetch Single
              BC Address Number - Ship To (F4201) =  TK Address Number
              RV SHAN_DEL1 <- TK Delivery Instructions Line 1
              RV SHAN_DEL2 <- TK Delivery Instructions Line 2
              RV SHAN_AC03 <- TK Category Code - Address Book 03
              RV SHAN_AC04 <- TK Category Code - Address Book 04
              RV SHAN_AC05 <- TK Category Code - Address Book 05
              RV SHAN_AC06 <- TK Category Code - Address Book 06
              RV SHAN_AC07 <- TK Category Code - Address Book 07
              VA rpt_ReportCodeAddBook008 <- TK Category Code - Address Book 08
              VA rpt_ReportCodeAddBook009 <- TK Category Code - Address Book 09
0168       Get UDC Description
              UNDEFINED X szDataDictionaryItem
              "01" -> szSystemCode
              "08" -> szUserDefinedCodes
              UNDEFINED X cUserDefinedCode
              VA rpt_ReportCodeAddBook008 -> szUserDefinedCode
              RV SHAN_AC08 <- szDescription01
              UNDEFINED X szDescription02
              UNDEFINED X cErrorCode
              UNDEFINED X szSpecialHandlingCode
0169       Get UDC Description
              UNDEFINED X szDataDictionaryItem
              "01" -> szSystemCode
              "09" -> szUserDefinedCodes
              UNDEFINED X cUserDefinedCode
              VA rpt_ReportCodeAddBook009 -> szUserDefinedCode
              RV SHAN_AC09 <- szDescription01
              UNDEFINED X szDescription02
              UNDEFINED X cErrorCode
              UNDEFINED X szSpecialHandlingCode
0170    End If
0171 ! End If
0172 //
0173 RV SHAN_WH_Pro = "1"
0174 RV SHAN_Pallet = "1"
0175 //
0176 ! Add a Carrige Return to String
     !    RV SHC5 <> szString
0177 //
0178 // Carrier No
0179 RV CarrierNo = BC Carrier Number (F4201)
0180 F0101.Fetch Single
        RV CarrierNo =  TK Address Number
        RV Carr_ALPH <- TK Name - Alpha
0181 //
0182 // PO No.
0183 RV PONO1 = BC Reference (F4201)
0184 //
0185 //
0186 //

-----------------------------------------------------------------------
     EVENT:  Init Break Section [V]
-----------------------------------------------------------------------
0001 ! If VA rpt_Count is not equal to <Zero>
0002 !    Do Custom Section(RS Union F4211 & F42119 -All Fields)
0003 ! Else
0004 ! End If

-----------------------------------------------------------------------
     EVENT:  End Break Section [V]
-----------------------------------------------------------------------
0001 //
0002 //
0003 //
0004 F03012.Fetch Single
        BC Address Number - Ship To (F4201) =  TK Address Number
        VA rpt_AC03_YN <- TK Category Code - Address Book 03
        VA rpt_AC07YN <- TK Category Code - Address Book 07
0005 ! VA rpt_CallDetailWO_CF = "99999"
0006 If VA rpt_CallDetailWO_CF is equal to "99999"
0007    If BC Order Type (F4201) (DCTO) is equal to "S6,SW"
0008       F5542528.Insert
              BC Document (Order No, Invoice, etc.) (F4201) -> TK Document (Order No, Invoice, etc.)
              BC Order Type (F4201) -> TK Order Type
              BC Address Number (F0101) -> TK Address Number
              BC Address Number - Ship To (F4201) -> TK Address Number - Ship To
              BC Date - Order/Transaction (F4201) -> TK Date - Order/Transaction
              VA rpt_AC03_YN -> TK Category Code - Address Book 03
              VA rpt_AC07YN -> TK Category Code - Address Book 07
              SL UserID                          -> TK User ID
              SL DateToday                       -> TK Date - Updated
0009    End If
0010    Do Custom Section(RS Union F4211 & F42119 -All Fields)
0011 Else
0012    If VA rpt_Count is not equal to <Zero>
0013       If BC Order Type (F4201) (DCTO) is equal to "S6,SW"
0014          F5542528.Insert
                 BC Document (Order No, Invoice, etc.) (F4201) -> TK Document (Order No, Invoice, etc.)
                 BC Order Type (F4201) -> TK Order Type
                 BC Address Number (F0101) -> TK Address Number
                 BC Address Number - Ship To (F4201) -> TK Address Number - Ship To
                 BC Date - Order/Transaction (F4201) -> TK Date - Order/Transaction
                 VA rpt_AC03_YN -> TK Category Code - Address Book 03
                 VA rpt_AC07YN -> TK Category Code - Address Book 07
                 SL UserID                          -> TK User ID
                 SL DateToday                       -> TK Date - Updated
0015       End If
0016       Do Custom Section(RS F5541261 - All Fields)
0017    Else
0018    End If
0019 End If

=======================================================================
     SECTION: Union F4211 & F42119 -All Fields [GROUP SECTION] ()
=======================================================================
     OBJECT:  SECTION
     EVENT:  Initialize Section
-----------------------------------------------------------------------
0001 Set Selection Append Flag( <Yes>)
0002 Set User Selection(BC Document (Order No, Invoice, etc.) (F4211), <Equal To>, VA rpt_DocumentOrderInvoiceE, <And>)
0003 ! Set User Selection(BC Document Company (F4211), <Equal To>, VA rpt_CompanyKeyOrderNo, <And>)
0004 Set User Selection(BC Status Code - Last (F4211),  <Not Equal To>, "980", <And>)
0005 Set User Selection(BC Status Code - Next (F4211),  <Equal To>, "540", <And>)
0006 Set User Selection(BC Line Type (F4211),  <Equal To>, "S", <And>)
0007 Set User Selection(BC Line Number (F4211), <Equal To>, VA rpt_LineNumberDetail, <And>)
0008 Set User Selection(BC Order Type (F4211), <Equal To>, VA rpt_OrderType, <None>)

-----------------------------------------------------------------------
     EVENT:  Do Section
-----------------------------------------------------------------------
0001 ! RV SpIns. = "  "
0002 //
0003 RV SplIns = "."
0004 // Unit Of Measure
0005 //
0006 If VA rpt_CallDetailWO_CF is equal to "99999"
0007 Else
0008    //
0009    F5541251.Fetch Single
           BC 2nd Item Number (F4211) =  TK 2nd Item Number
           BC Business Unit (F4211) =  TK Business Unit
           RV ContainerNo <- TK Description
           RV ItemPack <- TK Pieces MTD
           RV ItemNonWeight <- TK Weight per - Level 2
           RV ItemDepth <- TK Length
           RV ItemWidth <- TK Width per - Level 1
           RV ItemHt <- TK Height per - Level 1
           RV Tie <- TK Height per - Level 2
           RV High <- TK Height per - Level 3
           RV CountPallet <- TK Height per - Level 4
           VA rpt_GT_DateForConf <- TK Date - Ending Effective
           VA rpt_GroupUnitOfMeasure =  TK Unit of Measure as Input
0010    RV ConfCode = VA rpt_GroupUnitOfMeasure
0011    //
0012    //
0013    RV ItemWtUnit = "L"
0014    //
0015 End If
0016 //
0017 // End Unit Of Measure
0018 RV ReqDelDate = BC Date - Promised Delivery (F4211)
0019 RV Line_ID = [BC Line Number (F4211)]*1000
0020 // No.of Pallets
0021 //
0022 RV New_No_ofPallets = ([BC Units - Order/Transaction Quantity (F4211)]/[RV ItemPack])/[RV CountPallet]
0023 //
0024 // Ship Qty.
0025 //
0026 RV ShipQty = [VA rpt_Qty_ship_C1]
0027 //
0028 F5542324.Fetch Single
        BC Order Company (Order Number) (F4211) =  TK Order Company (Order Number)
        BC Document (Order No, Invoice, etc.) (F4211) =  TK Document (Order No, Invoice, etc.)
        BC Order Type (F4211) =  TK Order Type
        BC Line Number (F4211) =  TK Line Number
        RV ConfCode =  TK Unit of Measure as Input
0029 ! F5542324.Fetch Single
     !    BC Order Company (Order Number) (F4211) =  TK Order Company (Order Number)
     !    BC Document (Order No, Invoice, etc.) (F4211) =  TK Document (Order No, Invoice, etc.)
     !    BC Order Type (F4211) =  TK Order Type
0030 If SV File_IO_Status is equal to CO SUCCESS
0031    Suppress Section Write
0032 Else
0033    F554247T.Fetch Single
           BC Document (Order No, Invoice, etc.) (F4211) =  TK Document (Order No, Invoice, etc.)
0034    If SV File_IO_Status is equal to CO SUCCESS
0035       F5542324.Insert
              BC Order Company (Order Number) (F4211) -> TK Order Company (Order Number)
              BC Document (Order No, Invoice, etc.) (F4211) -> TK Document (Order No, Invoice, etc.)
              BC Order Type (F4211) -> TK Order Type
              BC Line Number (F4211) -> TK Line Number
              RV ConfCode -> TK Unit of Measure as Input
              SL DateToday                       -> TK Date - Updated
              SL UserID                          -> TK User ID
0036       VA rpt_CountLineNumberTot = [VA rpt_CountLineNumberTot]+[VA rpt_CountLineNumber]
0037    End If
0038 End If
0039 ! Add a Carrige Return to String
     !    RV CarriageRet_detail <> szString
0040 ! Add a Carrige Return to String
     !    RV SplIns <> szString
0041 //
0042 //
0043 VA rpt_GroupUnitOfMeasureH1 = ""
0044 VA rpt_GroupUnitOfMeasureH2 = ""
0045 VA rpt_GroupUnitOfMeasureH3 = ""
0046 //
0047 // Re-verification
0048 //
0049 F554247T.Fetch Single
        BC Document (Order No, Invoice, etc.) (F4211) =  TK Document (Order No, Invoice, etc.)
0050 If SV File_IO_Status is equal to CO SUCCESS
0051 Else
0052    Suppress Section Write
0053 End If
0054 //
0055 //
0056 F5541261.Fetch Single
        BC Document (Order No, Invoice, etc.) (F4211) =  TK Document (Order No, Invoice, etc.)
        BC Order Type (F4211) =  TK Order Type
        RV ContainerNo <- TK Description
        VA rpt_QuantityTimeSeries01 <- TK Quantity - Time Series 01
        VA rpt_QuantityTimeSeries02 <- TK Quantity - Time Series 02
        VA rpt_QuantityTimeSeries03 <- TK Quantity - Time Series 03
        VA rpt_GroupUnitOfMeasureH1 <- TK Group - Unit of Measure (Level 1)
        VA rpt_GroupUnitOfMeasureH2 <- TK Group - Unit of Measure (Level 2)
        VA rpt_GroupUnitOfMeasureH3 <- TK Group - Unit of Measure (Level 3)
0057 If SV File_IO_Status is equal to CO SUCCESS
0058    //
0059    If VA rpt_QuantityTimeSeries01 is equal to <Zero>
        And VA rpt_QuantityTimeSeries02 is equal to <Zero>
        And VA rpt_QuantityTimeSeries03 is equal to <Zero>
0060       Suppress Section Write
0061    Else
0062    End If
0063 Else
0064    Suppress Section Write
0065 End If
0066 //
0067 //
0068 F4102.Fetch Single
        BC Item Number - Short (F4211) =  TK Item Number - Short
        BC Business Unit (F4211) =  TK Business Unit
        VA rpt_ShippingConditionsCode_1 <- TK Shipping Conditions Code
0069 RC 70 = VA rpt_ShippingConditionsCode_1
0070 If VA rpt_ShippingConditionsCode_1 is equal to "85"
0071    RC N = "Y"
0072 Else
0073 End If
0074 //
0075 //

=======================================================================
     SECTION: F5541261 - All Fields [GROUP SECTION] ()
=======================================================================
     OBJECT:  SECTION
     EVENT:  Initialize Section
-----------------------------------------------------------------------
0001 Clear User Selection
0002 Set Selection Append Flag( <Yes>)
0003 Set User Selection(BC Document (Order No, Invoice, etc.) (F5541261), <Equal To>, VA rpt_DocumentOrderInvoiceE, <And>)
0004 ! Set User Selection(BC Order Company (Order Number) (F5541261), <Equal To>, VA rpt_CompanyKeyOrderNo, <And>)
0005 Set User Selection(BC Order Type (F5541261), <Equal To>, VA rpt_OrderType,  <None>)

-----------------------------------------------------------------------
     EVENT:  Do Section
-----------------------------------------------------------------------
     evt_UnitsQuantityShipped
0001 VA rpt_LineNumberDetail = 0
0002 VA rpt_GroupUnitOfMeasure = ""
0003 VA rpt_Qty_ship_C1 = 0
0004 ! VA rpt_Qty_ship_C2 = 0
0005 ! VA rpt_Qty_ship_C3 = 0
0006 //
0007 VA rpt_LineNumberDetail = BC Line Number (F5541261)
0008 ! If BC Quantity - Time Series 01 (F5541261) is not equal to <Zero>
     ! And BC Quantity - Time Series 01 (F5541261) is not equal to <Blank>
0009    If BC Group - Unit of Measure (Level 1) (F5541261) is not equal to <Blank>
0010       VA rpt_GroupUnitOfMeasure = ""
0011       VA rpt_GroupUnitOfMeasure = [BC Group - Unit of Measure (Level 1) (F5541261)]
0012       VA rpt_Qty_ship_C1 = [BC Quantity - Time Series 01 (F5541261)]
0013       Do Custom Section(RS Union F4211 & F42119 -All Fields)
0014    End If
0015 ! End If
0016 ! If BC Quantity - Time Series 02 (F5541261) is not equal to <Zero>
     ! And BC Quantity - Time Series 02 (F5541261) is equal to <Blank>
0017    If BC Group - Unit of Measure (Level 2) (F5541261) is not equal to <Blank>
0018       VA rpt_GroupUnitOfMeasure = ""
0019       VA rpt_GroupUnitOfMeasure = [BC Group - Unit of Measure (Level 2) (F5541261)]
0020       VA rpt_Qty_ship_C1 = [BC Quantity - Time Series 02 (F5541261)]
0021       Do Custom Section(RS Union F4211 & F42119 -All Fields)
0022    End If
0023 ! End If
0024 ! If BC Quantity - Time Series 03 (F5541261) is not equal to <Zero>
     ! And BC Quantity - Time Series 03 (F5541261) is not equal to <Blank>
0025    If BC Group - Unit of Measure (Level 3) (F5541261) is not equal to <Blank>
0026       VA rpt_GroupUnitOfMeasure = ""
0027       VA rpt_GroupUnitOfMeasure = [BC Group - Unit of Measure (Level 3) (F5541261)]
0028       VA rpt_Qty_ship_C1 = [BC Quantity - Time Series 03 (F5541261)]
0029       Do Custom Section(RS Union F4211 & F42119 -All Fields)
0030    End If
0031 ! End If

=======================================================================
     SECTION: Report Header [REPORT HEADER] ()
=======================================================================
     OBJECT:  SECTION
     EVENT:  Do Section
-----------------------------------------------------------------------
0001 RV RepDate = [SL DateToday                      ]
0002 RV RrunTime = [VA rpt_TimeLastUpdated]

-----------------------------------------------------------------------
     EVENT:  Initialize Report Header
-----------------------------------------------------------------------
0001 Get Audit Information
        UNDEFINED X szUserName
        UNDEFINED X jdDate
        VA rpt_TimeLastUpdated <- mnTime
        UNDEFINED X szWorkstation_UserId

=======================================================================
     SECTION: Report Footer [REPORT FOOTER] ()
=======================================================================
     OBJECT:  SECTION
     EVENT:  Do Section
-----------------------------------------------------------------------
0001 RV TotRec = VA rpt_CountLineNumberTot

 

No comments: