Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Retrieving data from AUSP

Former Member
0 Likes
8,996

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

1 ACCEPTED SOLUTION
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
5,375

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

4 REPLIES 4
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
5,376

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

Read only

Former Member
0 Likes
5,375

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.

Read only

atul_mohanty
Active Contributor
0 Likes
5,375

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

Read only

Former Member
0 Likes
5,375

Thank you guys I really appreciate the helpful answers.

Merry Christmas

Dave