VerifyAndGetSOorPOText

Verify And Get SO or PO Text

Major Business Rule

Object Name: B4300440

Parent DLL: CDIST

Location: Client/Server

Language: C

Functional Description

Purpose

1.1Purpose
Retrieves a SO/PO Text Line from F4314 and stores the hRequest and the File Pointer to the row. 
Subsequent calls to this business function in Mode = '2' will retrieve rows sequentially. 


Setup Notes and Prerequisites

• 1.2Setup Notes and Prerequisites
• The first time this business function is called, Process Mode must be set to '1'. This will tell the 
business function to verify that a SO/PO Text Line exists in the F4314 table. The User must supply 

GENLNG variables to hold the returned hRequest and File Pointer in addition to the required parameters.

• To retrieve sequential records from the file, the user should call the BsFn in Process Mode = '2' 
and pass in the stored File Pointer and hRequest. The BsFn will keep returning the file pointer and 

hRequest until all records are read.

• The user must call this business function one last time to close the table(which frees the hRequest) 
and to free the File Pointer. To do this call the BsFn in Process Mode = '3'.

• Although there is only one index for the file, the number of keys used within that index is a 
variable that is left up to the user:

Indexes Available in F4314:

1 = DOCO, DCTO, KCOO, LNID, LINS.
Combinations of Keys in the Index used:

Key Fields = 1 -> DOCO only.

Key Fields = 2 -> DOCO and DCTO only.

Key Fields = 3 -> DOCO, DCTO, and KCOO only.

Key Fields = 4 -> DOCO, DCTO, KCOO, and LNID only.

Key Fields = 5 -> DOCO, DCTO, KCOO, LNID, and LINS.




Technical Specification



2.4Processing 




6.If in Process Mode = '1' , attempt to read the first record in F4314 that matches the 
parameters passed in (using only the number of key fields in the Index as specified by the Key Fields (MATH01)  

parameter). If a record is found, load and return Print Before (PNTC) and Text Message (TXLN). The 

F4314 File Pointer (GENLNG) and hRequest (GENLN2) parameters will be returned regardless of whether a 

record was found or not. If the record is not found, return "0002".

7.If in Process Mode = '2' , use the F4314 File Pointer (GENLNG) and hRequest (GENLN2) to 

retrieve the next record in the file. If the next record is not found, return '0002' and end the business 

function. If a record was found, return the File Pointer and hRequest along with the Print Before and 

Text Message values.

8.If in Process Mode = '3' , retrieve the hRequest and File Pointer from input parameters. Close 

the F4314 table(which frees hRequest) and free the File Pointer memory.





^

Data Structure

D4300440 - Verify And Get SO/PO Text

Parameter NameData ItemData TypeReq/OptI/O/Both
mnOrderNumberDOCOMATH_NUMERICNONENONE

Special Input Expected
Required if Key Fields =  1,2,3,4,5ab 

^

szOrderTypeDCTOcharNONENONE

Special Input Expected
Required if Key Fields =  2,3,4,5ab 

^

szRelatedKeyCompanyKCOOcharNONENONE

Special Input Expected
Required if Key Fields =  3,4,5ab 

^

mnLineNumberLNIDMATH_NUMERICNONENONE

Special Input Expected
Required if Key Fields =  4,5ab 

^

mnLineNumberWorkOrderLINSMATH_NUMERICNONENONE

Special Input Expected
Required if Key Fields =  5ab 



^

cPrintBeforeYNPNTCcharNONENONE

A one-character code indicating whether the print message/item note text prints before or after the detail line on the order.  The default is for 
the text to print after the detail line.

szMessageTextLineTXLNcharNONENONE

An internal counter used by order processing programs to determine the order in which the lines of a print message appear.

idF4314FilePointerGENLNGIDNONENONE

General purpose ID variable.

idF4314hRequestGENLN2IDNONENONE

General purpose ID variable.

cProcessModeMODEcharNONENONE

Special Input Expected
1-Init, Read F4314, and store ptrs,   

2-Read F4314 

3-Close Tbl. and free all  ptrs.ab 

^

cSuppressErrorMessagesEV01charNONENONE

Special Input Expected
1=to  Suppressab 


^

szErrorMessageDTAIcharNONENONE

Special Output Returned
"0002" if no records found

^

mnKeyFieldsMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

Related Functions

None

Related Tables

F4314 Sales Order/Purchasing Text Detail Lines