#' Sales Order Detail File
#'
#' F4211 - Sales Order Detail File
#'
#' @param db2_connection JDE Database Connection
#' @param friendly_names Flag to return human-readable column names. Default TRUE.
#' @export
F4211 <- function(db2_connection, friendly_names = TRUE) {
F4211 <- dplyr::tbl(db2_connection, dbplyr::in_schema('PRODDTA', 'F4211'))
if (friendly_names) {
F4211 <- F4211 %>% dplyr::select(
`Order Company (Order Number)` = `SDKCOO`,
`Document (Order No Invoice etc.)` = `SDDOCO`,
`Order Type` = `SDDCTO`,
`Line Number` = `SDLNID`,
`Order Suffix` = `SDSFXO`,
`Business Unit` = `SDMCU`,
`Company` = `SDCO`,
`Document Company (Original Order)` = `SDOKCO`,
`Original Order Number` = `SDOORN`,
`Original Order Type` = `SDOCTO`,
`Original Line Number` = `SDOGNO`,
`Company - Key (Related Order)` = `SDRKCO`,
`Related PO/SO/WO Number` = `SDRORN`,
`Related PO/SO/WO Order Type` = `SDRCTO`,
`Related PO/SO Line Number` = `SDRLLN`,
`Agreement Number - Distribution` = `SDDMCT`,
`Agreement Supplement - Distribution` = `SDDMCS`,
`Address Number` = `SDAN8`,
`Address Number - Ship To` = `SDSHAN`,
`Address Number - Parent` = `SDPA8`,
`Date - Requested` = `SDDRQJ`,
`Date - Order/Transaction` = `SDTRDJ`,
`Date - Scheduled Pick` = `SDPDDJ`,
`Date - Actual Ship Date` = `SDADDJ`,
`Date - Invoice` = `SDIVD`,
`Date - Cancel` = `SDCNDJ`,
`Date - For G/L (and Voucher)` = `SDDGL`,
`Date - Promised Delivery` = `SDRSDJ`,
`Date - Price Effective Date` = `SDPEFJ`,
`Date - Promised Shipment` = `SDPPDJ`,
`Reference` = `SDVR01`,
`Reference 2` = `SDVR02`,
`Item Number - Short` = `SDITM`,
`2nd Item Number` = `SDLITM`,
`3rd Item Number` = `SDAITM`,
`Location` = `SDLOCN`,
`Lot/Serial Number` = `SDLOTN`,
`From Grade` = `SDFRGD`,
`Thru Grade` = `SDTHGD`,
`From Potency` = `SDFRMP`,
`Thru Potency` = `SDTHRP`,
`Days Before Expiration` = `SDEXDP`,
`Description` = `SDDSC1`,
`Description - Line 2` = `SDDSC2`,
`Line Type` = `SDLNTY`,
`Status Code - Next` = `SDNXTR`,
`Status Code - Last` = `SDLTTR`,
`Business Unit - Header` = `SDEMCU`,
`Item Number - Related (Kit)` = `SDRLIT`,
`Kit Master Line Number` = `SDKTLN`,
`Component Line Number` = `SDCPNT`,
`Related Kit Component` = `SDRKIT`,
`Number of Component Per Parent` = `SDKTP`,
`Sales Catalog Section` = `SDSRP1`,
`Sub Section` = `SDSRP2`,
`Sales Category Code 3` = `SDSRP3`,
`Sales Category Code 4` = `SDSRP4`,
`Sales Category Code 5` = `SDSRP5`,
`Commodity Class` = `SDPRP1`,
`Commodity Sub Class` = `SDPRP2`,
`Supplier Rebate Code` = `SDPRP3`,
`Master Planning Family` = `SDPRP4`,
`Purchasing Category Code 5` = `SDPRP5`,
`Unit of Measure as Input` = `SDUOM`,
`Units - Order/Transaction Quantity` = `SDUORG`,
`Quantity Shipped` = `SDSOQS`,
`Units - Qty Backordered/Held` = `SDSOBK`,
`Units - Quantity Canceled/Scrapped` = `SDSOCN`,
`Units - Future Quantity Committed` = `SDSONE`,
`Units - Open` = `SDUOPN`,
`Units - Shipped to Date` = `SDQTYT`,
`Units - Relieved` = `SDQRLV`,
`Committed (H/S)` = `SDCOMM`,
`Other Quantity (1/2)` = `SDOTQY`,
`Amount - Price per Unit` = `SDUPRC`,
`Amount - Extended Price` = `SDAEXP`,
`Amount - Open` = `SDAOPN`,
`Price Override Code` = `SDPROV`,
`Temporary Price (Y/N)` = `SDTPC`,
`Unit of Measure - Entered for Unit Price` = `SDAPUM`,
`Amount - List Price` = `SDLPRC`,
`Amount - Unit Cost` = `SDUNCS`,
`Amount - Extended Cost` = `SDECST`,
`Cost Override Code` = `SDCSTO`,
`Extended Cost - Transfer` = `SDTCST`,
`Print Message` = `SDINMG`,
`Payment Terms Code` = `SDPTC`,
`Payment Instrument` = `SDRYIN`,
`Based on Date` = `SDDTBS`,
`Discount - Trade` = `SDTRDC`,
`Trade Discount (Old)` = `SDFUN2`,
`Price and Adjustment Schedule` = `SDASN`,
`Item Price Group` = `SDPRGR`,
`Pricing Category Level` = `SDCLVL`,
`Discount % - Cash` = `SDCADC`,
`Document Company` = `SDKCO`,
`Document (Voucher Invoice etc.)` = `SDDOC`,
`Document Type` = `SDDCT`,
`Document - Original` = `SDODOC`,
`Document Type - Original` = `SDODCT`,
`Document Company - Original` = `SDOKC`,
`Pick Slip Number` = `SDPSN`,
`Delivery Number` = `SDDELN`,
`Sales Taxable (Y/N)` = `SDTAX1`,
`Tax Rate/Area` = `SDTXA1`,
`Tax Expl Code 1` = `SDEXR1`,
`Associated Text` = `SDATXT`,
`Priority - Processing` = `SDPRIO`,
`Printed Code` = `SDRESL`,
`Backorders Allowed (Y/N)` = `SDBACK`,
`Substitutes Allowed (Y/N)` = `SDSBAL`,
`Partial Line Shipments Allowed (Y/N)` = `SDAPTS`,
`Line of Business` = `SDLOB`,
`End Use` = `SDEUSE`,
`Duty Status` = `SDDTYS`,
`Nature of Transaction` = `SDNTR`,
`Primary / Last Supplier Number` = `SDVEND`,
`Carrier Number` = `SDCARS`,
`Mode of Transport` = `SDMOT`,
`Route Code` = `SDROUT`,
`Stop Code` = `SDSTOP`,
`Zone Number` = `SDZON`,
`Container I.D.` = `SDCNID`,
`Freight Handling Code` = `SDFRTH`,
`Shipping Commodity Class` = `SDSHCM`,
`Shipping Conditions Code` = `SDSHCN`,
`Serial Number - Lot` = `SDSERN`,
`Unit of Measure - Primary` = `SDUOM1`,
`Units - Primary Quantity Ordered` = `SDPQOR`,
`Unit of Measure - Secondary` = `SDUOM2`,
`Units - Secondary Quantity Ordered` = `SDSQOR`,
`Unit of Measure - Pricing` = `SDUOM4`,
`Unit Weight` = `SDITWT`,
`Weight Unit of Measure` = `SDWTUM`,
`Unit Volume` = `SDITVL`,
`Volume Unit of Measure` = `SDVLUM`,
`Reprice (Basket Price) Category` = `SDRPRC`,
`Order Reprice Category` = `SDORPR`,
`Order Repriced Indicator` = `SDORP`,
`Costing Method - Inventory` = `SDCMGP`,
`G/L Offset` = `SDGLC`,
`Century` = `SDCTRY`,
`Fiscal Year` = `SDFY`,
`Inter Branch Sales` = `SDSO01`,
`On Hand Updated` = `SDSO02`,
`Configurator Print Flag` = `SDSO03`,
`Sales Order Status 04` = `SDSO04`,
`Substitute Item Indicator` = `SDSO05`,
`Preference Commitment Indicator` = `SDSO06`,
`Ship date (PDDJ) overridden` = `SDSO07`,
`Price Adjustment Line Indicator` = `SDSO08`,
`Price Adj. History Indicator` = `SDSO09`,
`Preference Production Allocation` = `SDSO10`,
`Transfer/Direct Ship/Intercompany Flag` = `SDSO11`,
`Deferred entries flag` = `SDSO12`,
`Euro Conversion Status Flag` = `SDSO13`,
`Sales Order Status 14` = `SDSO14`,
`Sales Order Status 15` = `SDSO15`,
`Apply Commission (Y/N)` = `SDACOM`,
`Commission Category` = `SDCMCG`,
`Reason Code` = `SDRCD`,
`Gross Weight` = `SDGRWT`,
`Gross Weight Unit of Measure` = `SDGWUM`,
`Subledger - G/L` = `SDSBL`,
`Subledger Type` = `SDSBLT`,
`Code - Location Tax Status` = `SDLCOD`,
`Price Code 1` = `SDUPC1`,
`Price Code 2` = `SDUPC2`,
`Price Code 3` = `SDUPC3`,
`Status - In Warehouse` = `SDSWMS`,
`Work Order Freeze Code` = `SDUNCD`,
`Send Method` = `SDCRMD`,
`Currency Code - From` = `SDCRCD`,
`Currency Conversion Rate - Spot Rate` = `SDCRR`,
`Amount - List Price per Unit` = `SDFPRC`,
`Amount - Foreign Price per Unit` = `SDFUP`,
`Amount - Foreign Extended Price` = `SDFEA`,
`Amount - Foreign Unit Cost` = `SDFUC`,
`Amount - Foreign Extended Cost` = `SDFEC`,
`User Reserved Code` = `SDURCD`,
`User Reserved Date` = `SDURDT`,
`User Reserved Amount` = `SDURAT`,
`User Reserved Number` = `SDURAB`,
`User Reserved Reference` = `SDURRF`,
`Transaction Originator` = `SDTORG`,
`User ID` = `SDUSER`,
`Program ID` = `SDPID`,
`Work Station ID` = `SDJOBN`,
`Date - Updated` = `SDUPMJ`,
`Time of Day` = `SDTDAY`,
`Manufacturing Variance Accounting Flag` = `SDSO16`,
`Sales Order Status 17` = `SDSO17`,
`Sales Order Status 18` = `SDSO18`,
`Sales Order Status 19` = `SDSO19`,
`Sales Order Status 20` = `SDSO20`,
`Integration Reference 01` = `SDIR01`,
`Integration Reference 02` = `SDIR02`,
`Integration Reference 03` = `SDIR03`,
`Integration Reference 04` = `SDIR04`,
`Integration Reference 05` = `SDIR05`,
`Source of Order` = `SDSOOR`,
`Reference` = `SDVR03`,
`Demand Unique Key ID` = `SDDEID`,
`Pull Signal` = `SDPSIG`,
`Release Number` = `SDRLNU`,
`Scheduled Shipment Time` = `SDPMDT`,
`Time - Release` = `SDRLTM`,
`Date - Release` = `SDRLDJ`,
`Requested Delivery Time` = `SDDRQT`,
`Actual Shipment Time` = `SDADTM`,
`Time - Original Promised Delivery` = `SDOPTT`,
`Time - Scheduled Pick` = `SDPDTT`,
`Time - Future Time 2` = `SDPSTM`,
`Cross-Docking Flag` = `SDXDCK`,
`Cross Docking Priority for Sales Orders` = `SDXPTY`,
`Dual Unit Of Measure Item` = `SDDUAL`,
`Buying Segment Code` = `SDBSC`,
`Current Buying Segment Code` = `SDCBSC`,
`Change Order Number` = `SDCORD`,
`Address Number - Deliver To` = `SDDVAN`,
`Pending Approval Flag` = `SDPEND`,
`Revision Reason` = `SDRFRV`,
`Matrix Control Line Number` = `SDMCLN`,
`Shipment Number` = `SDSHPN`,
`Promised Delivery Time` = `SDRSDT`,
`Project Number` = `SDPRJM`,
`Sequence Number` = `SDOSEQ`,
`Item Revision Level` = `SDMERL`,
`Hold Orders Code` = `SDHOLD`,
`Business Unit - Header` = `SDHDBU`,
`Business Unit - Demand` = `SDDMBU`,
`Currency Code - Base` = `SDBCRC`,
`Document Line Number - Original` = `SDODLN`,
`Date - Original Promised Delivery` = `SDOPDJ`,
`Cross Dock Order Company (Order Number)` = `SDXKCO`,
`Cross Dock Order No` = `SDXORN`,
`Cross Dock Order Type` = `SDXCTO`,
`Cross Dock Line Number` = `SDXLLN`,
`Cross Dock Order Suffix` = `SDXSFX`,
`Port of Entry or Exit` = `SDPOE`,
`Payment Terms Override Code` = `SDPMTO`,
`Buyer Number` = `SDANBY`,
`Promotion ID` = `SDPMTN`,
`Asset Item Number` = `SDNUMB`,
`Parent Number` = `SDAAID`,
`Ship To Attention` = `SDSPATTN`,
`Partner Address Number` = `SDPRAN8`,
`Partner Contact Line Number ID` = `SDPRCIDLN`,
`Customer Contact Line Number ID` = `SDCCIDLN`,
`Ship To Cust Contact Line Num ID` = `SDSHCCIDLN`,
`Opportunity Number` = `SDOPPID`,
`Organization Structure Type` = `SDOSTP`,
`Unique Key ID (Internal)` = `SDUKID`,
`Catalog Name` = `SDCATNM`,
`Allocation Process Flag` = `SDALLOC`,
`Fulfillment Plan ID` = `SDFULPID`,
`Allocation Status Number` = `SDALLSTS`,
`Sales Order Score` = `SDOSCORE`,
`Order Score Override` = `SDOSCOREO`,
`Customer Master Company` = `SDCMCO`,
`Kit Identifier` = `SDKITID`,
`Accumulated Amount Invoiced (Domestic)` = `SDKITAMTDOM`,
`Accumulated Amount Invoiced (Foreign)` = `SDKITAMTFOR`,
`Kit Component Dirty Flag` = `SDKITDIRTY`,
`OC In-Transit Flag` = `SDOCITT`,
`OC Kanban Card No` = `SDOCCARDNO`,
`Production Number` = `SDPMPN`,
`Production Number Short` = `SDPNS`
)
}
return(F4211)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.