ReturnUDCRecords

Return User Defined Codes Records

Minor Business Rule

Object Name: B4100450

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function reads the all records available in UDC Table (F0005) with System Code and Code Type.  

It will return UDC Value left justify and the UDC Description.  If the last record is read for, 

LastRecordFlag will be set to a '1'.  An ErrorMessageID will return a value only if no records exist in UDC 

Table.


Setup Notes and Prerequisites


Special Logic



Technical Specification


Parameters


Data Item     Data Structure Description     I/O     Required     Notes

RT            Record Type                     I         Y

SY            System Code                     I         Y

KY            Code Value                      O         Y

DL01          Description                     O         Y

EV02          Suppress Error Message          I         N

DTAI          Error Message ID                O         N         Error will be set as '3143' only if

hUser or hRequest fails;  or '0002'

the first fetch fails (no records

exist in F0005)

GENLNG        User Handle                     I         Y         Will be released and set back to 

NULL if the Last Record Flag is set

to '1'.

GENLNG        Hrequest                        I         Y         Will be relased and set back to

NULL if the Last Record Flag is set

to '1'.

EV01          Last Record Flag                O         Y         The Last Record Flag will be set to

'1' if no more records are found

in F0005.      

      

Related Tables

F0005 - UDC Table


Related Business Functions


Processing

Read the UDC table (F0005) equal to the record type and system code passed in sending out the code

and it's description.

When no more records sent back a '1' will be in the Last Record Flag.


Data Structure

D4100450 - Return User Defined Codes Records

Parameters
Data Item     Data Structure Description     I/O     Required     Notes
RT            Record Type                     I         Y
SY            System Code                     I         Y

KY            Code Value                      O         Y

DL01          Description                     O         Y

EV02          Suppress Error Message          I         N

DTAI          Error Message ID                O         N         Error will be set as '3143' only if

hUser or hRequest fails;  or '0002'

the first fetch fails (no records

exist in F0005)

GENLNG        User Handle                     I         Y         Will be released and set back to 

NULL if the Last Record Flag is set

to '1'.

GENLNG        Hrequest                        I         Y         Will be relased and set back to

NULL if the Last Record Flag is set

to '1'.

EV01          Last Record Flag                O         Y         The Last Record Flag will be set to

'1' if no more records are found

in F0005.      

      

^

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

szCodeTypeRTcharNONENONE

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

szUDCValueKYcharNONENONE

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

szUDCDescription1DL01charNONENONE

A user defined name or remark.

cLastRecordFlagEV01charNONENONE

Parameters
EV01          Last Record Flag                O         Y         The Last Record Flag will be set to
ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab '1' if no more records are found

ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab in  F0005.ab  ab  ab  ab              ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab 

ab  ab  ab  ab  ab  ab 

^

cSuppressErrorMessageEV01charNONENONE

An option that specifies the type of processing for an event.

szErrorMessageIDDTAIcharNONENONE

Parameters
Data Item     Data Structure Description     I/O     Required     Notes
DTAI          Error Message ID                O         N         Error will be set as '3143' only if
ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab hUser or hRequest fails;  or '0002'

ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab the first fetch fails (no records

ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab exist in F0005)


^

idHrequestHandleGENLNGIDNONENONE

Parameters
Data Item     Data Structure Description     I/O     Required     Notes
GENLNG        Hrequest                        I         Y         Will be released and set back to 
ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab NULL if the Last Record Flag is set

ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab to '1'.

ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab 

^

idHuserHandleGENLNGIDNONENONE

Parameters
Data Item     Data Structure Description     I/O     Required     Notes
GENLNG        User Handle                     I         Y         Will be released and set back to 
ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab NULL if the Last Record Flag is set

ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab to '1'.


^

Related Functions

None

Related Tables

F0005 User Defined Codes