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 query

former_member587342
Participant
0 Likes
1,153

Hi Experts

I have one scenario i need to pass ebeln to ekpo so we need to get bednr associated with it.then i need to pass this bednr to ekpo-bednr so we will get all po's assocaited with this bednr.

I ma getting error. could you please help me out to achieve this.

so i have write query like this

data: lv_po type ekpo-bednr.

select bednr from ekpo into lv_po where ebeln = po_number.(po_number is the attriubute

4 REPLIES 4
Read only

srikanthnalluri
Active Participant
1,008

Read the Documentation - https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapselect.htm

Either you need to write SELECT SINGLE or Close the set using ENDSELECT.

Read only

tan_michael
Active Participant
0 Likes
1,008

Hi,

I think you should use SELECT SINGLE..

Read only

0 Likes
1,008

select single bednr

from ekpo

into lv_po

where ebeln = po_number.

Read only

matt
Active Contributor
1,008

"Getting an error" is not really sufficient detail.