1. Create a Processing Option and define output file.
Initialize section open your file and write headers of the columns
Do section put your all the logic and write line in text file.
End Section - close you file---Done
Open File Code
Write a line
Close
Listing of ER for Report: Report : Sam's Dot Com 846 (R5541004A)
***********************************************************************
GLOBALS: Variables (Global)
***********************************************************************
rpt_IdentifierShortItem_ITM
rpt_QtyOnHandPrimaryUn_PQOH
rpt_ErrorCode_ERRC
rpt_GenericLong_GENLNG
rpt_VariableLengthField1_VAR1
rpt_SearchString_SerchString
=======================================================================
SECTION: Item Cross Reference [GROUP SECTION] (S1)
=======================================================================
OBJECT: SECTION
EVENT: Initialize Section
-----------------------------------------------------------------------
OPT: Using Defaults
0001 //
0002 VA rpt_SearchString_SerchString = concat(concat(rtrim([PO szDPSINBOUNDFORECAST],' '),rtrim([PO szAddressLine1_HiringLocation],' ')),[PO szAlphaSpecData08])
0003 Open Flat File
"1" -> BF cSuppressErrorMessage
VA rpt_ErrorCode_ERRC <- BF cErrorCode
VA rpt_GenericLong_GENLNG <- BF idFilePtr
VA rpt_SearchString_SerchString -> BF szFilePath
0004 //
0005 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],"Vendor Number")
0006 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0007 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],"Supplier")
0008 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0009 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],"Country")
0010 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0011 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],"Sams Club Item Number")
0012 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0013 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],"UPC")
0014 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0015 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],"Vendor Item Number")
0016 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0017 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],"Description")
0018 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0019 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],"QTY")
0020 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0021 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],"UOM")
0022 // Write Header
0023 Write One Line To Flat File
"1" -> BF cSuppressErrorMessage
VA rpt_ErrorCode_ERRC <- BF cErrorCode
VA rpt_GenericLong_GENLNG -> BF idFilePtr
VA rpt_VariableLengthField1_VAR1 -> BF szRecord
-----------------------------------------------------------------------
EVENT: Do Section
-----------------------------------------------------------------------
OPT: Using Defaults
0001 //
0002 Suppress Section Write
0003 //
0004 //
0005 VA rpt_IdentifierShortItem_ITM = BC Item Number - Short (F4104)(ITM)
0006 RV Country = "US"
0007 RV UM = "EA"
0008 RV Qty_PQOH = ""
0009 F0101.Fetch Single
BC Address Number (F4104)(AN8) = TK Address Number
RV Alph_Vendor <- TK Name - Alpha
0010 Do Custom Section(RS Item Availability Browse)
0011 RV Qty_PQOH = VA rpt_QtyOnHandPrimaryUn_PQOH
0012 //
0013 VA rpt_VariableLengthField1_VAR1 = ""
0014 //
0015 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],[BC Address Number (F4104)(AN8)])
0016 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0017 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],[RV Alph_Vendor])
0018 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0019 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],[RV Country])
0020 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0021 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],[BC Item Number - Customer/Supplier (F4104)(CITM)])
0022 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0023 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],[BC Description - Line 2 (F4104)(DSC2)])
0024 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0025 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],[BC 2nd Item Number (F4104)(LITM)])
0026 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0027 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],[BC Description (F4104)(DSC1)])
0028 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0029 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],[RV Qty_PQOH])
0030 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],",")
0031 VA rpt_VariableLengthField1_VAR1 = concat([VA rpt_VariableLengthField1_VAR1],[RV UM])
0032 //
0033 //
0034 Write One Line To Flat File
<Zero> -> BF cSuppressErrorMessage
VA rpt_ErrorCode_ERRC <- BF cErrorCode
VA rpt_GenericLong_GENLNG -> BF idFilePtr
VA rpt_VariableLengthField1_VAR1 -> BF szRecord
-----------------------------------------------------------------------
EVENT: End Section
-----------------------------------------------------------------------
OPT: Using Defaults
0001 //
0002 Close Flat File
<Blank> -> BF cSuppressErrorMessage
VA rpt_ErrorCode_ERRC <- BF cErrorCode
VA rpt_GenericLong_GENLNG -> BF idFilePtr
=======================================================================
SECTION: Page Header [PAGE HEADER] (S2)
=======================================================================
OBJECT: SECTION
EVENT: Do Section
-----------------------------------------------------------------------
OPT: Using Defaults
0001 Suppress Section Write
=======================================================================
SECTION: Item Availability Browse [GROUP SECTION] (S3)
=======================================================================
OBJECT: SECTION
EVENT: Initialize Section
-----------------------------------------------------------------------
OPT: Using Defaults
0001 Set Selection Append Flag(<Yes>)
0002 Set User Selection(BC Item Number - Short (F41021)(ITM), <Equal To>, VA rpt_IdentifierShortItem_ITM, <And>)
0003 ! Set User Selection(BC Business Unit (F41021)(MCU), <Equal To>, " MIDWEST-SC", <None>)
0004 Set User Selection(BC Business Unit (F41021)(MCU), <Equal To>, "DALLAS-CERTS", <None>)
-----------------------------------------------------------------------
EVENT: Do Section
-----------------------------------------------------------------------
OPT: Using Defaults
0001 VA rpt_QtyOnHandPrimaryUn_PQOH = [VA rpt_QtyOnHandPrimaryUn_PQOH]+[BC Quantity on Hand - Primary units (F41021)(PQOH)]
Monday September 04, 2017 17:42
No comments:
Post a Comment