CallExternalDocumentNbrPgm

Call External Document Number Program

Minor Business Rule

Object Name: B4900820

Parent DLL: CTRAN

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

The purpose of this business function is to call an external program to retrieve a document number to be used by the shipping document that has called 

this business function.


1.2Setup Notes and Prerequisites




1.3Special Logic




2.Technical Specifications


2.1Parameters:


Data Item Data Structure DescriptionI/OReqNotes

DTAIError Message IDON
SUPPSSuppress Error Message IDIN

INQInquiry flagIYIf set to '1', the next number should be determined and returned to the calling function, but the next number 

should not be incremented. 

REFQReference QualifierIY

PIDNExternal Program IDY

CARSCarrierIN

MOTMode of TransportIN

MCUZPrint DepotIN

COCompanyINValue used to retrieve the internal document number.

EMCUHeader Business UnitINSee CO

MCUBusiness UnitINSee CO

DCTDocument TypeINSee CO

DTDODocument DateINSee CO

DOCDocument NumberINSee CO

KCOKey CompanyINSee CO

DCNSDocument Number SourceINSee CO

REFNReference NumberONumber determined by the external program called and passed back to the caller of B4900820.





2.2Related Tables 

Table Table Description

 




2.3Related Business Functions

Source NameFunction Name
  


2.4Processing 


This business function will accept the parameters passed and perform a call to the business function name specified in External Program ID (PIDN).




^

Data Structure

D4900820 - Call External Document Number Program

Parameter NameData ItemData TypeReq/OptI/O/Both
szErrorMessageIDDTAIcharOPTOUTPUT

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 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

cSuppressErrorMessageSUPPScharOPTINPUT

A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.        0 = allow 
runtime error message handling.        1 = suppress runtime error message handling.

cUpdateControlFlagUPCFcharOPTINPUT

Controls whether to update the General Ledger (G/L) for commingled product. Typically, you update the G/L for the product that belongs to 
your company's inventory, not the product that belongs to another owner. Valid values are:        Y  A journal entry is written. You may also use 1.    
    N  A journal entry is not written. You may also use 0.

szRefNumberQualifierREFQcharOPTINPUT

A code qualifying the Reference Number. Must conform to one of the accepted values for EDI X12 data element 128.

szProgramIDDocNxtNbrPIDNcharREQINPUT

Enter the Form Name (Program ID) of the business function used to derive the external document number.

mnCarrierCARSMATH_NUMERICREQINPUT

The address number for the preferred carrier of the item. The customer or your organization might prefer a certain carrier due to route or 
special handling requirements.

szModeOfTransportMOTcharOPTINPUT

A user defined code (00/TM) that describes the nature of the carrier being used to transport goods to the customer. For example, by rail, by 
road, and so on.

szPrintDepotMCUZcharOPTINPUT

Identifies a separate entity within a business for which you wish to track costs, for example, a warehouse location, job, project, work center, 
or branch/plant. The business unit field is alphanumeric. You can assign a business unit to a voucher, invoice, fixed asset, and so forth, for 
responsibility reporting.  The system provides reports of open A/P and A/R by business unit, for example, to track equipment by responsible 
department. Business Unit Security can prevent you from inquiring on business units for which you have no authority.

szCompanyCOcharOPTINPUT

A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company 
Constants table (F0010) and must identify a reporting entity that has a complete balance sheet. At this level, you can have intercompany 
transactions. Note: You can use company 00000 for default values such as dates and automatic accounting instructions. You cannot use company 00000 
for transaction entries.

szCostCenterHeaderEMCUcharREQINPUT

A business unit is an accounting entity required for management reporting. It can be a profit center, department, warehouse location, job, 
project, work center, branch/plant, and so forth. This business unit is from the business unit entered on the header of a sales/purchase order for 
reporting purposes. This data is always right justified on entry (for example, CO123 would appear as _______CO123).  A security mechanism 
has been provided to inhibit users from entering or locating business units outside the scope of their authority.

szCostCenterMCUcharREQINPUT

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

szDocumentTypeDCTcharREQINPUT

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

jdDateDocument1DTDOJDEDATEREQINPUT

The date that the system prints on the document.

mnDocumentNumberDOCMATH_NUMERICREQINPUT

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szCompanyKeyKCOcharREQINPUT

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

cDocumentNumberSourceDCNScharREQINPUT

Determines the source of the document next number. Valid values are:    C Company    D Depot    S Sales Region

szReferenceNumberREFNcharREQOUTPUT

A Reference number or identification number as defined for a particular EDI transaction set or as specified by the Reference Number 
Qualifier.

szDocumentCodeDCCDcharOPTNONE

Identifies the document code the system will use when printing this document.

mnShipmentNumberSHPNMATH_NUMERICOPTNONE

A "next number" that uniquely identifies a shipment.

mnRoutingStepNumberRSSNMATH_NUMERICOPTNONE

This is the number assigned to a shipment routing step. The movement of a shipment from the origin to the final destination (ship to 
address) can be made up of one or more routing steps, each with an intermediate destination.

szProgramIdPIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

Related Functions

None

Related Tables

None