Skip to Content
0
Former Member
Feb 08, 2008 at 02:46 PM

I have problem in my code.I have two issues

10 Views

1. i am supposed to get those values of the material number

vbpa-matnr

which does not contain material group between 300 -and 399

I have written the query like this

SELECT
       vbak~vbeln
       vbak~erdat
       vbak~vkorg
        ABRVW
        augru
        posnr
        matnr
        vbap~vkaus
        vbap~spart
        vbap~netwr
        vbap~waerk
        kwmeng
        kondm
        mvgr1
        mvgr2
        mvgr3
        mvgr4
        mvgr5
  FROM vbak AS vbak INNER JOIN vbap AS vbap
  ON vbak~vbeln EQ vbap~vbeln
  INTO corresponding fields of TABLE t_vbak
  WHERE vbak~vbeln EQ s_vbeln and vbap~matkl not in (300,399).

but Materials with Material group(VBAP-MATKL) between 000000300 and 000000399 are still appearing on the report ? eg on 4558 ? 10000231

Really need your earnest help to modify this......

2. SELECT
        VBAK~VBELN
        VBAK~VKORG
        VBAK~ERDAT
        VBAK~AUGRU
        vbkd~bstkd
        vbkd~bstdk
        tvaut~bezei
FROM VBAK as vbak join vbkd as vbkd
on vbak~vbeln eq vbkd~vbeln
and vbak~posnr eq vbkd~vbeln
left join tvaut as tvaut
on vbak~augru eq tvaut~augru
INTO CORRESPONDING FIELDS OF TABLE I_HEADER
WHERE VBAK~VBELN EQ S_VBELN.

here I am the BSTDK i.e the PO date is comming wrong

How to get it

Need immidiate help thnks