Scripting Post-calculation

Administration > Setup > Precalculation > Calculation schema > Calculation objects > Calculation Objects Edit > Scripting > Scripting Post-calculation

Top  Previous  Next
Expand/Collapse Toggles

Additional information are available in the post-calculation. The calculation is executed differently as in the Precalculation. That is why the script must be created separately for the post-calculation.

 

Note:

No all variables are available in DataWindow dw_1 if the calculation results in the background (eg. at a posting-in assembly)

hmtoggle_plus1Available variables:

 

Per calculation object the script is executed four times. In variable <sum.typ> is is stored, which value is calculated currently:

mc.plan

Planned costs at marginal costs

mc.actual

Current costs at marginal costs

fc.plan

Planned costs at full costs

fc.actual

Current costs at full costs

 

The following variables are available:

sum.typ

What is calculated (see above)

sum.material

Material costs without surcharges, without external operations

sum.labor

L+M costs

sum.manufacturing

Cost of external operation

sum.production

Production costs - including all surcharges until this calculation object

sum.quantity

At mc.typ = mc.plan or fc.plan the planned quantity, otherwise the current quantity

At projections always the projection quantity

 

You can set the following values:

cost

Surcharge costs - separately for the currently calculated value (see sum.typ).

description

Description - transferred from the latest set value.

 

Available basic variables

Note: It is not mandatory to set these variables. If empty, default values are used.

e_von

Valuation considered from date

e_bis

Valuation considered to date

e_batch

J = Batch-calculation - no output on screen

e_schema_id

Default - Calculation schema, if empty, automatic determination

e_postcalcquantity

set only in case of single step calculation:
Conversion to the defined quantity independent from planned or reported quantity

e_receiptquantity

Is set, if the calculation is called up at posting in goods. The quantity to post in is entered

e_postcalcorder

Determines, whether purchase orders for external operations are to be considered. True or J = consider, false or N = not to consider

e_costrate

Alternative resource cost rates

e_onelevel

Determines the extended pricing of storage related sub-assemblies in post-calculations (setup: onelevelcalc)
S=Standard, V=determine prices from last Precalculation

str_parm.belnr_id

Document number (BEAS_FTHAUPT.BELNR_ID)

str_parm.belpos_id

Document position (BEAS_FTPOS.BELPOS_ID)
If 0, all document positions

 

Furthermore, you can access all values of dw_1.

Note: Not all fields are filled for calculations running in the background ( for example, when posting in an assembly).

 

hmtoggle_plus1Example
hmtoggle_plus1Example: L+M Cost always to Planned costs

 

(beas9.1-004-064-000)


Help URL: https://help.beascloud.com/beas202402/index.html?scripting_postcalculation.htm