Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2015 at 05:53 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.