Skip to Content
0
Former Member
Aug 11, 2005 at 02:54 PM

Problem in querying

50 Views

I am trying to fetch all the values of POSNR for given values of AUFNR and VORNR from RESB.

Using databrowser in se11 I can query posnr on above condition and also can see the queried data.

But when I try to write SQL statements in my report nothing gets fetched. I am wondering the way I am querying is wrong or what ?

(Also I get warning like VORNR may contain null values in where clause but it get activated. I guess this is not the problem)

report ZTF1.

TABLES: RESB.

DATA: BEGIN OF IRESB OCCURS 100,

W_POSNR LIKE RESB-POSNR,

END OF IRESB.

SELECT POSNR from RESB INTO IRESB-W_POSNR where VORNR = 0010 and AUFNR = 7200000100.

ENDSELECT.

LOOP AT IRESB.

WRITE: / IRESB-W_POSNR.

ENDLOOP.