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

Materials for plant

i am using follwoing fields for getting materials combination of plant and distribution channels..

MVKE - Matnr,VKORG,VTWEG

MARC - MATNR,WERKS

how to write code for getting materials mixing of plant and distribution channels.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 06:46 AM

    Hey MVKE is having plant information also.

    Check the filed DWERK. depending on that u can get data.

    hey DWERK seems to fail in some conditions. So do one thing.

    Get materials from MARC.

    Next get data from MVKE using for all entries on MATNR from MARC table.

    you will get the combinations.

    in this case you will miss entries for which no plant data is there but sales data is available. That is Materials with sales view and no plant view.

    if you want that also.. then check for other alternatives.

    Message was edited by:

    Jyothi

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member
      select matnr werks from marc
      into table itab
      where matnr in s_matnr and 
                werks in s_werks.
      
      select matnr vkorg vtweg 
      from mvke
      into table itab2
      for all entries in itab
      where matnr = itab-matnr.
      

      please reward if useful.

      Thanks,

      Naveena.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 08:30 PM

    Check this code:

    TABLES: mara.

    TYPES: BEGIN OF ty_mvke_marc,

    matnr TYPE mvke-matnr,

    vkorg TYPE mvke-vkorg,

    vtweg TYPE mvke-vtweg,

    werks TYPE marc-werks,

    END OF ty_mvke_marc.

    DATA: gt_mvke_marc TYPE TABLE OF ty_mvke_marc.

    SELECT-OPTIONS: s_matnr FOR mara-matnr.

    SELECT mvke~matnr vkorg vtweg werks

    FROM mvke INNER JOIN marc

    ON mvkematnr = marcmatnr

    INTO TABLE gt_mvke_marc

    WHERE mvke~matnr IN s_matnr.

    which gives the input of Sales area(Sales org. and Dist. Channel) and its plant data.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 03:43 AM

    using join concept u can collect all the fields from different tables.

    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.