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

problem with SELECT SINGLE *

Former Member
0 Likes
607

Hi experts,

SELECT SINGLE * FROM cosp WHERE objnr = g_objnr AND

gjahr = p_gjahr AND

wrttp = '01' AND

versn = p_ver AND

vrgng = 'RKP1'.

IF sy-subrc = 0.

if the values of

gjahr = KS500081A650

wrttp = '01'

versn = 'N0'

vrgng = 'RKP1'.

there are 18 recors exist in table 'cosp' then sysbrc= 0. its wrking fine

but if change verision versn = '01' then check in table 'cosp' there are 31 records exits but my select query not selecting any record and sy-subrc <> 0.

please tell me what is the reason?

regards

niru

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
577

Try:

versn = '001' 

Rob

3 REPLIES 3
Read only

Former Member
0 Likes
578

Try:

versn = '001' 

Rob

Read only

Former Member
0 Likes
577

Hi Niru,

There must be something wrong in your analysis.Onc again check entries in table.

Regards,

Atish

Read only

Former Member
0 Likes
577

Neeru,

The data element VERSN is of length. So as Rob suggested try


SELECT SINGLE * FROM cosp WHERE objnr = g_objnr AND
gjahr = p_gjahr AND
wrttp = '01' AND
versn = '001' AND
vrgng = 'RKP1'.

Regards

Aneesh.