Skip to Content

Script Logic - Unable to clear data

Hello Experts,

I'm trying to execute a logic file to clear the data based on some properties(on Account & Entity) but in the end it is not deleting the data. I've tried hard coding Entities but still I'm unable to see any change in output executed via UJKT/Package Run.

1. Version BPC10.1 SP8 , BW740 SP13


2. List of Dimensions for Finance Model: ACCOUNT, CATEGORY,GROUP, COSTCENTER,CURRENCY,DATASRC,ENTITY,FLOW,INTERCP,PROFITCENTER,
SCENARIO, TIME


3. RECLASS.LGF - Re classification is done on the basis of Account Property. [DISCOPS TO ACCT]= (other than blank) , Entity Property. [DISCOPS_HFS] =D , DATASRC(AUDIT) Property.[DISCOPS_DS]=Y. Now whenever the script run based on the above properties , reclassification is done.

This scenario is whenever the Entity Property.[DISCOPS_HFS] = other than blank was used , now the business has removed this property. So, in order to automatically clear the data from the DATASRC = DISCOPS and ACCOUNT Property. [DISCOPS TO ACCT]= (other than blank) . This logic should be added in the script.

Thus, to delete the data always whenever the Entity Property = DISCOPS_HFS is blank. DATSRC should always be DISCOPS. Accounts should always be Property = DISCOPS TO ACCT (other than blank).


4. DM Script (Not a Default logic)

PROMPT(SELECT,,,,"ENTITY,CATEGORY,TIME")

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,RECLASS.LGF)


5. UJKT
DATA REGION -

CATEGORY=ACTUAL

ENTITY=AE10

TIME=2017.JAN


CODE - Provided Below


LGX:

*XDIM_SKIPNULLCHECK CURRENT

*XDIM_MEMBERSET CATEGORY = %GAAPONLY%

*XDIM_FILTER ENTITY = [ENTITY].PROPERTIES("CALC") = N

*START_BADI RUNLOGIC_PH

QUERY = OFF

WRITE = ON

LOGIC = RECLASS.LGF

APPSET = FPR

APP = Finance

DIMENSION ACCOUNT = <ALL>

DIMENSION CATEGORY = ACTUAL

DIMENSION GROUP = G_NONE

DIMENSION COSTCENTER = <ALL>

DIMENSION CURRENCY = <ALL>

DIMENSION DATASRC = <ALL>

DIMENSION ENTITY = AE10

DIMENSION FLOW = FOPE,FACT,FCLO

DIMENSION INTERCO = <ALL>

DIMENSION PROFITCENTER = <ALL>

DIMENSION SCENARIO = <ALL>

DIMENSION TIME = 2017.JAN

CHANGED = ENTITY.PARALLEL

DEBUG = OFF

*END_BADI

*COMMIT



LOG-

APPSET:FPR

APPLICATION: Finance

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:ACCOUNT WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:GROUP WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:COSTCENTER WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:DATASRC WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:FLOW WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:INTERCO WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:PROFITCENTER WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:SCENARIO WILL QUERY ON ALL BASE MEMBERS.

EXECUTION BADI:RUNLOGIC_PH

QUERY: OFF

WRITE: ON

Logic script RECLASS.LGF is processed.

1 Data Regions will be generated.

30 parallel processes will be used.

Dimension ENTITY property P02 1 members used for a new Data Region

Process Task 1 Started at 05:41:24 .

Process Task 1 Ended at 05:41:25 successfully.

BADI EXECUTION TIME IN TOTAL :2.00 ms.

SCRIPT RUNNING TIME IN TOTAL:2.00 s.

LOG END TIME:2017-12-28 05:41:25

6. Code:-

*XDIM_SKIPNULLCHECK CURRENT

*XDIM_MEMBERSET CATEGORY = %GAAPONLY%

*XDIM_FILTER ENTITY = [ENTITY].PROPERTIES("CALC") = N

*START_BADI RUNLOGIC_PH

	QUERY = OFF

	WRITE = ON

	LOGIC = RECLASS.LGF

	APPSET = FPR

	APP = Finance

	DIMENSION ACCOUNT = <ALL>

	DIMENSION CATEGORY = %CATEGORY_SET%

	DIMENSION GROUP = <ALL>

	DIMENSION COSTCENTER = <ALL>

	DIMENSION CURRENCY = <ALL>

	DIMENSION DATASRC = <ALL>

	DIMENSION ENTITY = %ENTITY_SET%

	DIMENSION FLOW = FACT,FCLO,FOPE

	DIMENSION INTERCO = <ALL>

	DIMENSION PROFITCENTER = <ALL>

	DIMENSION SCENARIO = <ALL>

	DIMENSION TIME = %TIME_SET%

	CHANGED = ENTITY.PARALLEL

	DEBUG = OFF

*END_BADI

*COMMIT


RECLASS.LGF:-

*SELECT(%DA%, "[ID]","ACCOUNT", "[DISCOPS_TO_ACCT] <>  ''")
*SELECT(%DE%, "[ID]","ENTITY", "[DISCOPS_HFS] = 'D' AND ID = %ENTITY_SET%")
*SELECT(%DD%, "[ID]","DATASRC", "[DISCOPS_DS] = 'Y'")
*SELECT(%ED%, "[ID]", "ENTITY","[DISCOPS_HFS] = ''")

*XDIM_SKIPNULLCHECK CURRENT 
*XDIM_MEMBERSET ENTITY = %DE%
*XDIM_MEMBERSET ACCOUNT AS %CFDR% = 123212,A310005,312110
*XDIM_MEMBERSET ACCOUNT = <ALL>
*XDIM_MEMBERSET GROUP = <ALL>
*XDIM_MEMBERSET COSTCENTER = <ALL>
*XDIM_MEMBERSET CURRENCY = FC,USD
*XDIM_MEMBERSET DATASRC = DISCOPS
*XDIM_MEMBERSET FLOW = FOPE,FACT,FCLO
*XDIM_MEMBERSET INTERCO = <ALL>
*XDIM_MEMBERSET PROFITCENTER = <ALL>
*XDIM_MEMBERSET SCENARIO = <ALL>

*WHEN ACCOUNT
*IS <> %CFDR%
*REC(EXPRESSION = 0)
*ENDWHEN

*XDIM_MEMBERSET ACCOUNT = %DA%
*XDIM_MEMBERSET GROUP = <ALL>
*XDIM_MEMBERSET COSTCENTER = <ALL>
*XDIM_MEMBERSET CURRENCY = FC,USD
*XDIM_MEMBERSET DATASRC = %DD%
*XDIM_MEMBERSET FLOW = FOPE,FACT,FCLO
*XDIM_MEMBERSET INTERCO = <ALL>
*XDIM_MEMBERSET PROFITCENTER = <ALL>
*XDIM_MEMBERSET SCENARIO = <ALL>
*WHEN ENTITY.DISCOPS_HFS
*IS D
*WHEN CURRENCY
*IS FC,USD
*REC(FACTOR = -1,DATASRC = "DISCOPS")
*REC(FACTOR = 1,ACCOUNT = ACCOUNT.DISCOPS_TO_ACCT,DATASRC = "DISCOPS")
*ENDWHEN
*ENDWHEN

//ADDITIONAL CODE IN THE SCRIPT SHOWN BELOW TO CLEAR DATA (BUT NOT CLEARING ANY DATA) :-
*XDIM_MEMBERSET ENTITY = %ED%
*XDIM_MEMBERSET DATASRC = DISCOPS
*XDIM_MEMBERSET ACCOUNT = %DA%
*XDIM_MEMBERSET GROUP = <ALL>
*XDIM_MEMBERSET COSTCENTER = <ALL>
*XDIM_MEMBERSET CURRENCY = FC,USD
*XDIM_MEMBERSET FLOW = FOPE,FACT,FCLO
*XDIM_MEMBERSET INTERCO = <ALL>
*XDIM_MEMBERSET PROFITCENTER = <ALL>
*XDIM_MEMBERSET SCENARIO = <ALL>
*WHEN ENTITY
*IS %ED%
*REC(EXPRESSION = 0)
*ENDWHEN

*COMMIT  
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 28, 2017 at 08:00 AM

    Issue is resolved now, correct script to delete the data:-

    *XDIM_SKIPNULLCHECK CURRENT

    *XDIM_MEMBERSET ENTITY = %ED%

    *XDIM_MEMBERSET ACCOUNT = %DA%

    *XDIM_MEMBERSET GROUP = <ALL>

    *XDIM_MEMBERSET COSTCENTER = <ALL>

    *XDIM_MEMBERSET CURRENCY = FC,USD

    *XDIM_MEMBERSET DATASRC = DISCOPS

    *XDIM_MEMBERSET FLOW = FOPE,FACT,FCLO

    *XDIM_MEMBERSET INTERCO = <ALL>

    *XDIM_MEMBERSET PROFITCENTER = <ALL>

    *XDIM_MEMBERSET SCENARIO = <ALL>

    *WHEN ACCOUNT

    *IS %DA%

    *REC(EXPRESSION = 0)

    *ENDWHEN

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 27, 2017 at 11:14 AM

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

    Your question is like: My script is not working, but I don't want to provide full info!

    Add comment
    10|10000 characters needed characters exceeded