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

Function 'MATERIAL_MAINTAIN_DARK'

Former Member
0 Likes
1,626

Hello,

I want to use function 'MATERIAL_MAINTAIN_DARK' to change data only in table MBEW.

I have filled all necessary data im mara_ueb like tcode, index, matnr and vpsta only for the accounting view. Basic view is not maintained in vpsta.

And all necessary data in mbew_ueb.

I do not want to change or add any data of  table mara. But if I run my program I get error messages that belongs to some mara fields. Alle this fields are required fields in mara.

We will maintain this fields at a later time but not yet. At this moment we only want to maintain fields from mbew.

Is there a way to deactivate the check of the mara fields or does this function always check the fields of the basic view. 

Thanks

Arnfried

1 REPLY 1
Read only

ShyamPindiproli
Active Participant
0 Likes
557

Hello Arnfried,

This is a MM - Master Data Creation / Updation FM. As per the Documentation, only data that can be created or changed jointly in an online transaction is created or changed jointly using this Function Module

So If you can perform such an operation i.e. the desired material master update using an Online T-code, you should be able to do it via FM as well. 

You can always make use of the "Test Mode" option to ensure the Database remains intact.

  call function 'MATERIAL_MAINTAIN_DARK'

       exporting

            flag_muss_pruefen         = 'X'

            sperrmodus                = 'N'

            p_kz_no_warn              = 'N'

            kz_prf                    = 'W'

            kz_test                   = v_testmode " Create change documents - yes/no

       importing

            matnr_last                = v_mara_matnr_0

            number_errors_transaction = v_numerror

       tables

            amara_ueb                 = it_mara_ueb

            amakt_ueb                 = it_makt_ueb

            amarc_ueb                 = it_marc_ueb

            amard_ueb                 = it_mard_ueb

            amarm_ueb                 = it_marm_ueb

            amea1_ueb                 = it_mea1_ueb

            ambew_ueb                 = it_mbew_ueb  

            asteu_ueb                 = it_steu_ueb

            astmm_ueb                 = it_stmm_ueb

            amvke_ueb                 = it_mvke_ueb

            altx1_ueb                 = it_ltx1_ueb

            amfieldres                = it_mfieldres

            amerrdat                  = it_merrdat

       exceptions

            kstatus_empty             = 1

            tkstatus_empty            = 2

            t130m_error               = 3

            internal_error            = 4

            too_many_errors           = 5

            update_error              = 6

            others                    = 7.

Regards,

Shyam