Hi experts,
I'm trying to retrieve the Managing Department for functional locations from table AUSP. I get the Object Number as follows:
select single CUOBJ from INOB into OBJ
where OBJEK = iflo-tplnr.
I then try to get Managing Department with the following code:
select single ATWRT from AUSP into DEPT
where OBJEK = OBJ
and ATINN = 'P_MANAGINGDEPARTMENT'.
This is coming back as blank. If i miss out the last line (and ATINN = 'P_MANAGINGDEPARTMENT') I get the first entry in the AUSP table for the relative object number. Does anyone know why i'm getting a blank field? I can select P_MANAGINGDEPARTMENT in AUSP-ATINN SE16N and it works.
Thank you and kind regards
Dave