Edit Org Management Infotype 1000

Hi All,
Can you suggest me how to edit the Infotype screen of Org Management Infotype 1000.
Requirement is to restrict the Org unit abbrevation without blank spaces.
eg) EAB/AB/TM MR is not allowed. It should be  EAB/AB/TMMR

Hi Veer,
If you are talking about Org unit abbreviation, this can be done in any of the interfaces in Org Mgmt.
For example, you can do it in Simple Maintenance, select the org unit and rename it whether abbreviation or name of the org unit.
Best regards
Ghouse

Similar Messages

  • Pa custom infptype and org management infotype creation

    hi experts,
    pa custom infptype and org management infotype creation
    steps are same or not.
    If  any difference b/w both plz give me step by step procedure.
    Regards,
    Sandeep

    PA infotype will create in PM01  everything we need fill from PM01.
    OM infotype
    :- 1. we need to create HRI9XXX  structure.
       2. PPCJ t-code  u can create from this t-code.
    PA INFOTYPE CREATION
    1) Go to Transaction PM01.
    2) Enter the custom Infotype number which you want to create (Should be a 4 digit number, start with 9).
    3) Select the `Employee Infotype' radio button.
    4) Select the `PS Structure Infotype'.
    5) Click on Create. A separate table maintenance window appears.
    6) Create a PS structure with all the fields you want on the Infotype
    7) Save and Activate the PS structure
    8) Go back to the initial screen of PM01.
    9) Click on `All' push button. It takes a few moments.
    10) Click on `Technical Characteristics' . Infotype list screen appears
    11) Click on `Change'(pencil) button
    12) Select your Infotype and click on `Detail' (magnifying glass) button
    13) Give `T591A' as subtype table
    14) Give `T591S' as subtype txt tab
    15) Give your subtype field as subtype field
    16) Save and come back to PM01 initial screen
    17) Click on `Infotype Characteristics' . Infotype list screen appears
    18) Click on `Change' (pencil) button
    19) Click on `New Entries'
    20) Enter your Infotype number and short text
    21) Here we have to set different Infotype Characteristics as per the requirement. (Better open another session with some standard Infotype's infotype characteristics screen and use as the reference to fill yours)
    22) Save your entries.
    23) Now the Infotype is created and ready to use.
    24) If you want to change the layout of the Infotype as per your requirement.
    25) In the PM01 initial screen.Select `Screen' radio button and give 2000 as the screen name, then click on edit.
    26) In the next screen.. Select `Layout Editor' and click `Change'.
    27) Screen default layout appears.here you can design/modify the screen.. change the attributes of the fields. etc.
    28) Save and activate. (Don't forget to `Activate at every level)
    Edited by: sapabap229 on Aug 30, 2010 11:19 AM

  • Org.Management Infotypes..

    Hi Experts..
    Could you please tell me where we use Org.Management infotypes(IT1000 to1999)
    Thanks in advance.

    OM infotypes are those in which we store all the information regarding all organization attributes, activities etc..  e.g
    Position is related to organization so we maintain it in OM infotypes..
    in 1000, we maintain its name and long text .. in 1001 we maintain relationship of position with other OM attributes i.e. Org Unit, Job, Business Area etc.
    We maintain 1000 and 1001 infotypes for all OM objects...
    but other Infotypes may vary depending upon their attributes..
    e.g. IT 1007 is maintained for Job.. whether it is vacant or not..
    similarly IT 1610 is used for US Job attributes... we can maintain only attributes here not position and others.
    Reward if useful
    regards
    Pradeep

  • Custom Infotype for Org Management

    Hi Experts,
    I Iam trying to create custom infotype to capture some infomation on an Org Management custom object and I am not sure if I can do this through PM01 because this is neither employee or applicant info but custom object info. Any idea on how to do this?

    Hi,
    For creating OM custom infotype you should start with transaction SE11.  PM01 is only for employee and applicant IT.
    Go to SE11Create structure Ex:HRI9009 Create all necessary datatypes. (fields for your IT).
    Then go to PPCI enter IT name and number. then maintain Table T77I here maintain time constraint for your IT.
    If you still have doubts get back to me.
    Thanks and Regards,
    Shilpa

  • 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.

  • Logging Changes in Org Man Infotype Data

    Hi,
    We currently use Auditing to log changes to PA infotypes but would also find this function useful on OM infotypes (eg IT1001, IT1018 etc).  It's possible to see who changed it last using the 'Change Information' icon, but we would like to be able to see the before and after picture where someone has edited a record and overwritten the original data.
    Does anyone know if this is possible?   V_T585A doesn't allow selection of OM infotypes for logging.
    Thanks
    Emma

    How about RHRHAZ00 for org management audit trail?
    You can set up which infotypes you want to audit in T77CDOC_CUST
    Edited by: Harish T K on Dec 23, 2010 10:06 AM

  • CIC Profile and Org Management

    We are currently upgrading from R/3 4.7 to ECC 6.
    Since upgrading our test client, the cic profile does not appear to be called when going to transaction CIC0 - Customer Interaction Center.
    We are using Org Management and have cic profiles (infotype 1260) assigned to each position. We also have a person tied to each position and the employee's system username is tied to that person (personnel no.) in inftotype 0105 - subtype 0001.
    It seems like we are missing something between the personnel number and the position - as if it's not picking up the username when an employee goes to t-code CIC0. It is now using the defautl profile (000001) instead of the one we have specified on the position.
    Any feedback/advice would be greatly appreciated.
    K

    Hi Amol,
    Firstly post ur queries in a separate thread.
    Now to answer ur query i.e. how do u come the context (created/updated/ transaction type etc). Whenver a BADI is called like for eg. CRM_ORDERADM_H_BADI, it will have an import parameter iv_guid, which holds the header guid of the transaction. Taking this header guid, call FM CRM_ORDER_READ, pass this guid. You can fetch all the information of the transaction which is opened or being edited or created, what is the transaction type.
    The complete information of the transaction can be fetched on just passing the header guid to the mentioned function module.
    Wish the information is useful.
    Regards,
    Shalini Chauhan

  • Org Management programing Material

    Hi,
    Can any one pls send me the document on reporting in Org Management.
    Thankyou.

    Hi
    see the sample code using Orgn management infotypes like HRP1000 etc
    report zporgr0040
    line-size 108
    line-count 60(1)
    no standard page heading
    message-id zndc.
    Database Tables
    tables: hrp1001, " HR Master Record (Orgn. Assignment)
    pa0002, " Personal Data
    t528t, " Position Texts
    t527x, " Org Unit Text
    t528b, " Positions
    csks, " Cost Center
    cskt. " Cost Center Texts
    Declaration of Internal Tables
    Internal Table for Orgn Object Data HRP1000
    data: begin of obj_tab occurs 0,
    otype like hrp1000-otype, " Object Type
    objid like hrp1000-objid, " Object ID
    plvar like hrp1000-plvar, " Plan Version
    istat like hrp1000-istat, " Planning Status
    begda like hrp1000-begda, " Begin date
    endda like hrp1000-endda, " End date
    end of obj_tab.
    Internal Table for Active Employees data PA0000
    data: begin of stat_tab occurs 0,
    pernr like pa0000-pernr, " Object Type
    begda like pa0000-begda, " Begin date
    endda like pa0000-endda, " End date
    stat2 like pa0000-stat2, " Employment Status
    end of stat_tab.
    Internal Table for Actual Orgn Assignment Data PA0001
    data: begin of act_tab occurs 0,
    pernr like pa0001-pernr, " Object Type
    begda like pa0001-begda, " Begin date
    endda like pa0001-endda, " End date
    kostl like pa0001-kostl, " Cost Center
    orgeh like pa0001-orgeh, " Org Unit
    plans like pa0001-plans, " Position
    natio like pa0002-natio, " Nationality
    end of act_tab.
    Internal Table for Orgn Data HRP1001
    data: begin of org_tab occurs 0,
    otype like hrp1001-otype, " Object Type
    objid like hrp1001-objid, " Object ID
    plvar like hrp1001-plvar, " Plan Version
    istat like hrp1001-istat, " Planning Status
    begda like hrp1001-begda, " Begin date
    endda like hrp1001-endda, " End date
    subty like hrp1001-subty, " Sub Type
    sclas like hrp1001-sclas, " Type of Related Object
    sobid like hrp1001-sobid, " Id of Related Object
    kostl like pa0001-kostl, " Cost Center
    plstx like t528t-plstx, " Position Text
    orgtx like t527x-orgtx, " Org Unit Text
    end of org_tab.
    Internal Table for Position Calculations
    data: begin of org1_tab occurs 0,
    kostl like pa0001-kostl, " Cost Center
    objid like hrp1001-objid, " Object ID
    end of org1_tab.
    Internal Table for Position Calculations
    data: begin of org2_tab occurs 0,
    kostl like pa0001-kostl, " Cost Center
    count type i, " No of Positions
    end of org2_tab.
    Internal Table for Actual Manpower Calculations
    data: begin of act1_tab occurs 0,
    kostl like pa0001-kostl, " Cost Center
    natio like pa0002-natio, " Nationality
    plans like pa0001-plans, " Position
    end of act1_tab.
    Internal Table for Actual Manpower Calculations(UAE)
    data: begin of act2_tab occurs 0,
    kostl like pa0001-kostl, " Cost Center
    natio like pa0002-natio, " Nationality
    end of act2_tab.
    Internal Table for Actual Manpower Calculations(Others)
    data: begin of act3_tab occurs 0,
    kostl like pa0001-kostl, " Cost Center
    natio like pa0002-natio, " Nationality
    end of act3_tab.
    Internal Table for Actual Manpower Calculations(UAE)
    data: begin of act4_tab occurs 0,
    kostl like pa0001-kostl, " Cost Center
    count1 type i, " No of Positions(UAE)
    end of act4_tab.
    Internal Table for Actual Manpower Calculations(OTHERS)
    data: begin of act5_tab occurs 0,
    kostl like pa0001-kostl, " Cost Center
    count2 type i, " No of Positions(Others)
    end of act5_tab.
    Internal Table for Vaccancies Data
    data: begin of vac_tab occurs 0,
    plvar like hrp1007-plvar, " Plan Version
    otype like hrp1007-otype, " Object Type
    objid like hrp1007-objid, " Object ID
    istat like hrp1007-istat, " Planning Status
    begda like hrp1007-begda, " Begin date
    endda like hrp1007-endda, " End date
    vacan like hrp1007-vacan, " Vacancy Indicator
    status like hrp1007-status, " Status of Vacancy
    end of vac_tab.
    Internal Table to store the Report Output data
    data : begin of rep_tab occurs 0 ,
    kostl(10) type n, " Cost Cente
    plans like pa0001-plans, " Position
    vacan like hrp1007-vacan, " Vacancy Indicator
    status like hrp1007-status, " Status of Vacancy
    plstx like t528t-plstx, " Position Text
    orgtx like t527x-orgtx, " Org Unit Text
    end of rep_tab.
    Internal Table to store the Report Output data
    data : begin of rep1_tab occurs 0 ,
    kostl(10) type n, " Cost Cente
    cnt type i, " No of Vacancies
    end of rep1_tab.
    Internal Table to store the Report Output data
    data : begin of rep2_tab occurs 0 ,
    kostl(10) type n, " Cost Cente
    app_no type i, " Approved
    nat_no type i, " National
    exp_no type i, " Expatriate
    tot_no type i, " Total
    vac_no type i, " Vacancies
    end of rep2_tab.
    Declaration of Variables
    data: v_sobid like hrp1001-sobid, " Object Id
    v_sobid1 like hrp1001-sobid, " Object Id
    v_sobid2 like hrp1001-sobid, " Object Id
    v_sclas like hrp1001-sclas, " Related Obj Type
    v_subty like hrp1001-subty, " Related Object Id
    v_otype like hrp1007-otype, " Object Type
    v_str(9) type c, " Text
    v_str1(10) type c, " Text
    v_cnt like sy-tabix. " Table Index
    Declaration of Constants
    constants : c_x type c value 'X', " Flag
    c_stat1 like pa0000-stat2 value '3', " Emp Status
    c_plan like hrp1001-plvar value '01', " Plan Version
    c_name like hrp1000-uname value 'SAP', " Uname
    c_uae like pa0002-natio value 'AE', " Country
    c_type like hrp1007-otype value 'O', " Object Type
    c_otype like hrp1007-otype value 'S', " Object Type
    c_stat like hrp1007-status value '0', " Status
    c_pstat like hrp1007-istat value '1', " Plang Status
    c_sclas like hrp1001-sclas value 'K', " Rel. Obj Type
    c_subty like hrp1001-subty value 'A002', " Related ObjId
    c_subty2 like hrp1001-subty value 'A003', " Related ObjId
    c_sclas1 like hrp1001-sclas value 'O', " Rel.Obj Type
    c_subty1 like hrp1001-subty value 'A011', " Rel.Object Id
    c_kokrs like coej-kokrs value '1000'. " Controlling Area
    Selection Screen
    selection-screen begin of block b1 with frame title text-001.
    parameters :
    p_date like pa0001-begda obligatory default sy-datum. " Date
    select-options :
    s_kostl for csks-kostl, " Cost Center
    s_plans for t528b-plans. " Position ID
    selection-screen end of block b1.
    At selection-screen
    at selection-screen.
    Validate the Selection Screen fields
    perform validate_screen.
    Start-of-Selection
    start-of-selection.
    Get the Orgn data from database Table HRP1001
    perform get_org_data.
    Get the Actual Manpower from PA0001
    perform get_act_data.
    Get the Vaccancies data from database Table HRP1007
    perform get_vac_data.
    Append the data into final Internal Table
    perform append_data.
    Top-of-page
    top-of-page.
    Write the Report and Column Headings
    perform top_of_page.
    End-of-Page
    end-of-page.
    write /1(108) sy-uline.
    End-of-Selection
    end-of-selection.
    Display the Output Report.
    perform display_report.
    Form-Routines
    *& Form validate_screen
    Validation of selection Screen fields
    form validate_screen.
    Validation of Position ID
    clear t528b.
    if not s_plans[] is initial.
    select single plans
    into t528b-plans
    from t528b
    where plans in s_plans.
    if sy-subrc <> 0.
    message e999 with 'Invalid Position ID'(009).
    endif.
    endif.
    Validation of Cost Center
    clear csks.
    if not s_kostl[] is initial.
    select single kostl
    into csks-kostl
    from csks
    where kostl in s_kostl.
    if sy-subrc <> 0.
    message e999 with 'Invalid Cost Center'(008).
    endif.
    endif.
    endform. "validate_screen
    *& Form get_org_data
    Get the Orgn Data from Database Table HRP1001
    form get_org_data.
    v_str = 'Developee'(002).
    v_str1 = 'Deployment'(003).
    Select All the Positions from HRP1000
    select otype " Object Type
    objid " Object ID
    plvar " Plan Version
    istat " Planning Status
    begda " Begin date
    endda " End date
    into table obj_tab
    from hrp1000
    where otype = c_otype and
    plvar = c_plan and
    istat = c_pstat and
    begda le p_date and
    endda ge p_date and
    objid in s_plans and
    uname ne c_name.
    sort obj_tab by otype objid.
    Get the Orgn and Cost Center for all the above Positions
    if not obj_tab[] is initial.
    select otype " Object Type
    objid " Object ID
    plvar " Plan Version
    istat " Planning Status
    begda " Begin date
    endda " End date
    subty " Sub Type
    sclas " Type of Related Object
    sobid " Id of Related Object
    into table org_tab
    from hrp1001
    for all entries in obj_tab
    where otype = c_otype and
    plvar = c_plan and
    istat = c_pstat and
    begda le p_date and
    endda ge p_date and
    sclas eq c_sclas1 and
    subty eq c_subty2 and
    objid eq obj_tab-objid.
    endif.
    sort org_tab by otype objid.
    Get the Cost Center
    loop at org_tab.
    v_otype = c_otype. " S
    v_sclas = c_sclas. " K
    v_subty = c_subty1. " A011
    v_sobid = org_tab-objid.
    perform get_org using v_otype v_sclas v_subty
    v_sobid.
    if sy-subrc = 0.
    org_tab-kostl = hrp1001-sobid+0(10).
    else.
    v_otype = c_otype. " S
    v_sclas = c_sclas1. " O
    v_subty = c_subty2. " A003
    v_sobid = org_tab-objid.
    perform get_org using v_otype v_sclas v_subty
    v_sobid.
    if sy-subrc = 0.
    v_otype = c_type. " O
    v_sclas = c_sclas. " K
    v_subty = c_subty1. " A011
    v_sobid1 = v_sobid.
    perform get_org using v_otype v_sclas v_subty
    v_sobid.
    if sy-subrc <> 0.
    v_otype = c_type. " O
    v_sclas = c_sclas1. " O
    v_subty = c_subty. " A002
    v_sobid = v_sobid1.
    perform get_org using v_otype v_sclas v_subty
    v_sobid.
    if sy-subrc = 0.
    v_otype = c_type. " O
    v_sclas = c_sclas. " K
    v_subty = c_subty1. " A011
    v_sobid2 = v_sobid.
    perform get_org using v_otype v_sclas v_subty
    v_sobid.
    if sy-subrc <> 0.
    v_otype = c_type. " O
    v_sclas = c_sclas1. " O
    v_subty = c_subty. " A002
    v_sobid = v_sobid2.
    perform get_org using v_otype v_sclas v_subty
    v_sobid.
    else.
    org_tab-kostl = hrp1001-sobid+0(10).
    endif.
    endif.
    else.
    org_tab-kostl = hrp1001-sobid+0(10).
    endif.
    else.
    v_otype = c_otype. " S
    v_sclas = c_otype. " S
    v_subty = c_subty. " A002
    v_sobid = org_tab-objid.
    perform get_org using v_otype v_sclas v_subty
    v_sobid.
    if sy-subrc = 0.
    v_otype = c_otype. " S
    v_sclas = c_sclas. " K
    v_subty = c_subty1. " A011
    v_sobid1 = v_sobid.
    perform get_org using v_otype v_sclas v_subty
    v_sobid.
    if sy-subrc <> 0.
    v_otype = c_otype. " S
    v_sclas = c_sclas1. " O
    v_subty = c_subty2. " A003
    v_sobid = v_sobid1.
    perform get_org using v_otype v_sclas v_subty
    v_sobid.
    if sy-subrc = 0.
    v_otype = c_type. " O
    v_sclas = c_sclas. " K
    v_subty = c_subty1. " A011
    v_sobid2 = v_sobid.
    perform get_org using v_otype v_sclas v_subty
    v_sobid.
    if sy-subrc <> 0.
    v_otype = c_type. " O
    v_sclas = c_sclas1. " O
    v_subty = c_subty. " A002
    v_sobid = v_sobid2.
    perform get_org using v_otype v_sclas v_subty
    v_sobid.
    else.
    org_tab-kostl = hrp1001-sobid+0(10).
    endif.
    endif.
    else.
    org_tab-kostl = hrp1001-sobid+0(10).
    endif.
    endif.
    endif.
    endif.
    Get the Position Text
    clear t528t.
    select single plstx from t528t into t528t-plstx
    where sprsl = sy-langu and
    otype = c_otype and
    plans = org_tab-objid.
    org_tab-plstx = t528t-plstx.
    Get the Org Unit Text
    clear t527x.
    select single orgtx from t527x into t527x-orgtx
    where sprsl = sy-langu and
    orgeh = org_tab-sobid+0(8).
    org_tab-orgtx = t527x-orgtx.
    modify org_tab index sy-tabix.
    clear v_sobid.
    endloop.
    sort org_tab by otype objid.
    Calculate the Approved No of Positions
    loop at org_tab.
    if org_tab-kostl in s_kostl.
    move-corresponding org_tab to org1_tab.
    append org1_tab.
    clear org1_tab.
    endif.
    endloop.
    sort org1_tab by kostl objid.
    clear v_cnt.
    loop at org1_tab.
    at end of kostl.
    sy-tabix = sy-tabix - v_cnt.
    org2_tab-kostl = org1_tab-kostl.
    org2_tab-count = sy-tabix.
    v_cnt = v_cnt + sy-tabix.
    append org2_tab.
    clear:org2_tab.
    endat.
    endloop.
    sort org2_tab by kostl.
    endform. "get_org_data
    *& Form get_act_data
    Get the Actual Manpower Data from Database Table PA0001
    form get_act_data.
    clear : stat_tab, act_tab.
    refresh: stat_tab, act_tab.
    Get all the Active Employees
    select pernr " Object Type
    begda " Begin date
    endda " End date
    stat2 " Emp Status
    into table stat_tab
    from pa0000
    where stat2 eq c_stat1 and
    begda le p_date and
    endda ge p_date.
    sort act_tab by pernr.
    if not stat_tab[] is initial.
    select pernr " Object Type
    begda " Begin date
    endda " End date
    kostl " Cost Center
    orgeh " Org Unit
    plans " Position
    into table act_tab
    from pa0001
    for all entries in stat_tab
    where pernr eq stat_tab-pernr and
    kostl in s_kostl and
    plans in s_plans and
    persg eq '1' and
    begda le p_date and
    endda ge p_date.
    endif.
    sort act_tab by pernr.
    loop at act_tab.
    move-corresponding act_tab to act1_tab.
    clear pa0002-natio.
    select single natio into pa0002-natio from pa0002
    where pernr = act_tab-pernr.
    if sy-subrc = 0.
    act1_tab-natio = pa0002-natio.
    endif.
    append act1_tab.
    clear act1_tab.
    endloop.
    sort act1_tab by kostl natio.
    Calculate the Local and Expatriate Manpower
    loop at act1_tab.
    if act1_tab-natio = c_uae.
    act2_tab-kostl = act1_tab-kostl.
    act2_tab-natio = act1_tab-natio.
    else.
    act3_tab-kostl = act1_tab-kostl.
    act3_tab-natio = act1_tab-natio.
    endif.
    append: act2_tab, act3_tab.
    clear : act2_tab,act3_tab.
    endloop.
    sort act2_tab by kostl.
    sort act3_tab by kostl.
    Actual UAE Manpower
    clear v_cnt.
    loop at act2_tab.
    at end of kostl.
    sy-tabix = sy-tabix - v_cnt.
    act4_tab-kostl = act2_tab-kostl.
    act4_tab-count1 = sy-tabix.
    v_cnt = v_cnt + sy-tabix.
    append act4_tab.
    clear:act4_tab.
    endat.
    endloop.
    sort act4_tab by kostl.
    Other Countries
    clear v_cnt.
    loop at act3_tab.
    at end of kostl.
    sy-tabix = sy-tabix - v_cnt.
    act5_tab-kostl = act3_tab-kostl.
    act5_tab-count2 = sy-tabix.
    v_cnt = v_cnt + sy-tabix.
    append act5_tab.
    clear:act5_tab.
    endat.
    endloop.
    sort act5_tab by kostl.
    endform. "get_act_data
    *& Form get_org
    Get the Cost Center from Parent Org Id
    form get_org using p_v_otype p_v_sclas p_v_subty p_v_sobid.
    clear hrp1001.
    select single * from hrp1001
    where otype = p_v_otype and
    plvar = c_plan and
    istat = c_pstat and
    begda le p_date and
    endda ge p_date and
    sclas eq p_v_sclas and
    subty eq p_v_subty and
    objid eq p_v_sobid.
    v_sobid = hrp1001-sobid+0(8).
    endform. " get_org
    *& Form get_vac_data
    Get the Vaccancies Data from Database Table HRP1007
    form get_vac_data.
    if not org_tab[] is initial.
    select plvar " Plan Version
    otype " Object Type
    objid " Object ID
    istat " Planning Status
    begda " Begin date
    endda " End date
    vacan " Vacancy Indicator
    status " Status of Vacancy
    into table vac_tab
    from hrp1007
    for all entries in org_tab
    where plvar = c_plan and
    otype = c_otype and
    istat eq c_pstat and
    objid = org_tab-objid and
    begda le p_date and
    endda ge p_date and
    vacan eq c_x and
    status eq c_stat.
    endif.
    sort vac_tab by plvar otype objid.
    Get the HR data into the rep_tab Internal Table
    loop at vac_tab.
    rep_tab-plans = vac_tab-objid.
    rep_tab-vacan = vac_tab-vacan.
    rep_tab-status = vac_tab-status.
    read table org_tab with key objid = vac_tab-objid.
    if sy-subrc = 0.
    rep_tab-kostl = org_tab-kostl.
    rep_tab-plstx = org_tab-plstx.
    rep_tab-orgtx = org_tab-orgtx.
    endif.
    append rep_tab.
    clear rep_tab.
    endloop.
    loop at rep_tab.
    if not rep_tab-kostl in s_kostl.
    delete rep_tab index sy-tabix.
    endif.
    endloop.
    sort rep_tab by kostl plans.
    delete rep_tab where plstx cs v_str.
    delete rep_tab where orgtx cs v_str1.
    Calculate the Count of Vacancies in each Division
    clear v_cnt.
    loop at rep_tab.
    at end of kostl.
    sy-tabix = sy-tabix - v_cnt.
    rep1_tab-kostl = rep_tab-kostl.
    rep1_tab-cnt = sy-tabix.
    v_cnt = v_cnt + sy-tabix.
    append rep1_tab.
    clear:rep1_tab.
    endat.
    endloop.
    sort rep1_tab by kostl.
    endform. "get_vac_data
    *& Form append_data
    Append the data into final Internal Table
    form append_data.
    loop at org2_tab.
    rep2_tab-kostl = org2_tab-kostl.
    rep2_tab-app_no = org2_tab-count.
    read table act4_tab with key kostl = org2_tab-kostl
    binary search.
    if sy-subrc = 0.
    rep2_tab-nat_no = act4_tab-count1.
    endif.
    read table act5_tab with key kostl = org2_tab-kostl
    binary search.
    if sy-subrc = 0.
    rep2_tab-exp_no = act5_tab-count2.
    endif.
    read table rep1_tab with key kostl = org2_tab-kostl
    binary search.
    if sy-subrc = 0.
    rep2_tab-vac_no = rep1_tab-cnt.
    endif.
    rep2_tab-tot_no = rep2_tab-nat_no + rep2_tab-exp_no.
    append rep2_tab.
    clear rep2_tab.
    endloop.
    sort rep2_tab by kostl.
    endform. "append_data
    *& Form top_of_page
    Write the Report and Column Headings
    form top_of_page.
    skip.
    format color col_heading on.
    write: /1(108) 'NATIONAL DRILLING COMPANY'(010) centered,
    /1(108) 'Summary of Manning Level Report'(011) centered.
    format color off.
    skip.
    write: /2 'Key Date :'(013), p_date,
    75 'Report Run Date:'(041), sy-datum.
    if not s_kostl[] is initial.
    if s_kostl-high is initial.
    write: /2 'Cost Center :'(023), s_kostl-low,
    75 'Time :'(042), sy-uzeit.
    else.
    write: /2 'Cost Center From:'(024), s_kostl-low+7(3),
    'To'(022), s_kostl-high,
    75 'Time :'(042), sy-uzeit.
    endif.
    else.
    write: /75 'Time :'(042), sy-uzeit.
    endif.
    if not s_plans[] is initial.
    if s_plans-high is initial.
    write: /2 'Position Id :'(019), s_plans-low,
    75 'User :'(043), sy-uname.
    else.
    write: /2 'Position Id From:'(021), s_plans-low,
    'To'(022), s_plans-high,
    75 'User :'(043), sy-uname.
    endif.
    else.
    write: /75 'User :'(043), sy-uname.
    endif.
    write: /75 'Page No :'(044), sy-pagno.
    skip.
    write /1(108) sy-uline.
    format color col_heading.
    write:/1 sy-vline,
    12 sy-vline, 53 sy-vline,
    64 sy-vline, 65(32) 'Actual'(018) centered,
    97 sy-vline,108 sy-vline.
    write:/1 sy-vline, 2(10) 'CostCenter'(014),
    12 sy-vline, 13(40) 'Description'(026) centered,
    53 sy-vline, 54(10) 'Approved'(025) centered,
    64 sy-vline, 65(32) sy-uline,
    97 sy-vline, 98(10) 'Vacancies'(017),
    108 sy-vline.
    write:/1 sy-vline,
    12 sy-vline, 53 sy-vline,
    64 sy-vline, 65(10) 'National'(015) centered,
    75 sy-vline, 76(10) 'Expatriate'(020) centered,
    86 sy-vline, 87(10) 'Total'(016) centered,
    97 sy-vline,108 sy-vline.
    format color off.
    write /1(108) sy-uline.
    endform. "top_of_page
    *& Form Display_report
    Write the Report Output
    form display_report.
    if rep2_tab[] is initial.
    message i999 with
    'No Data found for the entered Selection'(035).
    else.
    loop at rep2_tab.
    Authorization Check for the Orgn and Cost Centers
    perform auth_check_org.
    if sy-subrc = 0.
    clear cskt.
    select single ltext into cskt-ltext from cskt
    where spras = sy-langu and
    kokrs = c_kokrs and
    kostl = rep2_tab-kostl.
    format color col_normal.
    write: /1 sy-vline, 2(10) rep2_tab-kostl+7(3),
    12 sy-vline, 13(40) cskt-ltext,
    53 sy-vline, 54(10) rep2_tab-app_no,
    64 sy-vline, 65(10) rep2_tab-nat_no,
    75 sy-vline, 76(10) rep2_tab-exp_no,
    86 sy-vline, 87(10) rep2_tab-tot_no,
    97 sy-vline, 98(10) rep2_tab-vac_no,
    108 sy-vline.
    format color off.
    at last.
    sum.
    format color 3.
    write /1(108) sy-uline.
    write: /1 sy-vline, 2(10) 'Total'(027),
    12 sy-vline,
    53 sy-vline, 54(10) rep2_tab-app_no,
    64 sy-vline, 65(10) rep2_tab-nat_no,
    75 sy-vline, 76(10) rep2_tab-exp_no,
    86 sy-vline, 87(10) rep2_tab-tot_no,
    97 sy-vline, 98(10) rep2_tab-vac_no,
    108 sy-vline.
    format color off.
    endat.
    endif.
    endloop.
    endif.
    write /1(108) sy-uline.
    endform. " Display_report
    *& Form auth_check_org
    Authorization Check for the Orgn and Cost Center
    form auth_check_org.
    authority-check object 'ZNDCHROM'
    id 'PLVAR' dummy
    id 'OTYPE' dummy
    id 'KOSTL' field rep2_tab-kostl.
    endform. "auth_check_org
    Also
    Check this link : http://www.sapdevelopment.co.uk/hr/hrhome.htm.
    Reward points if found helpful……
    Cheers,
    Chandra Sekhar.

  • Sample code for Org Management

    Hi,
             I am new to Org Management coding in HR ABAP.
       Can anybody post some simple sample code for Org. Management so that I can understand the flow of coding..
    Thanks and Regards,
    Ram

    Hi
    see the sample code using Orgn management infotypes like HRP1000 etc
    report zporgr0040
           line-size 108
           line-count 60(1)
           no standard page heading
           message-id zndc.
    Database Tables
    tables: hrp1001,     " HR Master Record (Orgn. Assignment)
            pa0002,      " Personal Data
            t528t,       " Position Texts
            t527x,       " Org Unit Text
            t528b,       " Positions
            csks,        " Cost Center
            cskt.        " Cost Center Texts
    Declaration of Internal Tables
    Internal Table for Orgn Object Data  HRP1000
    data: begin of obj_tab occurs 0,
            otype like hrp1000-otype,      " Object Type
            objid like hrp1000-objid,      " Object ID
            plvar like hrp1000-plvar,      " Plan Version
            istat like hrp1000-istat,      " Planning Status
            begda like hrp1000-begda,      " Begin date
            endda like hrp1000-endda,      " End date
          end of obj_tab.
    Internal Table for Active Employees data PA0000
    data: begin of stat_tab occurs 0,
            pernr like pa0000-pernr,       " Object Type
            begda like pa0000-begda,       " Begin date
            endda like pa0000-endda,       " End date
            stat2 like pa0000-stat2,       " Employment Status
          end of stat_tab.
    Internal Table for Actual Orgn Assignment Data PA0001
    data: begin of act_tab occurs 0,
            pernr like pa0001-pernr,       " Object Type
            begda like pa0001-begda,       " Begin date
            endda like pa0001-endda,       " End date
            kostl like pa0001-kostl,       " Cost Center
            orgeh like pa0001-orgeh,       " Org Unit
            plans like pa0001-plans,       " Position
            natio like pa0002-natio,       " Nationality
          end of act_tab.
    Internal Table for Orgn Data HRP1001
    data: begin of org_tab occurs 0,
            otype like hrp1001-otype,      " Object Type
            objid like hrp1001-objid,      " Object ID
            plvar like hrp1001-plvar,      " Plan Version
            istat like hrp1001-istat,      " Planning Status
            begda like hrp1001-begda,      " Begin date
            endda like hrp1001-endda,      " End date
            subty like hrp1001-subty,      " Sub Type
            sclas like hrp1001-sclas,      " Type of Related Object
            sobid like hrp1001-sobid,      " Id of Related Object
            kostl like pa0001-kostl,       " Cost Center
            plstx like t528t-plstx,        " Position Text
            orgtx like t527x-orgtx,        " Org Unit Text
          end of org_tab.
    Internal Table for Position Calculations
    data: begin of org1_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            objid like hrp1001-objid,      " Object ID
          end of org1_tab.
    Internal Table for Position Calculations
    data: begin of org2_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            count type i,                  " No of Positions
          end of org2_tab.
    Internal Table for Actual Manpower Calculations
    data: begin of act1_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            natio like pa0002-natio,       " Nationality
            plans like pa0001-plans,       " Position
          end of act1_tab.
    Internal Table for Actual Manpower Calculations(UAE)
    data: begin of act2_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            natio like pa0002-natio,       " Nationality
          end of act2_tab.
    Internal Table for Actual Manpower Calculations(Others)
    data: begin of act3_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            natio like pa0002-natio,       " Nationality
          end of act3_tab.
    Internal Table for Actual Manpower Calculations(UAE)
    data: begin of act4_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            count1 type i,                 " No of Positions(UAE)
          end of act4_tab.
    Internal Table for Actual Manpower Calculations(OTHERS)
    data: begin of act5_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            count2 type i,                 " No of Positions(Others)
          end of act5_tab.
    Internal Table for Vaccancies Data
    data: begin of vac_tab occurs 0,
            plvar like hrp1007-plvar,      " Plan Version
            otype like hrp1007-otype,      " Object Type
            objid like hrp1007-objid,      " Object ID
            istat like hrp1007-istat,      " Planning Status
            begda like hrp1007-begda,      " Begin date
            endda like hrp1007-endda,      " End date
            vacan like hrp1007-vacan,      " Vacancy Indicator
            status like hrp1007-status,    " Status of Vacancy
          end of vac_tab.
    Internal Table to store the Report Output data
    data : begin of rep_tab occurs 0 ,
             kostl(10) type n,                  " Cost Cente
             plans   like pa0001-plans,         " Position
             vacan   like hrp1007-vacan,        " Vacancy Indicator
             status  like hrp1007-status,       " Status of Vacancy
             plstx   like t528t-plstx,          " Position Text
             orgtx like t527x-orgtx,            " Org Unit Text
           end of rep_tab.
    Internal Table to store the Report Output data
    data : begin of rep1_tab occurs 0 ,
             kostl(10) type n,                  " Cost Cente
             cnt     type i,                    " No of Vacancies
           end of rep1_tab.
    Internal Table to store the Report Output data
    data : begin of rep2_tab occurs 0 ,
             kostl(10) type n,                  " Cost Cente
             app_no    type i,                  " Approved
             nat_no    type i,                  " National
             exp_no    type i,                  " Expatriate
             tot_no    type i,                  " Total
             vac_no    type i,                  " Vacancies
           end of rep2_tab.
    Declaration of Variables
    data: v_sobid  like hrp1001-sobid,   " Object Id
          v_sobid1 like hrp1001-sobid,   " Object Id
          v_sobid2 like hrp1001-sobid,   " Object Id
          v_sclas  like hrp1001-sclas,   " Related Obj Type
          v_subty  like hrp1001-subty,   " Related Object Id
          v_otype  like hrp1007-otype,   " Object Type
         v_str(9)    type c,            " Text
         v_str1(10)  type c,            " Text
          v_cnt    like sy-tabix.        " Table Index
    Declaration of Constants
    constants : c_x         type c value 'X',            " Flag
                c_stat1  like pa0000-stat2  value '3',   " Emp Status
                c_plan   like hrp1001-plvar value '01',  " Plan Version
                c_name   like hrp1000-uname value 'SAP', " Uname
                c_uae    like pa0002-natio  value 'AE',  " Country
                c_type   like hrp1007-otype  value 'O',  " Object Type
                c_otype  like hrp1007-otype  value 'S',  " Object Type
                c_stat   like hrp1007-status value '0',  " Status
                c_pstat  like hrp1007-istat  value '1',  " Plang Status
                c_sclas  like hrp1001-sclas value 'K',    " Rel. Obj Type
                c_subty  like hrp1001-subty value 'A002', " Related ObjId
                c_subty2 like hrp1001-subty value 'A003', " Related ObjId
                c_sclas1 like hrp1001-sclas value 'O',    " Rel.Obj Type
                c_subty1 like hrp1001-subty value 'A011', " Rel.Object Id
                c_kokrs  like coej-kokrs value '1000'. " Controlling Area
    Selection Screen
    selection-screen begin of block b1 with frame title text-001.
    parameters     :
      p_date  like pa0001-begda obligatory default sy-datum. " Date
    select-options :
      s_kostl for csks-kostl,                     " Cost Center
      s_plans for t528b-plans.                    " Position ID
    selection-screen end of block b1.
    At selection-screen
    at selection-screen.
    Validate the Selection Screen fields
      perform validate_screen.
    Start-of-Selection
    start-of-selection.
    Get the Orgn data from database Table HRP1001
      perform get_org_data.
    Get the Actual Manpower from PA0001
      perform get_act_data.
    Get the Vaccancies data from database Table HRP1007
      perform get_vac_data.
    Append the data into final Internal Table
      perform append_data.
    Top-of-page
    top-of-page.
    Write the Report and Column Headings
      perform top_of_page.
    End-of-Page
    end-of-page.
      write /1(108) sy-uline.
    End-of-Selection
    end-of-selection.
    Display the Output Report.
      perform display_report.
    Form-Routines
    *&      Form  validate_screen
    Validation of selection Screen fields
    form validate_screen.
    Validation of Position ID
      clear t528b.
      if not s_plans[] is initial.
        select single plans
          into t528b-plans
          from t528b
          where plans in s_plans.
        if sy-subrc <> 0.
          message e999 with 'Invalid Position ID'(009).
        endif.
      endif.
    Validation of Cost Center
      clear csks.
      if not s_kostl[] is initial.
        select single kostl
          into csks-kostl
          from csks
          where kostl in s_kostl.
        if sy-subrc <> 0.
          message e999 with 'Invalid Cost Center'(008).
        endif.
      endif.
    endform.                  "validate_screen
    *&      Form  get_org_data
    Get the Orgn Data from Database Table HRP1001
    form get_org_data.
    v_str  = 'Developee'(002).
    v_str1 = 'Deployment'(003).
    Select All the Positions from HRP1000
      select otype       " Object Type
             objid       " Object ID
             plvar       " Plan Version
             istat       " Planning Status
             begda       " Begin date
             endda       " End date
         into table obj_tab
         from hrp1000
         where otype = c_otype  and
               plvar = c_plan   and
               istat = c_pstat  and
               begda le p_date  and
               endda ge p_date  and
               objid in s_plans and
               uname ne c_name.
      sort obj_tab by otype objid.
    Get the Orgn and Cost Center for all the above Positions
      if not obj_tab[] is initial.
        select otype       " Object Type
               objid       " Object ID
               plvar       " Plan Version
               istat       " Planning Status
               begda       " Begin date
               endda       " End date
               subty       " Sub Type
               sclas       " Type of Related Object
               sobid       " Id of Related Object
           into table org_tab
           from hrp1001
           for all entries in obj_tab
           where otype = c_otype  and
                 plvar = c_plan   and
                 istat = c_pstat  and
                 begda le p_date  and
                 endda ge p_date  and
                 sclas eq c_sclas1 and
                 subty eq c_subty2 and
                 objid eq obj_tab-objid.
      endif.
      sort org_tab by otype objid.
    Get the Cost Center
      loop at org_tab.
        v_otype = c_otype.       " S
        v_sclas = c_sclas.       " K
        v_subty = c_subty1.                                     " A011
        v_sobid = org_tab-objid.
        perform get_org using v_otype v_sclas v_subty
                        v_sobid.
        if sy-subrc = 0.
          org_tab-kostl = hrp1001-sobid+0(10).
        else.
          v_otype = c_otype.    " S
          v_sclas = c_sclas1.   " O
          v_subty = c_subty2.                                   " A003
          v_sobid = org_tab-objid.
          perform get_org using v_otype v_sclas v_subty
                         v_sobid.
          if sy-subrc = 0.
            v_otype = c_type.     " O
            v_sclas = c_sclas.    " K
            v_subty = c_subty1.                                 " A011
            v_sobid1 = v_sobid.
            perform get_org using v_otype v_sclas v_subty
                                 v_sobid.
            if sy-subrc <> 0.
              v_otype = c_type.    " O
              v_sclas = c_sclas1.  " O
              v_subty = c_subty.                                " A002
              v_sobid = v_sobid1.
              perform get_org using v_otype v_sclas v_subty
                        v_sobid.
              if sy-subrc = 0.
                v_otype = c_type.   " O
                v_sclas = c_sclas.  " K
                v_subty = c_subty1.                             " A011
                v_sobid2 = v_sobid.
                perform get_org using v_otype v_sclas v_subty
                                 v_sobid.
                if sy-subrc <> 0.
                  v_otype = c_type.   " O
                  v_sclas = c_sclas1. " O
                  v_subty = c_subty.                            " A002
                  v_sobid = v_sobid2.
                  perform get_org using v_otype v_sclas v_subty
                          v_sobid.
                else.
                  org_tab-kostl = hrp1001-sobid+0(10).
                endif.
              endif.
            else.
              org_tab-kostl = hrp1001-sobid+0(10).
            endif.
          else.
            v_otype = c_otype.   " S
            v_sclas = c_otype.   " S
            v_subty = c_subty.                                  " A002
            v_sobid = org_tab-objid.
            perform get_org using v_otype v_sclas v_subty
                           v_sobid.
            if sy-subrc = 0.
              v_otype = c_otype.  " S
              v_sclas = c_sclas.  " K
              v_subty = c_subty1.                               " A011
              v_sobid1 = v_sobid.
              perform get_org using v_otype v_sclas v_subty
                                   v_sobid.
              if sy-subrc <> 0.
                v_otype = c_otype.  " S
                v_sclas = c_sclas1. " O
                v_subty = c_subty2.                             " A003
                v_sobid = v_sobid1.
                perform get_org using v_otype v_sclas v_subty
                          v_sobid.
                if sy-subrc = 0.
                  v_otype = c_type.   " O
                  v_sclas = c_sclas.  " K
                  v_subty = c_subty1.                           " A011
                  v_sobid2 = v_sobid.
                  perform get_org using v_otype v_sclas v_subty
                                   v_sobid.
                  if sy-subrc <> 0.
                    v_otype = c_type.    " O
                    v_sclas = c_sclas1.  " O
                    v_subty = c_subty.                          " A002
                    v_sobid = v_sobid2.
                    perform get_org using v_otype v_sclas v_subty
                            v_sobid.
                  else.
                    org_tab-kostl = hrp1001-sobid+0(10).
                  endif.
                endif.
              else.
                org_tab-kostl = hrp1001-sobid+0(10).
              endif.
            endif.
          endif.
        endif.
    Get the Position Text
        clear t528t.
        select single plstx from t528t into t528t-plstx
          where sprsl = sy-langu and
                otype = c_otype  and
                plans = org_tab-objid.
        org_tab-plstx = t528t-plstx.
    Get the Org Unit Text
        clear t527x.
        select single orgtx from t527x into t527x-orgtx
          where sprsl = sy-langu and
                orgeh = org_tab-sobid+0(8).
        org_tab-orgtx = t527x-orgtx.
        modify org_tab index sy-tabix.
        clear v_sobid.
      endloop.
      sort org_tab by otype objid.
    Calculate the Approved No of Positions
      loop at org_tab.
        if org_tab-kostl in s_kostl.
          move-corresponding org_tab to org1_tab.
          append org1_tab.
          clear org1_tab.
        endif.
      endloop.
      sort org1_tab by kostl objid.
      clear v_cnt.
      loop at org1_tab.
        at end of kostl.
          sy-tabix = sy-tabix - v_cnt.
          org2_tab-kostl = org1_tab-kostl.
          org2_tab-count   = sy-tabix.
          v_cnt = v_cnt + sy-tabix.
          append org2_tab.
          clear:org2_tab.
        endat.
      endloop.
      sort org2_tab by kostl.
    endform.              "get_org_data
    *&      Form  get_act_data
    Get the Actual Manpower Data from Database Table PA0001
    form get_act_data.
      clear  : stat_tab, act_tab.
      refresh: stat_tab, act_tab.
    Get all the Active Employees
      select pernr       " Object Type
             begda       " Begin date
             endda       " End date
             stat2       " Emp Status
           into table stat_tab
           from pa0000
           where stat2 eq c_stat1 and
                 begda le p_date  and
                 endda ge p_date.
      sort act_tab by pernr.
      if not stat_tab[] is initial.
        select pernr       " Object Type
               begda       " Begin date
               endda       " End date
               kostl       " Cost Center
               orgeh       " Org Unit
               plans       " Position
           into table act_tab
           from pa0001
           for all entries in stat_tab
           where pernr eq stat_tab-pernr and
                 kostl in s_kostl and
                 plans in s_plans and
                 persg eq '1'     and
                 begda le p_date  and
                 endda ge p_date.
      endif.
      sort act_tab by pernr.
      loop at act_tab.
        move-corresponding act_tab to act1_tab.
        clear pa0002-natio.
        select single natio into pa0002-natio from pa0002
          where pernr = act_tab-pernr.
        if sy-subrc = 0.
          act1_tab-natio = pa0002-natio.
        endif.
        append act1_tab.
        clear act1_tab.
      endloop.
      sort act1_tab by kostl natio.
    Calculate the Local and Expatriate Manpower
      loop at act1_tab.
        if act1_tab-natio = c_uae.
          act2_tab-kostl = act1_tab-kostl.
          act2_tab-natio = act1_tab-natio.
        else.
          act3_tab-kostl = act1_tab-kostl.
          act3_tab-natio = act1_tab-natio.
        endif.
        append: act2_tab, act3_tab.
        clear : act2_tab,act3_tab.
      endloop.
      sort act2_tab by kostl.
      sort act3_tab by kostl.
    Actual UAE Manpower
      clear v_cnt.
      loop at act2_tab.
        at end of kostl.
          sy-tabix = sy-tabix - v_cnt.
          act4_tab-kostl   = act2_tab-kostl.
          act4_tab-count1  = sy-tabix.
          v_cnt = v_cnt + sy-tabix.
          append act4_tab.
          clear:act4_tab.
        endat.
      endloop.
      sort act4_tab by kostl.
    Other Countries
      clear v_cnt.
      loop at act3_tab.
        at end of kostl.
          sy-tabix = sy-tabix - v_cnt.
          act5_tab-kostl   = act3_tab-kostl.
          act5_tab-count2  = sy-tabix.
          v_cnt = v_cnt + sy-tabix.
          append act5_tab.
          clear:act5_tab.
        endat.
      endloop.
      sort act5_tab by kostl.
    endform.              "get_act_data
    *&      Form  get_org
    Get the Cost Center from Parent Org Id
    form get_org using p_v_otype p_v_sclas p_v_subty p_v_sobid.
      clear hrp1001.
      select single * from hrp1001
            where otype = p_v_otype  and
                  plvar = c_plan   and
                  istat = c_pstat  and
                  begda le p_date  and
                  endda ge p_date  and
                  sclas eq p_v_sclas   and
                  subty eq p_v_subty  and
                  objid eq p_v_sobid.
      v_sobid = hrp1001-sobid+0(8).
    endform.                    " get_org
    *&      Form  get_vac_data
    Get the Vaccancies Data from Database Table HRP1007
    form get_vac_data.
      if not org_tab[] is initial.
        select plvar       " Plan Version
               otype       " Object Type
               objid       " Object ID
               istat       " Planning Status
               begda       " Begin date
               endda       " End date
               vacan       " Vacancy Indicator
               status      " Status of Vacancy
           into table vac_tab
           from hrp1007
           for all entries in org_tab
           where plvar = c_plan   and
                 otype = c_otype  and
                 istat eq c_pstat and
                 objid = org_tab-objid and
                 begda le p_date and
                 endda ge p_date and
                 vacan eq c_x  and
                 status eq c_stat.
      endif.
      sort vac_tab by plvar otype objid.
    Get the HR data into the rep_tab Internal Table
      loop at vac_tab.
        rep_tab-plans  = vac_tab-objid.
        rep_tab-vacan  = vac_tab-vacan.
        rep_tab-status = vac_tab-status.
        read table org_tab with key objid = vac_tab-objid.
        if sy-subrc = 0.
          rep_tab-kostl = org_tab-kostl.
          rep_tab-plstx = org_tab-plstx.
          rep_tab-orgtx = org_tab-orgtx.
        endif.
        append rep_tab.
        clear  rep_tab.
      endloop.
      loop at rep_tab.
        if not rep_tab-kostl in s_kostl.
          delete rep_tab index sy-tabix.
        endif.
      endloop.
      sort rep_tab by kostl plans.
    delete rep_tab where plstx cs v_str.
    delete rep_tab where orgtx cs v_str1.
    Calculate the Count of Vacancies in each Division
      clear v_cnt.
      loop at rep_tab.
        at end of kostl.
          sy-tabix = sy-tabix - v_cnt.
          rep1_tab-kostl = rep_tab-kostl.
          rep1_tab-cnt   = sy-tabix.
          v_cnt = v_cnt + sy-tabix.
          append rep1_tab.
          clear:rep1_tab.
        endat.
      endloop.
      sort rep1_tab by kostl.
    endform.                  "get_vac_data
    *&      Form append_data
    Append the data into final Internal Table
    form append_data.
      loop at org2_tab.
        rep2_tab-kostl = org2_tab-kostl.
        rep2_tab-app_no = org2_tab-count.
        read table act4_tab with key kostl = org2_tab-kostl
                                     binary search.
        if sy-subrc = 0.
          rep2_tab-nat_no = act4_tab-count1.
        endif.
        read table act5_tab with key kostl = org2_tab-kostl
                                     binary search.
        if sy-subrc = 0.
          rep2_tab-exp_no = act5_tab-count2.
        endif.
        read table rep1_tab with key kostl = org2_tab-kostl
                                     binary search.
        if sy-subrc = 0.
          rep2_tab-vac_no = rep1_tab-cnt.
        endif.
        rep2_tab-tot_no = rep2_tab-nat_no + rep2_tab-exp_no.
        append rep2_tab.
        clear rep2_tab.
      endloop.
      sort rep2_tab by kostl.
    endform.             "append_data
    *&      Form  top_of_page
    Write the Report and Column Headings
    form top_of_page.
      skip.
      format color col_heading on.
      write: /1(108) 'NATIONAL DRILLING COMPANY'(010) centered,
             /1(108) 'Summary of Manning Level Report'(011) centered.
      format color off.
      skip.
      write: /2 'Key Date        :'(013), p_date,
             75 'Report Run Date:'(041), sy-datum.
      if not s_kostl[] is initial.
        if s_kostl-high is initial.
          write: /2 'Cost Center     :'(023), s_kostl-low,
                 75 'Time           :'(042), sy-uzeit.
        else.
          write: /2 'Cost Center From:'(024), s_kostl-low+7(3),
                                    'To'(022), s_kostl-high,
                 75 'Time           :'(042), sy-uzeit.
        endif.
      else.
        write: /75  'Time           :'(042), sy-uzeit.
      endif.
      if not s_plans[] is initial.
        if s_plans-high is initial.
          write: /2 'Position Id     :'(019), s_plans-low,
                 75 'User           :'(043), sy-uname.
        else.
          write: /2 'Position Id From:'(021), s_plans-low,
                              'To'(022), s_plans-high,
                 75 'User           :'(043), sy-uname.
        endif.
      else.
        write: /75 'User           :'(043), sy-uname.
      endif.
      write: /75 'Page No        :'(044), sy-pagno.
      skip.
      write /1(108) sy-uline.
      format color col_heading.
      write:/1 sy-vline,
            12 sy-vline, 53 sy-vline,
            64 sy-vline, 65(32)  'Actual'(018) centered,
            97 sy-vline,108 sy-vline.
      write:/1 sy-vline,  2(10) 'CostCenter'(014),
            12 sy-vline, 13(40) 'Description'(026) centered,
            53 sy-vline, 54(10) 'Approved'(025) centered,
            64 sy-vline, 65(32)  sy-uline,
            97 sy-vline, 98(10) 'Vacancies'(017),
           108 sy-vline.
      write:/1 sy-vline,
            12 sy-vline, 53 sy-vline,
            64 sy-vline, 65(10) 'National'(015) centered,
            75 sy-vline, 76(10) 'Expatriate'(020) centered,
            86 sy-vline, 87(10) 'Total'(016) centered,
            97 sy-vline,108 sy-vline.
      format color off.
      write /1(108) sy-uline.
    endform.               "top_of_page
    *&      Form  Display_report
    Write the Report Output
    form display_report.
      if rep2_tab[] is initial.
        message i999 with
        'No Data found for the entered Selection'(035).
      else.
        loop at rep2_tab.
    Authorization Check for the Orgn and Cost Centers
          perform auth_check_org.
          if sy-subrc = 0.
            clear cskt.
            select single ltext into cskt-ltext from cskt
                where spras = sy-langu and
                      kokrs = c_kokrs and
                      kostl = rep2_tab-kostl.
            format color col_normal.
            write: /1 sy-vline, 2(10) rep2_tab-kostl+7(3),
                   12 sy-vline, 13(40) cskt-ltext,
                   53 sy-vline, 54(10) rep2_tab-app_no,
                   64 sy-vline, 65(10) rep2_tab-nat_no,
                   75 sy-vline, 76(10) rep2_tab-exp_no,
                   86 sy-vline, 87(10) rep2_tab-tot_no,
                   97 sy-vline, 98(10) rep2_tab-vac_no,
                  108 sy-vline.
            format color off.
            at last.
              sum.
              format color 3.
              write /1(108) sy-uline.
              write: /1 sy-vline, 2(10) 'Total'(027),
                     12 sy-vline,
                     53 sy-vline, 54(10) rep2_tab-app_no,
                     64 sy-vline, 65(10) rep2_tab-nat_no,
                     75 sy-vline, 76(10) rep2_tab-exp_no,
                     86 sy-vline, 87(10) rep2_tab-tot_no,
                     97 sy-vline, 98(10) rep2_tab-vac_no,
                    108 sy-vline.
              format color off.
            endat.
          endif.
        endloop.
      endif.
      write /1(108) sy-uline.
    endform.                    " Display_report
    *&      Form  auth_check_org
    Authorization Check for the Orgn and Cost Center
    form auth_check_org.
      authority-check object 'ZNDCHROM'
            id 'PLVAR' dummy
            id 'OTYPE' dummy
            id 'KOSTL' field rep2_tab-kostl.
    endform.                  "auth_check_org
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Error: insertion of infotype 1000 (return code 2)

    Hi All,
    We are trying to Update the Org Structure in ECC which is typically used for the MM Processes.
    When ever we are trying to update the BP or create a new BP for Few Specific Company Codes we are receiving the below error
    Error: insertion of infotype 1000 (return code 2).
    SImilary we also see this error as well
    Database update not possible, data record    01S 500304541001A0031
    Your inputs are highly valuable.
    Regards,
    Satya

    the problem you mentioned here is not the whole problem in my opinion, so let me take a few assumptions and you tell me if some/all of em are correct or alternately you put in more detail in your query.. ok?
    well here goes:
    1. you mentioned BP which is a business partner object but you did not talk about hcm at all so am assuming sap hr has not been implemented at all in your sap box... right/
    2. then the infotype 100 and insert error is the least of your worries if the above point is correct.
    3. then you also have some nominal positions in your sap box to support your logistics process...
    4. and then I am taking a wild guess here --> you are trying to have a relation between a position and bp objects directly ...
    well I may be totally off the rocker in the above but what you need to tell us  could be :
    1. explain the business process.
    2. then we talk about how you are doing the business process in sap (is hr implemented or not? if yes to what extent etc...) and dont limit this point to logistics,.. cover the whole gamut of how you are doing it in sap today and am sure it spans across hcm and logistics
    3. then, a bit more info on what you were trying to do in a step by step fashion,... and where exactly you are encountering the error,.. --> the reason am asking for this is --> in my expereince I have seen a lot of logistics guys who are gurus intheir areas of expertise but you talk sap hr they are like babies,.. and the vice versa is also true,.. so if you are not able to explain point 2 above in full this point will give the complete technical picture.
    provide the above and loads of folks here will be able to help you out.
    cheers

  • Update Talent Management Infotype - Education, Career, Accomplishment

    Hi freinds,
    I got a requirement to update Talent management infotypes (7402/03/04/05/06/07) from portal in a custom webdynpro application. Can you provide any info on updating, as we are having text fields(>1000 character) for each infotype. How can integrate text field along with HRP740x tables and update them?
    Thanks,
    Anuroop

    Hi Anu,
    You need to findout any FM or BAPI is there to update that infotype like HR_INFOTYPE_OPERATIONS.
    Then using that you can update infotypes from WD.
    Cheers,
    Kris.

  • Org Management Reports.

    Hello All,
    We recently upgraded from 4.6c to ECC5.0. After the upgrade when we execute reports in Org Management like S_AHR_61016494 or any other reports, the reports changed a lot ( Layout ) the data is fine. In our previous version we are able to see many options and also we can save the report as a local file from the menu path system -> List -> Save -> Local File or any other options.
    But in our upgraded system there is no option like this and many others. We can not even right click on any object and edit it, we used to do that.
    Can someone explain if this has been changed like this or is this some problem with us.
    Its not authorization problem as I have my profile copied over from old system to the new one.
    Thanks a lot for your inputs!
    Chakri.

    Hi Chakri,
    Agree with you. Some workarounds :
    - To click and edit an object : Click the object, then goto Edit -> Maintain trans.
    - To save to a file :
      - Right mouse click at the header of the report and select "Export to Microsoft    Excel". Mine encounter an error when exporting to Excel.
      - Alternatively, run the report in the background. Then use sm37 to retrieve the
        spool file. When you view this spool file, you are able to save via List -> Save ->
        Local File.
    Hope it helps. Thanks.
    Regards
    Kir Chern

  • Migrating HR Org Management data.... any help files etc.

    Hi,
    I am familiar with migrating HR master data, payroll data, NI data, i.e. infotypes etc.
    I would like to know if anyone can give me a heads up on migrating Org management data, and positions data. Is there any abap involvement for this or is it purely a functional issue?
    What are main transactions for this? Can it be done with lsmw? Is there a standard procedure for migrating org mgt data?
    Any advice and assistance greatly appreciated.
    Thank you.

    I am using tcode PP02 and then entering values for
    Plan Version,
    Object Type,
    Object ID,
    Infotype,
    Subtype,
    Planning status, and
    Validity.
      Once I hit create icon "Create Relationships" screen comes up here I have to enter Type of related object, which I can select from a drop down list. This field is P1001-SCLAS. Which is of 2 characters, but when I see a drop down list its a description which is more than 2 characters. How can I populate values in this field using BDC  or Recording. the value I am reading from a file for this field is k or s ... but same field has a drop down list with descriptions but not k or s...., its kind of hard for me to imagin how this field can be populated. When I run a session in SM35  I am getting an error in BDC session as " No batch input data for screen MP100100 2000 ".When I look Converted data in LSMW its k or s ... but not description this is obvious.
      Thanks.

  • Org Management Data Migration

    Hello everyone !!
       I am currently working of org data migration from legacy to SAP and using LSMW Recording for Infotype 1000, 1001, 1002 .....
        when I came across info type 1001 were I was creating Relations using recording i can easily do whole recording with out any problem, and then I saved this recording and provided source and structure fields.
       Problem I encountered at P1001-SCLAS in second screen of tcode PP02. where I have to enter " Type of related object ". its a list of selections where I have to pick one from a list, the value i pick here is description of what I upload from a text file. for eg: if I read the value of  SCLAS : k or s, or c or o. then similarly I have to pick a description.
    k = cost center, s = positions, c =  jobs and o =  org unit. depending of subtype I select a list of description is populated.
    In P1001-SCLAS which is in the second screen of PP02. here comes the problem, this field is of only 2 character but on the screen I have to select a description which is obviously greater than 2 character.
       When I read file and convert data the converted data has only values picked from the file but not description.
      Here is what I needed. How do I convert a 2 char field to a 12 or 15 character field in target table and how to select a single description from a list of descriptions.
      Note: DTT is ruled out here. No chance of using DTT. But still you can add comments on DTT.
      Thanks for any help.

    I am using tcode PP02 and then entering values for
    Plan Version,
    Object Type,
    Object ID,
    Infotype,
    Subtype,
    Planning status, and
    Validity.
      Once I hit create icon "Create Relationships" screen comes up here I have to enter Type of related object, which I can select from a drop down list. This field is P1001-SCLAS. Which is of 2 characters, but when I see a drop down list its a description which is more than 2 characters. How can I populate values in this field using BDC  or Recording. the value I am reading from a file for this field is k or s ... but same field has a drop down list with descriptions but not k or s...., its kind of hard for me to imagin how this field can be populated. When I run a session in SM35  I am getting an error in BDC session as " No batch input data for screen MP100100 2000 ".When I look Converted data in LSMW its k or s ... but not description this is obvious.
      Thanks.

  • Infotype 1000, Position data IDOC is not getting created via RBDMIDOC

    Hi All,
    We are using PFAL styandard HRMD_A message type,  while executing RBDMIDOC with message type HRMD_A, all the infotypes data IDOC is created except Infotype 1000 Position(S).
    The same is (Infotype 1000, position IDOC is created in dev server) but the same is not getting created in Quality and Prod.
    Can any one suggest the same, what could be the error.
    Thanks.

    Hi,
    You need to check in your filter settings in BD64 for your corresponding distribution model, if you have included IT1000 for PD objects such as O, C, S. After adding this filter group, you have to distribute the source system into the target system (Edit > Model view> distribute). In the target system, you have to generate partner profiles (environment> generate partner profiles).
    Hope it helps,
    Christine

Maybe you are looking for

  • Help me please setting up this

    can anyone help me to set up my L305D-S5934 satellite laptop ,it is in english and I need to change to spanish,what do I need to do .i am not an expert so easy way thanks. [Edited by Admin - Sorry forum posts have to be in English]

  • My ipod shuffle 4th doesn't connect to itunes or windows, what can I do?

    hello, it's been like 2 weeks since I did the update of itunes and everything to get my ipod shuffle 4th generation, and also did all the troubleshooting from the apple page, and nothing happens. It doesn't connect to itunes or windows. anyone of you

  • ITunes can't find my tracks - please please help, DJ in need to urgent fix!

    iTunes cannot find my tracks which have been working fine on my external HDD for a long time. Basically today I have tried to move my library from one external HD to another (due to portability issues) I changed my iTunes media folder location in the

  • Freight Charges/Shipping charge

    Hello SAP Forum, What are the different ways to charge freight to customers based on weight and distance (point of departure (shipping point/plant) to point of arrival)? Can this be achieved by implementing shipment cost document? And will the charge

  • Firefox on the dock

    I downloaded firefox onto my macbook pro and I turned off the computer when I was finished using it. When I turned it back on, both firefox and safari were missing from the doc. Now everytime I want to open either safari or firefox I have to go to th