Help to find org.unit manager

hallow
here i try to find org unit manager but its not working well
plz some one can help
i think i have problem in dates but i not sure
thankes & regards
LOOP AT i_t_data INTO lw_t_data_0org.
SELECT begda endda sobid
FROM hrp1001
INTO TABLE lt_relat_org
WHERE objid EQ lw_t_data_0org-orgeh
AND rsign EQ 'B'
AND relat EQ '012'
AND endda GE lw_t_data_0org-datefrom
AND begda LE lw_t_data_0org-dateto.
SORT lt_relat_org BY begda DESCENDING endda DESCENDING sobid.
CLEAR lw_relat_org.
READ TABLE lt_relat_org INDEX 1 INTO lw_relat_org.
IF sy-subrc EQ '0'.
l_plans = lw_relat_org-sobid.
SELECT SINGLE pernr
FROM pa0001
INTO lw_t_data_0org-zzmanager
WHERE endda GE lw_relat_org-begda " lw_t_data_0org-datefrom
AND begda LE lw_relat_org-endda " lw_t_data_0org-dateto
AND plans EQ l_plans.
ENDIF.
APPEND lw_t_data_0org TO lc_t_data_0org.

hi
if it help
here is table  i_t_data and i wont to add for all orgeh which manager manage
this org btween dates
Regards
datafrom     datato       orgeh       org.manager
19690101     99991231     50002993     00000000
19690101     99991231     50002994     00000000
19650101     99991231     50003004     00000000
20050101     99991231     50003014     00000000
19690101     99991231     50003018     00000000
20050101     99991231     50003019     00000000
20050101     99991231     50003020     00000000
regards

Similar Messages

  • Org Unit Manager View

    Hi Experts,
    We have the following problem concerning the Org Unit Manager View : we cannot see the name of the manager who is responsible for an Org Unit. However we can see his photo stored in the R/3 and when pointing the cursor on the 'No Manager'  (which is displayed instead of the name) the name of the manager is displayed in this way : e.g. Peter Lewis().
    I tried to fix it through the Views -> Design Details , using the DataSource OrgUnitChiefViewDetails, but when i choose Edit I cannot see the preconfigured fields and when I try another Data Source, I loose also the information concerning the photo and the name of the Org Unit.
    Has anyone faced this problem??
    Thank you in advance,
    Evaggelia

    Hi Evaggelina,
    This is an issue that is resolved in Service Pack 1.0 (and also included in the subsequent Service Pack 2.0 release). You don't have to use a caption key, although this will mean your values will be hardcoded into the AppResources.xml. You should add keys from one of the Language XML files that represent what you want to use, or add some to the Custom.xml file in the Language folder. An example of what you should put in your data element is:
    <field name="Manager_PositionId">
       <caption key="Manager_PositionId"><![CDATA[Manager Personnel ID]></caption>
    </field>
    or
    <field name="Manager_PositionId">
       <caption><![CDATA[Manager Personnel ID]></caption>
    </field>
    I hope that helps!
    Luke

  • Assigning new employee to a org unit manager

    Once I had closed all the milestones of the firt implementation project(1. Design Accepted - 2 Solution Accepted - 3 Go Live Readness Acceptance) and tested some cenarios I found an error in the organization structure. To solve this problem I created a new Job D a new employee and had tried to assign this new employee as an org unit manager. The problem is that whem I Open the field " Select Organizational Unit Manager" the system does not show this new employee that I just have created. Does anybody knows whats is wrong? Should I have to create a new Project? Thank you in advance for you suport. Abilon Neves

    Hi Sushant,
    That´s the problem.
    I can´t assign this new employee to the org unit.
    The system does not list the new employees to be assigned. Only the old employees are listed.
    I´m in the first implementation Project and i closed all the milestones.
    Do you know if it can cause these problens?
    Should I open a new Project?
    Kind Regards.
    Abilon Neves
    SAP Consultant

  • Find org.unit of cost center

    hallow
    i have table of cost center and i wont to find all the or.unit of that belong to costcenters how i can do that?
    Regards

    Hi
    You need to Join two tables PA0001 and T527x as a data source in your query. Give the org units as a input parameter for this query.
    Another way is to check the IMG settings where the functionals have mapped org units and cost center. Since I am an ABAPer so I dont know how they do it.
    Reward points, if helpful.
    Regards
    Waz

  • Org.unit manager

    hallow
    i wont to bring org.unt mangers  for all period  how couled i find it.
    code sample will help.
    <b>i reward</b>
    Regards

    hi,
    Will this Tcode help you in anyway??
    S_AHR_61016494--Org unit with Position
    S_AHR_61016495--Org Unit with Persons.
    I guess position can determine the managers.
    Regards,
    Pranitha

  • How to find Org unit User has selected

    Hi All,
    We are setting up printing on our CRM 5.0 system (Web interaction centre) and was wondering if anyone knows of a way to find out what Org unit the users is logged on as ??
    We are using Actions to print specific smartforms off for the users and need the prints to go to an assigned printer.. We are hoping to use a printer that is assigned to the 'Default Printer' attribute in the org structure (PPOMA_BBP)
    As you will be aware users can be in many positions (under the org units) in the org structure and when we log onto the Web IC we get the option of which one we would like to use... Is there a function that can read this Org unit so we can use it in the printer determination BADI to decide what printer the prints will go to ???
    Many Thanks
    Gaz

    As soon as you make the profile selection,IC sets the profile and org unit in the session.
    You can read them using
    Data: lv_prof     type ref to if_ic_profile,
                    pname       type        string,
                    orgunit     type        crmt_ic_org_unit.
    lv_prof = cl_ic_profile_service=>get_instance( ).
    pname = lv_prof->get_profile( ).
    org_unit = cl_crm_ic_services=>get_org_unit(  ).
    Thanks,
    Thirumala.

  • Org Unit Manager as Part Appraiser

    Hi all,
    I am creating an appraisal document which will allow different organizational unit's managers evaluate one org unit. I was wondering is there any way that choosing organizational units as part appraisers and allow only managers to evaluate.
    For instance : Appraisee : Org A
                              Part Appraiser : Org B, Org C
    and the appraisal document should show up only in Org B and Org C's manager's ESS. Is it possible ?
    Thanks.

    You can add O as a Part Apprisal But for ESS you should change (develop new) POWL feader class  to show such situation.
    Much easier to write a BADI with autofilling managers in part appraisal form.

  • Help to find org. validtion

    hallow
    1)i wont to now how i find the org.unit valid dates begda & ennda
    i now that i have to take it from hep1000 or 1001,
    2)i wont to now how i now if org unit is valid or not
    regards

    if u have pernr as input parameter....
    tables : pa0000.
    parameters : p_pernr like pa0000-pernr,
    p_begda like pa0000-begda,
    p_endda like pa0000-endda.
    data : v_orgeh like hrp1000-orgeh,
    v1_orgeh like hrp1000-orgeh.
    select orgeh from pa0001 into v_orgeh where pernr = p_pernr and begda le p_endda and endda ge p_begda.
    if sy-subrc = 0.
    select single objid from hrp1000 into v1_orgeh
    where objid = v_orgeh and otype = 'O' and begda le p_endda
    and endda ge p_begda.
    if sy-subrc <> 0.
    message e000 with 'invalid org unit for pernr in specified date range'.
    endif.
    endif.
    select orgeh from pa0001 into v_orgeh where pernr = p_pernr and begda le p_endda and endda ge p_begda.
    if sy-subrc = 0.
    select single objid from hrp1000 into v1_orgeh
    where objid = v_orgeh and otype = 'O' .
    if sy-subrc <> 0.
    message e000 with 'invalid org unit for pernr'.
    endif.
    endif.
    Regards
    Vasu

  • Fm to get employee under manager of all org unit

    hi,
    i have requirement that i need list of all employee under particular manager i know abt HRWPC_PNP_MANAGED_EMPLOYEES but i don't know how to use it is thr any fm reg it .
    thanks in advance

    Hi Rajan,
    Below is the sample code for your reference...
    REPORT zrnd.
    *database tables used
    TABLES:pa0001, "Infotype 0001 (Org. Assignment)
    hrp1001, "Infotype 1001
    pa0002. "Infotype 0002 (Personal Data)
    *internal tables declaration
    **----internal tables for holding
    DATA:t1001 LIKE p1001 OCCURS 0 WITH HEADER LINE,
         t1002 LIKE p1001 OCCURS 0 WITH HEADER LINE,
         t1003 LIKE p1001 OCCURS 0 WITH HEADER LINE,
         t1004 LIKE p1001 OCCURS 0 WITH HEADER LINE,
         t1222 LIKE p1222 OCCURS 0 WITH HEADER LINE,
         t0001 LIKE p0001 OCCURS 0 WITH HEADER LINE,
         t0002 TYPE p0002 OCCURS 0 WITH HEADER LINE.
      DATA: w1222 TYPE hrp1222 .
      DATA : z1222 TYPE hrt1222 OCCURS 0 WITH HEADER LINE.
      DATA: res TYPE swhactor OCCURS 0.
      DATA: wa_res TYPE swhactor.
      Data : f_code type ABTNR,
            p_code type ABTNR,
            f_text type VTEXT,
            p_text type VTEXT,
            s_pernr type Pa0001-PERNR,
            s_name type  pa0001-ename.
    *variable declaration
    **---0 to capture the id of the object "may be orgunit, position, persion.
    DATA: g_sobid1 LIKE p1001-objid,
          g_sobid2 LIKE p1001-objid,
          g_sobid3 LIKE p1001-objid,
    *      *--to capture the personnel number
          g_pernr LIKE pa0002-pernr.
    Constants : c_function type c value 'F',
                   c_Proces   type c value 'P'.
    *selection screen paramters
    **----enter a valid personnel number
    PARAMETERS:p_pernr LIKE pa0002-pernr.
    *start of selection
    START-OF-SELECTION.
    *Get the Position for entered Personnel number
    *----RH_READ_INFTY function module is used for the OM infotypes ..starting with HRP
      CALL FUNCTION 'RH_READ_INFTY'
        EXPORTING
          plvar                = '01'
          otype                = 'P'
          objid                = p_pernr
          infty                = '1001'
          subty                = 'B008'
          begda                = sy-datum
          endda                = sy-datum
        TABLES
          innnn                = t1001
        EXCEPTIONS
          all_infty_with_subty = 1
          nothing_found        = 2
          no_objects           = 3
          wrong_condition      = 4
          wrong_parameters     = 5
          OTHERS               = 6.
      IF sy-subrc = 0.
    *    MESSAGE  'this number is not maintained in hrp1001' TYPE 'I'.
      ENDIF.
    *Get the latest record reading T1001 with following values
      SORT t1001 BY begda DESCENDING .
      READ TABLE t1001 WITH KEY objid = p_pernr "personnel number
      otype = 'P' "Person
      rsign = 'B' "hirarchy top down
      relat = '008' "Holder
      sclas = 'S'. "Position
      IF NOT t1001[] IS INITIAL.
        g_sobid1 = t1001-sobid. "ID of Related Object
    *Get Org unit for the position obtained from above
        CALL FUNCTION 'RH_READ_INFTY'
          EXPORTING
            plvar                = '01'
            otype                = 'S'
            objid                = g_sobid1
            infty                = '1001'
            subty                = 'A003'
            begda                = sy-datum
            endda                = sy-datum
          TABLES
            innnn                = t1002
          EXCEPTIONS
            all_infty_with_subty = 1
            nothing_found        = 2
            no_objects           = 3
            wrong_condition      = 4
            wrong_parameters     = 5
            OTHERS               = 6.
        IF sy-subrc = 0.
        ENDIF.
      ENDIF.
      SORT t1002 BY begda DESCENDING .
      READ TABLE t1002 WITH KEY objid = g_sobid1
      otype = 'S' "Position
      rsign = 'A' "bottom up
      relat = '003' "Belongs to
      sclas = 'O'. "org unit
      IF NOT t1002[] IS INITIAL.
        g_sobid2 = t1002-sobid.
    *Get position for the Org unit (Manager)
        CALL FUNCTION 'RH_READ_INFTY'
          EXPORTING
            plvar                = '01'
            otype                = 'O'
            objid                = g_sobid2
            infty                = '1001'
            subty                = 'B012'
            begda                = sy-datum
            endda                = sy-datum
          TABLES
            innnn                = t1003
          EXCEPTIONS
            all_infty_with_subty = 1
            nothing_found        = 2
            no_objects           = 3
            wrong_condition      = 4
            wrong_parameters     = 5
            OTHERS               = 6.
      ENDIF.
      SORT t1003 BY objid.
      READ TABLE t1003 WITH KEY objid = g_sobid2
      otype = 'O' "org unit
      rsign = 'B' "hirarchy top down
      relat = '012' "Manages
      sclas = 'S'. "Position
      IF NOT t1003[] IS INITIAL.
        g_sobid3 = t1003-sobid.
    *Get Personnel number for the Manager
        CALL FUNCTION 'RH_READ_INFTY'
          EXPORTING
            plvar                = '01'
            otype                = 'S'
            objid                = g_sobid3
            infty                = '1001'
            subty                = 'A008'
            begda                = sy-datum
            endda                = sy-datum
          TABLES
            innnn                = t1004
          EXCEPTIONS
            all_infty_with_subty = 1
            nothing_found        = 2
            no_objects           = 3
            wrong_condition      = 4
            wrong_parameters     = 5
            OTHERS               = 6.
    *    if sy-subrc <> 0.
    *       MESSAGE  'this number is not maintained in hrp1001' TYPE 'I'.
    *      endif.
      ENDIF.
      READ TABLE t1004 WITH KEY objid = g_sobid3
      otype = 'S' "Position
      rsign = 'A' "bottom up
      relat = '008' "Holder
      sclas = 'P'. "Person
      IF NOT t1004[] IS INITIAL.
        g_pernr = t1004-sobid+0(8).
    **--Get name of Manager(Supervisor)
        CALL FUNCTION 'HR_READ_INFOTYPE'
          EXPORTING
            pernr           = g_pernr
            infty           = '0001'
          TABLES
            infty_tab       = t0001
          EXCEPTIONS
            infty_not_found = 1
            OTHERS          = 2.
        SORT t0001 BY pernr begda.
        READ TABLE t0001 INDEX 1.
        IF NOT t0001[] IS INITIAL.
           write  t0001-pernr to s_pernr.
           write  t0001-ename to s_name.
         ENDIF.
        Perform get_function_code using  g_sobid2  .
      ENDIF.
    PERFORM display_results.
    *&      Form  get_function_code
    *       text
    *      -->G_SOBID1   text
    FORM get_function_code USING org_unit.
      PERFORM get_obj USING org_unit.
      PERFORM get_ab USING w1222-tabnr.
      PERFORM get_text tables z1222.
      IF z1222-attrib IS INITIAL.
        CALL FUNCTION 'RH_STRUC_GET'
          EXPORTING
            act_otype              = 'O'
            act_objid              = org_unit
            act_wegid              = 'A002'
    *   ACT_INT_FLAG           =
    *   ACT_PLVAR              = ' '
           act_begda              = sy-datum
           act_endda              = sy-datum
           act_tdepth             = 0
           act_tflag              = 'X'
           act_vflag              = 'X'
           authority_check        = 'X'
    *   TEXT_BUFFER_FILL       =
    *   BUFFER_MODE            =
    * IMPORTING
    *   ACT_PLVAR              =
         TABLES
           result_tab             = res
    *   RESULT_OBJEC           =
    *   RESULT_STRUC           =
         EXCEPTIONS
          no_plvar_found         = 1
          no_entry_found         = 2
          OTHERS                 = 3
        IF sy-subrc <> 0.
    *      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        LOOP AT res INTO wa_res.
          PERFORM get_obj  USING  wa_res-objid.
          PERFORM get_ab   USING w1222-tabnr.
          PERFORM get_text tables z1222.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "GET_TEXT
    *&      Form  GET_OBJ
    *       text
    *      -->P_OB  text
    *      -->P_OJ  text
    FORM get_obj  USING p_oj.
      SELECT SINGLE * FROM hrp1222 INTO w1222 WHERE otype = 'O'
                                               AND objid = p_oj.
    ENDFORM.                    " GET_OBJ
    *&      Form  GET_AB
    *       text
    *      -->P_TAB  text
    FORM get_ab  USING  p_tab.
      SELECT  * FROM hrt1222 INTO table z1222 WHERE tabnr = p_tab.
    ENDFORM.                    " GET_AB
    *&      Form  GET_TEXT
    *       text
    *      -->P_Z1222_LOW  text
    FORM get_text  tables p_txt STRUCTURE hrt1222.
    loop at p_txt.
    if p_txt-low+0(1) = c_function.
        write p_txt-low to f_code.
      SELECT single vtext FROM zfunctiont INTO f_text  WHERE abtnr = p_txt-low.
        ELSEIf p_txt-low+0(1) = c_Proces.
          write p_txt-low to P_code.
         SELECT single vtext FROM ZPROCESST INTO   p_text  WHERE abtnr = p_txt-low.
          endif.
    endloop.
    ENDFORM.                    " GET_TEXT
    form display_results.
      write :/ s_pernr,
              30 s_name.
      WRITE :/ f_code,
              30  f_text.
      WRITE :/ p_code,
              30  p_text.
      ULINE.
    endform.
    Thanks,
    Chidanand

  • Srorage Unit Management

    Hi Guru's
    Can u any body guide me, what is the use storege unit management and what are configuration setting we need to do
    if we activated the storage unit management for our ware house.

    Hi Vittu,
    Please go through this SAP help it will help you about Storage Unit Management.
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/f846014afa11d182b90000e829fbfe/frameset.htm
    I hope it will help you,
    Regards,
    Murali.

  • Find Manager of Org Unit

    Hi All,
    I would like to find the manager of an org unit. I know there are a bunch of ways to do this (FMs or table look up using the relations...). But my question is, if the manager of the org unit I am looking for does not exists, Is there a way to get the manager of the next level org unit. And, if that manager does not exists, then next level and so on.....
    Is there a FM which would give the manager in the above manner. If not, how could this be done.
    I appreciate your help in this regard.
    Thanks
    M

    Try this
    HR-ABAP issue how to find manager in PA reporting

  • How to find link between Business partner and Org unit in Solution manager

    Hi experts,
    Please!!!
    I have a requirement where my rule finds business partner assinged for that support team and in transaction ppoma_crm we have org unit assigned to that business partner number below that we have positions and user assigned...
    I can find business partner for the transaction now i need to find the org unit for the assigned business partner so i could use for agent determination in workflow.
    Thanks and Regards
    Annamalai

    do you know? ... the structure is like this... i have orgunit then a position to it and then i have assigned a business partner which is with prefix CP... i m not seeing the users assigned to it so my workflow doesnt get triggered if i use this org unit..
    regards

  • OSA - Default Manager From Org Unit

    Hi everyone:
    In my appraisal form, under "Processing" tab, in "Further Template Behaviour", I have included the standard BADI (Default Appraiser - Default Manager).
    Is this BADI supposed to pick the manager (chief position) of the org unit that belongs to the employee?
    If yes, it does not seems to be working the way it should be. I can put anyone (even the subordinate of the employee) as the appraiser and the system still lets me go through.
    OSS notes does not seems to have any solution with this.
    Has anyone encounter anything like this before? Your help is greatly appreciated.
    Thanks,
    Ash

    Hi Jothi:
    Thanks for your help. I managed to get the "Default Manager" BADI working.
    However, this is not a complete functionality because the appraisee can simply change the appraiser's name. There is no control on the appraiser chosen. I can always choose my subordinate as my appraiser, which is not correct.
    I know that in "Processing" tab, we can de-select "No Authorisation Check for Appraiser". This feature will check if the user (in my case, the appraisee) has authorisation for the appraiser etc. A few questions I would like to find out
    1) Will this feature work for my scenario?
    2) To use this feature, do I need structural authorisation or just non-structural authorisation?
    3) Should i use BADI "Authority Check" instead, to cater to my requirement?
    Many thanks once again for your help.
    Ash

  • HCM-ORG MANAGMENT Config error, in creation of Org Units.

    Hi Experts,
    I am trying to configure the HCM-Organization Management in ECC 6.0, When I try to maintain an Org Unit, the system prompts with an Information Message as stated below, since it was an information message, i continued creating the Org Unit, but when I am trying to save the entry, Now system shows me the same message and doesnt allow me save the entry and prompts me with same message...
    No evaluation path specified for structural evaluation
    Message no. 5A249
    Diagnosis
    You want to start structural reporting, but you have not specified an evaluation path according to table T778A.
    Can any of you help me in this regard.
    Best Regards,
    KishoreJ.

    Hi Amosha,
    When i try to do it through the expert mode..The following error shows in the task bar
    For infotype 1000 in status 4, function INSE is not allowed
    Message no. 5A043
    Best Regards,
    KishoreJ.

  • Function module to find wheather a user is heading any Org unit

    Function module to find wheather a user is heading any Org unit
    Hi Experts,
    I need to know if a user(SY-UNAME) is heading any Org unit(Check box marked for Head of own organisational unit in TCODE PPOMA_CRM for position in Basic Data). Is there any FM for this? I am trying to use FM RH_STRUC_GET but not able to find.
    Any help would be highly appreciated.

    Method  get_assignments_of_user of class cl_crm_ppm_um_toolkit solved this problem.

Maybe you are looking for

  • Oracle to File, filename and order by question

    Hello I am writing a simple interface, source is an oracle table and destination is a flat file. I have two questions: 1) the file name should be in the form allocation_ddmmyyyy.txt, where ddmmyyyy is the current date. which is the best way to accomp

  • Airport card for powerbook G4 12" Aluminum

    I have a powerbook G4 12" aluminum and I have looked everywhere for an airport card. I have gotten two original airport cards and they did not fit,these cards are just a smidge too wide for the card slot. I know there is an apple card that will fit i

  • Checkbox for only addrow column - Urgent

    Hi, I have a requirement to add check box against the columns which are added when on click of add row button. The rows which are previously added and saved shouldnt have this check box. Unsaved or newly added rows should have this check box. How to

  • Single node file system to 3 node rac and asm migration

    hi, we have several utl_file and external table applications running on 10.2 single node veritas file system. and we want to migrate to 3 node RAC ASM environment. what is the best practices in order to succeed this migration during this migration. t

  • How to hide the main window menu ?

    Hi, Im developing a Java app that has an horizontal menu bar,which has the option to exit the program . So I want to hide, or get rid of the main window menu bar, the one that has the close, minimize and maximize buttons..is it possible ? Thanks in a