Skip to Content
0

SCRIPT LOGIC CLEARING THE IC Data

Jun 05, 2017 at 02:56 PM

81

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Vadim Kalinin Jun 05, 2017 at 04:01 PM
0

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

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

thanks

I will try it

0
Former Member

thanks Vadim, it works

0

Then please accept the correct answer.

0
Former Member

sorry, I forgot to do that

0
Vadim Kalinin Jun 05, 2017 at 03:36 PM
0

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%

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0