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

Material Master Mandatory Fields (by type)

Former Member
0 Likes
503

Hi All

We have been asked If we can extract from ERP a u201Cbaseu201D definition of Material Master. That is the customer would like to have an overview of standard the SAP material types and the mandatory fields that need to be populated (by type).

Is there anyone out there aware of how we could extract this information from ERP or if this information already exists somewhere?

Any suggestions would be greatly appreciated (but probably not rewarded)

Edited by: Rob Burbank on Jul 21, 2010 9:56 AM

2 REPLIES 2
Read only

Former Member
0 Likes
463

Try this to get material master data

DATA clientdata     TYPE  bapi_mara_ga. " master data
DATA mat_descr      TYPE TABLE OF bapi_makt_ga. " texts
DATA materialtext   TYPE TABLE OF bapi_mltx_ga. " long texts

FORM read_material  USING    material
                    CHANGING message.
  " get bapi result
  DATA wa_return LIKE LINE OF return.
  " division for logging
  DATA div_src TYPE string.

  " bapi for read material generic data
  CALL FUNCTION 'BAPI_MATERIAL_GETALL'
    EXPORTING
      material            = material
    IMPORTING
      clientdata          = clientdata
    TABLES
      materialdescription = mat_descr
      materialtext        = materialtext
      return              = return.
ENDFORM.

Read only

Former Member
0 Likes
463

Study the function above to get also plant dependent data and so on ..

If you want to extract all materials, you have to get all material code from MARA

SELECT matnr
 FROM mara.

Regards

Gabriele