Tips and Tricks for the ABAP® Programming Language

YPMLIST1 – HR list of employees with name, adress, and cost center

This reports does print a HR list with names, adress and cost censter information

Parameters:
STANDARD HR-SELECTION SCREEN (LOGICAL DATABASE)

Output:
PERSONALNUMBER, NAME, ADRESS, COST CENTER

ABAP-Source-Code

You can copy and paste the source code directly into the ABAP-Workbench.

REPORT YPMLIST1 LINE-SIZE 120.          "yyyymmdd, Release 4.0
*
**********************         HEADER                    **************
*
* * Copyright (c) 2000 by B.D. from H.
*
*     You can use or modify this report for your own work as long
*               as you don't try to sell or republish it.
*      In no event will the author be liable for indirect, special,
*        Incidental, or consequental damages (if any) arising out of
*                       the use of this report.
*//////////////////////////////////////////////////////////////////////*
REPORT ZPMLIST1 NO STANDARD PAGE HEADING LINE-SIZE 120.

TABLES: PERNR.
INFOTYPES: 0001,    "organ. Zuordnung
           0002,    "Daten zur Person
           0006,    "Adresse
           0007.    "Arbeitszeit

DATA: BEGIN OF NAME,
        NACHN LIKE P0002-NACHN,
        VORNA LIKE P0002-VORNA,
      END OF NAME.

GET PERNR.
  RP-PROVIDE-FROM-LAST P0001 SPACE PN-BEGDA PN-ENDDA.
    MOVE-CORRESPONDING P0002 TO NAME.
    CONDENSE NAME.
      WRITE: / PERNR-PERNR, NAME, 60 P0006-ORT01, 100 P0001-KOSTL.
      WRITE: /60 P0006-STRAS.
pixelstats trackingpixel