ABAP code to retrieve Absence type text(AWART) from SAP table

The following code demonstrates how to retrieve the absence type text


*Retrieve AWART Text
  data: ld_moabw type t001p-moabw,
        ld_atext like t554t-atext.
* Loop at infortype 2001 records
  PROVIDE * FROM p2001 BETWEEN pn-begda AND pn-endda.
*   Retrieve latest infotype 0001 record (similar to select/endselect).
    rp_provide_from_last p0001 space p2001-begda p2001-endda.
*   Retrieve MOABW value
    CLEAR: ld_moabw.
    SELECT SINGLE moabw
      FROM t001p
      INTO ld_moabw
    WHERE werks EQ p0001-werks AND
          btrtl EQ p0001-btrtl.
    SELECT SINGLE atext
      FROM t554t
      INTO ld_atext
     WHERE sprsl EQ sy-langu AND
           moabw EQ ld_moabw AND
         awart EQ p2001-awart.
  ENDPROVIDE.

Related Articles

Payroll results (ABAP)
Display organisational structure
SAP HR infotypes
GET PERNR LAST and GET PAYROL
Retrieve multiple contracts for HR personnel and include in locical database selection/report
SAP HR Development help - ABAP code and information on various areas of HR development in SAP
ABAP to retrieve country grouping for personnel with SAP
Deleting an SAP HR Infotype
SAP HR Infotype selection
Creating a New SAP Infotype using transaction PM01 and PPCI
Retrieve comment texts from cluster table for SAP infotype 19
SAP Function module to call ABAP report from managers desktop(MDT)
SAP User Exits to Add functionality to the PBO and PAI of HR infotypes
Create SAP HR report category for logical database selection within ABAP report
SAP HR Selection Screen example
Retrieve SAP personal work schedule
SAP HR Infotype Development Information, ABP and step by step instructions
Enhancing an Infotype - Add, change or modify fields of and SAP infotype
SAP Personal absence calander for SSP/SMP
ABAP Program to retrieve and display sickpay(SSP, SMP etc) with SAP
SAP Personal absence calendar (NCALE) using transaction PC00_M08_CLPC
Accessing NCALE data via the Results Log when running a payroll
Program to retrieve sickpay values
Processing the SAP HR Organisation unit
SAP HR Payroll results ( transaction code: PC_PAYRESULT)
Payroll results (ABAP)
Display Payroll results using SAP transaction PC_PAYRESULT