Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

materail group (MATKL) table

Former Member
0 Likes
33,747

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
16,753

Hi,

T023 is the table where all the defined mat groups are stored.

Reward points if you find it useful.

Regards,

Prasanna

8 REPLIES 8
Read only

former_member156446
Active Contributor
0 Likes
16,753

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.

Read only

Former Member
0 Likes
16,753

hi

select * from mara into table <itab> where MATKL like ab%.

i hope its correct

any issue let me know

regards if helpful

baskaran

Read only

0 Likes
16,753

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

Read only

0 Likes
16,753

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?

Read only

0 Likes
16,753

Hi,

Use like this

select * from mara into table t_itab1
                            where MATKL like 'AB%'.

Read only

kiran_k8
Active Contributor
0 Likes
16,753

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.

Read only

Former Member
0 Likes
16,754

Hi,

T023 is the table where all the defined mat groups are stored.

Reward points if you find it useful.

Regards,

Prasanna

Read only

0 Likes
16,753

thanks prasanna i required that table only.

it solved my problem.