‎2013 Dec 23 12:17 PM
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
‎2013 Dec 23 12:24 PM
Hi Dave
Please use function module CONVERSION_EXIT_ATINN_INPUT pass in input your P_MANAGINGDEPARTMENT' value and then use the output value to do select on AUSP table.
It will work as SAP is doing a conversion on this field from external to internal and vice versa
Nabheet
‎2013 Dec 23 12:24 PM
Hi Dave
Please use function module CONVERSION_EXIT_ATINN_INPUT pass in input your P_MANAGINGDEPARTMENT' value and then use the output value to do select on AUSP table.
It will work as SAP is doing a conversion on this field from external to internal and vice versa
Nabheet
‎2013 Dec 23 12:35 PM
select single CUOBJ from INOB into OBJ
where OBJEK = iflo-tplnr.
CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
EXPORTING
INPUT = P_MANAGINGDEPARTMENT
IMPORTING
OUTPUT = P_MANAGINGDEPARTMENT.
select single ATWRT from AUSP into DEPT
where OBJEK = OBJ
and ATINN = P_MANAGINGDEPARTMENT.
‎2013 Dec 23 1:03 PM
Hi Dave -
The field ATINN in the table AUSP has a conversion routine atached at domain level.
In SE11, you can check the domain 'ATINN', the routine 'ATINN' under the 'definition' tab.
Before you retrieve the data from table AUSP, you need to use the conersion routine CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT' for the field P_MANAGINGDEPARTMENT.
Example
CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
EXPORTING
INPUT = P_MANAGINGDEPARTMENT
IMPORTING
OUTPUT = P_MANAGINGDEPARTMENT.
Then you can retrieve the data from table AUSP passing ATINN = P_MANAGINGDEPARTMENT.
Let us know, if it helps.
Regards,
Atul Mohanty
‎2013 Dec 23 5:01 PM
Thank you guys I really appreciate the helpful answers.
Merry Christmas
Dave