Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Select entries present in an internal table using a range of key values

Hi guys,

I have an internal table tb_bseg.

It contains the vendor code (lifnr), document number (belnr) and other fields.

How can I select values so that it may follow my (lifnr) range values in the selection screen?

SELECT belnr lifnr gsber mwskz hwbas wrbtr anln1 aufnr prctr projk nplnr kostl FROM bseg INTO TABLE tb_bseg

WHERE bukrs = pa_bukrs

AND belnr = tb_bkpf-belnr

AND gjahr = tb_bkpf-gjahr.

  • AND lifnr IN cd_lifnr. ??? can I use something like this?

Please guide me regarding this.

Best regards,

Reymar

Tags:
Former Member
Former Member replied

Hi Reymar,

You are right . You can use that way. So your select query will be

SELECT belnr lifnr gsber mwskz hwbas wrbtr anln1 aufnr prctr projk nplnr kostl FROM bseg INTO TABLE tb_bseg

WHERE bukrs = pa_bukrs

AND belnr = tb_bkpf-belnr

AND gjahr = tb_bkpf-gjahr

AND lifnr IN cd_lifnr.

where cd_lifnr is the selection screen field.

declare it as

SELECT-OPTIONS :

CD_LIFNR FOR BSEG-LIFNR.

Regards,

Swapna.

Edited by: NagaSwapna Thota on Sep 4, 2008 5:19 PM

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question