What do we know about the general parameter PRIFLG?

1 minute read time.
  • This parameter is used within the purchase documents for stock valuation calculation.
  • When an invoice, credit memo or an additional invoice is validated, one or several records get created for each document line in the PTDSTKVAL table.
  • Please refer to the online help for more information.
  • The default value of this parameter is set to ‘No’ and once it is changed to ‘Yes’, PTDSTKVAL table will start recording multiple records.
  • Additionally, once set to 'Yes', have transactions in this table and accounting interface is run, application will prevent changing this flag back to 'No' by design, to prevent potential data inconsistencies.
  • This general parameter is located under chapter ACH, group REC, PRIFLG (full stock valuation).
  • When the value of this parameter is set to ‘No’, PTDSTKVAL table is not populated.
  • Once the parameter is modified you can check the global variable GPSVSTRDAT to see the when the parameter was changed.
  • When you have multiple invoices with price variance and the parameter is set to ‘No’, stock cost per unit is calculated based on the stock cost per unit of the first invoice.
  • On the other hand if the parameter set to ‘Yes’, the stock cost per unit is calculated based on the stock cost per unit from the first invoice and of the stock cost per unit from the second invoice.

To illustrate this process:

  1. Generate a PO with a quantity of 10 and a unit amount of $100
    • Line amount – tax: $1000 
    • Cost total: $100
    • Stock cost: $1100 
    • Stock cost per unit: $110
    • Generate a partial invoice against the order for a quantity of 4, unit price of $100 = $400.
  2. Invoice the remaining quantity of 6 with a unit price of $160 (price variance) = $960.
  3. Receive the order completely.

If the parameter is set to ‘No’:

  • The stock cost per unit is $110, calculated based on the stock cost per unit of $110 from the first invoice.
  • Table is not populated.

Receipt stock journal

If the parameter is set to ‘Yes’:

  • The stock cost per unit will be $146, calculated based on the stock cost per unit of the first invoice $110 and the stock cost per unit of the second invoice $170.
  • Table is populated.

Receipt stock journal

PTDSTKVAL Table

Now you have an idea as to what this parameter is all about.