Skip to Content
author's profile photo Former Member
Former Member

help on material master

Hi guys i want to write the code for this. can somebody help me.

Select all entries from table MARD for selection criteria

Select corresponding record from table MARC

Select corresponding record from table MARA

check that the industry sector MARA-MBRSH is the value for mechanical engineering.

select material description from table MAKT where the language = SY-LANGU.

store all valid records in an internal table .

Thanks in Advance.

Edited by: Rishik on Jun 18, 2008 7:24 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Jun 18, 2008 at 05:24 AM

    Hi,

    U can use the select statements in the follwing way:

    select * from mard into table itab1 where condition.

    select * from marc into table itab2 for all entries in itab1 where condition.

    select * from mara into table itab3 for all entries in itab2 where condition.

    loop at itab3 into wa3 where mbrsh = value.

    select material descr from table makt into corresponding fields of table i_mat_details where

    lang = sy-lang.

    endloop.

    u can also use joins.

    ***Reward if useful ***

    Regards,

    Ruby.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 05:33 AM

    Hi,

    Select * from MARD into table it_mard.

    if it_mard is not initial.

    select * from MARC into table it_marc

    for all entries in it_mard

    where matnr = it_mard-matnr.

    endif.

    if it_marc is not initial.

    select * from mara

    into table it_mara

    for all entries in it_marc where

    matnr = it_marc-matnr

    and MBRSH = 'M'.

    endif.

    if it_mara is not initial.

    select maktx from makt

    into table it_makt

    for all entries in it_mara

    where matnr = it_mara-matnr

    and SPRAS = 'E'.

    endif.

    Loop at it_mard into wa_mard.

    move-corresponding wa_mard to wa_final.

    Read it_marc..........

    move-corresponding------

    Read it_mara..........

    move-corresponding------

    Read it_makt..........

    move-corresponding------

    append wa_final to it_final.

    endloop.

    Declare the structures of internal tables properly.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 05:39 AM

    Hi

    you can use a join on MARA ,MAKT MARC and MARD based on selection criteria ,if selection criteria is plant and storage location or just plant

    select afield bfield1 cfield2 dfield3

    from marc as a inner join mara as b

    on bmatnr = amatnr

    inner join makt as c

    on cmatnr = bmatnr and

    c~langu = sy-langu

    into table itab

    where a~werks in s_werks

    and b~MBRSH = mechnical enginnering.

    Please reward if useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 01:29 PM

    Another Simple report that you couldn't try writing on your own? Good Luck faking your way through your Job.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.