ValidateCostObject

Validate Cost Object

Minor Business Rule

Object Name: B1600040

Parent DLL: CALLBSFN

Location: Client/Server

Language: C

1.Functional Description
This business function is used edit and scrub cost object information for the cost management 

system..


1.1Purpose

The purpose of this business function is to edit and/or scrub cost object information based on the 

cost object type.


1.2Setup Notes and Prerequisites

Cost object types must be set up prior to calling this function.  Cost object types are set up using 

the application Cost Object Type Entry (P1620).  Cost object type information is stored in the Cost 

Object Types file (F1620).   The cost object type tells this function how the cost object field is to be 

scrubbed or edited.  The allowed edit rules are stored in UDC table 16/ER and can be any of the 

following values: 


A - No Editing, Left Justify

C - No Editing, Blank Fill

E - Record Existence

N - No Editing, Zero Fill

R - No Editing, Right Justify

T - Record Existence and Data Item Value

U - UDC Edit


Edit rules 'E' and 'T' can only be performed against tables set up as 'OT' types in the F1690.  

Currently only the following tables are allowed:


F0006 - Business Unit Master

F0101 - Address Book Master

F1201 - Asset Master

F4101 - Item Mater

F4102 - Item Branch File

F4801 - Work Order Master


1.3Special Logic

None.


2.Technical Specifications


2.4Processing 

1.Fetch Cost Object Type (F1620) record using the value passed in the cost object type parameter. 
 If no record is found then return in error.  

2.If the edit rule for the F1620 record fetched is an 'A' then left justify the value in the cost 

object parameter.

3.If the edit rule for the F1620 record fetched is an 'R' then right justify the value in the 

cost object parameter.

4.If the edit rule for the F1620 record fetched is an 'N' then zero fill the value in the cost 

object parameter.

5.If the edit rule for the F1620 record fetched is an 'C' then blank fill the value in the cost 

object parameter.

6.If the edit rule for the F1620 record fetched is an 'U' then validate that the cost object 

value passed in exists in the UDC table specified in the F1620 record (use jdeValidateUDC).  If the value 

is not found then return in error.

7.If the edit rule for the F1620 record fetched is an 'E' or a 'T' then do a fetch on the based 

on file specified in the F1620 record.  Use the cost object as the key.  If the based on file is the 

F4102 then also use business unit as part of the key.  If no record is found then return in error.

8.If the edit rule for the F1620 record fetched is a 'T' then retrieve data dictionary 

information for the data item in the F1620 using GetDataDictionaryInfo (B4700220).  If the item is not found 

then return in error.  Next retrieve the value of the data item from the record which was fetched.  

Compare that value with the value specified in the F1620 using the relation.  If the comparison is not met 

then return in error.

9.If the edit rule didn't match any of the values specified in steps 2 - 7 then return in error.

     


Data Structure

D1600040 - Validate Cost Object

Parameter NameData ItemData TypeReq/OptI/O/Both
cCostObjectTypeABT1charNONENONE

Special Input Expected
Cost object type value to be validated.

^

szCostObjectABR1charNONENONE

Special Input Expected
Cost object value to be validated.

^

szBusinessUnitMCUcharNONENONE

Special Input Expected
A business unit must be passed in this parameter if your cost object type has an edit rule of 'E' or 

'T' and the based on file is the F4102 (Branch Item).

^

cSuppressErrorMessageEV02charNONENONE

Special Input Expected
If you do not wish to have this function set an error message you pass a '1' in this parameter.


Significant Data Values

'1' - do not set error but return error id

' ' - set error if encountered


^

szErrorMessageIDDTAIcharNONENONE

Special Output Returned
If you decided not to have this business function set errors (cSuppressErrorMessage = '1') then the 

error id will be returned in the parameter if an error is encountered.

szDescriptionDSCRcharOPTNONE

For OneWorld, the row description that identifies fields on forms and reports. For World, the title that identifies text and reports. Use it in a 
manner similar to the column description in the query facility. It should be less than 35 characters. Use abbreviations whenever possible. 
Common abbreviations are: U/M Units of measure   YTD Year-to-date MTD Month-to-date PYE Prior year end   QTY Quantity G/L General ledger  
A/P Accounts payable   DEPR Depreciation

Related Functions

B4700220 Get Data Dictionary Information

Related Tables

F0101 Address Book Master
F1201 Asset Master File
F1620 Cost Object Types
F4101 Item Master
F4102 Item Branch File
F4801 Work Order Master File