Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How can I select the data based on propriety of member ID selected in the package?

Hi experts,

How can I select the data based on propriety of member ID selected in the package?

Example:

I select in the package the TIME: 2013.01

This member 2013.01 has a propriety called BASE=2013BASE.

And I have a MEMBER in TIME dimension as 2013BASE.

I want to run a logic script to clear data in 2013BASE member, according the select in package 2013.01.

I have data just in 2013BASE

In the package the users select 2013.01:

Logic incorrect because is looking for data in 2013.01 and not 2013BASE

//DELETE YEAR BASE RECORDS PRIOR TO RECALCULATING

*XDIM_MEMBERSET ACCSALES = BAS(KSD50)

*XDIM_MEMBERSET ENTITY = %ENTITY_SET%

*XDIM_MEMBERSET DATASOURCE = INPUT

*XDIM_MEMBERSET RPTCURRENCY=IC

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%

*XDIM_MEMBERSET TIME = %TIME_SET%

*XDIM_MEMBERSET MFGPLANT = BAS(MFGPLANTS)

*XDIM_MEMBERSET PLANT = %PLANT_SET%

*WHEN ACCSALES

*IS *

*REC(EXPRESSION= 0,ACCSALES=KSD51.2.1,TIME=TIME.YEAR_BASE)

*REC(EXPRESSION= 0,ACCSALES=KSD58.1,TIME=TIME.YEAR_BASE)

*REC(EXPRESSION= 0,ACCSALES=KSD14,TIME=TIME.YEAR_BASE)

*REC(EXPRESSION= 0,ACCSALES=KSD90,TIME=TIME.YEAR_BASE)

2.png (120934 B)
1.png (61582 B)
replied

"I understood the logic script will be:.." incorrect! why do you removed *SELECT from my previous answer???

Please read some documents - like help about script logic statements!

The code will be:

//DELETE YEAR BASE RECORDS PRIOR TO RECALCULATING

*SELECT(%YBMD%,[YEAR_BASE],TIME,[ID]=%TIME_SET%)

*SELECT(%YBM%,[ID],TIME,[ID]=%YBMD%) // %YBM% will contain list of YYYYBASE members without duplicates

*XDIM_MEMBERSET ACCSALES=KSD51.2.1,KSD58.1,KSD14,KSD90 //or BAS(KSDS) if you want to clear all base members!

*XDIM_MEMBERSET ENTITY = %ENTITY_SET%

*XDIM_MEMBERSET DATASOURCE = INPUT

*XDIM_MEMBERSET RPTCURRENCY=IC

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%

*XDIM_MEMBERSET MFGPLANT = BAS(MFGPLANTS)

*XDIM_MEMBERSET PLANT = %PLANT_SET%

*XDIM_MEMBERSET TIME=%YBM% //All YYYYBASE members will be scoped

//You even don't need FOR/NEXT to clear

*WHEN ACCSALES

*IS *

*REC(EXPRESSION= 0)

*ENDWHEN

//Then you can continue with original TIME members in %TIME_SET%

Vadim

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question