Functional Description
Purpose
This function adds or changes records in the Item Master Table (F4101).
Setup Notes and Prerequisites
The Second Item Number (LITM) and Description (DSC1) are required parameters, as well as the Action
Code.
Action Code:
Add = 'A' or '1'
Change= 'C' or '2'
Special Logic:
None
Technical Specification
This function adds or changes records in the item Master Table (F4101) based on the key passed in.
If in Add mode and the Short Item Number is zero or null, the business function F4101 Get Item Number
From Next Number is called to retrieve the next number. If the Short Item Number passed in is not
zero, it is validated against the Item Master table to ensure it is unique.
The business function Assign Item Master Defaults (X4101DEF) is called to assign default data
dictionary values for the addition of a record.
If the unit of meausure is blank, 'EA' is used.
For a Change action code, if the field in the data structure contains an '*', the database value will
not change. If the value is something other than '*', the database record will be updated with the
new value.
Related Tables
Table Table Description
F4101Item Master
Related Business Functions
Source NameFunction Name
X4101DEFAssignItemMasterDefaults
ITMMSTRF4101GetItemNumberFromNextNumber
B0100009CompressCharacterString
Processing
If ActionCode is not equal to '1', 'A', '2', or 'C'
Set error code to 0001
End
If ActionCode is not equal to '1' or 'A'
If the ShortItemNumber is zero or null in the data structure then
If the short item exists then set error code 0001
Clear the columns of the row about to be written
Call AssignItemMasterDefaults to assign default values to the columns contained in the
AssignItemMasterDefaults data structure
Test whether UOM1 is blank. If still blank assign 'EA' to UOM1
Test each of the fields : UOM2, UOM3, UOM4, UOM6, UOM8, UOM9 for blanks and assign UOM1
to them if blank.
If the LITM and AITM are blank, then set error code "0159" and exit.
Call CompressCharacterString (B0100009) with SRTX going in , returning the ALN field to be
updated
Pass in the LanguageType passed in.
End
If ActionCode = '2' or 'C'
Test for the existance of the short item in the Item Master table (F4101)
If the short item does not exist then set error code 0001 and exit.
Assign blanks to the data structure items that contain a '*'. This should only be done for the
items stated in the data structure definition. If any of those items are blank, then the
current value in the F4101 record should not change.
Perform data dictionary edits for the fields being updated. If the value is not an allowed
value set error code "0025". If the data item is validated against a UDC table and the value does
not exist set error code "0027". Do not retrieve the defaults if a value is not sent in.
If any errors are found assign a '1' to ErrorsFound. Otherwise send back a blank.
Update PID, USER, JOBN, UPMJ, TDAY
If ActionCode is equal to '1' or 'A'
Insert the row into the F4101 table.
End
If ActionCode is equal to '2' or 'C'
Update F4101 row in table.
End
D4100290 - Insert Item Master Row
Parameters:
Data Item Data Structure DescriptionI/ORequired
ITMShortItemNumberINo
LITMSecondItemNumberIY
AITMThirdItemNumberIY
DSC1ItemDescription1IY
DSC2ItemDescription2IY
UOM1PrimaryUnitOfMeasureI
STKTStockingTypeI
LNTYLineTypeI
GLPTGLClassCodeI
EV01SuppressErrorMessagesI
DTAIErrorMessageIDO
PIDProgram IdI
ACTNAction CodeIY
SRP1Sales Catalog SectionI
SRP2Sub SectionI
SRP3Sales Category Code 3I
SRP4Sales Category Code 4I
SRP5Sales Category Code 5I
PRP1Commodity ClassI
PRP2Sub ClassI
PRP3Vendor Rebate CodeI
PRP4Master Panning FamilyI
PRP5Purchasing Category Code 5I
BUYRBuyer NumberI
LTLVLeadtime LevelI
ANPLPlanner NumberI
OPCOrder Policy CodeI
ITCIssue Type CodeI
EV01Error FoundOY
Ev02LanguageTypeIY
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnShortItemNumber | ITM | MATH_NUMERIC | NONE | NONE |
If Zero/Null then the Next Numbers routine is used to assign a next item number.
| ||||
szSecondItemNumber | LITM | char | NONE | NONE |
A number that identifies the item. The system provides three separate item numbers plus an extensive cross-reference capability to
| ||||
szThirdItemNumber | AITM | char | NONE | NONE |
The system provides three separate item numbers plus an extensive cross-reference capability to alternate item numbers. These item
| ||||
szItemDescription1 | DSC1 | char | NONE | NONE |
Brief information about an item; a remark or an explanation. | ||||
szItemDescription2 | DSC2 | char | NONE | NONE |
A second, 30-character description, remark, or explanation. | ||||
szPrimaryUnitOfMeasure | UOM1 | char | NONE | NONE |
A user defined code (00/UM) that identifies the unit of measure that the system uses to express the quantity of an item, for example, EA
| ||||
cStockingType | STKT | char | NONE | NONE |
A user defined code (41/I) that indicates how you stock an item, for example, as finished goods or as raw materials. The following stocking
| ||||
szLineType | LNTY | char | NONE | NONE |
A code that controls how the system processes lines on a transaction. It controls the systems with which the transaction interfaces, such as
| ||||
szGLClassCode | GLPT | char | NONE | NONE |
A user defined code (41/9) that identifies the G/L offset that system uses when it searches for the account to which it posts the transaction. If
| ||||
cSuppressErrorMessages | EV01 | char | NONE | NONE |
1- No GBR Error message set in BFab
| ||||
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
| ||||
cLevelPurchasingPrice | PPLV | char | NONE | NONE |
A code that indicates where to retrieve the purchase price for an item when you enter a purchase order. Valid codes are:
1 Use the
| ||||
szProgramId | PID | char | NONE | NONE |
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry
| ||||
cActionCode | ACTN | char | NONE | NONE |
'A' or '1' - Add
| ||||
szSalesCatalogSection | SRP1 | char | NONE | NONE |
'*' will default to blanks
| ||||
szSubSection | SRP2 | char | NONE | NONE |
'*' will default to blanks
| ||||
szSalesCategoryCode3 | SRP3 | char | NONE | NONE |
'*' will default to blanks
| ||||
szSalesCategoryCode4 | SRP4 | char | NONE | NONE |
'*' will default to blanks
| ||||
szSalesCategoryCode5 | SRP5 | char | NONE | NONE |
'*' will default to blanks
| ||||
szCommodityClass | PRP1 | char | NONE | NONE |
'*' will default to blanks
| ||||
szCommoditySubClass | PRP2 | char | NONE | NONE |
'*' will default to blanks
| ||||
szVendorRebateCode | PRP3 | char | NONE | NONE |
'*' will default to blanks
| ||||
szMasterPlanningFamily | PRP4 | char | NONE | NONE |
'*' will default to blanks
| ||||
szPurchasingrCategoryCode5 | PRP5 | char | NONE | NONE |
'*' will default to blanks
| ||||
mnBuyerNumber | BUYR | MATH_NUMERIC | NONE | NONE |
'*' will default to blanks
| ||||
mnLeadtimeLevel | LTLV | MATH_NUMERIC | NONE | NONE |
'*' will default to blanks
| ||||
mnPlannerNumber | ANPL | MATH_NUMERIC | NONE | NONE |
'*' will default to blanks
| ||||
cOrderPolicyCode | OPC | char | NONE | NONE |
'*' will default to blanks
| ||||
cIssueTypeCode | ITC | char | NONE | NONE |
'*' will default to blanks
| ||||
cErrorCode | ERR | char | NONE | NONE |
1' will be returned if any errors occurred.
| ||||
cEv01LanguageType | EV01 | char | NONE | NONE |
If a '1', it is a double byte language and the compress description is inserted differently.
|
B4000040 Misc. Item Master Validation Functions | ||||
B4000290 Compress And Left Justify String | ||||
B9800100 Get Audit Information | ||||
X4101DEF Assign Item Master Defaults |
F4101 Item Master |