Customer Service ABAP Tables for Programmers
Introduction

While implementing Customer Service, you will probably specify or develop custom reports, and may specify or develop enhancements. After the business process owners have decided what they want (to start with anyway), your next challenge may be to find where the data are located that you’ll need to work with. For reports and many enhancements, you’ll want to pull data directly from the transparent tables. But which tables, and which fields? I have ferreted out some (hardly all) useful paths that you can follow to get the Customer Service data you need. All this information results from the research I’ve done on various projects in Release 4.0B and is therefore limited to the areas and release I worked in. There are surely tables and data paths that I don’t know about because I haven’t worked in those particular niches. I’d love to hear about any corrections or expansions to this information you may have. Please send them to .

This article contains three parts: Tables, Joins and Plants.
Part 1 contains a list of many (most?) tables that that are involved in Customer service. It concludes with a small ABAP program you can use to list the fields of those tables so you can search for a well-hidden field.
Part 2 graphically shows several of the data paths you might find useful when you must pull data out of the transparent tables.
Part 3 briefly illustrates several plants that are used in Customer service. If you want a report to include Plant then you must choose which one (or more) to show. In many business environments the several Plants may all have the same value, but some companies use Plant very creatively.

Part 1 - Tables

Here’s a list of many of the tables involved in Customer service.

*Orders

AUFK Order master data

AFIH Maintenance Order Header

AFKO Order header data PP orders

AFPO Order item

AFFL Work order sequence

AFFH PRT assignment data for the work order

AFVU DB structure of the user fields of the opn

AFVC Operation within an order

AFVV DB str of quantities/dates/values in the opn

AFRU Order completion confirmations

IHPA Plant Maintenance: Partners

PMSDO Service order sales area

*Notifications

QMEL Quality notification

QMFE Quality notification - items

QMIH Quality message - maintenance data excerpt

QMMA Quality notification - activities

QMSM Quality notification - tasks

QMUR Quality notification - causes

*Function Location

IFLOT Functional location (table)

IFLOTX Functional Location: Short Texts

IFLOS Functional location aliases (4.6 and above)

IFLOALT Labeling Systems for Functional Locations (4.6 and above)

ILOA PM object location and account assignment

*Reservations

RKPF Document Header: Reservation

KBKO Header record for capacity requirements

KBED Capacity requirements records

HRP1001 Infotype 1001 DB Table

PA0001 HR Master Rec: Infotype 0001 (Org.Assgnmnt)

*Status

JSTO Status object information

JEST Object status

JCDS Change Documents for System/User Statuses

TJ30T Texts for user status

TJ02T Texts for system status

*Work Centers

CRID CIM Resource, Entities

CRHD Work Center Header

CRTX Text for the Work Center or Production

*Equipment

CRVE_A Assign PRT to equipment

CRVE_B Assign equipment to PRT

CRFH CIM production resource/tool master data

EQUI Equipment master data

EQUZ Equipment time segment

EQKT Equipment Texts

ANLH Main asset number

*Materials

MARA Material Master: General Data

MARC Material Master: C Segment

MARD Material Master: Storage Locn/Batch Segment

MAKT Material Descriptions

OBJK Plant Maintenance Object List

SER03 Doc.header f.serial numbers for goods mvmnts

*Measures & Counters

IMPTT Measurement point (table)

IMRG Measurement document

CABN Characteristic

*Sales documents

VBAK Sales Document: Header Data

VBAP Sales Document: Item Data

VBEP Sales Document: Schedule Line Data

VBFA Sales document flow

*Purchase orders

EBAN Purchase Requisition

EBKN Purchase Requisition Account Assignment

Here’s a report that shows all the structures of the tables listed. You can search (in the report or in a downloaded file) for a field by name, data element or check table if you need a field that doesn’t show up otherwise. Obviously you can add other tables to this report if you are working in another module.

*&--------------------------------------------------------------------&*

REPORT Z_SVC_ORD_TABLES.

* Report tables and fields associated with Service orders

*&--------------------------------------------------------------------&*

TABLES: DD03L, DD02T, DD04T.

DATA:

position LIKE DD03L-POSITION,

keyflag LIKE DD03L-KEYFLAG,

fieldname LIKE DD03L-FIELDNAME,

data_elem LIKE DD03L-ROLLNAME,

checktable LIKE DD03L-CHECKTABLE,

descr LIKE DD04T-DDTEXT,

ddtext LIKE DD02T-DDTEXT,

header(120),

BEGIN OF i OCCURS 80,

t LIKE DD02T-TABNAME,

END OF i.

*Orders

i-t = 'AUFK'. APPEND i. "Order master data

i-t = 'AFIH'. APPEND i. "Maintenance Order Header

i-t = 'AFKO'. APPEND i. "Order header data PP orders

i-t = 'AFPO'. APPEND i. "Order item

i-t = 'AFFL'. APPEND i. "Work order sequence

i-t = 'AFFH'. APPEND i. "PRT assignment data for the work order

i-t = 'AFVU'. APPEND i. "DB structure of the user fields of the opn

i-t = 'AFVC'. APPEND i. "Operation within an order

i-t = 'AFVV'. APPEND i. "DB str of quantities/dates/values in the opn

i-t = 'AFRU'. APPEND i. "Order completion confirmations

i-t = 'IHPA'. APPEND i. "Plant Maintenance: Partners

i-t = 'PMSDO'. APPEND i. "Service order sales area

*Notifications

i-t = 'QMEL'. APPEND i. "Quality notification

i-t = 'QMFE'. APPEND i. "Quality notification - items

i-t = 'QMIH'. APPEND i. "Quality message - maintenance data excerpt

i-t = 'QMMA'. APPEND i. "Quality notification - activities

i-t = 'QMSM'. APPEND i. "Quality notification - tasks

i-t = 'QMUR'. APPEND i. "Quality notification - causes

*Function Location

i-t = 'IFLOT'. APPEND i. "Functional location (table)

*i-t = 'IFLOS'. APPEND i. "Functional location aliases (4.6 and above)

*i-t = 'IFLOTX'. APPEND i. "Labeling Systems for Functional Locations (4.6 and above)

i-t = 'ILOA'. APPEND i. "PM object location and account assignment

*Reservations

i-t = 'RKPF'. APPEND i. "Document Header: Reservation

i-t = 'KBKO'. APPEND i. "Header record for capacity requirements

i-t = 'KBED'. APPEND i. "Capacity requirements records

i-t = 'HRP1001'. APPEND i. "Infotype 1001 DB Table

i-t = 'PA0001'. APPEND i. "HR Master Rec: Infotype 0001 (Org.Assgnmnt)

*Status

i-t = 'JSTO'. APPEND i. "Status object information

i-t = 'JEST'. APPEND i. "Object status

i-t = 'JCDS'. APPEND i. "Change Documents for System/User Statuses

i-t = 'TJ30T'. APPEND i. "Texts for user status

i-t = 'TJ02T'. APPEND i. "Texts for system status

*Work Centers

i-t = 'CRID'. APPEND i. "CIM Resource, Entities

i-t = 'CRHD'. APPEND i. "Work Center Header

i-t = 'CRTX'. APPEND i. "Text for the Work Center or Production

*Equipment

i-t = 'CRVE_A'. APPEND i. "Assign PRT to equipment

i-t = 'CRVE_B'. APPEND i. "Assign equipment to PRT

i-t = 'CRFH'. APPEND i. "CIM production resource/tool master data

i-t = 'EQUI'. APPEND i. "Equipment master data

i-t = 'EQUZ'. APPEND i. "Equipment time segment

i-t = 'EQKT'. APPEND i. "Equipment Texts

i-t = 'ANLH'. APPEND i. "Main asset number

*Materials

i-t = 'MARA'. APPEND i. "Material Master: General Data

i-t = 'MARC'. APPEND i. "Material Master: C Segment

i-t = 'MARD'. APPEND i. "Material Master: Storage Locn/Batch Segment

i-t = 'MAKT'. APPEND i. "Material Descriptions

i-t = 'OBJK'. APPEND i. "Plant Maintenance Object List

i-t = 'SER03'. APPEND i. "Doc.header f.serial numbers for goods mvmnts

*Measures & Counters

i-t = 'IMPTT'. APPEND i. "Measurement point (table)

i-t = 'IMRG'. APPEND i. "Measurement document

i-t = 'CABN'. APPEND i. "Characteristic

*Sales documents

i-t = 'VBAK'. APPEND i. "Sales Document: Header Data

i-t = 'VBAP'. APPEND i. "Sales Document: Item Data

i-t = 'VBEP'. APPEND i. "Sales Document: Schedule Line Data

i-t = 'VBFA'. APPEND i. "Sales document flow

*Purchase orders

i-t = 'EBAN'. APPEND i. "Purchase Requisition

i-t = 'EBKN'. APPEND i. "Purchase Requisition Account Assignment

PERFORM List_Table_Fields.

*&--------------------------------------------------------------------&*

FORM List_Table_Fields.

LOOP AT i.

SELECT SINGLE DDTEXT FROM DD02T

INTO (ddtext)

WHERE DDLANGUAGE EQ SY-LANGU

AND AS4LOCAL EQ 'A'

AND AS4VERS EQ '0000'

AND TABNAME EQ i-t.

SKIP 2.

ULINE (112).

CONCATENATE i-t '-' ddtext INTO header SEPARATED BY SPACE.

WRITE: header,

/2 'Field name',

18 'Key',

22 'Data element',

38 'Checktable',

54 'Description',

65 '_________________________________________________'.

SELECT L~POSITION L~KEYFLAG L~FIELDNAME

L~ROLLNAME L~CHECKTABLE D~DDTEXT

INTO (position, keyflag, fieldname,

data_elem, checktable, descr)

FROM DD03L AS L

JOIN DD04T AS D ON D~ROLLNAME EQ L~ROLLNAME

WHERE D~DDLANGUAGE EQ SY-LANGU

AND L~AS4LOCAL EQ 'A'

AND TABNAME EQ i-t

ORDER BY L~POSITION.

WRITE: /2(15) fieldname,

18(1) keyflag,

22(15) data_elem,

38(15) checktable,

54(60) descr.

ENDSELECT.

ENDLOOP. "i

ENDFORM.

*&--------------------------------------------------------------------&*

*& end of report

Part 2 - Joins

This part contains an assembly of many of the joins involved in Customer service, followed by specific data paths that lead to particular outputs. The data paths have one or more entry points (what you know to start with) at the top, for example the Service order number (AUFNR) and the Operation number (VORNR). These values start a sequence of table joins that ultimately produce the output needed for a report.

Some table joins in Service orders

Tables | Joins | Conditions

VBEP | AUFNR VBELN POSNR |

VBAK | VBELN |

VBAP | VBELN POSNR |

AUFK | AUFNR OBJNR KDAUF KDPOS |

AFIH | AUFNR ILOAN GEWRK |

ILOA | ILOAN |

AFKO | AUFNR AUFPL RSNUM BEDID |

AFPO | AUFNR POSNR |

AFVC | VORNR AUFPL APLZL OBJNR ARBID |

AFFL | AUFPL APLZL |

AFFH | AUFPL APLZL OBJNR OBJID | OBJTY*

CRID | OBJID | OBJTY*

CRHD | OBJID | OBJTY*

CRTX | OBJID | OBJTY* SPRAS = SY-LANGU.

AFVV | AUFPL APLZL |

AFVU | AUFPL APLZL |

AFRU | AUFNR VORNR AUFPL APLZL ARBID | ISMNW

RKPF | RSNUM |

KBKO | BEDID |

JSTO | OBJNR STSMA |

JEST | OBJNR* STAT |

JCDS | OBJNR STAT |

TJ30T | STSMA ESTAT | SPRAS = SY-LANGU.

TJ02T | ISTAT | SPRAS = SY-LANGU.

| |

| |

AFFH | AUFPL APLZL OBJID | OBJTY*

CRVE_A | OBJID EQUNR | OBJTY*

CRVE_B | OBJID EQUNR | OBJTY*

EQUI | EQUNR OBJNR |

IMPTT | MPOBJ POINT ATINN |

IMRG | POINT | RECDV etc.

CABN | ATINN | ATNAM

| |

(Notes) *OBJTY='A' "Work Center

='FH' "PRT

Tables | Typical display fields

AUFK | AUFNR KTEXT AUART WERKS

AFIH | PRIOK

ILOA | TPLNR

AFVC | ARBID LTXA1

AFVV | ARBEI

CRHD | ARBPL

JCDS | UDATE UTIME INACT CHIND

TJ30T | TXT04 TXT30

TJ02T | TXT04 TXT30

Data path Between Service order and Sales Document

Entry & Tables | Joins | Conditions | Outputs

Service Order | AUFNR | |

AUFK | AUFNR KDAUF KDPOS OBJNR | |

VBEP | AUFNR VBELN POSNR | |

PMSDO | OBJNR | | VKORG VTWEG SPART

Original S.O. | | |

VBAK | VBELN | |

VBAP | VBELN POSNR | |

Original Quote | | |

VBFA | VBELV POSNV VBELN POSNN | VBTYP_V = ‘B’; VBTYP_N = ‘C’ |

VBAK | VBELN | |

VBAP | VBELN POSNR | |

Notes:
KDAUF and KDPOS will contain the numbers of the original sales document from which this order was created. If it was created from a Quotation and a subsequent sales order was created, these fields are not updated. Follow the path through VBFA to get the Sales order number in that case.

Service order Plants and Work Center

Entry & Tables | Joins | Conditions | Outputs

Service Order | AUFNR | |

AFIH | AUFNR GEWRK | | IWERK

CRHD | OBJID | | ARBPL WERKS

CRTX | OBJID | SPRAS = SY-LANGU | KTEXT

Service order Partners

Entry & Tables | Joins | Conditions | Outputs

Service Order | AUFNR | |

AUFK | AUFNR OBJNR | |

IHPA | OBJNR | | PARVW PARNR

Service operation to assigned PRT and to that equipment’s system status

Entry & Tables | Joins | Conditions | Outputs

Service Order | AUFNR | |

Operation | VORNR | |

AFKO | AUFNR AUFPL | |

AFVC | VORNR AUFPL APLZL OBJNR | |

AFFH | AUFPL APLZL OBJID OBJTY OBJNR | |

CRVE_A | OBJID OBJTY EQUNR | | EQUNR

EQUI | EQUNR | | MATNR

EQKT | EQUNR | SPRAS EQ ‘EN’ | EQKTX

EQUZ | EQUNR | DATBI EQ ‘99991231’ |

JEST | OBJNR | INACT EQ SPACE (1) |

JEST | OBJNR | INACT EQ SPACE (2) |

* Notes:

(1) If JEST-STAT EQ 'I0013' (Deleted) and JEST-INACT EQ SPACE then the operation has been deleted.

(2) If JEST-STAT EQ 'I0013' (Deleted) and JEST-INACT EQ SPACE then the equipment assignment has been deleted from the operation.

Functional Location to Measurement Document

Entry & Tables | Joins | Conditions | Outputs

Fncl Locn | TPLNR | |

IFLOT | TPLNR ILOAN | |

AFIH | ILOAN AUFNR | |

AFKO | AUFNR AUFPL | |

AFFH | AUFPL OBJID | |

CRVE_A | OBJID EQUNR | |

EQUI | EQUNR OBJNR | |

IMPTT | MPOBJ POINT ATINN | |

IMRG | POINT | | RECDV, etc.

CABN | ATINN | | ATNAM

Confirmations

Entry & Tables | Joins | Conditions | Outputs

Service Order | AUFNR | |

Operation | VORNR | |

AFRU | AUFNR VORNR AUFPL APLZL | | ISMNW

Service Order to capacity (personnel) assignments

Entry & Tables | Joins | Conditions | Outputs

Service Order | AUFNR | |

AFKO | AUFNR BEDID | |

KBED | BEDID ARBID PERNR | | (dates)

CRHD | OBJID | OBJTY = ‘A’ | ARBPL

PA0001 | PERNR | ENDDA = ‘99991231’ | ENAME

Equipment to Work Center

Entry & Tables | Joins | Conditions | Outputs

Equipment |EQUNR | |

EQUZ |EQUNR ILOAN | DATBI = ‘99991231’; EQLFN = ‘001’ |

ILOA | ILOAN PPSID | OWNER = ‘ ’ |

CRHD | OBJID | OBJTY = ‘A’, | ARBPL WERKS

Operation to Work Center

Entry & Tables | Joins | Conditions | Outputs

Service Order | AUFNR | |

Operation | VORNR | |

AFKO | AUFNR AUFPL | |

AFVC | AUFPL VORNR ARBID | |

CRHD | OBJID | OBJTY=‘A’ | ARBPL WERKS

Equipment Hierarchy

Entry & Tables | Joins | Conditions | Outputs

Equipment Nr | EQUNR | | “The subject equipment

EQUZ | EQUNR HEQUI | DATBI EQ ‘99991231’, HEQNR = 1 | “Its current date record

EQUI | EQUNR | | “Its immediately superior equipment

Data Map to identify moved equipment assets

Entry & Tables | Joins | Conditions | Outputs

Asset | ANLNR | |

ILOA | ANLNR ILOAN | ANLNR NE SPACE |

EQUZ | ILOAN EQUNR | DATBI GT SY-DATUM |

OBJK | EQUNR OBKNR | TASER EQ ‘SER03’ |

SER03 | OBKNR | BLART EQ ‘WL’* SHKZG EQ ‘H’* | WERK = SourcePlant

SER03 | OBKNR | BLART EQ ‘WE’* SHKZG EQ ‘S’* | WERK = DestinationPlant

ANLH | ANLN1 | | ANLHTXT

EQKT | EQUNR | SPRAS = SY-LANGU | EQKTX

Additional Conditions:

OBJK-DATUM BT begin AND end

SourcePlant NE DestinationPlant

Select the OBJK record:
with the greatest value of DATUM between begin and end for destination plant
with the least value of DATUM between begin and end for source plant.

*Notes:

begin = first day of reporting period

end = last day of reporting period.

SHKZG: H = Credit S = Debit

BLART: WE = Goods receipt WL = Goods issue/delivery

Find all the active equipment (from a material number) that exists in a plant.

Entry & Tables | Joins | Conditions | Outputs

Plant | WERK | |