You are on page 1of 11

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 youll need to work with. For reports and many enhancements, youll 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 Ive 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 dont know about because I havent worked in those particular niches. Id love to hear about any corrections or expansions to this information you may have. Please send them to Dennis.Barrett@sap.com. 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 Heres a list of many of the tables involved in Customer service.
*Orders AUFK AFIH AFKO AFPO AFFL AFFH AFVU AFVC AFVV AFRU IHPA PMSDO Order master data Maintenance Order Header Order header data PP orders Order item Work order sequence PRT assignment data for the work order DB structure of the user fields of the opn Operation within an order DB str of quantities/dates/values in the opn Order completion confirmations Plant Maintenance: Partners Service order sales area notification notification - items message - maintenance data excerpt notification - activities notification - tasks

*Notifications QMEL Quality QMFE Quality QMIH Quality QMMA Quality QMSM Quality

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 JEST JCDS TJ30T TJ02T Status object information Object status Change Documents for System/User Statuses Texts for user status 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 CRVE_B CRFH EQUI EQUZ EQKT ANLH *Materials MARA MARC MARD MAKT OBJK SER03 Assign PRT to equipment Assign equipment to PRT CIM production resource/tool master data Equipment master data Equipment time segment Equipment Texts Main asset number Material Master: General Data Material Master: C Segment Material Master: Storage Locn/Batch Segment Material Descriptions Plant Maintenance Object List Doc.header f.serial numbers for goods mvmnts

*Measures & Counters IMPTT Measurement point (table)

IMRG CABN

Measurement document Characteristic Document: Header Data Document: Item Data Document: Schedule Line Data document flow

*Sales documents VBAK Sales VBAP Sales VBEP Sales VBFA Sales

*Purchase orders EBAN Purchase Requisition EBKN Purchase Requisition Account Assignment

Heres 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 doesnt 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'. i-t = 'AFIH'. i-t = 'AFKO'. i-t = 'AFPO'. i-t = 'AFFL'. i-t = 'AFFH'. i-t = 'AFVU'. i-t = 'AFVC'. i-t = 'AFVV'. APPEND APPEND APPEND APPEND APPEND APPEND APPEND APPEND APPEND i. i. i. i. i. i. i. i. i. "Order master data "Maintenance Order Header "Order header data PP orders "Order item "Work order sequence "PRT assignment data for the work order "DB structure of the user fields of the opn "Operation within an order "DB str of quantities/dates/values in the opn

i-t = 'AFRU'. i-t = 'IHPA'. i-t = 'PMSDO'. *Notifications i-t = 'QMEL'. i-t = 'QMFE'. i-t = 'QMIH'. i-t = 'QMMA'. i-t = 'QMSM'. i-t = 'QMUR'.

APPEND i. "Order completion confirmations APPEND i. "Plant Maintenance: Partners APPEND i. "Service order sales area APPEND APPEND APPEND APPEND APPEND APPEND i. i. i. i. i. i. "Quality "Quality "Quality "Quality "Quality "Quality notification notification - items message - maintenance data excerpt notification - activities notification - tasks 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'. i-t = 'KBKO'. i-t = 'KBED'. i-t = 'HRP1001'. i-t = 'PA0001'. *Status i-t = 'JSTO'. i-t = 'JEST'. i-t = 'JCDS'. i-t = 'TJ30T'. i-t = 'TJ02T'. *Work i-t = i-t = i-t = Centers 'CRID'. 'CRHD'. 'CRTX'. APPEND APPEND APPEND APPEND APPEND APPEND APPEND APPEND APPEND APPEND i. i. i. i. i. i. i. i. i. i. "Document Header: Reservation "Header record for capacity requirements "Capacity requirements records "Infotype 1001 DB Table "HR Master Rec: Infotype 0001 (Org.Assgnmnt) "Status object information "Object status "Change Documents for System/User Statuses "Texts for user status "Texts for system status

APPEND i. "CIM Resource, Entities APPEND i. "Work Center Header APPEND i. "Text for the Work Center or Production APPEND APPEND APPEND APPEND APPEND APPEND APPEND i. i. i. i. i. i. i. "Assign PRT to equipment "Assign equipment to PRT "CIM production resource/tool master data "Equipment master data "Equipment time segment "Equipment Texts "Main asset number

*Equipment i-t = 'CRVE_A'. i-t = 'CRVE_B'. i-t = 'CRFH'. i-t = 'EQUI'. i-t = 'EQUZ'. i-t = 'EQKT'. i-t = 'ANLH'. *Materials

i-t i-t i-t i-t i-t i-t

= = = = = =

'MARA'. 'MARC'. 'MARD'. 'MAKT'. 'OBJK'. 'SER03'.

APPEND APPEND APPEND APPEND APPEND APPEND

i. i. i. i. i. i.

"Material Master: General Data "Material Master: C Segment "Material Master: Storage Locn/Batch Segment "Material Descriptions "Plant Maintenance Object List "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'. i-t = 'VBAP'. i-t = 'VBEP'. i-t = 'VBFA'. APPEND APPEND APPEND APPEND i. i. i. i. "Sales "Sales "Sales "Sales Document: Header Data Document: Item Data Document: Schedule Line Data 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 VBEP VBAK VBAP AUFK AFIH ILOA AFKO AFPO AFVC AFFL AFFH CRID CRHD CRTX AFVV AFVU AFRU RKPF KBKO JSTO | Joins | | | | | | | | | | | | | | | | | | | | AUFNR AUFNR AUFNR AUFNR AUFNR POSNR OBJNR AUFPL AUFPL APLZL OBJNR AUFPL APLZL AUFPL APLZL OBJNR ARBID OBJID OBJID OBJID OBJID ARBID OBJNR STSMA | Conditions VBELN POSNR | VBELN | VBELN POSNR | KDAUF KDPOS | | | RSNUM BEDID | | | | | | | | | | | RSNUM | BEDID | |

ILOAN ILOAN VORNR

GEWRK

AUFNR VORNR

AUFPL APLZL AUFPL APLZL AUFPL APLZL

OBJTY* OBJTY* OBJTY* OBJTY* ISMNW

SPRAS = SY-LANGU.

JEST JCDS TJ30T TJ02T

| | | | |

OBJNR* OBJNR

STAT STAT STSMA ESTAT ISTAT

| | | | | | | | | | | | | | OBJTY* OBJTY* OBJTY* RECDV etc. ATNAM

SPRAS = SY-LANGU. SPRAS = SY-LANGU.

AFFH CRVE_A CRVE_B EQUI IMPTT IMRG CABN (Notes) Tables AUFK AFIH ILOA AFVC AFVV CRHD JCDS TJ30T TJ02T

| | AUFPL APLZL OBJID | OBJID EQUNR | OBJID EQUNR | EQUNR OBJNR | MPOBJ POINT ATINN | POINT | ATINN | *OBJTY='A' "Work Center ='FH' "PRT | Typical display fields | AUFNR KTEXT AUART WERKS | PRIOK | TPLNR | ARBID LTXA1 | ARBEI | ARBPL | UDATE UTIME INACT CHIND | TXT04 TXT30 | TXT04 TXT30

Data path Between Service order and Sales Document Entry & Tables Service Order AUFK VBEP PMSDO Original S.O. VBAK VBAP Original Quote VBFA VBAK VBAP | | | | | | | | | | | | Joins AUFNR AUFNR KDAUF KDPOS OBJNR AUFNR VBELN POSNR OBJNR VBELN VBELN POSNR VBELV POSNV VBELN POSNN VBELN VBELN POSNR | Conditions | | | | | | | | | VBTYP_V = B; VBTYP_N = C | | | Outputs | | | | VKORG VTWEG SPART | | | | | | |

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 Service Order | AUFNR AFIH | AUFNR GEWRK CRHD | OBJID CRTX | OBJID | Conditions | | | | SPRAS = SY-LANGU | | | | | Outputs IWERK ARBPL WERKS KTEXT

Service order Partners Entry & Tables | Joins Service Order | AUFNR AUFK | AUFNR OBJNR IHPA | OBJNR Service operation to assigned PRT and to that equipments system status Entry & Tables Service Order Operation AFKO AFVC AFFH CRVE_A EQUI EQKT EQUZ JEST JEST | Joins | AUFNR | VORNR | AUFNR AUFPL | VORNR AUFPL APLZL OBJNR | AUFPL APLZL OBJID OBJTY OBJNR | OBJID OBJTY EQUNR | EQUNR | EQUNR | EQUNR | OBJNR | OBJNR | | | | | | | | | | | | Conditions | | | | | | | | | | | | Outputs | Conditions | | | | Outputs | | | PARVW PARNR

SPRAS DATBI INACT INACT

EQ EQ EQ EQ

EN 99991231 SPACE (1) SPACE (2)

EQUNR MATNR EQKTX

* 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 Fncl Locn IFLOT AFIH AFKO AFFH CRVE_A EQUI IMPTT IMRG CABN Confirmations Entry & Tables Service Order Operation AFRU | Joins | AUFNR | VORNR | AUFNR VORNR AUFPL APLZL | Conditions | | | | Outputs | | | ISMNW | Joins | TPLNR | TPLNR ILOAN | ILOAN AUFNR | AUFNR AUFPL | AUFPL OBJID | OBJID EQUNR | EQUNR OBJNR | MPOBJ POINT ATINN | POINT | ATINN | Conditions | | | | | | | | | | | Outputs | | | | | | | | | RECDV, etc. | ATNAM

Service Order to capacity (personnel) assignments Entry & Tables Service Order AFKO KBED CRHD PA0001 | Joins | AUFNR | AUFNR BEDID | BEDID ARBID PERNR | OBJID | PERNR | Conditions | | | | OBJTY = A | ENDDA = 99991231 | | | | | | Outputs (dates) ARBPL ENAME

Equipment to Work Center Entry & Tables Equipment EQUZ ILOA CRHD | Joins |EQUNR |EQUNR ILOAN | ILOAN PPSID | OBJID | | | | | Conditions DATBI = 99991231; EQLFN = 001 OWNER = OBJTY = A, | Outputs | | | | ARBPL WERKS

Operation to Work Center Entry & Tables Service Order Operation AFKO AFVC CRHD | Joins | AUFNR | VORNR | AUFNR AUFPL | AUFPL VORNR ARBID | OBJID | Conditions | | | | | OBJTY=A | Outputs | | | | | ARBPL WERKS

Equipment Hierarchy Entry & Tables Equipment Nr EQUZ EQUI | Joins | EQUNR | EQUNR HEQUI | EQUNR | Conditions | | DATBI EQ 99991231, HEQNR = 1 | | | | | Outputs The subject equipment Its current date record Its immediately superior equipment

Data Map to identify moved equipment assets Entry & Tables | Joins Asset | ANLNR ILOA | ANLNR ILOAN EQUZ | ILOAN EQUNR OBJK | EQUNR OBKNR SER03 | OBKNR SER03 | OBKNR ANLH | ANLN1 EQKT | EQUNR | | | | | | | | | Conditions ANLNR DATBI TASER BLART BLART NE GT EQ EQ EQ SPACE SY-DATUM SER03 WL* WE* | | | | | | | | | Outputs

SHKZG EQ H* SHKZG EQ S*

SPRAS = SY-LANGU

WERK = SourcePlant WERK = DestinationPlant ANLHTXT 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 Plant | WERK Material | MATNR | Conditions | | | Outputs | |

Status list JEST EQUI

| STAT | STAT OBJNR | WERK MATNR OBJNR

| = any member of allowable list | INACT NE X | LVORM NE X

| | | EQUNR

Select your allowable values of STAT from this typical list: TJ02T - System status texts (JEST-STAT -> TJ02T-ISTAT) --------------------------------------------ISTAT TXT04 TXT30 --------------------------------------------I0099 AVLB Available I0184 ESTO In the warehouse I0116 I0180 I0076 I0100 I0186 I0188 I0190 I0320 ASEQ NPRT DLFL INST EDEL ECUS ELOK INAK Allocated to superior equipt PRT not ready for use (planned) Deletion flag Installed Assigned in delivery note At customer site Locked Object deactivated

Part 3 - Plants Plant fields are sprinkled throughout Service orders and technical objects. Heres a brief summary of some of those plants that may be useful as you are parsing out which plants to report. Some tables contain plant fields that I havent tracked down. If you know what they are about, please let me know. Thanks.
Service order Plants IW32 Screen & label Order Header Main Work Center plant Maintenance Planning plant ? Order item ? Operation Work Center plant ? Equipment Plants Screen & label Location & PM: Maintplant PM data: Planning plant PM data: Main WorkCtr Plant Serial data: Plant ? Screen field ILOA-SWERK EQUZ-IWERK RM63E-WERGW EQUI-WERK ? Table field ILOA-SWERK EQUZ-IWERK CRHD-WERKS EQUI-WERK CRFD-STOWK Field description; Notes Maintenance plant Planning plant Plant; Populated from Work Center choice Stock plant Plant location of the production resource/tool Screen field CAUFVD-VAWRK CAUFVD-IWERK ? ? AFVGD-WERKS ? Table field CRHD-WERKS AFIH-IWERK AUFK-SOWRK AFPO-PWERK AFPO-DWERK AFVC-WERKS AFVC-WERKI Field description; Notes Plant; via AFIH-GEWRK = CHRD-OBJID Planning plant; also populates AUFK-WERKS Plant Location plant Planning plant for the order Plant Plant Actual plant

Material Plants Screen & label SalesOrg 1: Delivering Plant Sales, general/plant: Plant Storage 1 & 2: Plant ? ? Functional location Plants Screen & label Location data: Maintenance plant Plant Maintenance: Planning plant Plant Maintenance: Main WorkCtr Screen field ILOA-SWERK RILO0-IWERK RILO0-WERGW Table field ILOA-SWERK IFLOT-IWERK CRHD-WERKS Field description; Notes Maintenance plant; also Plant Maintenance Planning plant Plant; Populated from Work Center choice Screen field MVKE-DWERK RMG1-WERKS RMG1-WERKS ? ? Table field MVKE-DWERK MARC-WERKS MARD-WERKS MARC-VRBWK SER03-WERK Field description; Notes Delivering plant Plant; also Purchasing & Foreign-Trade segments Plant Reference plant for consumption Plant

End of article - Customer Service ABAP Tables for Programmers

You might also like