Share |

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.