sapdev logo background
sapdev logo sapdev logo
Comments

Retrieving SAP HR wage type cost assignments for infotype records - IT0014




Individual cost assignments can be made for wage types within infotypes such as 0014 and 0015. However this data is not stored in the underlying infotype database tables or is not retrieved using standard infotype retrieval techniques. The data is in-fact stored on tables 'ASSHR' and 'ASSOB_H', which can be retrieved using code similar to the following. Please note the actual coding may change depending on which infotype you are using and what data is required.

* Code used for retrieving cost assignment for infotype 0014 records
* -------------------------------------------------------------


*   Loop at infotype 0014 records
    PROVIDE * FROM p0014 BETWEEN pn-begda AND pn-endda.

*     Select all the PDC cost assignment records for each wage-type
      SELECT * FROM asshr WHERE pernr  = pernr-pernr
                            AND infty  = '0014'
                            AND subty  = p0014-lgart
                            AND begda  = p0014-begda
                            AND endda  = p0014-endda.


*       Retrieve Cost Centre and WBS details
        SELECT SINGLE * FROM assob_hr WHERE pdsnr = asshr-pdsnr.
*         Store retrieved data into declared variables/itables

      ENDSELECT.
    ENDPROVIDE.



comments powered by Disqus