i have wriiten a update rule routine.
in that routine i am fetching comp code ,GL Acct. from SKB1 table and match those records wth Data Package records.
Data Package has both Open and Closed items. so i need to match the Comp Code and GL Account which i have fetched from SKB1 with Data Package Comp Code and GL account which records will be matched they will go to Target ODS otherwise Delete from Data Package.
But data is not coming properly in Target ODS.
i have debug the routine and found , there are 10 records(Comp Code + GL Acct.) has been fetched from SKB1
and Data Package has Total 416 Records. Only 20 Records has been gone to Target ODS while I have seen the 216 Comp Code and GL Account combination has been successfully matched with 10 Records of SKB1
Below is the code in Start routine.
Note: Data Package has Multiple Records for a Combination of Company Code and GL Account which is present in SKB1.
How can i resolve this problem.
********Logic to Fetch Open items GL Account**************
*Fetch data from SKB1*********
INTO TABLE TB_ZOCFSKB1
FOR ALL ENTRIES IN DATA_PACKAGE
WHERE /BIC/ZMCFBUKRS = DATA_PACKAGE-COMP_CODE
AND /BIC/ZMCFSAKNR = DATA_PACKAGE-GL_ACCOUNT
AND /BIC/ZMCFXOPVW = 'X'.
***Fetch records from FI GL Data Package which match with
***internal table TB_ZOCFSKB1
LOOP AT DATA_PACKAGE INTO WA_DATA_PACKAGE.
READ TABLE TB_ZOCFSKB1 INTO WA_TB_ZOCFSKB1 WITH KEY
/BIC/ZMCFBUKRS = WA_DATA_PACKAGE-COMP_CODE
/BIC/ZMCFSAKNR = WA_DATA_PACKAGE-GL_ACCOUNT
IF sy-subrc ne 0.
DELETE TABLE DATA_PACKAGE FROM WA_DATA_PACKAGE.
***Clear Work Area****************
***Refresh internal table*********
if abort is not equal zero, the update process will be canceled
ABORT = 0.
Edited by: AtulMohan Mishra on Feb 9, 2011 11:22 AM