Skip to Content

Introduction


Case 1 – Create a material with reference to some existing material in the ECC system.

Case 2 – Create a report with data from MARC, MARD, MVKE, MBEW, etc.

Case 3 – Get the existing Purchase Order text of any material.

To suit the above needs, SAP has given a wonderful Function Module ‘CRS_MATERIAL_READ_ALL’. Using this function module we can pass the Material Number and get all the details of that material.

Code example for the same is :-

Form get_material_details.

DATA :

*-for CRS_MATERIAL_READ_ALL Function Module ————–*

*– Sales Data

               lt_mvke    TYPE STANDARD TABLE OF    mvke,

*– Valuation Data

               lt_mbew    TYPE STANDARD TABLE OF    mbew,

*– Plant Data

               lt_marc    TYPE STANDARD TABLE OF    marc,

*– Storage Location Data

               lt_mard    TYPE STANDARD TABLE OF    mard,

*– Material Description Data

               lt_makt    TYPE STANDARD TABLE OF    makt,

*– Units oF Measure Data

               lt_marm    TYPE STANDARD TABLE OF    marm,

*– International Article Numbers Data

               lt_mean    TYPE STANDARD TABLE OF    mean,

*– Tax Classifications Data

               lt_mlan    TYPE STANDARD TABLE OF    mlan,

*– Purchase Order Text Data

               lt_cdtxt   TYPE STANDARD TABLE OF    cdtxt.

CALL FUNCTION ‘CRS_MATERIAL_READ_ALL’

   EXPORTING

     iv_matnr           = ‘000000000000000010’  ” Pass the material Number here.

   TABLES

     et_mvke            = lt_mvke

     et_mbew            = lt_mbew

     et_marc            = lt_marc

     et_mard            = lt_mard

     et_makt            = lt_makt

     et_marm            = lt_marm

     et_mean            = lt_mean

     et_mlan            = lt_mlan

     et_icdtxt_material = lt_cdtxt.

Endform.

Disclaimer :- The simple reason for posting this was that i was unable to find proper example of this very powerful function module. It can reduce lots of Inner Joins and FAE on the concerned tables.

Also if you are planning to use this for Case 1 it can be used a sub step for it.


Thanks.



To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

    1. Ankit Maskara Post author

      Hi Eitan,

      You are true that this FM has not been released yest but still it can be used with comfort is what i feel.

      BR.

      (0) 
      1. Eitan Rosenberg

        Hi,

        This is ok.

        But there are organizations that are very strict about “Not released” policy .

        After checking “where used” I found that this function is hardly used.

        Regards.

        (0) 
        1. Ankit Maskara Post author

          Hi Eitan,

          It is an alternative which i suggested. Using this blog i just want to spread the word about this powerful FM.

          BR.

          (0) 

Leave a Reply