Skip to Content
0
Former Member
Jul 19, 2013 at 05:50 AM

Material Vaidation Based on Plant ??

48 Views

Hi All,

I have a basic question ..,

I have searched all blogs and SCN also ..,

I need to validate materials based on Plant and range of material :

Scenario :

I will send plant and entered digits of material ,

I have to get the list of materials ...,

for EX : plant eq '1001' and material eq '200'

my Query:

TYPES : BEGIN OF ty_range,

sign TYPE char1,

option TYPE char2,

low TYPE makt-matnr,

high TYPE makt-matnr,

END OF ty_range.

data : lit_matnr TYPE TABLE OF ty_range,

wa_matnr TYPE ty_range.

data : lv_werks type werks.

concatenate lv_matnr '*' into lv_key2.

lw_range-sign = 'I'.

lw_range-option = 'CP'.

lw_range-low = lv_key2.

APPEND lw_range TO lt_range.


select matnr from marc into table lt_marc where matnr in lit_matnr and werks eq = lv_werks .

here im facing the problem its giving all the materials inside the plant including invalid materials ...

Please help me to get valid materials based on plant

regards,

Lokesh.