‎2008 Apr 17 5:49 AM
HI All,
Is there any table to store only materail group (matkl).
I want to fetch the materials whose material group starts with to characters( for example AB***** ).
how can i write the condition on mara table to fetch the materail whose materal group starts with "AB".
if material group field values stores in separate table than i can fetch all material group values, filter required materail group based on than i can write select query.
‎2008 Apr 17 5:55 AM
Hi,
T023 is the table where all the defined mat groups are stored.
Reward points if you find it useful.
Regards,
Prasanna
‎2008 Apr 17 5:52 AM
you can create a range ra_matkl and use that in the select statement..
MOVE 'E' TO ra_matkl-sign.
MOVE 'BT' TO ra_matkl-option.
MOVE 'AB' TO ra_matkl-low.
APPEND ra_matkl.
select 1 2 3
from
where matkl in ra_matkl.
‎2008 Apr 17 5:52 AM
hi
select * from mara into table <itab> where MATKL like ab%.
i hope its correct
any issue let me know
regards if helpful
baskaran
‎2008 Apr 17 7:30 AM
hI Baskaran,
thanks for the reply,
but select * from mara into table <itab> where MATKL like ab%.
is giving error.
kindly let me know the error, if u know.
thaks
‎2008 Apr 17 7:33 AM
hi..
give AB* in selection screen and execute...it should server u r purpose...
but i guess u dont have material group in u r selection screen...am i right?
‎2008 Apr 17 7:40 AM
Hi,
Use like this
select * from mara into table t_itab1
where MATKL like 'AB%'.
‎2008 Apr 17 5:55 AM
Hi,
Check in MARA table.You can get both matnr and matkl.
data:begin of itab occurs 0,
matnr like mara-matnr,
matkl like mara-matkl.
end of itab.
parameter p_matkl like mara-matkl
select matnr
matkl
from mara
into table itab
where matkl = p_matkl.
In the selection screen given the value as AB* and execute.
K.Kiran.
‎2008 Apr 17 5:55 AM
Hi,
T023 is the table where all the defined mat groups are stored.
Reward points if you find it useful.
Regards,
Prasanna
‎2008 Apr 17 7:41 AM
thanks prasanna i required that table only.
it solved my problem.