DetermineVendorSchedule

F3430 Determine Vendor Schedule

Major Business Rule

Object Name: B3401120

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description
This business function is to be used to determine shipping dates and schedule quantities. The 
business function will accept the Document number, Document Type, Document Company, Suffix and Line Id as the 

primary key to access records on the Vendor Schedule Quantities table (F3430). This function will 

populate a work table which is for the specific use of the calling application P34301. The work table 

will then be used in the  application to populate the grid area on the form.


1.1Purpose
The purpose of this business function is to ultimately populate a work table with shipping dates and 
schedule quantities retrieved from the Vendor Schedule Quantities table (F3430).

The function will start by reading the F3430 table using the key (DOCO, DCTO, KCOO, SFXO, LNID). 

Every start date within that line id will be processed individually to firstly determine whether it is a 

shippable date and also to associate a time fence identifier. Time fence identification will be 

explained in more detail later on.

As the start date record is being processed, the planned and released quantities will be used to 

populate the work table and also to calculate the cumulative and net change quantities.

In order to achieve a correctly populated work table various other business functions will need to be 

invoked also. These will be detailed later on also.      


1.2Setup Notes and Prerequisites

This business function essentially uses various tables as input to update one work table for use in 
the calling application. 


• The work table will have 4 key fields and 54 generic use fields.
• The grid that needs to be populated in the OneWorld application will have a maximum of 52 dates ie., 
54 columns and  5 fixed rows as shown below.


Past Due 2/1/962/2/962/3/962/4/962/5/962/6/96

Released

Planned

Cumulative

Net Change

----->


Can scroll to the right for up to 52 columns/dates....


The 54 generic fields in the table can hold either Date OR Quantity information.




• There are two record type fields  used in the work table to identify the type of information held in 
the generic fields.  m8ev01 

 m8qtdescription

• '1'      D-Date Fields
• '2'      R-Released Quantities
• '3'      P-Planned Quantities
• '4'      C-Cumulative Quantites
• '5'      N-Net Change Quantities
• '6'      U -Updateable Planned Quantity (will contain on/off flag)
• This implies that there will always be 6 records in the work table when the function passes control 
back to the calling application. These values will be assigned when the function is writing records to 

the work table.

• A maximum of  52 start dates will be processed within a unique line id. The skip to Ship Date in the 
form control will be used to determine a starting point for loading the start dates onto the grid.

• The key structure of Document Number, Document Type, Document Company, Suffix and Line Id must be 
supplied to the function to enable access to the various tables involved.

• The work table will be cleared upon entry to the function by Job Id, Computer Id and App Id.
• The work table will be cleared upon exit from the application by Job Id, Computer Id and App Id.

1.3Special Logic
Both date and numeric type fields will have to be manipulated into string type fields as previously 
mentioned.


2.Technical Specifications

Initialise all work fields and arrays.

Do While F3430 records still exist

      And F3430 record count is less than or equal to 52


For every F3430 record read...

Populate the Date array with the relevant record count index  

Populate the Released array with the relevant record count index  

Populate the Planned array with the relevant record count index  

Populate the Cumulative array with the relevant record count index  

Populate the Net Change array with the relevant record count index 

Populate the Updateable Planned Quantity array with relevant record 

index count 

Enddo


Read the Date Array and populate to the relevant field name on the F34UI003 for the '1' 

type record.

Read the Released Array and populate to the relevant field name on the F34UI003 for the '2' 

type record.

Read the  Planned Array and populate to the relevant field name on the F34UI003 for the '3' 

type record.

Read the  Cumulative Array and populate to the relevant field name on the F34UI003 for the 

'4' type record.

Read the  Net Change Array and populate to the relevant field name on the F34UI003 for the 

'5' type record.

Read the  Updateable Quantity Array and populate to the relevant field name on the 

F34UI003 for the '6' type record.


Now that the F34UI003 table has been populated, pass control back to the calling application 

P34301.





Detailed Processing 


NOTE:  ** internal function **
/ / / * programmer notes */ / /


/ / / * Special Data Structure * / / /
 Converted Array Structure (54 structures in array) 

- szDate, szReleased, szPlanned, szCumulative, szNetChange, szUpdateable



****************************** Main Program ******************************************

/ / / * Initialization * / / /

*** InitOutputParms (Initialize output parameters to zero) ***

Check if input Conversion Factor = 0 

Set Conversion Factor  = 1

If  Conversion Factor does not = 1

WorkCum = Input  Open Quantities divided by Conversion Factor

Copy WorkCum to Ouput Cum Frozen, Cum Fabricated, Cum Raw Materials

Else

Set Output Cum Frozen, Cum Fabricated, Cum Raw Materials = Input Open 

Quantites

*** End InitOutputParms ***

Initialize all data structures to zero


Open Tables F3430, F34UI003

If failure 

Error 3143 - File Cannot Be Accessed

Return Error Code = ER_ERROR

Else

If  input cMode == 1

****** Load F34UI003 ******

If else  input cMode == 2

****** Update F3430 ******

else

Error 0013 - Entry invalid

Return Error Code = ER_ERROR

Close Tables

return Error Code


*************************************************************************************

********************************* Load F34UI003 **********************************

*** Load F3430 Key (doco, dcto, kcoo, lnid, sfxo, strt) ***

Select records

If select successful

Fetch first Record

** InitConvertedArray (Initialize Converted Array first two elements) **

Convert Array[0] Planned = "Planned"

Convert Array[0] Released = "Released"

Convert Array[0] NetChange = "Net Change"

 Convert Array[0] Cumulative = " Cumulative"

Convert Array[1] Date = "Past Due"

Convert Array[1] Cumulative = Converted Open Quantity (Conv Factor)

Convert Array[1] Released = Converted Open Quantity (Conv Factor)


** end InitConvertedArray **

Set WorkRecordCount = 2 /* Start of Dates Conversion */


** Convert Time Fence days to Julian Dates (TimeFence) **

Set WorkCDF1 = input Frozen Commit Days

WorkCDF2 = input Fab Commit Days

WorkCDF3 = input Raw Material Days

WorkCDF4 = Order Release Days

Error Flag = 0

if WorkCDF1 >= 1

Subract 1 from WorkCDF1

endif

if WorkCDF2 >= 1

Subract 1 from WorkCDF2

endif

if WorkCDF3 >= 1

Subract 1 from WorkCDF3

endif

if WorkCDF4 >= 1

Subract 1 from WorkCDF4

endif

If WorkCDF1 > 0

Call ForwardBackwardScheduleDates passing:

input Cost Center, MVSTRT, WorkCFD1, "F"

Copy CallOutput Start Date to WorkFrozenDate

If Call to ForwardBackwardScheduleDates fails

set Error Flag = 1

EndIf

else

if input Frozen Days does not = 0

Move MVSTRT to WorkFrozenDate

endif

endif

if WorkCDF2 > 0

Call ForwardBackwardScheduleDates passing:

input Cost Center, MVSTRT, WorkCFD2, "F"

Copy CallOutput Start Date to WorkFabDate

If Call to ForwardBackwardScheduleDates fails

set Error Flag = 1

Endif

else

if  input Fabricated Days does not = 0

Move MVSTRT to WorkFabDate

endif

endif

if WorkCDF3 > 0

Call ForwardBackwardScheduleDates passing:

input Cost Center,  MVSTRT, WorkCFD3, "F"

Copy CallOutput Start Date to WorkRawMaterialDate

If Call to ForwardBackwardScheduleDates fails

set Error Flag = 1

Endif

else

if input Raw Material Days does not = 0

Move MVSTRT to WorkRawMaterialDate

endif

endif

if WorkCDF4 > 0

Call ForwardBackwardScheduleDates passing:

input Cost Center, MVSTRT, WorkCFD4, "F"

Copy CallOutput Start Date to WorkOrderReleaseDate

If Call to ForwardBackwardScheduleDates fails

set Error Flag = 1

Endif

else

if input Order Release Days does not = 0

Move Fetched MVSTRT to WorkOrderReleaseDate

endif

endif

If Error Flag == 1

Error 1923 - Work Day Calendar is not setup

** end Convert Time Fence **

While WorkRecord < 54 and Fetch Record does not fail
If input Start Date <= MVSTRT

** ConvertF3430DataToString **

ConvertedArray[RecordCount] Date= Converted MVSTRT

If RecordCount > 3

** MarkTimeFences **

If WorkRawMaterialDate <= MVSTRT  and 

WorkRawMaterialDate > WorkPreviousDate

10th char ConvertArray[RecordCount]Date = "M"

Endif

If WorkFabDate <= MVSTRT  and 

WorkFabDate > WorkPreviousDate

10th char ConvertArray[Record Count]Date = "L"

Endif

If WorkReleasedDate <= MVSTRT  and 

WorkReleasedDate > WorkPreviousDate

10th charConvertArray[Record Count]Date = "R"

Endif

If WorkFrozenDate <= MVSTRT  and 

WorkFrozenDate > WorkPreviousDate

10th char ConvertArray[Record Count]Date = "F"

Endif

Data Structure

D3401120 - F3430 Determine Vendor Schedule


Data Item Data Structure DescriptionI/ORequiredNotes

DOCO            Document Number                  IYes      Key Field

DCTO            Document Type                  IYes      Key Field

KCOO            Document Company                  IYes      Key Field

SFXO            Suffix                        IYes      Key Field

LNID            Line Id.                        IYes      Key Field

STRT            Skip To Start Date            IYes      Positions pointer in F3430 

table

CNVQ            Conversion Factor                  I      Used for calculating 

quantities

PBUOPN      Open Quantity                  I

PBCDF1       Frozen Commitment Days            I

PBCDF2      Fabricated Commitment Days      I

PBCDF3      Raw Material Days                  I

PBCDF4      Order Release Days            I

PBVSST      Vendor Schedule Status            I

PBORFD      Frozen Days Flag                  I

PDMCU            Cost Center                        I

PDUOM3      Purchasing UoM                  I      Used with Mode=2

IMUOM1      Item UoM                         I        Used with Mode=2

CFRO            Cumulative Frozen                  ONo      For output to header part of 
form

CFAB            Cumulative Fabricated            ONo      For output to header part of 

form

CRAW            Cumulative Raw Materials      ONo      For output to header part of 

form

VSSP            Processing Option Value            IYes      The status beyond which 

changes 

                                                                        cannot be made to the vendor 

                                                                        schedule. 

EV03            Suppress Error Messages            INo      " " - display error messages 

                                                                        "1" - suppress error messages

DTAI            Error Message Id.             O      " " - no errors not blank - 

error                                                                               ID

EV02            Additional Records            O      " " - all records read (<= 52 


                                                                        records) "+"- additional 

records                                                                         exist (>52 )

JOBS            Job ID                        I      Input required if Updating  

F3430 

                                                                        Output if loading F34UI003

PID            Program ID                        IYes

CTID            Computer ID                        I      Input required if Updating 

F3430 

                                                                        Output if loading F34UI003

EV01            Call Type                        IY      1 = Normal Mode 

                                                                        2 = Update F3430 table  

                                                                        default = Error 

DATE01      Beginning Date            O      Only returned when Additional 

Records 

                                                                        contains a '+'

DATE02      End Date                        O      Only returned when Additional 

Records 

                                                                        contains a '+'

DATE03      First Date                        I      Only to be passed in when 

'More 

                                                                        Dates' or 'Previous Dates' 

has been 

                                                                        pressed from Form Exits.

MATH01      CumulativeQuantity            I/OY      Input and output required to 

save the 

                                                                        Cumulative quantity


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnOrderNumberDOCOMATH_NUMERICNONENONE

A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry, 
and so on.

szOrderTypeDCTOcharNONENONE

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

szOrderCompanyKCOOcharNONENONE

A number that, along with order number and order type, uniquely identifies an order document (such as a purchase order, a contract, a 
sales order, and so on). If you use the Next Numbers by Company/Fiscal Year facility, the Automatic Next Numbers program (X0010) uses the 
order company to retrieve the correct next number for that company. If two or more order documents have the same order number and order 
type, the order company lets you locate the desired document. If you use the regular Next Numbers facility, the order company is not used to 
assign a next number. In this case, you probably would not use the order company to locate the document.

szOrderSuffixSFXOcharNONENONE

In the A/R and A/P systems, a code that corresponds to the pay item. In the Sales Order and Procurement systems, this code identifies 
multiple transactions for an original order. For purchase orders, the code is always 000. For sales orders with multiple partial receipts against an 
order, the first receiver used to record receipt has a suffix of 000, the next has a suffix of 001, the next 002, and so on.

mnLineNumberLNIDMATH_NUMERICNONENONE

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

jdStartDateSTRTJDEDATENONENONE

The start date for the order. You can enter this date manually, or have the system calculate it using a backscheduling routine. The routine 
starts with the required date and offsets the total leadtime to calculate the appropriate start date.

mnConversionFactorCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

mnOpenQuantityUOPNMATH_NUMERICNONENONE

The original quantity for the order detail line, plus or minus any changes to that quantity, minus all quantities shipped, received, and 
vouchered to date.

mnFrozenCommitDaysCDF1MATH_NUMERICNONENONE

The number of workdays from the generation start date that the quantity buckets will be frozen with no changes and releases possible. This 
value is also used to calculate the cumulative frozen quantity (see CFRO).

mnFabCommitDaysCDF2MATH_NUMERICNONENONE

The number of workdays, from the generation start date, that the customer guarantees the fabrication costs for the quanity ordered.

mnRawMaterialDaysCDF3MATH_NUMERICNONENONE

The number of workdays, from the generation start date, that the customer guarantees the raw material costs for the quantity ordered.

szVendorScheduleStatusVSSTcharNONENONE

The current status of the supplier schedule. This is updated as the schedule moves through the system.

cFrozenDaysFlagORFDcharNONENONE

Indicates whether the Frozen Days (CDF1) value used in planning the supplier schedule was overridden and a value of 'Zero' was used 
instead.  Controlled by a processing option in the generation program, a value of 1 indicates that the generation ignored frozen time fence day 
limitations and allowed processing inside the frozen time fence.  This is used to allow schedule initialization or procedural error recovery.

szCostCenterMCUcharNONENONE

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.

mnCumFrozenCFROMATH_NUMERICNONENONE

The quantity inside the Frozen Time Fence that the customer is planning to release or has already released to the supplier.

mnCumFabCFABMATH_NUMERICNONENONE

The running total of the item for which you could be exposed to fabrication costs by the supplier. This is calculated as the quantity planned 
for release up to the fabrication time fence.

mnCumRawMaterialsCRAWMATH_NUMERICNONENONE

The quantity for which you could be exposed to raw material costs by the supplier. This is calculated as the quantity planned for release up 
to the raw material time fence.

szProcOptValueVSSPcharNONENONE

User defined codes (system 40/type SP) that identify the shipping and delivery arrangement you have established with the supplier for this 
item. It can be specific Workday Calendar days on which the supplier agrees to make shipments,a range of days, such as a specific week 
during the month, or some other arrangement unique to your business. You can add new codes to suit your needs.

cSuppressErrorMessagesEV03charNONENONE

A radio button that specifies the level at which trace/track result is to be displayed.  Select the Detail to display all transactions except IB, IX, 
and IZ types.  Or, select Derivative Lots Only to display only those transactions that may have created new derivative lot. 

szErrorMessageIDDTAIcharNONENONE

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.

cAdditionalRecordsEV02charNONENONE

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

mnJobNumberJOBSMATH_NUMERICNONENONE

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

szProgramIDPIDcharNONENONE

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.

szComputerIDCTIDcharNONENONE

cModeEV01charNONENONE

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

mnOrderReleaseDaysCDF4MATH_NUMERICNONENONE

A time fence that indicates the number of workdays from the generation start date to use when identifying the cutoff date for actual blanket 
order releases. The system uses the time fence when the supplier schedule release generation program is run.

szUnitOfMeasurePurchasUOM3charNONENONE

A code (table 00/UM) that identifies the unit of measure in which you usually purchase the item.

szUnitOfMeasurePrimaryUOM1charNONENONE

A user defined code (00/UM) that identifies the unit of measure that the system uses to express the quantity of an item, for example, EA 
(each) or KG (kilogram).

szStandardUOMConversionTFLAcharNONENONE

Allows you to bypass the item-specific unit of measure and use the standard unit of measure. Valid values are:    blank Use the item-specific 
unit of measure    1       Bypass the item-specific unit of measure and use the standard unit of measure

jdEndDateDATE01JDEDATENONENONE

Event point for JDE Date.

jdBeginningDateDATE02JDEDATENONENONE

Event point for JDE Date.

jdFirstDateDATE03JDEDATENONENONE

Event point for JDE Date.

mnCumulativeQuantityMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

mnIdentifierShortItemITMMATH_NUMERICOPTNONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

Related Functions

B3100300 Forward Backward Schedule Dates
B3100710 Get Job Number
B4000520 Get Item UoM Conversion Factor
B9800100 Get Audit Information

Related Tables

F3430 Vendor Schedule Quantity File
F34UI003 MPS Time Series User Index
e; left: 0.600000in">Convert Array[1] Cumulative = Converted Open Quantity (Conv Factor)

Convert Array[1] Released = Converted Open Quantity (Conv Factor)


** end InitConvertedArray **

Set WorkRecordCount = 2 /* Start of Dates Conversion */


** Convert Time Fence days to Julian Dates (TimeFence) **

Set WorkCDF1 = input Frozen Commit Days

WorkCDF2 = input Fab Commit Days

WorkCDF3 = input Raw Material Days

WorkCDF4 = Order Release Days

Error Flag = 0

if WorkCDF1 >= 1

Subract 1 from WorkCDF1

endif

if WorkCDF2 >= 1

Subract 1 from WorkCDF2

endif

if WorkCDF3 >= 1

Subract 1 from WorkCDF3

endif

if WorkCDF4 >= 1

Subract 1 from WorkCDF4

endif

If WorkCDF1 > 0

Call ForwardBackwardScheduleDates passing:

input Cost Center, MVSTRT, WorkCFD1, "F"

Copy CallOutput Start Date to WorkFrozenDate

If Call to ForwardBackwardScheduleDates fails

set Error Flag = 1

EndIf

else

if input Frozen Days does not = 0

Move MVSTRT to WorkFrozenDate

endif

endif

if WorkCDF2 > 0

Call ForwardBackwardScheduleDates passing:

input Cost Center, MVSTRT, WorkCFD2, "F"

Copy CallOutput Start Date to WorkFabDate

If Call to ForwardBackwardScheduleDates fails

set Error Flag = 1

Endif

else

if  input Fabricated Days does not = 0

Move MVSTRT to WorkFabDate

endif

endif

if WorkCDF3 > 0

Call ForwardBackwardScheduleDates passing: