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 problem in BKPF

Former Member
0 Likes
898

Hi,

I have written the following Select Query .I got one record in IT_BKPF1 but the awkey field in Internal Table IT_BKPF1 is Blank. can u help me.

SELECT bukrs

belnr

gjahr

blart

bldat

budat

cpudt

usnam

bvorg

xblnr

bstat

awtyp

awkey

INTO TABLE it_bkpf1

FROM bkpf

WHERE awkey = '51056012492007 '.

Regards,

Deepthi.

7 REPLIES 7
Read only

Former Member
0 Likes
800

make sure that Internal Table BKPF has the same structure.

bukrs

belnr

gjahr

blart

bldat

budat

cpudt

usnam

bvorg

xblnr

bstat

awtyp

awkey

the way you are selecting.

Read only

0 Likes
800

Yes, it has got the same structure...

Read only

0 Likes
800

check the declaration for that internal table. it should match with ur select query field order

Read only

Former Member
0 Likes
800

use INTO CORRESPONDING FIELDS OF TABLE it_bkpf1

Read only

Former Member
0 Likes
800

The field in the internal table should be in the same ORDER and of same TYPE.

Please verify.

Thanks,

Amol

Read only

Former Member
0 Likes
800

I have commented bstat field from selection as it has got some deep strcture.

SELECT bukrs

belnr

gjahr

blart

bldat

budat

cpudt

usnam

bvorg

xblnr

  • bstat

awtyp

awkey

INTO TABLE it_bkpf1

FROM bkpf

FOR ALL ENTRIES IN it_ekbe

WHERE

awkey = it_ekbe-awkey.

Read only

0 Likes
800

BSTAT a deep structure?

Better include AWTYP in the where-condition, or we will see you in the performance forum soon.

Thomas