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

Select query not working

Former Member
0 Likes
1,266

Hi

The below code is not selecting the data though the table has value for this selection criteria

REPORT ZTEST_EZHIL.

Tables : AUSP.

data: atwrt like ausp-atwrt.

Select atwrt from AUSP into ausp-atwrt

where OBJEK = '000000000000888143' AND ATINN = 'ZYMER' and MAFID = 'O'.

Endselect.

Write: ausp-atwrt.

Can you tell me why because?

Thanks,

Ezhil.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
980

Hello

Use FM CONVERSION_EXIT_ATINN_INPUT for convert 'ZYMER' into internal format and pass this into select query.

5 REPLIES 5
Read only

Former Member
0 Likes
981

Hello

Use FM CONVERSION_EXIT_ATINN_INPUT for convert 'ZYMER' into internal format and pass this into select query.

Read only

manthanraja
Active Participant
0 Likes
980

REPORT ZTEST_EZHIL.

Tables : AUSP.

data: atwrt like ausp-atwrt.

Select atwrt from AUSP into ausp-atwrt <=== Declaration of the said object missing

where OBJEK = '000000000000888143' AND ATINN = 'ZYMER' and MAFID = 'O'.

Endselect.

Write: ausp-atwrt.

Read only

0 Likes
980

Sorry.

REPORT ZTEST_EZHIL.

Tables : AUSP.

data: atwrt like ausp-atwrt.

Select atwrt from AUSP into atwrt

where OBJEK = '000000000000888143' AND ATINN = 'ZYMER' and MAFID = 'O'.

Endselect.

Write: atwrt.

But still its not working

Read only

0 Likes
980

guess you should try

Dzed Maro''s solution ..

in this way


CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
                 EXPORTING
                   input         =
*                IMPORTING
*                  OUTPUT        =

.

Might work ...

BR

Manthan Raja

Read only

Former Member
0 Likes
980

Hi,

"Please note

if you are using the FM as mentioned above 
most of the cases this conversion is used with in a loop.
this becomes performance issue.
so you can get all the corresponding ATINN outside the loop from CABN table
Just check the FM it also gets the ATINN against the ATNAM from CABN Table only
" Hope this would help in your future issues/Requirements

Tables : CABN.
DATA : WA_CABN TYPE CABN.
SELECT ATINN FROM CABN INTO WA_CABN-ATINN WHER ATNAM = 'ZYMER'.
IF SY-SUBRC = 0.

Select atwrt from AUSP into ausp-atwrt <=== Declaration of the said object missing 

where OBJEK = '000000000000888143' AND ATINN = WA_CABN-ATINN and MAFID = 'O'.
else.
message 'ZYMER is not maintained' type 'E' " or any other type
ENDIF.

Cheerz

Ram