cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error whiel retracting data fom BPC to ECC after migration to 10.1

Former Member
0 Likes
577

Hi Team,

We have recently migrated from BPC 10.0 to 10.1(BW on HANA). Below error is observed while running a retraction job after migration:

"Error found in system.
EXCEPTION OCCURRED IN BADI"

We have further debug the BADI and looks like it is trying to duplicate the records and the exception is raised. Below is the script which we are using for retraction:


*SELECT(%ACCT%, ID, P_ACCT, ID >= 000000 AND ID <= 999999 AND CALC = N)

//Determine Time: should be TOTAL or INP depending on VERSION parameters
*SELECT(%STARTYEAR%, STARTYEAR, VERSION, ID = $BPC_VERSION$)
*SELECT(%LAST_YEAR_MONTH%, LAST_YEAR_MONTH, VERSION, ID = $BPC_VERSION$)
*SELECT(%LAST_YEAR_FULL%, LAST_YEAR_FULL, VERSION, ID = $BPC_VERSION$)
*SELECT(%TIME_MONTHLY%, ID, TIME, YEAR = $YEAR$ AND YEAR >= %STARTYEAR% AND YEAR <= %LAST_YEAR_MONTH% AND LEVEL_REPORT = MONTH AND CALC = N)
*SELECT(%TIME_YEARLY%, ID, TIME, YEAR = $YEAR$ AND YEAR > %LAST_YEAR_MONTH% AND YEAR <= %LAST_YEAR_FULL% AND LEVEL_REPORT = YEAR AND CALC = N)
*SELECT(%YEAR%, YEAR, TIME, ID = %TIME_MONTHLY%,%TIME_YEARLY%)

*XDIM_MEMBERSET TIME = %TIME_MONTHLY%,%TIME_YEARLY%
*XDIM_MEMBERSET P_ACCT = %ACCT%
*XDIM_MEMBERSET PROFIT_CENTRE = BAS(QRN_FUNC)
*XDIM_MEMBERSET P_DATASRC = ALLDATASRC
*XDIM_MEMBERSET VERSION = $BPC_VERSION$

*START_BADI RETRACT_PRCTR
QUERY = ON
WRITE = OFF
TIME = %YEAR% //BADI can run for many years
ECC_VERSION = $ECC_VERSION$
TEST_RUN = $TEST_RUN$
*END_BADI


I have tried to run teh script using UJKT fixing TIME=2020.TOTAL and YEAR=2020. Job is successful generating exact no.of.records(without duplicating) but all the records are zero. When I try to pass the year =2020 from data manager package, double the records are generated and the package is failed.


Looks like an issue with logic script or TIME dimension or BADI after migration. Need your assistance to resolve the issue.


Let me know if you have any further queries.

Regards,

Bharadwaj Cheruvu

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Hi Vadim,

Thanks for your response. Issue is resolved by changing the BADI.

Duplicate records were identified in SKFs. Collect statement was creating a record. Implemented the BADi considering unit of measure for SKF account.

Regards,

Bharadwaj Cheruvu.

former_member186338
Active Contributor
0 Likes

As usial, issue with badi means incorrect badi code 🙂

former_member186338
Active Contributor
0 Likes

First of all - you have badi error and without debugging results of badi it's not possible to help you!

Second - provide UJKT log without launching badi:

In parameters set values for

$BPC_VERSION$
*SELECT(%ACCT%, ID, P_ACCT, ID >= 000000 AND ID <= 999999 AND CALC = N)
 
//Determine Time: should be TOTAL or INP depending on VERSION parameters
*SELECT(%STARTYEAR%, STARTYEAR, VERSION, ID = $BPC_VERSION$)
*SELECT(%LAST_YEAR_MONTH%, LAST_YEAR_MONTH, VERSION, ID = $BPC_VERSION$)
*SELECT(%LAST_YEAR_FULL%, LAST_YEAR_FULL, VERSION, ID = $BPC_VERSION$)
*SELECT(%TIME_MONTHLY%, ID, TIME, YEAR = $YEAR$ AND YEAR >= %STARTYEAR% AND YEAR <= %LAST_YEAR_MONTH% AND LEVEL_REPORT = MONTH AND CALC = N)
*SELECT(%TIME_YEARLY%, ID, TIME, YEAR = $YEAR$ AND YEAR > %LAST_YEAR_MONTH% AND YEAR <= %LAST_YEAR_FULL% AND LEVEL_REPORT = YEAR AND CALC = N)
*SELECT(%YEAR%, YEAR, TIME, ID = %TIME_MONTHLY%,%TIME_YEARLY%)
 
*XDIM_MEMBERSET TIME = %TIME_MONTHLY%,%TIME_YEARLY%
*XDIM_MEMBERSET P_ACCT = %ACCT%
*XDIM_MEMBERSET PROFIT_CENTRE = BAS(QRN_FUNC)
*XDIM_MEMBERSET P_DATASRC = ALLDATASRC
*XDIM_MEMBERSET VERSION = $BPC_VERSION$

Select logic is not clear, please explain what do you want to achieve!

Please read: https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/

Former Member
0 Likes

Hi Vadim,

Thanks for your response. We are still debugging the BADI. Looks like it is working fine for some of the records and is not for the other selections of time and SKF.

We have got a log while debugging “Double CO object in row copied to planning data interface”.

Could you help any further based on the log generated.

Thanks,

Bharadwaj Cheruvu.

former_member186338
Active Contributor
0 Likes

bharadwajcheruvu

Sorry, but please, read my answer once again!

I don't see the log!