Open all | Close all

Getting the LATEST information!

To ensure you are getting the latest information please vist this page on the new domain for SAP Development


Retrieve Absence type text(AWART)

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.