VIAUFKS PM Order Selection Database View

While searching for the total cost of travel from contract, I stumble into this useful database view table which provide most of the information that I need.

Database view (SE11) : VIAUFKS - PM Order Selection

With the sales contract number, I was able to find the require information such as the order number, notification, equipment, serial number etc. to get the travel cost from table COSS (CO Object: Cost Totals for Internal Postings).

I linkup the two tables using the key: VIAUFKS-OBJNR and COSS-OBJNR

---

You can also use this database view as a table selection in your ABAP program.

For e.g. 

TABLES: VIAUFKS.      "PM Order Selection

SELECT *
  INTO TABLE ITAB_VIAUFKS
  FROM VIAUFKS
WHERE KDAUF EQ ITAB_ALL-VBELN
   AND KDPOS EQ ITAB_ALL-POSNR
   AND EQUNR EQ ITAB_VIS-EQUNR.

---

Actually the database view VIAUFKS is a combination from table AUFK, ILOA, AFIH and AFKO

Database view VIAUFKS

---

Database View Table VIAUFKS Fields Information

AUFNR                Order Number
PRIOK                  Priority
EQUNR                Equipment Number
BAUTL                Assembly
ANLZU                Syst.Condition
IWERK                 Maintenance Planning Plant
INGPR                  Planner Group for Customer Service and Plant Maintenance
APGRP                 Responsible planner group/department
GEWRK                Object ID of the Work Center
KUNUM               Customer Number
ANING                 Name of Person Reponsible for System
GAUEH                Unit for Breakdown Duration
GAUZT                Planned downtime in hours
ANLBD                Date until which the system is available
ANLVD                Date from which the system is available
ANLBZ                 Time until which the system is available
ANLVZ                 Time from Which System is Available
WARPL                Maintenance Plan
WAPOS                Maintenance item
REVNR                 Revision for Plant Maintenance and Customer Service
ARTPR                 Priority Type
ILOAN                  Location and account assignment for technical object
ILOAI                    ILOA Individual
PM_OBJTY          Object Type of CIM Resources for Work Center
INSPK                  Name of Person Responsible for Technical Inspection
DATAN               Date of Technical Inspection
ABNUM               Maintenance Plan Call Number
LAUFN                 Order number
OBKNR                Object list number
AUART                Order Type
AUTYP                Order category
ERNAM               Entered by
ERDAT                Created on
AENAM               Last changed by
AEDAT                Change date for Order Master
KTEXT                 Description
LTEXT                 Long Text Exists
BUKRS                 Company Code
WERKS                Plant
GSBER                 Business Area
KOKRS                Controlling Area
CCKEY                Cost collector key
KOSTV                Responsible cost center
STORT                Location
SOWRK               Location plant
ASTKZ                Identifier for statistical order
WAERS               Order Currency
ASTNR               Order status
STDAT               Date of last status change
ESTNR                Status reached so far
PDAT1                Planned release date
PDAT2                Planned completion date
PDAT3                Planned closing date
IDAT1                 Release date
IDAT2                 Technical completion date
IDAT3                 Close date
OBJID                  Object ID
VOGRP                Group of disallowed transactions
LOEKZ                 Deletion flag
PLGKZ                 Identifier for planning with line items
KVEWE                Usage of the condition table
KAPPL                 Application
KALSM                Costing Sheet
ZSCHL                 Overhead key
ABKRS                Processing group
KSTAR                Settlement cost element
KOSTL                Cost Center
SAKNR                G/L account for basic settlement
SETNM               Allocation set
CYCLE                Cost center to which costs are actually posted
SDATE                Start Date
SEQNR                Sequence number
OBJNR                Object number
PRCTR                Profit Center
VNAME              Joint Venture
RECID                 Recovery Indicator
ETYPE                Equity type
PSPEL                 Work breakdown structure element (WBS element)
AWSLS               Variance Key
ABGSL                Results Analysis Key
TPLNR                Functional Location
ABCKZ               ABC indicator for technical object
EQFNR               Sort field
SWERK               Maintenance plant
STORT_ILOA      Location of maintenance object
MSGRP                Room
BEBER                Plant section
CR_OBJTY          Object types of the CIM resource
PPSID                  Object ID of PP work center
GSBER_ILOA      Business Area
KOKRS_ILOA      Controlling Area
PROID                 Work Breakdown Structure Element (WBS Element)
BUKRS_ILOA      Company Code
ANLNR               Main Asset Number
ANLUN               Asset Subnumber
DAUFN               Standing order number
AUFNR_ILOA     Settlement order
GLTRP                Basic finish date
GSTRP                Basic Start Date
FTRMS                Scheduled release date
GLTRS                 Scheduled finish
GSTRS                 Scheduled start
GSTRI                  Actual start date
GETRI                  Confirmed Order Finish Date
GLTRI                  Actual finish date
FTRMI                  Actual release date
FTRMP                 Planned release date
RSNUM                Number of Reservation/Dependent Requirement
GASMG                Total scrap quantity in the order
GAMNG               Total order quantity
GMEIN                 Base Unit of Measure
PLNBEZ                Material Number
PLNTY                  Task List Type
PLNNR                  Key for Task List Group
PLNAW                 Application of the task list
PLNAL                  Group Counter
PVERW                 Task list usage
PLAUF                  Date for routing transfer
PLSVB                  To lot size
PLNME                 Task list unit of measure
PLSVN                  From Lot Size
PDATV                 Valid-From Date
PAENR                 Change Number
PLGRP                  Responsible planner group/department
LODIV                  Lot size divisor
STLTY                 BOM category
STLBEZ                Material Number
STLST                  BOM status
STLNR                 Bill of material
SDATV                Valid-From Date
SBMNG               Base quantity
SBMEH                Base Unit of Measure
SAENR                Change Number
STLAL                 Alternative BOM
STLAN                BOM Usage
SLSVN                 From Lot Size
SLSBS                 To Lot Size
AUFLD                Date of BOM Explosion/Routing Transfer
DISPO                 MRP controller for the order
AUFPL                 Routing number of operations in the order
FEVOR                 Production Supervisor
FHORI                  Scheduling Margin Key for Floats
TERKZ                 Scheduling type
REDKZ                 Reduction indicator for scheduling
APRIO                  Order priority
AUFNT                Number of superior network
AUFPT                 Routing number of operations in the order
APLZT                  General counter for order
PROFID                Network profile
VORGZ                 Float before production (in days)
SICHZ                   Float after production (in days)
FREIZ                    Release period (in days)
UPTER                  Indicator: Change to Scheduled Dates
BEDID                   ID of the capacity requirements record
PRONR                 Project definition
ZAEHL                  Internal counter
MZAEHL               Internal counter
ZKRIZ                    Counter for additional criteria
PRUEFLOS            Inspection Lot Number
KLVARP                Costing variant for planned costs
KLVARI                 Costing variant for actual costs
RGEKZ                   Indicator: Backflushing for order
PLART                   Basis for scheduling
ADDAT                 PM Order: Reference Date
ADUHR                 Time of Reference Date
IPHAS                    Maintenance Processing Phase
ILART                    Maintenance activity type
QMNUM               Notification No
FLG_AOB             Indicator: relationships
FLG_ARBEI           Indicator: Default value work is relevant
GLTPP                   Finish date (forecast)
GSTPP                   Forecast start date
GLTPS                   Scheduled forecast finish
GSTPS                   Scheduled forecast start
FTRPS                   Scheduled release date (forecast)
RDKZP                  Reduction indicator for scheduling (forecast)
TRKZP                  Scheduling type (forecast)
VKORG                 Sales Organization
VTWEG                 Distribution Channel
SPART                   Division
ADRNR_ILOA       Address number
KDAUF                  Sales Order Number
KDPOS                  Item Number in Sales Order
GLUZP                   Basic finish (time)
GSUZP                   Basic start time
GLUZS                   Scheduled finish time
GSUZS                   Scheduled Start (Time)
MAUFNR              Number of superior order
LEAD_AUFNR      Leading order in current processing
GEUZI                   Confirmed order finish (time)
GSUZI                   Actual start time
OWNER                Object reference indicator
PLKNZ                  Maintenance order planning indicator
USER4                  Estimated total costs of order
RSORD                 Refurbishment order indicator (PM)
BEMOT                Accounting Indicator
SERMAT              Material Number
SERIALNR            Serial Number
DEVICEID             Additional Device Data
ADRNRA              Address number
UII                         Unique Item Identifier
NETZKONT          Indicator for the account assignment of a network(hdr/act.)
.APPEND
/CUM/CMNUM     CU: Construction Measure Number
/CUM/DESNUM    CU: Design Number

SAP PM Tips

Related:
Characteristics in SAP PM

Have a SAP PM Problems?
Do you have a SAP PM Question?

SAP Books
SAP Certification, Functional, Basis Administration and ABAP Programming Reference Books

SAP PM
SAP PM Tips and Plant Maintenance Discussion Forum

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.