Skip to Content
1
Former Member
Jul 29, 2007 at 06:11 AM

Is it correct quires?

25 Views

Hi,

I write some quires,any one tell me is it correct quires.Because some quires i have used workarea and some for i_vbeln.

types : begin of ty_vbeln,

vbeln type vbfa-vbeln,

end of ty_vbeln.

data : i_vbeln type standard table of ty_vbeln,

wa_vbeln type ty_vbeln.

SELECT VBELn FROM VBFA into table i_vbeln

where vbelv = CE0_M200-kaufn

and VBTYP_V eq 'M'.

if sy-subrc = 0.

Describe table i_vbeln lines ws_lines .

select single budat into ws_budat

from bkpf where awtyp = 'VBRK'

and awkey = wa_vbeln-vbeln.

loop at i_vbeln into wa_vbeln.

select single matnr from vbrp into ws_c_matnr

where vbeln = wa_vbeln-vbeln

and matnr = CE0_M200-artnr.

Thanks & Regards,

sudhakar