Skip to Content
0
Former Member
Feb 14, 2007 at 03:23 PM

Performance problem with an abap code

22 Views

Hi all,

I am having a performnance problem with the code below. Any recomendations ?

SELECT rnr FROM rsseldone INTO w_psarqst-low

WHERE seldate BETWEEN p_date-low AND p_date-high

AND source EQ p_source.

APPEND w_psarqst.

ENDSELECT.

  • Fill-up the internal table from activity item psa for given interval.

LOOP AT w_psarqst.

SELECT guid item_guid created_at item_changed_at FROM (l_psa) INTO

(w_act_psa-l_guid, w_act_psa-l_itmguid, w_act_psa-l_cr_date, w_act_psa-l_ch_date)

WHERE request = w_psarqst-low.

APPEND w_act_psa.

ENDSELECT.

LOOP AT w_act_psa.

IF w_act_psa-l_ch_date = '00000000'.

w_act_psa-l_ch_date = w_act_psa-l_cr_date.

ENDIF.

  • update active table.

TRY.

UPDATE /bic/azsc_d00300

SET /bic/zsc_date = w_act_psa-l_ch_date

WHERE /bic/zsc_acgui = w_act_psa-l_guid

AND /bic/zsc_itmgu = w_act_psa-l_itmguid.

CATCH cx_sy_dynamic_osql_error.

MESSAGE `Error in update!` TYPE 'I'.

WRITE:/'Error in update!'.

COMMIT WORK.

ENDTRY.

ENDLOOP.

ENDLOOP.

WRITE:/'Update finished successfully.'.