Retrieve SAP Organisation unit from HR selection screen

Simply use the code below to retrieve org. unit from standard HR selection screen. When using logical database PNP


*Retrieve Org. Unit from selection screen
DATA: gd_orgunit like p0001-orgeh.
    read table pnpobjid index 1.
    if sy-subrc eq 0.
      gd_orgunit = pnpobjid-low.
    endif.

Related Articles

Add new entry to SAP HRP1001 and other infotype tables using ABAP Function Module
Delete infotype (i.e. HRP1001) relationship record by changing the validity date of entry
Retrieve SAP HR Organisation unit relationship within HRP1001
SAP Search helps for HR org unit values
Retrieve text for SAP HR Organisation unit