Skip to Content

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

inactive materials tables

Hi,

i need to find out the materials that has no movement for a long time, time determined by user,

and i went to the mkpf-mseg tables.

However i have to select the data based on the bwart field's values.

For example if mseg~bwart is not eq to '261' 262,601,602,201,202,543,544 etc then it is an inactive material for us.

But my query is not working:

select mseg~matnr mseg~werks mseg~bwart from mseg
      inner join mkpf on mseg~mblnr eq mkpf~mblnr
      and mseg~mjahr eq mkpf~mjahr
      into corresponding fields of table itab
      for all entries in mat
where
      mkpf~budat le so_budat and
      mseg~matnr eq mat-matnr
      and mseg~bwart ne '261'
      and mseg~bwart ne '262'
      and mseg~bwart ne '601'
      and mseg~bwart ne '602'
      and mseg~bwart ne '201'
      and mseg~bwart ne '202'
      and mseg~bwart ne '543'
      and mseg~bwart ne '544'  .

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