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

SCRIPT LOGIC CLEARING THE IC Data

Former Member
0 Kudos
1,028

Hi Bpc Friends

Before to run the intco badi I would like to delete the data so for example I would like to run the below code for the entity=5400 and I would like that the below code will set to 0 all the records with Entity=ALL Intco=I_5400 and datasrc=IC_DATASRC, the problem is that the below script it doesn't work!!!

*SELECT(%INTCOTODELETE%,[INTCO],ENTITY,ID=%ENTITY_SET%)


*FOR INTCO= %INTCOTODELETE%
*WHEN DATASRC
*IS IC_DATASRC
*REC(FACTOR=0)
*ENDWHEN

*NEXT

*COMMIT

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Then the script will be:

*SELECT(%INTCOTODELETE%,[INTCO],ENTITY,ID=%ENTITY_SET%)
*XDIM_MEMBERSET DATASRC=IC_DATASRC
*XDIM_MEMBERSET ENTITY=<ALL>
*XDIM_MEMBERSET INTCO=%INTCOTODELETE%

*WHEN DATASRC
*IS *
*REC(FACTOR=0)
*ENDWHEN

You don't need FOR/NEXT, and for sure - don't need useless COMMIT

Former Member
0 Kudos

thanks

I will try it

Former Member
0 Kudos

thanks Vadim, it works

former_member186338
Active Contributor
0 Kudos

Then please accept the correct answer.

Former Member
0 Kudos

sorry, I forgot to do that

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

Try to explain you requirements once again - absolutely not clear! Provide some data sample!

"for the entity=5400" ???

"Entity=ALL" ??

P.S. Your code will simply delete everything with IC_DATASRC for the entity selected in %ENTITY_SET%

Former Member
0 Kudos

I want to run a package selecting the time for example=FY2016.012 AND entity for example 5400 and I would like that the script for all the records in BPC like the bellows set the values to 0

Entity INTCO TIME VALUE

1000 I_5400 FY2016.012 100

1200 I_5400 FY2016.012 200

2000 I_5400 FY2016.012 50

and so on