F32921GetValuesSequentially

F32921 Get Values Sequentially

Major Business Rule

Object Name: B3200260

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description
This business function will get all the Values  from the F32921 table for a given Parent Item, 
Branch, Rule,Sequence Number and fcod.


1.1Purpose


1.2Setup Notes and Prerequisites
The first time the function is called, pass a '1' in the Type parameter so the Request is not 
released. To get the next value in the table, pass a '2' in the Type parameter. To release the request, pass 

a '3' in the Type parameter.


1.3Special Logic


2.Technical Specifications

2.4Processing 
1. If the Input Request Type = '3', Release the Request and exit the Business    function.
2. If the Input Request Type is '1', Get the row (F32921) using KIT, MCU,ATOS and    ATO_1,FCOD as 
partial Keys. Return SVL

3. If the Request Type = '2', read the next F3003 row using the above keys. Return    SVL

4. If row is found

Wk Selected flag = 1.

If input EV01 <> '1' 

If ASDE1 < IREFFF or ASDE1 > IREFFT

Wk Select flag = 0.

Endif

Endif

    Else

Release the Request and Exit.

    Endif.

5. If Wk Select flag = 1, Do the following calculations otherwise go to step 3.

    a. Get the Item Master (F4101) using IRKIT and IRMMCU as the keys.

    b. Get the Line type constants row (F40205) using IMLNTY as the key.

    c. Check for Intermediates as given below.

I. Get the Inter row from F3111 (B3100340) using COBY( = 'I') , DOCO and       OPSQ(= IROPSQ).

    If Row is found,

Output Inter Flag = 1.

Output QNTY =  WMUORG

Output IQTY   =  WMUORG

Output UM      =   WMUM

If WMCPYP <> 0

 Output IQTY = MathRound (Output IQTY * WMCPYP /100)

Endif

If IRCPYP <> 0

Output IQTY = MathRound (Output IQTY *100/ IRCPYP)

Endif

    Endif

II. If Intermediate flag <> 1, Check for Inter (B3000060) using COBY (=I),           IRKIT, 

IRMMCU, TBM(=IRTRT), IRBQTY, IROPSQ as parameters.

     If row is found and ASDE1 >= IXEFFF and ASDE1 < IXEFFT

Output Inter Flag    = 1.

Output UM = IXUM.

Get Item Master (F4101) using IXITM and IXCMCU as keys

If row found

Output IQTY  = IXQNTY.

Output QNTY = IXQNTY.

If IRCPYP <> 0

Output IQTY = Output IQTY * 100/IRCPYP

Endif

 Save the Current F3003 Row and read the next F3003 row.

If the next row is found and IRCPYP <> 0

Output QNTY = Output QNTY * 100/IRCPYP

Endif

Restore the Previous Row

If IXFORQ = 'F'or '%' and  IXBQTY <> 0

Else

Output IQTY = Output IQTY * Input UORG.

Output QNTY = Output QNTY * Input UORG.

Endif.

If IMSNS = 'R'

MathRound (Output QNTY)

MathRound (Output IQTY )

Endif.

Endif

  Endif

d. Check for Ingredients as under.

I. Get the Intgredients row from F3111 (B3100340) using COBY( = ' ') , DOCO,           OPSQ(=  

  IROPSQ).

    If Row is found,

Output Ingred Flag = 1.

    Endif

II. If Ingred flag <> 1, Check for Ingredients (B3000060)  using COBY (= '             '), 

IRKIT, IRMMCU, TBM(=IRTRT), IRBQTY, IROPSQ, ASDE1 with effective           date checking.

     If row is found

Output Ingred Flag   = 1

     Endif

e. Check for Co/By products as under.

I. Get the Co Prod row from F3111 (B3100340) using COBY( = 'C') , DOCO and           OPSQ(= 

IROPSQ)     If Row is found,

Output Co/By Flag = 1.

    Else

   Get the By Prod row from F3111(B3100340)using COBY( = 'B'),DOCO and OPSQ. 

If Row is found

Output Co/By Flag = 1

Endif 

    Endif

II. If Co/By flag <> 1

If LFIVI = 'Y' or 'D' and IMUOM1 <> Blanks

Wk UOM = IMUOM1

Else

Wk UOM = IRUOM

Endif

Convert IRBQTY from IRUOM to Wk UOM using business function             (B4000520).

If no Errors, IXQNTY = Converted Qty else IXQNTY = IRBQTY.

Get F3002 row (B3000060) using COBY (= 'C'), IXITM(=IRKIT),                               

    IXCMCU(=IRMMCU),TBM(=IRTRT), IXQNTY, IXUM (= IRUOM) and             IXOPSQ(=IROPSQ).

If found

Output CoBy Flag   = 1

Else

Get F3002 row (B3000060) after changing IXCOBY = 'C'

If Found

Output CoBy Flag = 1

Endif

Endif

    Endif.

f. Convert Quantities into Corresponding Unit of Measure.

Wk WUORG = Input TRQT.

If Output UM <> Blanks

Wk WUORG = Output IQTY

Wk RUORG = Output IQTY.

Else

If LFIVI = 'Y' or 'D'

Wk UOM = IMUOM1

Else

Wk UOM = IRUOM

Endif

Convert Input TRQT from Wk UOM to IRUOM using business function             (B4000520).

Wk RUORG = Converted Qty from function.

Convert Wk WUORG from Wk UOM to IRUOM using business function             (B4000520).

Wk WUORG = Wk Qty1.

Endif.

h. Convert time basis code IRTIMB to Quantity using business function B3000330. If    no errors 

Wk TIMQ =  Output from function 

else 

Wk IMQ = 1.

j. Calculate Output RUNM, RUNL using B3000220 using Wk RUORG as the Quantity in     Mode 3. If Output 

UM is not blanks, pass '1' to intermediate item flag.

Repeat the same with Wk WUORG and Load the Output Cost RUNL and RUNM. 

g. Load all Other Output fields from F3003.


6. If any errors, Release the request and exit the function with the Error Code          value as 

'1'.   



^

Data Structure

D3200260 - F32921 Get Values Sequentially

Parameter NameData ItemData TypeReq/OptI/O/Both
cFileCodeFCODcharNONENONE

The file code is used in the *RANGE and *VALUE file for configurations to determine if the *RANGE or *VALUE goes with a "IF" statement, a 
"THEN"statement or with an assembly inclusion rule statement.

szBranchMCUcharNONENONE

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.

mnParentItemNumberKITMATH_NUMERICNONENONE

The system provides for three separate item numbers.    1.   Item Number (short) - An eight-digit, computer assigned, completely 
non-significant item number.    2.   2nd Item Number - The 25-digit, free form, user defined alphanumeric item number.    3.   3rd Item Number - Another 
25-digit, free form, user defined alphanumeric item number.

mnRuleNumberATO#MATH_NUMERICNONENONE

The number associated with a set of cross-segment editing rules or assembly inclusion rules.

mnSequenceNumberATOSMATH_NUMERICNONENONE

The Sequence number is the rule number within an edit group of cross-segment editing rules or assembly inclusion rules. You can insert a 
line within a rule to assign a new sequence number.

idRequestHandleGENLNGIDNONENONE

General purpose ID variable.

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.

cSuppressErrorMessagesEV01charNONENONE

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

cEndOfFileEV01charNONENONE

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

cRequestTypeEV01charNONENONE

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

mnNumberInKeyMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

szSelectionValueSGVLcharOPTNONE

An answer to the configurator feature and option questions that appear during order entry. When you define cross-segment editing rules, 
you compare the segment answers to values to determine invalid configurations. When you define assembly inclusion rules, you create unique 
configurations by comparing the segment answers to values to assign parts, prices, calculated values, or routing steps.

Related Functions

None

Related Tables

F32921 Cross Segment Editing Rules - Values