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

Former Member
0 Likes
847

hi to all,

help me in this issue

SELECT *

FROM ZFtable

INTO IT_cus

WHERE ZSTAT = IT_CUSBAL-ZSTAT

AND ZINVIND = ' '

AND TRANSINST EQ ' '

when i keep this transinst eq ' ' it is not collecting any date but date is therein database is there any mistake in select stament.

thanks in advance

kiran kumar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
816

You can do the following :

SELECT *

FROM ZFtable

INTO IT_cus

WHERE ZSTAT = IT_CUSBAL-ZSTAT

AND ZINVIND = ' '

AND TRANSINST <b>= SPACE.</b>

7 REPLIES 7
Read only

Former Member
0 Likes
817

You can do the following :

SELECT *

FROM ZFtable

INTO IT_cus

WHERE ZSTAT = IT_CUSBAL-ZSTAT

AND ZINVIND = ' '

AND TRANSINST <b>= SPACE.</b>

Read only

0 Likes
816

hi ravi,

with keeping sapce also it is not working.

thanks and regards

kiran kumar

Read only

Former Member
0 Likes
816

Hi,

Check the data type of this field "TRANSINST"...

also check the initial value of the data type..

Try to compare it with the initial value.

Regards

Read only

Former Member
0 Likes
816

Hi Kiran,

Kindly try this code:

SELECT * FROM zftable INTO it_cus
WHERE zstat EQ it_cusbal-zstat
AND   zinvind <b>IS INITIAL</b>
AND   transinst <b>IS INITIAL</b>.

hope this helps!

best regards,

Thangesh

Read only

Former Member
0 Likes
816

Hi kiran,

there are 2 ways.

first create a field like TRANSINST and let it initial.

data TRANSINST like ZFTABE-TRANSINST.

*

SELECT * FROM ZFTABE where TRANSINST = TRANSINST.

...

...

ENDSELECT.

*

Another way is to check with initial.

Regards, Dieter

Message was edited by: Dieter Gröhn

Read only

Former Member
0 Likes
816

It seems that the value in the field for TRANSINST is not SPACE. Hence It is not returning you any data.

Read only

former_member404244
Active Contributor
0 Likes
816

Hi kiran,

u query is fine..but It seems that the value in the field for TRANSINST is not equal to SPACE. So u r not getting any values.Chek the same...

Regards,

nagaraj