1.Functional Description
This function is to be used to determine if an item is considered a co or by product. For the
selected Item Number and Branch/Plant, three optional files are checked. They include Bill of Materials
(F3002), Rate Based (F3104), and Shop Floor (F3111).
1.1Purpose
The purpose of this business function is to determine if an item/branch is a co or by product. A
flag will be returned to the calling application to specify if a co (C) or by (B).
1.2Setup Notes and Prerequisites
The use of this business function is for determining the type of product. The files that need
checked may or may not exist on the client machine.
By Item and Branch/Plant
Optional files
C or B
1.3Special Logic
This business function will need to allow for files not to exist. When processing F3002, RPG used
access path F3002LI. COBY = 'C' and TBM = 'M' for initial SETLL. If not valid, COBY is changed to B
and SETLL is performed again. For F3104, RPG used access path F3104LG with COBY = 'C'. If not valid,
COBY is changed to 'B'. For F3111, RPG used access path F3111LG with COBY = 'C'. If not valid, COBY
is changed to 'B'. In all checks, if the previous check was successful, the remaining SETLL's were not
performed. If successful in any SETLL's the flag $$COBY is set to '1'.
2.Technical Specifications
This section describes detailed processing in structured English. This includes any error messages
used.
Main Processing :
initialize CoOrByProduct to a blank
initialize Error Message ID to a blank
Search Table F3002
if Error Message ID is not blank or CoOrByProduct is a blank
Search Table F3104
if Error Message ID is not blank or CoOrByProduct is a blank
Search Table F3111
Search Table F3002:
Open Table F3002
if Open Table fails
set error message to 3143
else
set IXKIT to Short Item Number
set IXMMCU to Cost Center
set IXTBM to 'M'
set IXCOBY to 'C'
Fetch Record
if Fetch fails
set IXCOBY to 'B'
Fetch Record
if Fetch fails
set output Co Or By Product to a blank
else Fetch on B succeeds
set uoput Co Or By Products to 'B'
else Fetch on C succeeds
set output Co Or By Product to 'C'
Close Table
return
Search Table F3104:
set Error Message Id to a blank
Open Table F3104
if Open Table fails
set error message to 3143
else
set IPITM to Short Item Number
set IPMMCU to Cost Center
set IPCOBY to 'C'
Fetch Record
if Fetch fails
set IPCOBY to 'B'
Fetch Record
if Fetch fails
set output Co Or By Product to a blank
else Fetch on B succeeds
set uoput Co Or By Products to 'B'
else Fetch on C succeeds
set output Co Or By Product to 'C'
Close Table
return
Search Table F3111:
set Error Message Id to a blank
Open Table F3111
if Open Table fails
set error message 3143
else
set WMCPIT to Short Item Number
set WMCMCU to Cost Center
set WMCOBY to 'C'
Fetch Record
if Fetch fails
set WMCOBY to 'B'
Fetch Record
if Fetch fails
set output Co Or By Product to a blank
else Fetch on B succeeds
set uoput Co Or By Products to 'B'
else Fetch on C succeeds
set output Co Or By Product to 'C'
Close Table
return
^
D3400340 - Determine CoBy Product
Data Item Data Structure DescriptionI/ORequiredNotes
ITM Short Item IYes
MCU Cost Center IYes
EV01 Suppress Error Messages IYes 1 = Suppress run time error
message
handling 0 = Allow run time error
message handling
DTAI Error Message ID ONo
EV02 Co or By Product OYes C = Co Product B = By Product
' '= No Records Found
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnShortItem | ITM | MATH_NUMERIC | NONE | NONE |
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item
| ||||
szCostCenter | MCU | char | NONE | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
cSuppressErrorMessage | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szErrorMessageID | DTAI | char | NONE | NONE |
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
| ||||
cCoOrByProduct | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. |
None |
F3002 Bill of Material Master File | ||||
F3111 Work Order Parts List |