ProcessIntegrityAnalysis

Process Integrity Analysis

Major Business Rule

Object Name: B3001270

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This function will assist P30601 (Bill of Material Structure Analysis) in exploding Bills of 
Materials.  This function will read through the entire Bill of Material File (F3002) and update the Item 

Master (F4101) and the Item Branch (F4102) files with the calculated Low Level Code.  


1.2Setup Notes and Prerequisites

Before calling this function Get Audit Information (B9800100) should be called to retrieve the 
parameters to be sent in.


1.3Special Logic

This function uses a temporary work file F30UI002 to save Item Numbers read from F3002.  While 
exploding the bill this file will be updated with Item Numbers and levels.  Error messages will also be set 

by this function.  R30601 will call Intialize PPAT Error Message API (B0100025) and Error Message 

Processor to PPAT System (B0100011)
 to send the error messages generated by this function to PPATs.

2.Technical Specifications

2.4Processing 

For all records being inserted or updated to F30UI002, assign LocalComputerName to IXCTID_F30UI002 

and a unique number to IXUKID_F30UI002.

For all records read from F30UI002, IXCTID_F30UI002 should equal LocalComputerName.

Initialize LineID to '1'


If Mode = '1'


I.  Begin reading all F3002 records sequentially.  Until the end of the file is reached perform the 

following:

A.  If there was a record lock on F3002 call jdeSetGBRErrorSubText with error message 023B and  

     IXKIT_F3002 and IXMMCU_F3002 in the data structure for the message and do not continue.

1.  If IXKIT is not equal to '0' and IXITM is not equal to '0' and IXCOBY is not equal to 

'I' 

a.  Assign the following values:

IXKIT_F3002toSaveParentItem

IXITM_F3002toSaveComponentItem

IXMMCU_F3002toSaveParentBranch

IXCMCU_F3002toSaveComponentBranch

IXCPNT_F3002toSaveLineNumber

IXBQTY_F3002toSaveBatchQuantity

IXUOM_F3002toSaveUnitofMeasure

IXTBM_F3002toSaveTypeBillofMaterial

'1'toLevel


b.  Find F30UI002 record with IXKIT_F3002 = IXITM_F30UI002 with  

   IXMODE_F30UI002equal to '3'.

     If the item exists and Level is greater than XLLX_F30UI002

Assign Level to IXLLX_F30UI002

Update F30UI002 with new level

Otherwise

Assign IXKIT_F3002 to IXITM_F30UI002

Assign Level to IXLLX_F30UI002

Assign '3' to IXMODE_F3002UI001

Update F30UI002 

c.  Add '1' to Level

d. Find F30UI002 record with IXITM_F3002 = IXITM_F30UI002 with  

   IXMODE_F30UI002 equal to '3'.

     If the item exists and Level is greater than XLLX_F30UI002

Assign Level to IXLLX_F30UI002

Update F30UI002 with new level

Otherwise

Assign IXKIT_F3002 to IXITM_F30UI002

Assign Level to IXLLX_F30UI002

Update F30UI002 

e.  Assign IXITM_F3002 to IXKIT_F3002 and IXCMCU_F3002 to  

    IXMMCU_F3002.  Assign '0' to LOOP.

f.  Delete all records in F30UI002 with IXMODE_F30UI002 equal to     

'1' and '2'.

g.  While LOOP = 0 read F3002 record using values in IXKIT_F3002     

and IXMMCU_F3002.  Do not process records with IXCOBY_F3002     = 'I' and IXKIT_F3002 = 

'0' and IXITM_F3002 = '0'.  If a     record lock occured, call jdeSetGBRErrorSubText 

with error     message 023B and IXKIT_F3002 and IXMMCU_F3002 in the data  

   structure for the message and do not process record. If     IXITM_F3002 is equal to 

SaveParentItemNumber or IXITM_F3002     is equal to SaveComponentItemNumber call 

jdeSetGBRError with     error message 023F and do not process record  (Only issue  

   this error once.  Goto IV and return here).  If not     processing the record 

read go to step 4.

    If processing record:

1. Find F30UI002 record with IXITM_F3002 = IXITM_F30UI002  

  with IXMODE_F30UI002 equal to '3'.

     If the item exists and Level is greater than XLLX_F30UI002

Assign Level to IXLLX_F30UI002

Update F30UI002 with new level

Otherwise

Assign IXITM_F3002 to IXITM_F30UI002

Assign Level to IXLLX_F30UI002

Update F30UI002 

2.  Find F30UI002 record with IXITM_F3002 = IXITM_F30UI002  

   with IXMODE_F30UI002 = '2'.

     If no record is found, add a record with IXITM_F3002  

    equal to IXITM_F300UI001 and IXMODE_F300UI001equal to      '1' and a record 

with IXMODE_F30UI002 equal to '2'.

3.  Return to step 'g' to continue reading F3002.

          End Processing Record

4.  Read to first value in F30UI002 with IXMODE_F30UI002  

   equal to '1'.

     If no record was found assign a '1' to LOOP.

 If LOOP is not equal to '1'  

5.  Assign IXITM_F30UI002 to IXKIT_F3002.

6.  Dellete the record just read from F30UI002.

7. Find F30UI002 record with IXKIT_F3002 = IXITM_F30UI002  

  with IXMODE_F30UI002 equal to '3'.

     If the item exists 

Assign IXLLX_F30UI002 to Level

Otherwise

Add '1' to Level

Return back to 'g'.

End While LOOP = '0'


II.  If no errors occurred update F4101 and F4102

A.  For each record in F30UI002 with IXMODE_F30UI002 equal to '3'

1.  Find F4101 record with IMITM_F4101 equal to IXITM_F30UI002.

a.  If no record is found call jdeSetGBRErrorSubText with error     

message 023C. Send IXITM_F30UI002 into the data structure     for the error. 

b.  If record lock jdeSetGBRErrorSubText with error message    

023D. Send IMITM_F4101 into the data structure for the error. 

c.  If  a record was found and there was not a record lock:

1.  Update the F4101 record with: 

IMLLX= IXLLX_F30UI002

IMUSER = UserID

IMPID = ProgramID

IMJOBN = JobNumber

IMUPMJ = Today's Date

IMTDAY = Time of day

2.  Find F4102 records with IBITM_F4102 equal to     

IXITM_F30UI002

a.  If no record found go to 'A'

b.  If record lock jdeSetGBRErrorSubText with error  

   message 023E.  Send IBITM_F4102 and IBMCU_F4102     into the data 

structure for the error.

c.  If a record was found and no record lock:

IBLLX = IXLLX_F30UI002

IBUSER = UserID

IBPID = ProgramID

IBJOBN = JobNumber

IBUPMJ = Today's Date

IBTDAY = Time of day


III.  Clear all records in F30UI002 with:

IXCTID_F30UI002=LocalComputerName

IXMODE_F30UI002!='4'


Recursive Bill Error Processing Only

IV.  If Recursive Bill Processing:

A.  Assign the following values:

SaveParentItemtoIXKIT_F30UI002

SaveComponentItemtoIXITM_ F30UI002

SaveParentBranchtoIXMMCU_ F30UI002

SaveComponentBranchtoIXCMCU_ F30UI002

SaveLineNumbertoIXCPNT_ F30UI002

SaveBatchQuantitytoIXBQTY_ F30UI002

SaveUnitofMeasuretoIXUOM_ F30UI002

SaveTypeBillofMaterialtoIXTBM_ F30UI002

LineIDtoIXLNID_F30UI002

'4'toIXMODE_F30UI002


B.  Insert the record into F30UI002.


C.  Assign the following Values:

IXKIT_F3002toIXKIT_F30UI002

IXITM_F3002toIXITM_ F30UI002

IXMMCU_F3002toIXMMCU_ F30UI002

IXCMCU_ F3002toIXCMCU_ F30UI002

IXCPNT_ F3002toIXCPNT_ F30UI002

IXBQTY_ F3002toIXBQTY_ F30UI002

IXUOM_ F3002toIXUOM_ F30UI002

IXTBM_ F3002toIXTBM_ F30UI002

LineIDtoIXLNID_F30UI002

'4'toIXMODE_F30UI02


D.  Insert the record into F30UI002.


E.  Add '1' to LineID.


If Mode '2'


I.  Delete all records in F30UI002 with IXCTID_F30UI002 equal to LocalComputerName.

^

Data Structure

D3001270 - Process Integrity Analysis

Parameter NameData ItemData TypeReq/OptI/O/Both
szUserIDUSERcharNONENONE

The code that identifies a user profile.

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.

szJobNumberJOBNcharNONENONE

The code that identifies the work station ID that executed a particular job.

szLocalMachineNameCTIDcharNONENONE

cModeMODEcharNONENONE

The processing mode used in Purchase Order Consolidator to signify when specific orders are being processed.

cErrorFlagEV01charNONENONE

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

Related Functions

None

Related Tables

F3002 Bill of Material Master File
F30UI002 Bill of Material Structure Analysis Work File
F4101 Item Master
F4102 Item Branch File