Hello All,
We have a requirementt to change one of the master data field(FLAG) while loading on the transaction data.
we get the material info in the Master data. and in the sales order item data also we get the material.
While loading the Transaction data, I have to set a FLAG field has "s" in the Master data material based on the Key selection:
Master data - MAterial = Tramsaction - Data Material.
I have written the code.. and implemented.. i get the correct records but i face huge performance issue. can any one guide me please
DATA: itab1 TYPE STANDARD TABLE OF /bi0/pmaterial,
wa_itab1 TYPE /bi0/pmaterial,
w_tabix TYPE sy-tabix.
IF itab1 IS INITIAL.
SELECT * FROM /bi0/pmaterialINTO TABLE itab1.
ENDIF.
LOOP AT result_package ASSIGNING <result_fields>.
READ TABLE itab1 INTO wa_itab1 WITH KEY
material = <result_fields>-material.
IF sy-subrc = 0.
w_tabix = sy-tabix.
IF <result_fields>-/bic/paa1c2033 IS NOT INITIAL.
wa_itab1-FLAG= 'S'.
MODIFY itab1 FROM wa_itab1 INDEX w_tabix TRANSPORTING FLAG.
ENDIF.
ENDIF.
ENDLOOP.
IF itab1 IS NOT INITIAL.
MODIFY /bi0/pmaterial FROM TABLE itab1.
ENDIF.