cancel
Showing results for 
Search instead for 
Did you mean: 

aggregate exported data in /CPMB/EXPORT_TD_TO_FILE

former_member617674
Participant

is it possible to aggregate results data in chain /CPMB/EXPORT_TD_TO_FILE?

One of my packages uses this chain - it exports several fields from BPC model. Model has 8 dimension, but only 4 are used in export process - it causes many combinations are repeated in file.

Off course sum of values is correct, but it would be better to have a choise whether to aggregate data or not.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Hi Michal,

You have 4 unused dimensions - do you have a root parent member for each unused dimension?

If yes - just export the root members for unused dimensions...

Vadim

former_member617674
Participant
0 Kudos

Vadim,

Weve tried to use some aggregation levels but the problem concerns bpc behaviour when you want use conversion file.

Bpc do the conversion on exported data, I think as the last step. If there is more than one internal mapped to one external, more than one line can have same attribute value.

We thought about creating hierarchy to replace conversion file, but its impossible because externals have same value as base members in dimension... one of solution could be routine I believe...

former_member186338
Active Contributor
0 Kudos

I am not talking about conversion, just about top parent usage for unused dimensions...

"but its impossible because externals have same value as base members in dimension" - not clear!

Vadim

Answers (3)

Answers (3)

former_member186338
Active Contributor
0 Kudos

Hi Michal,

I just tested custom process chain approach - first run script then export to file (with the same scope):

The new chain was created based on the copy of standard chain

The advanced script for the package was:

PROMPT(MEASURELIST,%MEASURES%,"Please select measures")

PROMPT(SELECTINPUT,,,,"%DIMS%")

PROMPT(TRANSFORMATION,%TRANSFORMATION%,"Transformation file:",,,Import.xls)

PROMPT(OUTFILE,,"Please enter an output file",Data files (*.txt)|*.txt|All files(*.*)|*.*)

PROMPT(RADIOBUTTON,%ADDITIONINFO%,"Add other information(Environment,Model,User,Time)?",1,{"Yes","No"},{"1","0"})

INFO(%DIMVALUE%,E=24)

INFO(%TEMPNO1%,%INCREASENO%)

INFO(%TEMPNO2%,%INCREASENO%)

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

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

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

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

TASK(/CPMB/SCRIPT_LOGIC,LOGICFILENAME,PREPEXPORT.LGF)

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

TASK(/CPMB/APPL_TD_SOURCE,DIMENSIONVALUE,%DIMVALUE%)

TASK(/CPMB/APPL_TD_SOURCE,MEASURES,%MEASURES%)

TASK(/CPMB/APPL_TD_SOURCE,OUTPUTNO,%TEMPNO1%)

TASK(/CPMB/EXPORT_TD_CONVERT,INPUTNO,%TEMPNO1%)

TASK(/CPMB/EXPORT_TD_CONVERT,TRANSFORMATIONFILEPATH,%TRANSFORMATION%)

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

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

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

TASK(/CPMB/EXPORT_TD_CONVERT,OUTPUTNO,%TEMPNO2%)

TASK(/CPMB/TD_FILE_TARGET,INPUTNO,%TEMPNO2%)

TASK(/CPMB/TD_FILE_TARGET,FULLFILENAME,%FILE%))

TASK(/CPMB/TD_FILE_TARGET,ADDITIONALINFO,%ADDITIONINFO%))

The scope prompt was filled only once:

The script successfully processed scope data and then the processed data was exported to the file.

B.R. Vadim

former_member186338
Active Contributor
0 Kudos

Hi Michal,

May be it's better to aggregate data by some simple script on some dummy members of unused dimensions and then export?

Vadim

former_member617674
Participant
0 Kudos

Vadim,

Good idea but we would like to do this as a transparent process for user... is it possible to do this as one package? Or it should be two packages and package link with both packages?

former_member186338
Active Contributor
0 Kudos

Hi Michal,

1. The package link is the simplest option, but you may have to select some members twice.

2. You can create a custom chain that will first run script and then export data. In this case prompts can be combined.

3. Badi is the most complex way!

Vadim

Former Member
0 Kudos

Hi Vadim,

BADI is not the most complex way, actually BADI is the most simplest way and the best solution for this problem. if you want to export from multiple models, you only need to create once.

also it is the fastest solution out of all your suggestions.

Andy

Former Member
0 Kudos

Hi Michal,

You can use end routine in your transformation file (BADI) to sum it up for you.

Andy

former_member617674
Participant
0 Kudos

Andy,

Could you desribe some details about this BADI? Should it use COLLECT or something other?

And how about scalability of this routine? Is it possible to create one routine for aggregating exported data, no matter of columns names etc?

Former Member
0 Kudos

Hi Michal,

Yes, you use collect in the badi.

yes, you can code in a dynamic way so that the badi can be used in different models.

Andy

former_member617674
Participant
0 Kudos

Andy,

Is there any documentation how to do this in SAP BPC? I assume it concerns more ABAP than BPC? some how-to would be very helpful...

former_member186338
Active Contributor
0 Kudos

Just to get an idea look on

Vadim

Former Member
0 Kudos

Yes, you can have a look at this link.

How To... Use Start and End Routine

Andy