Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

FM to get Position/Org unit which uses the given Cost Centre

$
0
0

Hi HR ABAP Experts,

We are using 'A011'(Cost centre assignment) relationship both for Position-Cost centre and Org unit-Cost centre assignment.

 

Could u pls let me know the FM name if we have to get the position ID,Org unit ID by giving the Cost centre and the realtionship.

 

In HRP1001 I can do the direct select like below.

 

SELECT otype objid sclas sobid FROM hrp1001 INTO TABLE li_hrp1001
     WHERE
   ( otype = 'S'OR otype = 'O')

          AND rsign =  'A'

         AND relat = '011'

         AND   sclas = 'K' "Object type for cost centre

         AND sobid = 'IN123'.  "IN123 is my cost centre for which I need position,org unit who are using this cost centre

 

But I need to FM to get the same details by providing the same input as FM is preferable over direct SELECT from database.

 

Note:The common FM we use to read the structure 'RH_STRUC_GET' is not working for this case as we cant provide the cost centre to OBJID as is a Numeric field and cost centre contains the character so the this position-cost centre,org unit-cost centre relationship are not tow way means we dont have have relation like 'B011'.

 

 

Thanks in advance.

 

Thanks

Hafizul

         


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>