Skip to Content
0
Former Member
Sep 09, 2009 at 06:30 AM

Data from BSEG table

147 Views

Hi all,

I have written a select query to pull data from BSEG table for BSCHL (Posting key) values 31 or 22.

But currently its pulling only for 31 value and not for 22, if i am specifying only 22 in where condition then also I am facing the same problem.

How can I modify the below select query to pull data from bseg table for b oth the values of BSCHL field?

SELECT BUKRS BELNR GJAHR AUGDT BSCHL WRBTR WMWST LIFNR

APPENDING CORRESPONDING FIELDS OF TABLE I_BSEG PACKAGE SIZE 5000

FROM BSEG

WHERE BUKRS IN S_BUKRS

AND AUGDT IN S_AUGDT

AND BSCHL IN ('31','22')

AND KOART = 'K'

AND SHKZG = 'H'

AND LIFNR IN S_LIFNR.

Endselect.

Thanks in advance.

Selina