Application Development 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: 

Select query not working

Former Member
0 Kudos
507

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

Former Member
0 Kudos
221

Hello

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

5 REPLIES 5

Former Member
0 Kudos
222

Hello

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

manthanraja
Active Participant
0 Kudos
221

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.

0 Kudos
221

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

0 Kudos
221

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

former_member1245113
Active Contributor
0 Kudos
221

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