1.Functional Description
1.1Purpose
The Business Function will validate a UDC value entered by the user.
1.2Setup Notes and Prerequisites
This BSFN should be called if the Selection Value is not blank and Required field is not 'C'
(Calculated)
If the value is being checked for Range the CNUM(Y/N) must be passed in.
1.3Special Logic
None
2.Technical Specifications
2.4Internal Function Load()
Processing
1.)If BF Selection Value is not equal to Blank
1.1) If BFSystem Code in not equal to Blank AND If BF UsCd is not equal to Blank.
F0004 Get User Define Code Type
BF System Code -> szSystem Code
BF User Defined Codes->szRecordType
'1' ->cCall Type
'1' ->cSuppressErrorMessage
VA mnCodeLength <-mnUDCCodeLength
BF CodeNum <-cCodeNumeric
'1' ->mnIndex
'1' ->mnKeys
1.2) VA mnSegmentLength =length([BF Selection Value])
VA szErrorMsgId = 1290
Else
// Left-pad zero for numeric value to match UDC
Endif
1.4)Validate UDC Value
BF System Code ->szSystemCode
BF UserDefined Codes->szUserDefinedCodes
BF SelectionValue ->szUserDefinedCodeValue
cErrorCode <-cReturnCode
1.5) If VA cErrorCode is equal to Zero
VA cErrorCode='1'
VA szError MsgID=1290
Endif
Endif
Endif
2.) If BF Lower Limit of Value is not equal to Blank AND BF Upper Limit of Value is not equal to
Blank
2.1) If VA Code Num(Y/N) is not equal to 'Y'
Greater than BF Upper Limit
cErrorCode =1
Endif
Else
2.1.2) String, Convert String To Numeric
BF Selection Value->szGenericString
VA mnSegmentValue ->mnNumericValue
VA IsStringNumeric<-cErrorCode
2.1.3) If VA IsStringNumeric is equal to '1'
String, Convert String to Numeric
BF Lower Limit of Value ->szGenericString
VA mnLowerLimit ->mnNumericValue
VA IsStringNumeric <-cErrorCode
2.1.4) If VA IsStringNumeric is equal to '1'
String, Convert String to Numeric
BF Upper Limit of Value ->szGenericString
VA mnUpper Limit ->mnNumericValue
VA IsStringNumeric<-cErrorCode
EndIf
EndIf
mnLower limit or VA mn SegmentValue is Greater than VA mn UpperLimit
VA cErrorCode =1
VA szErrorMsgId=3728
EndIf
Endif
Endif
Endif
D3201210 - Validate Segment Value
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szSystemCode | SY | char | OPT | NONE |
A user defined code (98/SY) that identifies a system. Valid values include:
01
Address Book
03B
Accounts Receivable
04
Accounts
| ||||
szUserDefinedCodes | RT | char | OPT | NONE |
A code that identifies the table that contains user defined codes. The table is also referred to as a UDC type. | ||||
szLowerAllowedValue | LVAL | char | OPT | NONE |
The lower allowed value of this specific segment. If you enter a value here,then you must also enter an upper allowed value. | ||||
szAllowedValueUpper | UVAL | char | OPT | NONE |
The upper allowed value of this specific segment. If you enter a value here,then you must also enter an lower allowed value. | ||||
cNumericYN | CNUM | char | OPT | NONE |
Determines whether a user defined code is numeric or alphanumeric.
Valid values are:
Y Indicates that the code is numeric and should be
| ||||
cErrorCode | ERRC | char | OPT | NONE |
This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document
| ||||
szErrorMsgId | DTAI | char | OPT | 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
| ||||
cRequiredToBe | ATRQ | char | OPT | NONE |
A code that specifies whether a segment is required or optional in a configuration, or whether the system must calculate it to specification
| ||||
szSegmentValue | SGVL | char | OPT | NONE |
An answer to the configurator feature and option questions that appear during order entry.
When you define cross-segment editing rules,
|
None |
None |