Skip to Content
avatar image
Former Member

BAPI_MATERIAL_MAINTAINDATA_RT Performance

Hi Experts,

I am using BAPI BAPI_MATERIAL_MAINTAINDATA_RT to update ABC Indicator in the Retail system(MARC-MAABC).

But it is taking quite long time to update. For 10000 records it is taking more than 20 hours.

Even I tried with out Applicaiton log in Header structure no_app_log = 'X'. But I didn't find much difference in performance.


we have initial load of 19Lakhs records. Please suggest is there any settings to improve the performance.


My code is below: In Loop for 25K records


* Head Structure

   wa_head-material   = lwa_process-matnr.

   wa_head-logst_view = 'X'.

* Fill Plant data with ABC Indicator value

   wa_plantdata-material = lwa_process-matnr.

   wa_plantdata-plant    = lwa_process-werks.

   wa_plantdata-abc_id   = lwa_process-abc_ind.

   APPEND wa_plantdata TO gt_plantdata.

* Fill PLANTDATAX with ABC Indicator

   wa_plantdatax-material  = lwa_process-matnr.

   wa_plantdatax-plant     = lwa_process-werks.

   wa_plantdatax-abc_id    = 'X'.

   APPEND wa_plantdatax TO gt_plantdatax.

CALL FUNCTION 'BAPI_MATERIAL_MAINTAINDATA_RT'

       EXPORTING

         headdata   = wa_head

       IMPORTING

         return     = wa_return

       TABLES

         plantdata  = gt_plantdata

         plantdatax = gt_plantdatax.

     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

       EXPORTING

         wait = 'X'.

     IF wa_return-type = 'E'.

       wa_error_record = wa_process.

       REFRESH : lt_messages.

       CLEAR  : lwa_messages,lv_ext_no.

       lv_ext_no  = wa_return-message_v2.

       IF NOT lv_ext_no IS INITIAL.

         CALL FUNCTION 'APPL_LOG_READ_DB'

           EXPORTING

             object          = 'MATU'

             subobject       = '*'

             external_number = lv_ext_no

           TABLES

             messages        = lt_messages.

         SORT lt_messages BY msgty.

         READ TABLE lt_messages  INTO lwa_messages

                                  WITH KEY msgty = 'E'

                                  BINARY SEARCH.

         IF sy-subrc  = 0.

           CLEAR lv_message.

           CALL FUNCTION 'MESSAGE_TEXT_BUILD'

             EXPORTING

               msgid               = lwa_messages-msgid

               msgnr               = lwa_messages-msgno

               msgv1               = lwa_messages-msgv1

               msgv2               = lwa_messages-msgv2

               msgv3               = lwa_messages-msgv3

               msgv4               = lwa_messages-msgv4

             IMPORTING

               message_text_output = lv_message.

           wa_error_record-message = lv_message.

         ENDIF.

         APPEND wa_error_record TO gt_error_record.

       ENDIF.

     ELSE.

       wa_success_record = wa_process.

       wa_success_record-message = text-009.

       APPEND wa_success_record TO gt_success_record.

     ENDIF.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jan 14, 2015 at 05:53 AM

    Sorry for 25000 records it is taking 20 hours of time.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 14, 2015 at 05:56 AM

    Hi,

    please check to have all performance notes for this BAPI in your system, for example

    2068019 - ALE/BAPI: Performance of article master (data transfer)

    Further you can call BAPI_TRANSACTION_COMMIT without WAIT option.

    And you can try to use parallel processing (search SCN for info on that).

    Regards,

    Klaus

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Kalus,

      Thanks for your suggestion.

      I checked the note 2068019. The status of the note is Can't be implemented.

      I am working on ECC6.0 system.