GetAllUDCValues

Get All User Defined Codes Values

Minor Business Rule

Object Name: B3400130

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This business function will get all the UDC values from the UDC table (F0005) for a given System Code 

and Reporting Code. The first time the function is called, pass a '1' in the Type parameter so that 

the data dictionary value is obtained and the Request is not released. To get the next value in the 

table, pass a '2' in the Type parameter. To release the request, pass a '3' in the Type parameter.


1.2Setup Notes and Prerequisites

None.


1.3Special Logic

None.


2.Technical Specifications

Note : Input Values of  Request ID, Code Length will be zeros or blanks when the Request flag is '1'.


1. If the Input Request Type = '3', Release the Request using the Request ID and exit the Business 

function.

2. If the Input Request Type is '1', Using the System Code and  Reporting Code, Get the Code Length 

from the UDC types table (F0004).

3. Get the UDC Key Value using the System Code and Reporting Code as partial keys.

4. Output UDC Value = SubString(UDC Key Value , 10 - Code Length , Code Length).

5. If End of Table, Set the Error Code to '2' and Output UDC value to Blanks.

6. If any errors, Release the request and exit the function with the Error Code value as '1'.   


The UDC value, Request Id, Code Length and Error Code will be returned.


Data Structure

D3400130 - Get All User Defined Codes Values


Data Item Data Structure DescriptionI/ORequiredNotes

  SY                   System Code            IY

  RT                   Reporting Code            IY

  CDL                   Code Length            I/OY

 GENLNG             File Pointer            I/O

 PSF1                   TypeofRequest          IY      Request Flag "1" - First 

fetch "2" - Next                                                                         fetch "3" - 

Release Request

  KY                   Key Value              O

 ERRC                   Error Code             O          '0' if  successful. '1' if  

Errors                                                                                                  

                                               '2' if End of File


^

Parameter NameData ItemData TypeReq/OptI/O/Both
szSystemCodeSYcharNONENONE

A user defined code (98/SY) that identifies a system. Valid values include: 01 Address Book 03B Accounts Receivable 04 Accounts 
Payable 09 General Accounting 11 Multicurrency

szReportingCodeRTcharNONENONE

A code that identifies the table that contains user defined codes. The table is also referred to as a UDC type.

cTypeOfRequestPSF1charNONENONE

szUDCValueKYcharNONENONE

A list of valid codes for a specific user defined code list.

cErrorCodeERRCcharNONENONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

szDescription001DL01charNONENONE

A user defined name or remark.

szDescription02DL02charNONENONE

Additional text that further describes or clarifies a field in the system.

szSDCacheJobNumberJOBcharOPTNONE

Job Number

mnhReqCacheJobNumberJOBSMATH_NUMERICOPTNONE

The job number (work station ID) which executed the particular job.

Related Functions

None

Related Tables

F0004 User Defined Code Types
F0005 User Defined Codes