Functional Description
Purpose
The purpose of this function is to perform a series edits on each grid row, prior to outputing the 
grid row.
This function will edit/check most of the columns in the grid.  Should there be a hard error, the 
user will have to cancel out of the kit window.
Edits  perfomed:Check Item Restrictions
                  Determines the proper TransactionUOM & PricingUOM to be displayed
 Determines the proper RequestedDate to be displayed
 Determines the proper LineType to be displayed
 Retrieves the Line Type Constants LFIVI & LFTXYN   REMOVED 4/8/96 
                  If LFIVI = Y or D
                  Loads the description from the F4101
                        Retrieves the QuantityAvailable for the Component Item
                        Retrieves the Displayed Qty Per QNTY, & Hidden Qty Per QNTY
                        and sets up QNTY's for Kit Balancing.
Setup Notes and Prerequisites
 Use bullet points.
Special Logic
None.
Technical Specification
2.1 Data Structure
cItemRestrictionsCodeEDF2
cRequiredYNFTRC
szTransactionUOMCompUOM
szPricingUOMCompUOM4
szTransactionUOMUOM
szPricingUOMUOM4
cCreditOrderFlagERRC
szLineTypeCompLNTY
szLineTypeParentLNTY
cInvInterfaceFlagIVI
szDescriptionDS01
cFixedOrVarQtyFORQ
mnQtyPer3002QNTY
mnQtyPerDisplayQNTY
mnQtyPerPreviousHiddenQNTY
szComponentBranchCMCU
mnQtyAvailableQAVL
jdRequestedDateDRQJ
jdParentsRequestedDateDRQJ
jdDateUpdatedUPMJ
mnComponentItemITM
mnKitMasterQtyOrderedUORG
cErrorCodeERRC
cSuppressErrorMsgERRC
szErrorMsgIDDTAI
mnSoldToAN8
cOptional_FSOOPTK
mnParentItemKIT
sz3rdItemNumberAITM
sz2ndItemNumberLITM
szPrimaryItemNumberUITM
mnConvFactToPrimCNV1
mnCompToParentRatioKTP
mnConvFactTransToPricingCNV1
mnKitMstrQtyOrderedInPrimaryUORG
2.2Related Tables 
Table Table Description
 
2.3Related Business Functions
Source NameFunction Name
B4001040GetItemMasterDescUOM
B3100380CalculateQtyAvailShell
B4200270CheckItemRestrictions
B4000520GetItemUOMConversionFactor
B4100210CheckItemBranch
X0005GetUDC
2.4Processing 
1.Call CheckItemRestrictions   B4200270   
 sxxrvf = an8
 sxxrtc = "IR"
 sxxrvt = ixitm
 sxedf1 = S
          
 B4200270   Check ItemRestrictions
 Item Restriction Code I/E
 Ship To Customer<=SoldTo  AN8
 Short Item Number<=ComponentItem
 Suppress Error 0/1<=' '
 Error Code 0/1not used
 Error Message Codenot used
 If Found & EDF2 == E
      Set Error Flag On
 If Not Found & EDF2 == I
      Set Error Flag On
 If Error Flag On & FTRC = Y
      Issue hard error 4832
       IsError = TRUE
2.If (IsError = false)
 Call GetItemMasterDescUOM    B4001040
 Short Item Number<=Component Item  lpDS
 Branch Plant<=Component Branch  lpDS
 PrimaryUOM=>PrimaryUOM        work field
 Item Flash Message=>ItemFlash              work field
 Description=>Description            work field
 Third Item Number=>AITM   Third Item Number lpDS 
 2nd Item Number=>LITM    2nd Item Number lpDS
 Transaction UOM=>UOM  Transaction UOM     lpDS
 Pricing UOM=>UOM4  Pricing UOM    lpDS
 PrimaryItemNumber=>  PrimaryItemNumber  lpDS
 StandardUOMConv=>TFLA - Work Field
 
      If the Components UOM (GB U/M (3002))= = ' '
      GetItemMasterDescUOM      B4001040     
      fetch with component item number & return IMUOM , IMIFLA, IMUOM1, IMPMTH & IMDSC1
      GC UOM Transaction UOM = IM UOM
      else
 GC UOM Transaction UOM= GB U/M ( 3002)
      If the Components UOM4  == ' ' 
 GetItemMasterDescUOM        
        fetch with Parent item number & return IMUOM, IMIFLA, IMUOM1, IMPMTH & IMDSC1
 GC UOM4 Pricing UOM= IM UOM4
      else
 GC UOM4 Pricing UOM =  UOM4
3.If FI DRQJ RequestedDate == 0 ( NULL)
 GC DRQJ RequestedDate == GC UPMJ
 else
      GC DRQJ RequestedDate = FI DRQJ
4.Semi Kit Balancing & Display
 If  IVI Inventory Interface Flag  == Y or D
 //   Note:  *The Qty Per Display  per Component Item is in terms of the transaction uom 
of the 3002
 *the Quantity Ordered of Kit Masters in Primary
                  *The Qty Available per Component Item is in terms of the transaction uom of 
the 3002
       *The CompToKitParentRatio per Component Item = the qnty set up in the F3002 
Bill of Materials 
 * the Previous Levels Hidden Qty Per (Feature Level) 
                  Example:
 If  in the 3002  1 Computer Each is made up of 2 Cables PR then 
 If the user orders 1 Computer EA
 component item / kit master ordered uom =  2 Cables PR / 
Computer EA* PreviousLevelsHiddenQtyPer
 If the user orders 2 Computers EA
 component item / kit master ordered uom = 2 Cables PR / 
Computer EA * PreviousLevelsHiddenQtyPer
 If the user orders 1 Computer BX
                     component item / kit master ordered uom = 2 Cables PR / 
Computer BX * PreviousLevelsHiddenQtyPer
 * The Qty Per Previous Hidden ( Feature Level) is a 
running sum of 
                  The Qty Per (3002) * Qty Per Previous Hidden (Feature Level)
                             This number is calculated in ER of  P41351.
 // Note:Qty Per Pervious Hidden ( Feature Level ) is 
initialized to 1
 Example:
 Bill of Materials:1  ComputerEA
 2  CablesEAF
 2 Cables XEAO
 2 Cables YEAO
 2 CableKitsEAF
 2 Kit XEAO
 2 Hard DrivesEAS
                                                                                                      
            QtyPerPreviousHidden      KTP
 Sales Order:Order 2 ComputerEA1
 2 CablesEAF    (1 * 2) = 2        
         
 2 Cables XEAO    (2 * 2) = 4
 2 Cables YEAO    (2 * 2) = 4
 2 CableKitEAF    (2 * 2 ) =4 
 2 Kit XEAO    (2 * 4) = 8
 2 Hard Drives     EAS    (2 * 1) = 2
QNTY QntyPerDisplay lpDS = QNTY QtyPerPreviousHidden(feature level)*QNTY QntyPerFile (3002)
QNTY QntyPerDisplay lpDS = QNTY QntyPerDisplay  * UORG  Qty Ordered In Primary
( # of Kit Masters Ordered in Primary )
// NEW
 KTP CompToKitParentRatio =(   (QntyPerFile (3002) / Kit Master UOM (3002) )
 * The QtyPerPreviousHidden (Feature Level) )
 call GetItemUOMConversionFactor  B3100380  
 Short Item Number<=Component Item lpDS
 Branch Plant<=Component Branch lpDS
 Qty To Convert<=Qty Per 3002
 From Unit of Measure<=Transaction UOM
 To Unit of Measure<=Pricing UOM
 Inventory Interface Flag<=IVI   work field
 UOM to Primary<=Primary UOM work field
 ConvFactFromToTo=>ConvFactTransToPrimary   lpDS
 ConvFactFromToPrimary=>ConvFactTransToPricing    lpDS
      InvOfConvFactToPrimary = 1 / ConvFactTransToPrimary     ( pass this to CalcQtyAvailShell )
      //  NOTE:   When the Conversion Factor Parm is passed to CalcQtyAvailShell - GetItemUOMConv
                         Business function is not called again.  This speeds the Kit Program up
      If  OPTK == F
              QntyPerDisplay = 0
              QAVAL QtyAvailable = 0
                    
       If  FORQ FixedOrVarQty  == F
                   QntyPerDisplay =  QntyPerFile (3002)
  6.   Get the Quantity Available for the Component -  display on each grid line
        If IVI Inventory interface lpDS == Y or D
 
          if IMIFLA ( work field ) ==  " "              ( i.e. if the string is blank )               
            
               DS01 Description lpDS = IMDSC1 (work field)
         else
            Call X0005 
     
DataDictionaryItem<="IFLA"
SystemCode<="40"
RecordType<="FL"
UserDefineCode<=IMFLA   Item Flash Message Work Field
KeyFieldLength<="2"
Description001=>DS01  lpDS  Description
           
            If there is an error w/ get UDC
              GC DS01 Desription lpDS = IMDSC1 (work field )
        
          call CheckItemBranch     B4100210   send in ITM & CMCU
          if OPTK != F 
             call CalculateQtyAvailShell  B3100380  
              
Short Item Number<=Component Item lpDS
Branch Plant<=Component Branch lpDS
Index<="1"
Keys<="2"
Primary UOM<=PrimaryUOM    work field
Secondary UOM<=TransactionUOM  lpDS
QuantityAvailable=>QtyAvailable   lpDS
ConversionFactor<= Inverse of ConvFactToPrim  W.F.
 
/*   Note:This quantity available is returned in Transaction UOM,   I need to display
 the quantity available in terms of the U/M of the component item - from 3002 i.e. 
Trans UOM
^
D4200480 - Edits For Kit Window
Special Input Expected
EDF2ItemRestrictionsCode
FTRCRequiredYN
UOMTransactionUOMCompsend in GB U/M  ( from 3002)
UOM4PricingUOMComp
ERRCCreditOrderFlag1 = credit order 0 = not a credit
LNTYLineTypeComponentsend in GC LNTY
LNTYLineTypeParentsend in FI LNTY
FORQFixedOrVarQtysend in GC FORQ
QNTYQuantityPerFilesend in U/M f3002 GC QNTY 
QNTYQuantityPerDisplaysend in GC QNTY (Display) 
CMCUCompBranchPlantsend in from GC CMCU
DRQJParentsRequestedDatesend in from FI DRQJ
UPMJUpdatedDatesend in from GC UPMJ
QNTYQtyPerPreviousHiddensend in from Hidden GC QNTY The Components immediate parent 
ITMComponentItem
UORGQtyOrderedNot Used
ERRCSuppressErrorMsg
AN8SoldTo
OPTKOptional_FSOF (feature)
 S (standard)
 O (optional)
KITParentItem
AITM3rdItemNumber
LITM2ndItemNumber
UORG QtyOrderedInPrimary
Special Output Returned
UOMTransactionUOMout to grid
UOM4PricingUOMout to grid
LNTYLineTypeComponentsend in GC LNTY
IVIInvInterfaceFlagfrom linetypeconstants
DS01Descriptionload out to GC DS01
QNTYQuantityPerDisplaysend in GC QNTY (Display) 
QAVQuantityAvailableload out to GC QAVAL
DRQJRequestedDateload out to GC DRQJ
QNTYQtyPerPreviousHiddensend in from Hidden GC QNTY  The Components immediate parent
ERRCErrorCode
TAIErrorMsgID
AITM3rdItemNumber
LITM2ndItemNumber
UITMPrimaryItemNumber
CNV1ConvFactToPrimaryComponents Conversion Factor From to Primary
KTPCompToKitMasterRatio
CNV1ConvFactTransToPricingComponents Conversion Factor from Transaction UOM to Pricing UOM
^
| Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both | 
|---|---|---|---|---|
| cItemRestrictionsCode | EDF2 | char | NONE | NONE | 
A code that designates whether restrictions have been placed on the sale of items to this customer.
Valid values are:
   Blank No restrictions.
 
  | ||||
| cRequiredYN | FTRC | char | NONE | NONE | 
A code that specifies whether a component is required. Valid codes are:
   Y The component is required.
   N The component is not a 
  | ||||
| szTransactionUOMComp | UOM | char | NONE | NONE | 
  | ||||
| szPricingUOMComp | UOM4 | char | NONE | NONE | 
  | ||||
| szTransactionUOM | UOM | char | NONE | NONE | 
  | ||||
| szPricingUOM | UOM4 | char | NONE | NONE | 
  | ||||
| cCreditOrderFlag | ERRC | char | NONE | NONE | 
  | ||||
| szLineTypeComp | LNTY | char | NONE | NONE | 
 
ab  ab  ab 
  | ||||
| szLineTypeParent | LNTY | char | NONE | NONE | 
 
ab  ab 
  | ||||
| cInvInterfaceFlag | IVI | char | NONE | NONE | 
A code that identifies the type of interface to the Inventory Management system. Valid values are:
   Y The dollar or unit value of any activity 
  | ||||
| szDescription | DS01 | char | NONE | NONE | 
  | ||||
| cFixedOrVarQty | FORQ | char | NONE | NONE | 
A code that indicates if the quantity per assembly for an item on the bill of material varies according to the quantity of the parent item 
  | ||||
| mnQtyPer3002 | QNTY | MATH_NUMERIC | NONE | NONE | 
 
ab  ab 
  | ||||
| mnQtyPerDisplay | QNTY | MATH_NUMERIC | NONE | NONE | 
 
ab 
  | ||||
| mnQtyPerPreviousHidden | QNTY | MATH_NUMERIC | NONE | NONE | 
  | ||||
| szComponentBranch | CMCU | char | NONE | NONE | 
A secondary or lower-level business unit. The system uses the value that you enter to indicate that a branch or plant contains several 
  | ||||
| mnQtyAvailable | QAVL | MATH_NUMERIC | NONE | NONE | 
The number of on-hand units minus the number of units committed to prior orders.  | ||||
| jdRequestedDate | DRQJ | JDEDATE | NONE | NONE | 
  | ||||
| jdParentsRequestedDate | DRQJ | JDEDATE | NONE | NONE | 
 
ab 
  | ||||
| jdDateUpdated | UPMJ | JDEDATE | NONE | NONE | 
The date that specifies the last update to the file record.  | ||||
| mnComponentItem | ITM | MATH_NUMERIC | NONE | NONE | 
  | ||||
| mnKitMasterQtyOrdered | UORG | MATH_NUMERIC | NONE | NONE | 
 
ab  ab  ab 
  | ||||
| cErrorCode | ERRC | char | NONE | NONE | 
  | ||||
| cSuppressErrorMsg | ERRC | char | NONE | NONE | 
  | ||||
| szErrorMsgID | DTAI | char | NONE | NONE | 
  | ||||
| mnSoldTo | AN8 | MATH_NUMERIC | NONE | NONE | 
  | ||||
| cOptional_FSO | OPTK | char | NONE | NONE | 
A code that indicates whether a component is standard or optional within a bill of material or for kit processing. Valid codes are:
   S 
  | ||||
| mnParentItem | KIT | MATH_NUMERIC | NONE | NONE | 
The system provides for three separate item numbers.
   1.   Item Number (short) - An eight-digit, computer assigned, completely 
  | ||||
| sz3rdItemNumber | AITM | char | NONE | NONE | 
  | ||||
| sz2ndItemNumber | LITM | char | NONE | NONE | 
  | ||||
| szPrimaryItemNumber | UITM | char | NONE | NONE | 
  | ||||
| mnConvFactToPrim | CNV1 | MATH_NUMERIC | NONE | NONE | 
  | ||||
| mnCompToParentRatio | KTP | MATH_NUMERIC | NONE | NONE | 
The total number of the current component needed per unit of the parent kit.  | ||||
| mnConvFactTransToPricing | CNV1 | MATH_NUMERIC | NONE | NONE | 
  | ||||
| mnKitMstrQtyOrderedInPrimary | UORG | MATH_NUMERIC | NONE | NONE | 
  | ||||
| cCheckAvailabilityYN | CKAV | char | OPT | NONE | 
A code that specifies whether the system performs availability checking.  You might want to turn on availability checking for certain items.  
  | ||||
| szBatchUOM | UOM | char | OPT | NONE | 
A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).  | ||||
| mnBatchQuantity | #BQT | MATH_NUMERIC | OPT | NONE | 
A number that represents the quantity of finished units that you expect this bill of material or routing to produce. You can specify varying 
  | ||||
| szLotGroup | LOTGRP | char | OPT | NONE | 
Lot Group is the name of a user defined list of allowed non-blank lot status codes.  Entry of a Lot Group name in the Processing Option will 
  | ||||
| szOrderType | DCTO | char | OPT | NONE | 
A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
  | ||||
| B4000260 Line Type - Activity Rules | ||||
| B4000520 Get Item UoM Conversion Factor | ||||
| B4001040 Get Item Master Description UOM | ||||
| B4100210 Check Item Branch | ||||
| B4200270 Check Item Restrictions | ||||
| X4101 Validate and Retrieve Item Master | 
| None |