cancel
Showing results for 
Search instead for 
Did you mean: 

Fixing Statrt routine

Former Member
0 Kudos

Hai,

I have a start routine for an ODS. The data comes from R/3 to this ODS and there is a filter thats supposed to delete records that doesnot meet the given conditions.For instance if I load 20, if 5 of them donot meet the conditions given only 15 comein. But the problem is when loading data to the ODS, all the records are getting deleted. I checked some records that are good and meeting conditions, but are still getting deleted. I have been to start routine and deleted the code and now all the data is getting loaded. WHen I insert the code again, all the records are getting deleted.

Can somebody please tell me how to fix my start routine.

Accepted Solutions (1)

Accepted Solutions (1)

former_member188975
Active Contributor
0 Kudos

Hi Visu,

Can we please see your routine...

Former Member
0 Kudos

Here is the routine. The same code is working in development system but not in quality. Starnge!!!

Here is the code:

LOOP AT DATA_PACKAGE.

IF ( DATA_PACKAGE-COMP_CODE = '2101' OR

DATA_PACKAGE-COMP_CODE = '2204' ) AND

( DATA_PACKAGE-AC_DOC_TYP = 'DZ' OR

DATA_PACKAGE-AC_DOC_TYP = 'ZD' OR

DATA_PACKAGE-AC_DOC_TYP = 'RV' OR

DATA_PACKAGE-AC_DOC_TYP = 'AB' ) AND

( DATA_PACKAGE-COUNTRY = 'US' OR

DATA_PACKAGE-COUNTRY = 'USA' ) AND

( DATA_PACKAGE-DOC_CURRCY = 'USD') AND

DATA_PACKAGE-DEBIT_LC > 0 AND

( DATA_PACKAGE-/BIC/ZAR_IND = '01' OR

DATA_PACKAGE-/BIC/ZAR_IND = '02' ).

clear: ZRC_ACCOUNT.

  • Check if customer is an external customer. Reconciliation account

*30110000 indicates this.

select single RC_ACCOUNT into ZRC_ACCOUNT

from /BI0/MCUST_COMPC

where comp_code = DATA_PACKAGE-COMP_CODE and

cust_compc = DATA_PACKAGE-DEBITOR

AND OBJVERS = 'A'.

if ( ZRC_ACCOUNT <> '0030110000' ).

delete DATA_PACKAGE.

endif.

Thanks.

former_member188975
Active Contributor
0 Kudos

Is your CUST_COMPC master data correctly maintained and activated?

Former Member
0 Kudos

Hi Visu,

Do check what Bhanu has suggested..If you still encounter the problem..

Since you mentioned the code works in the other system, I would suggest that try debugging the update rules..

You will be able to do this if you loaded thru PSA.

Hope you know how to debug update rules..

Hope this helps..

Ashish..

Former Member
0 Kudos

Hai Bhanu,'

Yes my 0CUST_COMPC has master data and is active. I was working with it before. But may be its a mistake but I am deleted and and inserted the code too many times? Could this lead to any kind of errors?

Thank you.

former_member188975
Active Contributor
0 Kudos

No, deleting and reisnerting your code should not lead to this error. I was just thinking on lines of that when you select ZC_ACCOUNT from the 0CUST_COMPC, may be it is not maintained there. Did you try to debug through the update rules?

Former Member
0 Kudos

Hai Bhanu,

Thanks a lot man. After reloading and activating the 0CUST_COMPC object, everythig is working.

Thanks a lot.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Visu,

Could you teel us the condition you are trying to validate or a piece of the code would be helpful..

Ashish