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 a select

Former Member
0 Likes
1,262

Hi, I'm looking a source code of abap report and I found that:

SELECT SINGLE * FROM *KNA1

WHERE KUNNR = *BSEG-FILKD

what does it means? The * before the name of the table

Thanks.

1 ACCEPTED SOLUTION
Read only

former_member873340
Active Participant
0 Likes
1,233

Hi Dani,

  • means that all the fields from the table table KNA1 wil be selected into the work area of KNA1.

KNA1 must have been declared as

Tables : KNA1. in the declaration part.

This declaration creates a automatic workarea of the same type as KNA1.

Do you have any other clarification please feel free to ask.

Regards

Gowri

12 REPLIES 12
Read only

Former Member
0 Likes
1,233

This *BSEG is the workarea of type BSEG.

That is also the reason why SINGLE is used

Regards

Nishant

Read only

former_member873340
Active Participant
0 Likes
1,234

Hi Dani,

  • means that all the fields from the table table KNA1 wil be selected into the work area of KNA1.

KNA1 must have been declared as

Tables : KNA1. in the declaration part.

This declaration creates a automatic workarea of the same type as KNA1.

Do you have any other clarification please feel free to ask.

Regards

Gowri

Read only

Former Member
0 Likes
1,233

Hi,

It means the selected data is coming in the workarea.

Reward if useful.

Regards,

Shilpi

Read only

0 Likes
1,233

Thanks all!!!!

Read only

0 Likes
1,233

I'm upgrading 4.5 to 6.0 ECC version and doesn't work if I use the same statement. Someone knows if I have to change anything? Thank you all.

Read only

0 Likes
1,233

Hi,

you can use

SELECT SINGLE * FROM KNA1

INTO KNA1

WHERE KUNNR = ...

cya,

dimas

Read only

0 Likes
1,233

Hi,

I meant

SELECT SINGLE * FROM KNA1

INTO KNA1

WHERE KUNNR = BSEG-FILKD.

cya,

dimas

Read only

0 Likes
1,233

With INTO KNA1, do you want to say INTO a work area?

Read only

0 Likes
1,233

yes... select single just return one row form your table... is the same when you use select... endselect.

cya,

dimas

Read only

0 Likes
1,233

sorry...

I assumed that you defined KNA1 with

TABLES KNA1.

but you're right, it's into a working area

cya,

Dimas.

Read only

0 Likes
1,233

But, do you know why *kna1 gives error when changing from version 4.5 to 6.0 ECC?

Read only

0 Likes
1,233

I don't know why... but sicerely I always use the long way _