CRPCreateResourceProfileFromBOM

CRP, Create Resource Profile From BOM

Minor Business Rule

Object Name: B3300100

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

The purpose of this function is to trace the multi-level bill of material for the input parent item 

and call the function to create Resource Profile records (F3303) based on component item routing 

information.


1.2Setup Notes and Prerequisites

• The initial call to this function must have the Mode parameter set to '1'.  This causes the function 
to create the cache used to process each Item/Branch.  If the cache creation is successful, the 

function automatically switches the Mode to '2' so that the first F4102 record can be processed 

immediately.

• After all F4102 records have been read, the calling application must call this function with Mode = 
'3' so that the cache is destroyed.


1.3Special Logic


2.Technical Specifications

WkQuantity = 1


If Mode = 1

Create a cache using the name "B3300100 F3303 Cache Random Number" with the following fields:
Low Level Code (LLX)
Short Item Number (ITM)
Unique ID (UKID)

Branch (MCU)

Quantity (QNTY)

The cache should be keyed by Low Level Code, Short Item Number, Unique ID, and Branch.
Mode = 2

Else

   Initialize Cache

End


If Mode = 2

Open F3002

ComponentFlag = TRUE
ComponentFound = TRUE

WkLowLevelCode = 1

WkShortItem = ShortItemNumber

WkBranch = Branch

WkUniqueID = 1

Add a record to the cache for the values WkLowLevelCode, WkShortItem, WkUniqueID, WkBranch, 

and Quantity =                                                                                       

                        1.


Open a cursor on the cache
Call B3300110 passing the following fields:

Parent Item Flag = '1'

Branch = WkBranch

Short Item Number = WkShortItem

Second Item Number = SecondItemNumber

Third Item Number = ThirdItemNumber

BOM Component Item = WkShortItem

Component Branch = ' '

Unit Of Measure = ' '

BOM Quantity = 0

Effective From Date = EffectiveFromDate

Effective Thru Date = EffectiveThruDate

Master Routing Flag = MasterRoutingFlag

Accounting Cost Quantity = AccountingCostQty

Suppress Error Message = ' '

While ComponentFlag = TRUE

ComponentFlag = FALSE

ComponentFound = FALSE

Use CacheFetchPosition to position the cache cursor at the cache recordmatching          

         WkLowLevelCode

While LowLevelCode from fetched cache record = WkLowLevelCode

ComponentFlag = TRUE

Set a selection over F3002 using WkShortItem(IXKIT), WkBranch, TBM ='M' and         
 BQTY = AccountingCostQty.

Fetch the first selected record from F3002

If the fetch fails

Set a selection over F3002 using WkShortItem, WkBranch, TBM ='M' andBQTY = 0.
Fetch the first selected record from F3002

End


While F3002 fetch successful
if  (IXEFFF >= EffectiveFromDate and IXEFFF <= EffectiveThruDate) or

    (IXEFFT >= EffectiveFromDate and IXEFFT <= EffectiveThruDate) or

    (IXEFFF <= EffectiveFromDate and IXEFFT >= EffectiveThruDate)

Component Found = TRUE

If IXEFFF > EffectiveFromDate

RoutingEffectiveFrom = IXEFFF

Else

RoutingEffectiveFrom = EffectiveFromDate

End

If IXEFFT > EffectiveThruDate

RoutingEffectiveThru = IXEFFT

Else

RoutingEffectiveThru = EffectiveThruDate

End

WkUniqueID = WkUniqueID + 1

If IXFORQ = '%'

WkQuantity = IXQNTY/100

WkQuantity = WkQuantity*Cache Quantity

End

If IXFORQ = 'V'

WkQuantity = IXQNTY*Cache Quantity

End

If IXFORQ = 'F'

WkQuantity = IXQNTY

End


Insert a new record into the cache using values WkLowLevelCode+ 1, 
IXITM, WkUniqueID, IXCMCU, andWkQuantity

Call B3300110
Parent Item Flag = ' '
Branch = Branch

Short Item Number = ShortItemNumber
Second Item Number = SecondItemNumber
Third Item Number = ThirdItemNumber

BOM Component Item = IXITM
Component Branch = IXCMCU
Unit Of Measure = IXUM
BOM Quantity = WkQuantity

Effective From Date = RoutingEffectiveFrom
Effective Thru Date = RoutingEffectiveThru
Master Routing Flag = MasterRoutingFlag
Accounting Cost Quantity = Accounting CostQty
Suppress Error Message = ' '
End
Fetch the next F3002 record

End

Use CacheFetch to get the next cache record

End

If  ComponentFound = TRUE

Delete Cache records for previous level

Reset Cursor

End

WkLowLevelCode = WkLowLevelCode + 1

End
Delete all records from the cache

End


If Mode = 3

Destroy the cache

End


If any error occurs during a cache function

Set ErrorMessageID = '032E'

End


Data Structure

D3300100 - CRP, Create Resource Profile From BOM

Data Item Data Structure DescriptionI/ORequiredNotes
ITM            Short Item Number                  IY

LITM            Second Item Number            IY

AITM            Third Item Number                  IY

MCU            Branch                        IY

ACQ            Accounting Cost Quantity      IY

EFFF            Effective From Date            IY

EFFT            Effective Thru Date            IY

MRYN            Master Routing Flag            IY

EV01            Mode                                I/OY      1 = Create Cache 

                                                                        2 = Process Item/Branch 

                                                                        3 = Destroy Cache

DSC1            Cache Name                        I/OY

SUPPS            Suppress Error Message            IY      '1'    = Suppress error 

messages 

                                                                        ' '    = Allow error messages

DTAI            Error Message ID                  OY      ' '    = success 

                                                                        '032E' = error processing the 

cache


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnShortItemNumberITMMATH_NUMERICNONENONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

szSecondItemNumberLITMcharNONENONE

A number that identifies the item. The system provides three separate item numbers plus an extensive cross-reference capability to 
alternative item numbers. The three types of item numbers are: Item Number (short) An 8-digit, computer-assigned item number. 2nd Item Number A 
25-digit, user defined, alphanumeric item number. 3rd Item Number  Another 25-digit, user defined, alphanumeric item number. In addition to 
these three basic item numbers, the system provides an extensive cross-reference search capability. You can define numerous 
cross-references to alternative part numbers. For example, you can define substitute item numbers, replacements, bar codes, customer numbers, or 
supplier numbers.

szThirdItemNumberAITMcharNONENONE

The system provides three separate item numbers plus an extensive cross-reference capability to alternate item numbers. These item 
numbers are as follows: 1.  Item Number (short) - An 8-digit, computer-assigned item number. 2.  2nd Item Number - The 25-digit, free-form, user 
defined alphanumeric item number. 3.  3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item number.  In addition to 
these three basic item numbers, an extensive cross-reference search capability has been provided (see XRT). Numerous cross references to 
alternate part numbers can be user defined, such as substitute item numbers, replacements, bar codes, customer numbers, or supplier 
numbers.

szBranchMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

jdEffectiveFromDateEFFFJDEDATENONENONE

A date that indicates one of the following:     o When a component part goes into effect on a bill of material     o When a routing step goes into 
effect as a sequence on the routing for an item     o When a rate schedule is in effect The default is the current system date. You can enter 
future effective dates so that the system plans for upcoming changes. Items that are no longer effective in the future can still be recorded and 
recognized in Product Costing, Shop Floor Management, and Capacity Requirements Planning. The Material Requirements Planning system 
determines valid components by effectivity dates, not by the bill of material revision level. Some forms display data based on the effectivity 
dates you enter.

jdEffectiveThruDateEFFTJDEDATENONENONE

A date that indicates one of the following:     o When a component part is no longer in effect on a bill of material     o When a routing step is no 
longer in effect as a sequence on the routing for an item     o When a rate schedule is no longer active The default is December 31 of the 
default year defined in the Data Dictionary for Century Change Year. You can enter future effective dates so that the system plans for upcoming 
changes. Items that are no longer effective in the future can still be recorded and recognized in Product Costing, Shop Floor Management, 
and Capacity Requirements Planning. The Material Requirements Planning system determines valid components by effectivity dates, not by 
the bill of material revision level. Some forms display data based on the effectivity dates you enter.

cMasterRoutingFlagMRYNcharNONENONE

An option that determines whether the system uses the master routing for an item or a routing defined for the parent item. Both routings are 
retrieved from the Routing Master table (F3003). If you choose to check for master routings, the Shop Floor Management system checks the 
Item Cross Reference table (F4104), cross-reference type MR, for the parent item. If it finds a cross-reference, the program uses the master 
routing from the Routing Master Table (F3003). If it does not find a cross-reference, the system uses the routing defined for the parent item. If 
you do not choose to check for master routings, the program uses the parent item's routing from the Routing Master table. For World: Valid 
values are:    Y Yes, use the master routing for an item, if one exists.    N No, do not check for a master routing for the item. For OneWorld: To specify 
whether the system checks for cross-references and uses a master routing for the item, click the Master Routings option under the 
BOM/Routing Options heading.

cModeEV01charNONENONE

An option that specifies the type of processing for an event.

cSuppressErrorMessageSUPPScharNONENONE

A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.        0 = allow 
runtime error message handling.        1 = suppress runtime error message handling.

szErrorMessageIDDTAIcharNONENONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

szCacheNameDSC1charNONENONE

Brief information about an item; a remark or an explanation.

mnAccountingCostQtyACQMATH_NUMERICNONENONE

An amount that the system uses in the Cost Rollup program to determine the allocation of setup costs. The system totals the setup costs 
and divides the sum by this quantity to determine a unit setup cost. The default is 1.

Related Functions

B3300110 F3303, Create Resource Profile From Routing

Related Tables

F3002 Bill of Material Master File