FM RH_STRUC_GET and buffer_mode

Hi,
The FM RH_STRUC_GET offer an importing parameter called BUFFER_MODE. I have come across severel buffer modes i existing coding, like X, F and D.
My problem is that we are using the FM a lot. And I have a performance problem, that the FM doing a lot of identical selects on dababase.
Is there a place where I am able to get a list of all possible buffer modes, and som documentation on the differences of the modes.
Best regards,
Martin Molz

Hi Gilo,
Please check this example :
DATA: IOBJEC    LIKE OBJEC    OCCURS 0 WITH HEADER LINE,
        ISWHACTOR LIKE SWHACTOR OCCURS 0 WITH HEADER LINE,
        ISTRUC    LIKE STRUC    OCCURS 0 WITH HEADER LINE.
  CALL FUNCTION 'RH_STRUC_GET'
    EXPORTING
      ACT_OTYPE      = 'S'
      ACT_OBJID      = MGR_POS ---> <Position>
      ACT_WEGID      = 'ZSPS'     -
> Relation
      ACT_PLVAR      = '01'
      ACT_BEGDA      = PCHBEGDA
      ACT_ENDDA      = PCHENDDA
      ACT_TDEPTH     = 2  
    TABLES
      RESULT_TAB     = ISWHACTOR
      RESULT_OBJEC   = IOBJEC
      RESULT_STRUC   = ISTRUC
    EXCEPTIONS
      NO_PLVAR_FOUND = 1
      NO_ENTRY_FOUND = 2
      OTHERS         = 3.
Note : The Variable ACT_TDEPTH denotes -->To indicate how many levels of an organizational structure should be processed in an inquiry/report, enter the appropriate level numberFor example, if the field contains a 3, the system processes three levels of the structure, beginning from the organizational unit you select as the root object, down.
The below fields always used default values unless for special cases.
HRRHAS-TFLAG - is checked if you need to fetch the texts
HRRHAS-VFLAG - is checked if you need to fetch the relation ship information
HRRHAS-AUTHY - is checked if you need to check the authorization
TEXT_BUFFER_FILL - denotes a test run
Remember the Objid is position based on the object type and relation you selected.
Thank you,
Kumar
Edited by: Kumar B on Aug 24, 2010 12:37 PM

Similar Messages

  • Disable authorization check RH_STRUC_GET

    hi,
    is there a possibility to use FM
    RH_STRUC_GET and to disable authorization check similar to  'HR_READ_INFOTYPE_AUTHC_DISABLE' for fm HR_READ_INFOTYPE?
    thanks for help

    stupid question - solved by myself.

  • RH_STRUC_GET change version 4.6 to 6.0 lose of data

    Hi,
    i'm using this function module "RH_STRUC_GET", and i found an error with the same parameters in the 4.6 and 6.0 version and the same data in the tables, the function import a table with 58 results in 4.6 version  and 57 in the 6.0 version. the evaluation paths is the same too, i don't understand nothng, can you help me please?? thanx a lot.

    i yet do this but the results are differents, in the 4.6 version i have 58 results and in the 6.0 version i have 57 results, for the same parameters.
    Edited by: Leticia Gutierrez on Jul 10, 2009 6:18 PM

  • How to find Manager of the USER from org Structure

    Hello Experts,
    I have got the FM RH_STRUC_GET and SWX_GET_MANAGER to find the manager. I am unable to use this FM, Can you please let me know which FM can be used to find the manager.
    If RH_STRUC_GET is being used to find the manager what will be WEGID for this?
    Please help.

    Hi,
    Then Why don't you try with WEGID US_CHEF
    I think  You can just create a entry from the transaction as MANAGER with the below evaluations paths
    *     B     008     Holder     *     S
    S     A     003     Belongs to     *     O
    O     B     012     Is managed by...     *     S
    US     A     208     Is identical to     *     P
    Regards
    Pavan
    Edited by: Pavan Bhamidipati on May 30, 2011 2:28 PM

  • Function module to get manager of a user

    hi,
    I am desparatly looking for a BAPI / RFC giving be a list of all directly managed subordinates of an user.
    using HCM_GET_ORGSTRUCTURE_AS_XML is great but since I do not have information about relationships, I can' tell for sure who is manager of whom. It gives me this (originally hex-encoded!) output:
    <Child>
         <Type>O</Type>
         <ID>50000172</ID>
         <Relation>B002</Relation>
         <RelationBeginDate>2005-07-21</RelationBeginDate>
         <RelationEndDate>9999-12-31</RelationEndDate>
         <Child>
          <Type>S</Type>
          <ID>50000173</ID>
          <Relation>B003</Relation>
          <RelationBeginDate>2005-07-21</RelationBeginDate>
          <RelationEndDate>9999-12-31</RelationEndDate>
          <Child>
           <Type>P</Type>
           <ID>00000026</ID>
           <Relation>A008</Relation>
           <RelationBeginDate>2005-07-22</RelationBeginDate>
           <RelationEndDate>9999-12-31</RelationEndDate>
          </Child>
         </Child>
         <Child>
          <Type>S</Type>
          <ID>50000300</ID>
          <Relation>B003</Relation>
          <RelationBeginDate>2005-08-08</RelationBeginDate>
          <RelationEndDate>9999-12-31</RelationEndDate>
          <Child>
           <Type>P</Type>
           <ID>00000043</ID>
           <Relation>A008</Relation>
           <RelationBeginDate>2005-08-01</RelationBeginDate>
           <RelationEndDate>9999-12-31</RelationEndDate>
           <Name>Fred Bloggs</Name>
           <BeginDate>2005-08-01</BeginDate>
           <EndDate>9999-12-31</EndDate>
           <AdditionalData>
            <Key>ORG_BEGDA</Key>
            <Value>2005-08-01</Value>
           </AdditionalData>
           <AdditionalData>
            <Key>ORG_ENDDA</Key>
            <Value>9999-12-31</Value>
           </AdditionalData>
           <AdditionalData>
            <Key>ORG_RTEXT</Key>
            <Value>Holder</Value>
           </AdditionalData>
           <AdditionalData>
            <Key>ORG_SHORT</Key>
            <Value>Bloggs</Value>
           </AdditionalData>
           <AdditionalData>
            <Key>ORG_STEXT</Key>
            <Value>Fred Bloggs</Value>
           </AdditionalData>
           <AdditionalData>
            <Key>ORG_VBEGDA</Key>
            <Value>2005-08-01</Value>
           </AdditionalData>
           <AdditionalData>
            <Key>ORG_VENDDA</Key>
            <Value>9999-12-31</Value>
           </AdditionalData>
           <AdditionalData>
            <Key>ORG_VPROZT</Key>
            <Value>100,00</Value>
           </AdditionalData>
          </Child>
         </Child>
    do you know of a RFC I can use for retrieving the direct
    subordinates of a user or -even better- to get a full, hierarchical representation of all subordinates? With the RFC above I can tell, who is a member of a certain organisational unit but not who the members linemanager is.
    Thanks alot.
    tobi

    Thanks Srinivas, indeed, that took me further, but what I am trying to achive is to put the cart before the horse:
    I need to get a list of all subordinates of a manager, the RH_STRUC_GET with  act_wegid = 'BOSSONLY' returns the manager of a organisational unit.
    I could assemble the information myself using RH_STRUC_GET and HCM_GET_ORGSTRUCTURE_AS_XML if the following assumtion is true:
    Is it true, that a manager of an Orgaisational unit is the linemanager of each other Person in this Org unit?
    Thanks alot
    tobi

  • How to display employee lower hierarchy.

    Hi all,
        I am trying to generate a report of manager's lower hierarchy, As to get all the employee who are working under particular manager. But, I want to get his under working employee's under working
    employee and so on..,
       I think we have to use loop for this, But how many times shall we run that loop.
    Some employee may not have his under working employee and some one may have, but how to get each and every ones record in lower hierarchy.
      I am getting his next under working employee by using this code.
    Loop at itab_pernr.
       SELECT  OBJID
        FROM HRP1001
        INTO EMP_SUB1
       WHERE SOBID EQ ITAB_PERNR-PLANS
         AND OTYPE EQ 'S'
         AND PLVAR EQ '01'
         AND RSIGN EQ 'A'
         AND RELAT EQ '002'
         AND ENDDA GE P_ENDDA.
    WRITE:/ EMP_SUB1-PLANS.
       ENDSELECT.
    Endloop.
    But, How to get his under working employee and so on...
    Example:
    Manager     |  His under employee | His under employee  | His under employee | .............
    |--||--
    |..............
    Surender     | Mohan                    |  Rupa                      | Nandu                       |..............
    Surender     | Mohan                    |  Hrish                      |                                 |..............
    Surender     | Chandu                   |  Jane                       | Tom                         |..............
    Nalli            | Santhi                     |  Priya                      |                                 |..............
    Kishore       | Monoj                     |                                |                                 |..............
    Anna          | Roy                         |  Pradeep                  | Nandu                      |..............
    Anna          | Roy                         |  Krishna                   |                                |..............
    Hope you may got some good idea by looking to the example output.
    Can any one suggest me.
    Thanks and Regards,
    Surender.
    Edited by: Surender Batlanki on Mar 11, 2008 1:42 PM

    Use FM : RH_STRUC_GET and pass the parameters
    accordingly ...
          CALL FUNCTION 'RH_STRUC_GET'
            EXPORTING
              act_otype      = subst_str-otype  <-- pass the otype
              act_objid      = subst_str-objid <-- pass the objid
              act_wegid      = 'SAP_TAGT' <-- enter Evaluation Path
            TABLES
              result_tab     = lt_agents
            EXCEPTIONS
              no_plvar_found = 1
              no_entry_found = 2
              OTHERS         = 3.
    Edited by: Srinivas Gurram Reddy on Mar 11, 2008 6:20 PM

  • Problem using Function Module

    Hi,
    I am using RH_STRUC_GET with evalPath O-O-S-P and get the or g structure. I then loop through the table obtained from RH_STRUC_GET and re-use RH_STRUC_GET with a evaluation path 'bossonly' to find out who the managers are. But it does not work. I get No ROOTS FOUND error.
    When I try the function module RH_STRUC_GET separately with the same input fields then it works!!!
    Please let me know if I am doing anything wrong. My code is shown below....
    FUNCTION Z_ORGBUILDER_CONN.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(OTYPE) LIKE  OBJEC-OTYPE
    *"     VALUE(OBJID) LIKE  OBJEC-OBJID
    *"     VALUE(PATHID) LIKE  GDSTR-WEGID
    *"     VALUE(PLVAR) LIKE  OBJEC-PLVAR
    *"  EXPORTING
    *"     VALUE(RETURN) LIKE  BAPIRET2 STRUCTURE  BAPIRET2
    *"  TABLES
    *"      L_ZCONN_TAB TYPE  ZCONN_TAB
    *"      RESULT_TAB STRUCTURE  SWHACTOR OPTIONAL
    *"      RESULT_OBJEC STRUCTURE  OBJEC OPTIONAL
    *"      RESULT_STRUC STRUCTURE  STRUC OPTIONAL
    *"      L_ZCONN_ORG TYPE  ZCONN_TAB
    *"      L_ZCONN_POS_HOLDER TYPE  ZCONN_POS_TAB
    *"      L_MANAGERS STRUCTURE  OBJEC
    DATA: z_struc type zconn_struc.
    DATA: xresult_struc like result_struc.
    DATA: yresult_struc like result_struc.
    DATA: z_struc1 type zconn_struc.
    DATA: z_struc_pos type zconn_position.
    DATA: temp_tab LIKE SWHACTOR occurs 0 with HEADER LINE.
    DATA: temp like struc-objid.
            CALL FUNCTION 'RH_STRUC_GET'
              EXPORTING
                          act_otype = otype
                          act_objid = objid
                          act_plvar = plvar
                          act_wegid = pathid
              TABLES
                          result_tab = result_tab
                          result_struc = result_struc
                          result_objec = result_objec
              EXCEPTIONS
                          no_plvar_found = 1
                          no_entry_found = 2
                          OTHERS = 3.
              IF sy-subrc <> 0.
                          RAISE no_roots_found.
              ENDIF.
    LOOP AT result_struc into xresult_struc.
          read table result_struc into yresult_struc with key seqnr =
    xresult_struc-pup.
            if sy-subrc = 0.
            z_struc-objectID = xresult_struc-OBJID.
            z_struc-objectType = xresult_struc-otype.
            z_struc-parentID = yresult_struc-objid.
            z_struc-parentType = yresult_struc-otype.
    endif.
    Append z_struc to l_zconn_tab.
    ENDLOOP.
    LOOP AT l_zconn_tab.
      if l_zconn_tab-objectType = 'O' or l_zconn_tab-objectType = 'S'.
            z_struc1-objectID = l_zconn_tab-objectID.
            z_struc1-objectType = l_zconn_tab-objectType.
            z_struc1-parentID = l_zconn_tab-parentID.
            z_struc1-parentType = l_zconn_tab-parentType.
    Append z_struc1 to l_zconn_org.
        endif.
    ENDLOOP.
    LOOP AT l_zconn_tab.
      if l_zconn_tab-objectType = 'P'.
            z_struc_pos-position = l_zconn_tab-parentID.
            z_struc_pos-pos_holder = l_zconn_tab-objectID.
    Append z_struc_pos to l_zconn_pos_holder.
        endif.
    ENDLOOP.
    loop at result_struc.
      if result_struc-otype = 'O'.
            CALL FUNCTION 'RH_STRUC_GET'
              EXPORTING
                          act_otype = 'O'
                          act_objid = result_struc-objid
                          act_plvar = '01'
                          act_wegid = 'bossonly'
              TABLES
                          result_tab = temp_tab
              EXCEPTIONS
                          no_plvar_found = 1
                          no_entry_found = 2
                          OTHERS = 3.
              IF sy-subrc <> 0.
                          RAISE no_roots_found.
              ENDIF.
              APPEND LINES OF temp_tab to L_managers.
          endif.
    endloop.
    ENDFUNCTION.

    data: begin of itab occurs 0,
          orgunit(10) type c,
          mananger(30) type c,
          end of itab.
    * This will add a record to your itab
    loop at result.
      itab-orgunit = result-orgunit.   " I don't know what fields they are
      itab-manager = result-manager.
      append itab.
    endloop.
    Please remember to award points for helpful answers and mark this post as solved if you question has been answered.  Thanks.
    Regards,
    Rich Heilman

  • For an Org Unit, how do we get all Reporting Org units (Also employees reporting to the sub org unit) & Employees ?

    Hi Experts,
    I have a very common requirement in SAP HCM ABAP development.
    For an Org Unit, how do we get all Reporting Org units(Also employees reporting to the sub org unit) & Employees ?
    I have tried using RH_STRUC_GET_MULTIPLE_ROOTS and RHPH_STRUCTURE_READ, but the evaluation path is insufficient to get all objects under it. I tried with both O-S-P and O-O-S-P evaluation paths and as per some constraints, I can’t create a customized evaluation path for a reason.
    I am using PNPCE database for user selection screen and user would be advising the Org unit. I even referred the standard transaction ‘S_AHR_61016495’ which is using PCH logical database.
    I would really appreciate if anyone could provide a solution for this. (Rewards guranteed )
    Kindly help.
    Thank you.
    Regards,
    Mahesh Konade

    Hi Alexandre,
    Although I could not respond in time, thank you so much for your prompt reply.
    I had used the same RHPH_STRUCTURE_READ and passed the appropriate values to it, but it did not populate the required results. I cross checked the results manually, may be some relations issue. But later I tried using RH_STRUC_GET_MULTIPLE_ROOTS and it worked fine.
    Meanwhile I had done a workaround with PCH and RH_STRUC_GET and it served the purpose of getting all the Org units, it’s reporting sub-org-units, positions and persons (The deepest structure from the root org unit advised on selection screen).
    The solution I used is, I captured the org-units advised on selection screen by user using PCH logical database and then by looping on sub-org units reporting to the main org-unit I populated related positions and persons holding them and assigned it to the PNPCE logical database.
    Thank you so much for the help.
    Regards,
    Mahesh Konade

  • Org unit employees time depend

    Hello Experts,
    I need a help how to build DSO which gives all the employees in org unit & what the position for each employee between 2 dates
    Thanks

    Hi Alexandre,
    Although I could not respond in time, thank you so much for your prompt reply.
    I had used the same RHPH_STRUCTURE_READ and passed the appropriate values to it, but it did not populate the required results. I cross checked the results manually, may be some relations issue. But later I tried using RH_STRUC_GET_MULTIPLE_ROOTS and it worked fine.
    Meanwhile I had done a workaround with PCH and RH_STRUC_GET and it served the purpose of getting all the Org units, it’s reporting sub-org-units, positions and persons (The deepest structure from the root org unit advised on selection screen).
    The solution I used is, I captured the org-units advised on selection screen by user using PCH logical database and then by looping on sub-org units reporting to the main org-unit I populated related positions and persons holding them and assigned it to the PNPCE logical database.
    Thank you so much for the help.
    Regards,
    Mahesh Konade

  • BP Assignment

    Hi all,
              could any one help me what is the  FM  for getting multiple assignments of BP in an organisational structure?
    Regards.

    you can prove with RH_STRUC_GET and in ACT_WEGID field 'SAP_SORG'

  • Documentation on Orgmangement

    Dear Freinds,
                     Ian abap hr having around 1.2 years of exp ........and havent worked on org management . In the next object i would going to
    a developemnt totally on Orgmanagement . Could any one please give me  the concerned documentation on OrgMangement it would
    be great help ,i know there are function module like rh_struc_get and rh_Read_infty_1000 etc.But,  I want to learn the functionality wise as well.
    thanks in advance
    Regards
    madhuri

    Shikha,
    Please avoid duplicate posts
    Thanks
    Bala Duvvuri

  • Find org hierarchy

    hi,
    i wont to find the org. unit hierarchy org that under the org i put  i now that in hrp1001
    its org with relat B 002
    but i dont now how to do that?
    maybe someone can help
    regards

    Use FM  RH_STRUC_GET and pass
    DATA: BEGIN OF it_result_tab OCCURS 0.
            INCLUDE STRUCTURE  swhactor .
    DATA: END OF it_result_tab.
      CALL FUNCTION 'RH_STRUC_GET'
        EXPORTING
          act_otype  = 'O'
          act_objid  = <-- orgunit U want to pass
          act_wegid  = 'O-O' <-- is for higher level org units ..
                             'B002' --> all org units under that org unit ..
          act_begda  = sy-datum
          act_endda  = sy-datum
        TABLES
          result_tab = it_result_tab.
    Check in  it_result_tab for the higer level org units ...

  • Work centers by pernr

    Can anyone suggest a function module that returns all work centers assigned to a pernr (via the organization model).
    I have tried function modules RH_STRUC_GET and BAPI_ORGUNITEXT_DATA_GET with various evaluation paths (including ALLASSGN) but can not get the work centers.
    Many thanks.
    Ian

    Hi Ian,
    try fm COI2_PERSON_OF_WORKCENTER
    Example:
    IN_OBJECT
    OBJTY "P"
    OBJID  "4711"
    Best regards
    Stephan

  • FM/BAPI for transaction PPOSE

    Hello,
    Is there any fm/bapi for transaction PPOSE?
    thank you!

    Hi,
    You dont have single FM or BAPI to meet this requirement.
    you need to use RH_STRUC_GET and HR_READ_INFOTYPE to get the details
    Thanks
    Bala Duvvuri

  • Error in FM RH_STRUC_GET

    Hi all,
    I have an error FM RH_STRUC_GET,
    I have entry in Pa0001,
    pernr 81328
    start date 02.05.2008 ,enddate 31.12.9999
    position :20050130   MANAGER
               MANAGER SUPPORT
    org unit: 00022828   SDH
               SDH Consulti
    But when i run STRUC_GET
    using parameters
    ACT_OTYPE                       P
    ACT_OBJID                       81328
    ACT_WEGID                       P-S-O
    ACT_INT_FLAG
    ACT_PLVAR
    ACT_BEGDA                       22.05.2008
    ACT_ENDDA                       22.05.2008
    ACT_TDEPTH                         10
    ACT_TFLAG                       X
    ACT_VFLAG                       X
    AUTHORITY_CHECK                 X
    TEXT_BUFFER_FILL
    BUFFER_MODE
    The below error shows..
    Runtime:        17.907 Microseconds
    Exception       NO_ENTRY_FOUND
    Message ID:          5W                         Message number:           170
    Message:
    Structure 01 P 81328 P-S-O: No agent found.
    If the relationship is there in HRP1001, will get the same result in STRUC_GET ....what wrong whith the FM??
    regards
    Jose

    It should work exactly as transaction PPSS (apart from the buffer)
    RH_STRUC_GET uses the HR-buffer and PPSS retrieves the data directly from the HR tables.
    You can synchronise the HR-Buffer with SWU_OBUF.
    If you can find no differences, then look at how you populate the parameters, Person  81328 shouldn't this be Person 00081328, for instance
    Kind regards, Rob Dielemans

Maybe you are looking for

  • Manual Sync does not appear on IPHONE summary

    Hello, I just purchased a new iphone today and have not been able to manually sync my music from my library into my phone. Th manual sync option does not even appear when the phone is connected to itunes. (Quite odd.) Only two options appear in the s

  • Deleted music from my ipod

    Just bought a new computer and tried to transfer itunes and music from my old computer to my new computer. I followed the steps itunes layed out, but when i tried to transfer to the new computer, somehow I deleted all of my songs and my playlists on

  • How can i make a JTextField not scroll

    i have a JTextField which can show 10 columns, while i setText 20 cols, but i do not want the TextField scroll to show it all, any idea? thx

  • QuickTime using PlayList with OMF file

    I have a OMF video file.  It is composed of many individual video clips combined together as a OMF video file.   I could get a playlist from our video creater that has the information of each of the video files (like the timestamp information where t

  • Why won't Safari LAUNCH in Yosemite???

    I was very frustrated that all the forums have been saying to reset safari, but that was the whole problem. Safari won't even launch to get it in the toolbar to attempt that. I thought it was only a problem after i updated to OSX yosemite 10.10.2. Sa