SAP PP tables & link between them

  • CAUFV – OF – Données générales
  • AUFK – Orders de process – Master data
  • AFKO – Ordres de process – Entête
  • AFPO – Ordres de process – postes
  • AFVC – Operations dans un ordre
  • PLKO – Gammes – Entête
  • PLKZ – Gammes – Entête central
  • STKO – BOM nomenclature – Entête
  • STPO – BOM nomenclature – postes
  • MAST – Lien BOM / Articles
  • CHRD – Workcenter / Poste de travail
  • MKAL – Production version
  • JEST – Status des objets (AUFK-OBJNR = JEST-OBJID)

MDKP – Image du dernier MRP (utilisé pour MD07). Contient les couvertures 1, 2 et 3. A utiliser après avoir lancé un MRP.

Taken from : https://sap4tech.net/sap-production-order-tables/

SAP Production Order Tables and Join Between PO Tables (AUFK, AFVC, AFFL, AFRU…)

SAP Production Order Tables: find the most important SAP Tables used for Production Orders.

SAP PO Tables, in this article, will be classified by topics including: AFKO, AFVC, Status, Operation, Routines, Confirmations, missing Parts Tables, SAP CIM Order Tables.

As bonus, you will find some useful join condition to retrieve data of Production Order data for Standard SAP Tables.

SAP Production Order Tables

What’s Production Order in SAP

Production orders are a fundamental part of Production Planning and Control (PP).

PP is fully integrated in the Logistics (LO) component and has, among others, interfaces to

  • Sales and Distribution (SD)
  • Materials Management (MM)
  • Controlling (CO)

Source: Production Orders (PP-SFC)

Main SAP Production Order Tables

The main Production order tables name in sap are

  • AUFK Production order headers
  • AFKO Order header data PP orders
  • AFPO Order item

Check also SAP Production Orders Tcodes and SAP Planning Order Transactions

Join Between AUFK and AFPO

To retrieve Order Header from PP Production Order, join between

AUFK (Order header) and AFPO on field AUFNR

SAP PO Status tables

The main Production Order Status tables are:

  • JSTO Status profile
  • JEST Object status
  • TJ30 user status codes
  • TJ31 process control user status

How to find Status of SAP Production Order ?

In order to find SAP Production Order Status make a join between
AUFK (Order header) & JEST (active Status) on OBJNR

Link between JEST and TJ31 is set on STSMAS and ESTAT.

Alternatively, you can use the SAP Standard BAPI to read Production Order status: call function ‘STATUS_READ’ exporting OBJNR = L_AUFNR ONLY_ACTIVE = ‘X’ tables STATUS = IT_JEST exceptions OBJECT_NOT_FOUND = 1 others = 2.

SAP Production Order: Operation Table AFVC

The Production Order Operation can be found in the following Tables

  • AFVC Order operations
  • AFVV Quantities/dates/values in the operation
  • AFVU User fields of the operation

SAP Production Order: SAP Routing Tables

The Routing for Production Orders tables are:

  • AFFL Work order sequence
  • AFFH PRT assignment data for the work order (routing)

The link between AFKO (Order header) & AFVC (order routing) is set on field AUFPL

Sap production order confirmation table

SAP Order Confirmations are stored in

  • AFRU (confirmation)

To retrieve the confirmation of a SAP Production Order;
join between AFVC (order routing) and AFRU (confirmation) on : AUFPL & APLZL & PLNFL & VORN

Sap production order Tcode and Transaction

Find the list of the most important SAP Tcodes for SAP Production Orders and Planned Order in SAP PP in the following Post SAP Production Orders Tcodes.

Production Order Tables in SAP PP

SAP PP Confirmations for SAP Production Orders Tables

The following list is the SAP Tables for Production Orders Confirmation in SAP PP

TablesSAP PRODUCTION ORDER TABLES
AFFWGoods movements with errors from confirmation
AFRCTable of planned changes to conf.: Automatic
AFRDDefault values for collective confirmation
AFRHHeader information for confirmation pool
AFRP1Table of planned changes to conf.: Automatic
AFRP2/3/4Table of planned changes for confirmation: A/B/Data
AFRUOrder completion confirmations
AFWISubsequently posted goods movements for conf
TAFWDCORU: Messages that are not interpreted
TCORDTable for field-dependent check routines
TCORUParameters for order confirmations
TCORVTable with Routines for structuring variable
TCORWConfirmation: Window Control
TPARUControl paralleled confirmation processes
TPRRUControl table for process chain for confirmation
TPRRUTText table for process control of confirmation
TRUGSUser status caused by deviation

Source:Table name & field name for production order & operation confirmation

List of SAP PP Production Order Data Tables

The following list is the SAP Production Order Tables in SAP PP.

These SAP PO Tables stored all the PO Data:

TablesSAP PRODUCTION ORDER TABLES
AFBPCIM order: Batch print requests
AFFLWork order sequence
AFKOOrder header data PP orders
AFPOOrder item
AFVCOperation within an order
AFVUDB structure of the user fields of the opera
AFVVDB structure of the quantities/dates/values
FAPWIndex of production-/issuing plant for production
ORDCOMCommunication control Operation download

SAP Print PP Tables

SAP Print PP Tables handles the output of PP Documents.

PRINT PP TABLESDESCRIPTION
T496PPrint PP documents: Determination of output
T496RPrint PP shop papers: Report control
T496TSAP Print PP shop papers: Transaction control
T496VPP Print: Default Value for Printing Online

SAP CIM Order Tables in PP

The following List contains Related SAP CIM Tables in PP.

TablesSAP CIM ORDER TABLES
T496BCIM order: Assigning document types to refer
T496DCIM: Destination/lists/spool parameters per
T496FCIM order: Form description of the list
T496KCIM order: Entity table of possible table id
T496NList descriptions for CIM order Table
T496ZCIM order: Table-controlled table access
TCO03CIM order: Texts for TCO01
TCO41Default values for generating operation in CIM order
TCO09CIM order: Text IDs of objects in orders

SAP Missing Parts Tables

Here another list of SAP PP Tables related to Production Order Process.

The main SAP Missing Parts Tables are:

TablesSAP MISSING PARTS TABLES
TCOFProfile for missing parts info system
TCOFFProfile for Missing Parts Info System: Display
TCOFFTTexts for Missing Parts Info System: Display
TCOFGProfile for missing parts info system: Criteria
TCOFGTTexts for Missing Parts Info System: Criteria
TCOFKTexts for functions in milestones/trigger
TCOFSProfile for Missing Parts Info System: Sort
TCOFSTTexts for Missing Parts Info System: Sort
TCOFTTexts for Missing Parts Info System
TXPR1XPRA control : missing parts info system
TXPR1XPRA control : missing parts info system
FTINDMissing parts index

Text & Customizing Tables for Production Order

In the next part, you will find the list to related SAP PP Production Order Tables starting with T*.

In fact, this Tables’s List is more for customizing and Text Tables.

TablesSAP PRODUCTION ORDER TABLES
T024FProduction scheduler
T399XParameters dependent on order type
T441CProfile : availability check
T441CTTexts for Profile “Display Availability Check”
T490Transactions PP – orders – order category
T024FProduction scheduler
T024FProduction scheduler
T399XParameters dependent on order type
T441CProfileavailability check
T441CTTexts for Profile “Display Availability Check”
T490Transactions PP orders: order category
TC32Assigning subscreen to processing location
TC34Allocating operation to object type for the
TC62Sequence of detail screens when processing
TCO01Sequence/operations control in logistics
TCO04Table for controlling the screen sequence
TCO05CUA status depending on panel & trans. type
TCO06Exclusive functions for PP orders
TCO10Valuation variant for order costing
TCO11Control table for production orders – available
TCO12Control table production orders – stock
TCO36PP orders: Control table for calling up pop-
TCO43PP-SFC order profile
TCO43TDescription of production scheduler profile
TCO60Sequence keys for input facility and verification
TCO61Sequence key for PP orders
TCO62Defining screen sequences for input facility
TCO63Sequence of detail screens when maintaining
TCODBDatabase fields development class CO per order
TCOKOConstants for PP orders
TCOKTAccount assignment categories for order
TCOPField selection profile
TCOPSField selection profile
TCOPTDescription of Profile for Field Selection
TRUGReason for variances in completion confirmation
TRUGTText describing the reason for a variance in

IBP Formulas in KF

https://help.sap.com/docs/SAP_INTEGRATED_BUSINESS_PLANNING/bf99e931b8d44aafb4e306ec3602cbdd/b8582c558934753ce10000000a174cb4.html?version=2105&locale=en-US

Standard Functions

SyntaxDetailsExample
IF(intarg , arg2, arg3)Return arg2 if intarg is considered true (not equal to zero), else return arg3.CAPACITYOVERLOADS@PERLOCRES = IF(“CAPADEMANDUTILPCT@PERLOCRES”> 1,1,0)
ISNULL(arg1)Return 1 (= true), if arg1 is set to null.MARKETINGFORECASTQTY@PERPRODCUST = IF(ISNULL(MARKETINGFORECASTQTY@PERPRODCUST), SALESFORECASTQTY@PERPRODCUST, MARKETINGFORECASTQTY@PERPRODCUST)
CASE(arg1, default)CASE(arg1, cmp1, value1, cmp2, value2, …, default)Return value1 if arg1 == cmp1value2 if arg1 == cmp2, and so on, default if there is no match.CASE(SELECTEDOPTION@PERPROD, 1, KF1@PERPROD, 2, KF2@PERRPROD,KF@PERPROD)
ABS(arg)Returns arg, if arg is positive or zero, else –arg.IF(ABS(SUPPLYREV@PERPRODFML – CONSENSUSDEMANDREV@PERPRODFML)/CONSENSUSDEMANDREV@PERPRODFML > 0.2,1,0)
ROUND(double, int)ROUND(123.456, 0) = 123ROUND(123.456, 1) = 123.5ROUND(-123.456, 1) = -123.5ROUND(123.456, -1) = 120KF1@PERPRODLOCSRC = ROUND(KF@ PERPRODLOCSRC, 0)
ROUNDDOWN(double, int)ROUNDDOWN(123.456, -1) = 120ROUNDDOWN(-123.456, -1) = -130KF1@PERPRODLOCSRC = ROUNDDOWN(KF@ PERPRODLOCSRC, 0)
FLOOR(double)FLOOR(35.1) = 35KF1@PERPRODLOC = FLOOR(KF@ PERPRODLOC)
CEIL(double)CEIL(35.1) = 36KF1@PERPRODLOC = CEIL(KF@ PERPRODLOC)
LTRIM(string)LTRIM(string,string)Remove a whitespace prefix from a string. The whitespace characters may be specified in an optional argument. 
RTRIM(string)RTRIM(string,string)Remove trailing whitespace from a string. The whitespace characters may be specified in an optional argument. 
TRIM(string)TRIM(string,string)Remove whitespace from the beginning and end of a string. 
UPPER(arg1)Returns arg1 in upper caseKF1@PERPRODCUST = IF(UPPER( »ATTR1 ») =  »APPROVED », « KF2@PERPRODCUST », NULL)
MIN(arg1,arg2,…)In the case of several input key figures, there is no aggregation; it returns the lowest value of the input key figures.MINCAPACITY@MTHPRODLOC = MIN(« CAPACITYMORNING@MTHPRODLOC », « CAPACITYAFTERNOON@MTHPRODLOC », « CAPACITYNIGHT@MTHPRODLOC »)
MAX(arg1,arg2,…)In the case of several input key figures, there is no aggregation; it returns the highest value of the input key figures.MAXCAPACITY@MTHPRODLOC = MAX(« CAPACITYMORNING@MTHPRODLOC », « CAPACITYAFTERNOON@MTHPRODLOC », « CAPACITYNIGHT@MTHPRODLOC »)

Example

Sample configuration for aggregation of standard deviation

Take the sum of the squares; then calculate the square root of the total:

  1. Calculate the squares:
    1. Square the values:HKF1@PL = PROPAGATEDDEMANDSTDEV@PL ** 2
    2. Sum the squares:HKF1@REQUEST = SUM(HKF1@PL)
  2. Calculate the square root of the total:PROPAGATEDDEMANDSTDEV@REQUEST= HKF1@REQUEST ** 0.5

Example

ISNULL

The ISNULL condition works only when an underlying time series record exists for the planning object.

Imagine that Sales Forecast Quantity and Marketing Forecast Quantity are the stored key figures for planning level PERPROD.

Planning ObjectPeriodKey Figure: Sales Forecast QtyKey Figure: Marketing Forecast Qty
P1Jan 2018100 
P1Mar 2018 100

With the above data, IF(ISNULL(SALESFCSTQTY),1,0) exhibits the following behavior:

PeriodISNULL ValueNotes
Jan 20180January 2018 has the value “100”.
Feb 2018Not evaluatedThe planning object for the time period February 2018 does not exist.
Mar 20181Though there is no value for Sales Forecast Quantity, the Marketing Forecast Quantity key figure (for the same planning level) has a valid value. Therefore, a record exists in the time series for this planning object.

Sample Expressions

Key FigureCalculation Expression
Actuals PriceACTUALSPRICE@REQUEST = IF(“ACTUALSQTY@REQUEST”=0,0, “ACTUALSREV@REQUEST”/“ACTUALSQTY@REQUEST”)
Capacity OverloadsCAPACITYOVERLOADS@PERLOCRES = IF(“CAPADEMANDUTILPCT@PERLOCRES”> 1,1,0)
Capacity UsageCAPAUSAGE@PERPRODLOCRES = “CAPADEMAND@PERPRODLOCRES”*“(IF(CAPASUPPLYPERDEMAND@PERLOCRES”>1,1, “CAPASUPPLYPERDEMAND@PERLOCRES”))
Marketing Forecast ProfitMARKETINGFORECASTPROFIT@PERPRODCUST = “MARKETINGFORECASTREV@PERPRODCUST”- “HMARKETINGFORECASTCOST@PERPRODCUST”
Marketing Forecast QuantityMARKETINGFORECASTQTY@PERPRODCUST = IF(ISNULL(« MARKETINGFORECASTQTY@PERPRODCUST »), « SALESFORECASTQTY@PERPRODCUST », « MARKETINGFORECASTQTY@PERPRODCUST »)
Constrained Versus Consensus Demand RevenueCONSTRAINEDVSCONSENSUSREV@PERPRODFML = IF(ISNULL(« CONSENSUSDEMANDREV@PERPRODFML »)OR « CONSENSUSDEMANDREV@PERPRODFML »=0,0, IF(ABS(« SUPPLYREV@PERPRODFML » – « CONSENSUSDEMANDREV@PERPRODFML »)/ »CONSENSUSDEMANDREV@PERPRODFML » > 0,2,1,0))
Supply QuantitySUPPLYQTY@PERPRODLOC = IF(« HPROJECTEDINVENTORYQTY@PERPRODLOC »>=0, « DEPENDENTDEMANDQTY@PERPRODLOC », « DEPENDENTDEMANDQTY@PERPRODLOC »+ « HPROJECTEDINVENTORYQTY@PERPRODLOC »)
Bill Cost per Area Demand RevenueBILL_COST_PER_AREA@BSCIRTRSCFRCTOUFRUTO2L3AVG_A = IF(isnull(« ASSETAREA5@BSCIRTRSCFRCTOUFRUTO2L3AVG_A ») or « ASSETAREA5@BSCIRTRSCFRCTOUFRUTO2L3AVG_A »=0,0, »BILL_COST5@BSCIRTRSCFRCTOUFRUTO2L3AVG_A »/ »ASSETAREA5@BSCIRT

Spécifique HR – Include modif orders ZXCO1U06

ZXCO1U06 –

  • Verif des consos/Confirmations ordres Moli
    • Vérif champs ZZPRO et ZZSPRO
    • Blocage sauvegarde si control de dispo raté
    • Envoi Email à Juan Pedro si l’ordre bouge de 1 semaine – L137
    • Envoi Email à Juan Pedro si l’ordre est créé pour la semaine – L176
    • Envoi Email à Juan Pedro si on ramène un ordre sur la semaine – L290
    • Bloque le TECO si l’ordre a encore des COGI – L449
    • Envoi Email à Juan Pedro si on modifie une quantité – L539