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

Former Member
0 Kudos

select single matnr

werks

into marc

from marc

where matnr = 'ETEST1'

and werks = '0001'.

Output comes as 1

whereas table contains values as shown, what could be the issue.

1 ACCEPTED SOLUTION

JozsefSzikszai
Active Contributor
0 Kudos

select single matnr

werks

into CORRESPONDING FIELDS OF marc

from marc

where matnr = 'ETEST1'

and werks = '0001'.

3 REPLIES 3

JozsefSzikszai
Active Contributor
0 Kudos

select single matnr

werks

into CORRESPONDING FIELDS OF marc

from marc

where matnr = 'ETEST1'

and werks = '0001'.

former_member404244
Active Contributor
0 Kudos

Hi,

use CORRESPONDING FIELDS OF marc

Regards,

Nagaraj

arunkumar_yerram
Explorer
0 Kudos

Hi SV,

This scenario occurs for the following reason.

1. When there is conversion exit for either MATNR or WERKS. To check whether a conversion exit exists for these two, go to the domains for the above two.

To avoid this, do the following.

1. Declare variables for both Matnr & Werks.

2. Call the conversion functions for the above fields. Since there are two, you should be calling the conversion function modules (mostly 'CONVERSION_EXIT_ALPHA_INPUT') for each of them.

3. Pass these values in the where condition of the select query.

This should solve your purpose.

Regards,

Arun