Hello,
I have an END routine which reads a few other fields from the Active table of another DSO based on certain evaluation criteria. This END routine is updating from source DSO to target DSO.
The END routine works perfectly for a small set of records (i.e. A few customers at a time). However, when I try to load historical data which is a larger dataset, not all of the updates are made even though the END routine works correctly in de-bug mode.
I have decreased the DTP Package Size to 10,000 which does increase the amount of correct updates made, but many records are still skipped and not updated even though they match the selection criteria. I’ve also ensured that the Semantic Groups in the DTP match the DSO key fields. (They are identical between source and target DSO).
I am not sure why all of the records are not being read or updated. I am not an ABAPer, so any suggestions would be much appreciated. Should I be looking for something else via the de-bugger? We are on BW 7.02 Patch 10.
This is the actual code:
TYPES: zfiaro92_dso_key TYPE /bic/azfiaro9200.
DATA: w_zfiaro92_line TYPE zfiaro92_dso_key.
*-
DATA: t_zfiaro92_dso TYPE SORTED TABLE OF /bic/azfiaro9200
WITH NON-UNIQUE KEY debitor.
*-------------------------------------*
* Load DSO Table ZFIARO92
*-------------------------------------*
SELECT * FROM /bic/azfiaro9200 INTO TABLE t_zfiaro92_dso.
IF sy-subrc = 0.
ENDIF.
LOOP AT result_package ASSIGNING <RESULT_FIELDS>.
CLEAR: w_zfiaro92_line.
****-----------------------------------------------------------------------------
**** Check if Payer (0DEBITOR) and Cons Customer are the same.
**** If so exit and read next record
****------------------------------------------------------------------------------*
IF <RESULT_FIELDS>-debitor = <RESULT_FIELDS>-/bic/zconscust.
EXIT.
ENDIF.
READ TABLE t_zfiaro92_dso INTO w_zfiaro92_line
WITH KEY debitor = <RESULT_FIELDS>-debitor.
IF sy-subrc = 0.
IF <RESULT_FIELDS>-debitor = w_zfiaro92_line-cred_accnt.
<RESULT_FIELDS>-/bic/zaffiliat = w_zfiaro92_line-cred_accnt.
**** no match in the table ****
ELSE.
<RESULT_FIELDS>-/bic/zcopacker = w_zfiaro92_line-cred_accnt.
ENDIF.
ENDIF.
ENDLOOP.
Thank You, A. Cook