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 stmt

Former Member
0 Likes
895

hi gurus,

Select * from bkpf into table itab

WHERE bukrs = 1800

AND bstat in (SPACE, 'A' , 'B' , 'D')

AND budat IN zpdate

AND STBLG = ''.

order by primary key.

the above select stmt is going to dump. plz help to solve this issue.

thanks and regards,

vinay

7 REPLIES 7
Read only

Former Member
0 Likes
869

Hi,

Select * from bkpf into table itab

WHERE bukrs = 1800

AND bstat in (SPACE, 'A' , 'B' , 'D') AND budat IN zpdate

AND STBLG = ''. <b>Here give Space like ' '.</b> I think it is taking the value equal to ".

order by primary key.

Regards,

Anji

Read only

Former Member
0 Likes
869

<b>Select * from bkpf into table itab

WHERE bukrs eq '1800'

AND bstat in ('', 'A' , 'B' , 'D')

AND budat IN zpdate

AND STBLG eq ''.</b>

Regards

Prabhu

Read only

Former Member
0 Likes
869

Alson,

First the internal table should have the same structure of BKPF.

Second ---ZPDATE should be the type of "BKPF-budat".

Thire Do like this.

Select * from bkpf into table itab

WHERE bukrs = '1800'

AND bstat in (SPACE, 'A' , 'B' , 'D')

AND budat IN zpdate

AND STBLG = ''.

SORT itab by bukrs belnr gjahr.

Pls. mark if useful

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
869

Hi alson,

Try this:

SELECT * FROM bkpf INTO TABLE itab

WHERE bukrs = 1800

AND bstat IN (space, 'A' , 'B' , 'D')

AND budat In zpdate

AND stblg = ' '

ORDER BY PRIMARY KEY.

*reward if helps.

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
869

Hi

Hope only mistake here is:

Select * from bkpf into table itab

WHERE bukrs = 1800

AND bstat in (SPACE, 'A' , 'B' , 'D')

AND budat IN zpdate

AND STBLG = ''.

order by primary key.

U have to give

Select * from bkpf into table itab

WHERE bukrs = 1800

AND bstat in (SPACE, 'A' , 'B' , 'D')

AND budat IN zpdate

AND STBLG = ' '.

order by primary key.

Here space convention gone wrong.

Regards,

kumar

Read only

Former Member
0 Likes
869
REPORT YJJTEST1 .

tables bkpf.
DATA: itab TYPE STANDARD TABLE OF bkpf WITH HEADER LINE.
select-options zpdate for bkpf-budat.

Select * from bkpf into table itab
WHERE bukrs = 'ITC1'
AND bstat in (SPACE, 'A' , 'B' , 'D')
AND budat IN zpdate
AND STBLG = ''
order by primary key.

see this code adn see teh table declaration u r using.

Reward if this helsp.

Read only

Former Member
0 Likes
869

Try this ...

its not going for dump..

TABLES BKPF.

SELECT-OPTIONS ZPDATE FOR BKPF-BUDAT.

DATA ITAB TYPE STANDARD TABLE OF BKPF WITH HEADER LINE.

Select * from bkpf into table itab

WHERE bukrs = '1800'

AND bstat in (SPACE, 'A' , 'B' , 'D')

AND budat IN zpdate

AND STBLG = ' '

order by primary key.

still if it goes for a dump then there may be some declaration mistakes in ur prgram check that...!