Skip to Content
0
Former Member
Mar 28, 2006 at 03:28 PM

abap query

23 Views

hi folks,

I need some help in this query below.

data: v_gsber(4) type n.

Select single gsber into v_gsber from pa0001

where pernr eq wa_tab-pernr and gsber ne 0.

It is throwing an error saying that the select statement should end with 'endselect'

I do not want to use endselect because it harms the performance.

The issue is: I am trying to retireve gsber from PA0001 for a 'pernr'and for every pernr there is more than one record in the table and the record of the pernr the gsber(business area) field is populated and I need to get that record only.

something like this...

PA0001 TABLE

pernr bukrs .... gsber

120005 4020 blank

120005 4020 blank

120005 4020 7317

I need the record whose gsber value is populated.

How can I change the query to avoid using 'endselect'.

Thanks

Vinu