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 stmt

Former Member
0 Kudos
76

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

Former Member
0 Kudos
50

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

Former Member
0 Kudos
50

<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

Former Member
0 Kudos
50

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

Sandeep_Kumar
Product and Topic Expert
Product and Topic Expert
0 Kudos
50

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.

sreeramkumar_madisetty
Active Contributor
0 Kudos
50

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

Former Member
0 Kudos
50
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.

Former Member
0 Kudos
50

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...!