Skip to Content
avatar image
Former Member

SCRIPT LOGIC CLEARING THE IC Data

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 05, 2017 at 04:01 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 05, 2017 at 03:36 PM

    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%

    Add comment
    10|10000 characters needed 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