Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
sujeet2918
Active Contributor

Material Master Maintenance without Dialog.


     MATERIAL_MAINTAIN_DARK is used for Material Master Maintenance without Dialog. Which we can in Update mode also.

Before using function module MATERIAL_MAINTAIN_DARK, we need to configure the custom field in SAP IMG.

First add custom field in material master repository, you can create separate sub screen and then assign the sub screen at one particular position.

Follow the below step to maintain the custom field’s sequence in MMR.

First add your sub screen to “Define Structure of data Screen ….” Option. And add the screen sequence as per requirement. Example: Screen sequence 21.

Then go to data screen of same screen sequence and select screen sequence and screen number where you have added customer field.

Now add custom sub-screen by clicking on.

Now maintain the custom fields to field selection group which got added in MARC table.

Once we complete the above steps, we can update the same custom field using function module “MATERIAL_MAINTAIN_DARK”.

CALL FUNCTION 'MATERIAL_MAINTAIN_DARK'

EXPORTING

      sperrmodus                = 'E'

      max_errors                =  0

      p_kz_no_warn              = 'E'

      kz_prf                    = ' '

      kz_verw                   = 'X'

      kz_aend                   = 'X'

      user                      = sy-uname

IMPORTING

      number_errors_transaction = lv_count

TABLES

      amara_ueb                 = gt_mara_ueb

      amarc_ueb                 = gt_marc_ueb

      amerrdat                  = gt_amerrdat.

EXCEPTIONS

      kstatus_empty             = 1

      tkstatus_empty            = 2

      t130m_error               = 3

      internal_error            = 4

      too_many_errors           = 5

      update_error              = 6

      OTHERS                    = 7.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

Endif.