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

Former Member
0 Likes
506

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
Read only

JozsefSzikszai
Active Contributor
0 Likes
483

select single matnr

werks

into CORRESPONDING FIELDS OF marc

from marc

where matnr = 'ETEST1'

and werks = '0001'.

3 REPLIES 3
Read only

JozsefSzikszai
Active Contributor
0 Likes
484

select single matnr

werks

into CORRESPONDING FIELDS OF marc

from marc

where matnr = 'ETEST1'

and werks = '0001'.

Read only

former_member404244
Active Contributor
0 Likes
483

Hi,

use CORRESPONDING FIELDS OF marc

Regards,

Nagaraj

Read only

arunkumar_yerram
Participant
0 Likes
483

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