GenerateSOIndependentWorkOrder

GenerateSOIndependentWorkOrder

Minor Business Rule

Object Name: B3201850

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
The Business Function will be used to create SO independent Work Orders (when user sets WADL = 0 in Assembly Inclusion Rules). This function is 

designed to take care of GAPS in SO Cache, as well as to create WOs for all children in one call (mnMaxWOLineIndex == ZERO).

 

1.2Setup Notes and Prerequisites
This function assumes B3200370 and B3201470 caches exist prior to running this function, as well as WO cache.


1.3Special Logic

None


2.Technical Specifications


2.1Parameters:

Data Item Data Structure DescriptionI/ORequiredNotes JOBSJob NumberIRCache Job Number LNIXmnLastWOLineIndexIOStarting point for 

processing if passed , otherwise begin index is retrieved from  B3201470 LNIXmnMaxWOLineIndexIOEnd point for processing if passed, otherwise max index 

is retrieved from B3201470 Note: If this value is passed, mnLastWOLineIndex value need to be passed too, in this case calling sytem is responsible to 

keep track of last value used. VC04AszProcessModuleIRIf SY == 42 than SALE EV01cModeIRB - Batch Mode is not recommended ( it is called 

automatically), use F mode PIDszProgramIdIO SYszSystemCodeIRi.e. 42, 48, 31 DOCOmnSONumberIR ACTNcSOActionCodeIRC for change, A for 

Add HOLDszSOHeaderHoldCodeIO DCTOszSOOrderTypeIR KCOOszSOCompanyKeyOrderNoIRIf SY == 48 or 31 than * SFXOszSOOrderSuffixIRIf SY == 48 or 

31 than * SUPPScSuppressErrorMessageIO DTAIszErrorMessageIDOO EV01cClearWOWorkFileIOPass 1 if you want to clear WO Work File,  

otherwise calling system is responsible for it.


2.2Related Tables 

Table Table Description


2.3Related Business Functions

Source NameFunction 

Name B3200370CacheProcessAllComponents B3201470CacheProcessConfigurationID X4801F4801EditLine X4801F4801EndDocument


2.4Processing

 bProcessOK           = TRUE

If (mnMaxWOLineIndex == 0)

    If (cMode != B)

       bWOEndDocBatchMode  = TRUE

      Call I3201850_GetConfigurationID 

      If (mnConfigurationID != 0)

        Call I3201850_GetMaxWOIndex

       mMnLimitWOLineIndex = mnMaxWOLineIndex + 1

      End If

   Else

      bProcessOK           = FALSE

      bWOEndDocBatchMode  = TRUE

   End If


Else

   MnLimitWOLineIndex = mnMaxWOLineIndex

End If

If (bProcessOK == TRUE)

   mnConfigWOIndex = mnLastWOLineIndex + 1

   bWOLineIndexExists =

            Call I3201850_CacheVerifyWOIndexExists

   If (bWOLineIndexExists == TRUE)

       Call F4801EditLine

       If (cErrorCode =!= 2)

          If (szLineIdentifier != BLANK AND cStockingType != C)

             Call I3201850_LoadAddChangeRate

             If (cSOActionCode == A)

                Call F4801AddRate

            Else

               Call F4801ChangeRate

            End If 

         Else

             If (cSOActionCode == C)

                Call F31091ProcessMasterData

                Call I3201850_CallWorkOrderEndDoc

             End If

          End If

       End If 

       mnLastWOLineIndex = mnConfigWOIndex

       mnConfigWOIndex  = mnLastWOLineIndex + 1

   End If 

End If

If (bWOEndDocBatchMode   == TRUE)

   I3201850_CallWorkOrderEndDoc

   If (cClearWOWorkFile == 1)

     Call I3201850_ClearWOWorkFile

   End If

End If




3.2 Where Used: APPs/UBEs/NERs/BSFNs


Application/Business Function B4200310F4211FSEndDoc

Data Structure

D3201850 - GenerateSOIndependentWorkOrder

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobNumberJOBSMATH_NUMERICOPTNONE

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

mnLastWOLineIndexLNIXMATH_NUMERICOPTNONE

mnMaxWOLineIndexLNIXMATH_NUMERICOPTNONE

szProcessModuleVC04AcharOPTNONE

This is a generic field used as a work field in Everest.

cModeEV01charOPTNONE

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

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.

szSystemCodeSYcharOPTNONE

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

mnSONumberDOCOMATH_NUMERICOPTNONE

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.

cSOActionCodeACTNcharOPTNONE

A code that specifies the action that is performed. Valid values are: A Add C Change

szSOHeaderHoldCodeHOLDcharOPTNONE

A user defined code (42/HC) that identifies why an order is on hold.

szSOOrderTypeDCTOcharOPTNONE

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

szSOCompanyKeyOrderNoKCOOcharOPTNONE

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.

szSOOrderSuffixSFXOcharOPTNONE

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.

cSuppressErrorMessageSUPPScharOPTNONE

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.

szErrorMessageIDDTAIcharOPTNONE

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.

cClearWOWorkFileEV01charOPTNONE

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

Related Functions

None

Related Tables

None