cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP BPC10 Script Logic

Former Member
0 Likes
803

Hi Experts,

I am new in scripting and i don't know how to transfer data from model to different model.

i have a different set of dimension to each model and i don't have a BADI person to configure my script.

i hope you can help me on this problem.

here are the set of dimensions to each model:

Source ModelDestination Model
Model: EXPENSEModel: FS
ACCOUNTACCOUNT
COSTCENTER
CATEGORYCATEGORY
TIMETIME
AUDITTRAILAUDITTRAIL
CURRENCYCURRENCY
CAPEXTYPE
LOCATION
STATIONTYPEPROFITCENTER
ASSETCLASSCOMPANY

Thank you very much in advance, experts.

Regards,

Marlon

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi Experts.

For Cost Center Dimension to Profit Center Dimension I have a mapping in Cost Center Dimension, same in Company Dimension, i only have 2 Company in this dimension which also have a mapping inside CostCenter Dimension.

Thanks and Best Regards,

Marlon Manalo

former_member186338
Active Contributor
0 Likes

If you have the mapping - please describe it - what property is used etc... It's not possible to help you without details!

Vadim

Former Member
0 Likes

Hi Vadim,

Thank you very much for the support, i attached the condition regarding on my scripts.


I hope i gave you enough information for my scripts.

former_member186338
Active Contributor
0 Likes

Then, what's the issue?

Simply:

*XDIM_MEMBERSET ... //Scope the dimensions as required

...

*DESTINATION_APP=FS

*SKIP_DIM = CAPEXTYPE,LOCATION,STATIONTYPE,ASSETCLASS,COSTCENTER

*ADD_DIM COMPANY = COSTCENTER:COMPANYCODE,PROFITCENTER = COSTCENTER:PROFIT_CTR

*WHEN ACCOUNT

*IS * //have to be scoped before

*REC(EXPRESSION=%VALUE%)

*ENDWHEN

Vadim

P.S. The same can be also written using RENAME_DIM..

Former Member
0 Likes

Hi Vadim,

i plot my script like this.

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%

*XDIM_FILTER ACCOUNT = [ACCOUNT].DTRANS = Y

*XDIM_MEMBERSET AUDITTRAIL = INPUT, ADJUST

*XDIM_MEMBERSET CURRENCY = LC, NC

*DESTINATION_APP=FS

*SKIP_DIM = CAPEXTYPE,LOCATION,STATIONTYPE,ASSETCLASS,COSTCENTER

*ADD_DIM COMPANY = COSTCENTER:COMPANYCODE,PROFITCENTER = COSTCENTER:PROFIT_CTR

*WHEN ACCOUNT.DTRANS

*IS "Y"

*REC(EXPRESSION=%VALUE%)

*ENDWHEN

*WHEN AUDITTRAIL.ID

*IS "INPUT", "ADJUST"

*REC(EXPRESSION=%VALUE%, AUDITTRAIL.ID=INPUT_TRNS,ADJUST_TRNS)

*ENDWHEN

*WHEN CURRENCY.ID

*IS LC,NC

*REC(EXPRESSION=%VALUE%, CURRENCY.ID=LC,NC)

*ENDWHEN

*WHEN COSTCENTER //DO I ALSO NEED TO CREATE THIS ONE? IF YES, HOW?

Again Thanks you very much for the support

Marlon

former_member186338
Active Contributor
0 Likes

Ups, why do you need multiple WHEN/ENDWHEN loops? Please read at list help about script logic.

Only:

*WHEN AUDITTRAIL

*IS INPUT

*REC(EXPRESSION=%VALUE%, AUDITTRAIL=INPUT_TRNS)

*IS ADJUST

*REC(EXPRESSION=%VALUE%, AUDITTRAIL=ADJUST_TRNS)

*ENDWHEN

to properly match AUDITTRAIL.

And start testing in UJKT!

Vadim

Former Member
0 Likes

Hi Vadim,

here is my new script:

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%

*XDIM_FILTER ACCOUNT = [ACCOUNT].Properties("DTRANS") = Y

*XDIM_MEMBERSET AUDITTRAIL = INPUT, ADJUST

*XDIM_MEMBERSET CURRENCY = LC, NO_CURR

*DESTINATION_APP = FS

*SKIP_DIM = CAPEXTYPE,LOCATION,STATIONTYPE,ASSETCLASS,COSTCENTER

*ADD_DIM COMPANY = COSTCENTER:COMPANYCODE,PROFITCENTER = COSTCENTER:PROFIT_CTR

*WHEN ACCOUNT.DTRANS

*IS "Y"

*REC(EXPRESSION=%VALUE%)

*WHEN AUDITTRAIL.ID

*IS "INPUT"

*REC(EXPRESSION=%VALUE%, AUDITTRAIL=INPUT_TRNS)

*IS "ADJUST"

*REC(EXPRESSION=%VALUE%, AUDITTRAIL=ADJUST_TRNS)

*WHEN CURRENCY.ID

*IS LC

*REC(EXPRESSION=%VALUE%, CURRENCY=LC,CURRENCY=NO_CURR)

*IS NO_CURR

*REC(EXPRESSION=%VALUE%, CURRENCY=NO_CURR)

*ENDWHEN

*ENDWHEN

*ENDWHEN

*COMMIT

// i still don't have a code for COSTCENTER is that necessary?

former_member186338
Active Contributor
0 Likes

Again, you don't understand me! The final script have to be:

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%

*XDIM_FILTER ACCOUNT = [ACCOUNT].Properties("DTRANS") = Y

*XDIM_MEMBERSET AUDITTRAIL = INPUT, ADJUST

*XDIM_MEMBERSET CURRENCY = LC, NO_CURR

*DESTINATION_APP = FS

*SKIP_DIM = CAPEXTYPE,LOCATION,STATIONTYPE,ASSETCLASS,COSTCENTER

*ADD_DIM COMPANY = COSTCENTER:COMPANYCODE,PROFITCENTER = COSTCENTER:PROFIT_CTR

*WHEN AUDITTRAIL.ID

*IS "INPUT"

*REC(EXPRESSION=%VALUE%, AUDITTRAIL=INPUT_TRNS)

*IS "ADJUST"

*REC(EXPRESSION=%VALUE%, AUDITTRAIL=ADJUST_TRNS)

*ENDWHEN

Only SINGLE WHEN/ENDWHEN!!!

And no useless *COMMIT!

Vadim

former_member186338
Active Contributor
0 Likes

P.S. Please read at least this document

It's not 100% correct (for example: incorrect description of *COMMIT, some new functions missing etc...) but better then nothing.

Vadim

Former Member
0 Likes

Hi Vadim,

Thank you very much for the support, my scripts are running and working fine with no error.

Thank you and Best Regards,

Marlon Manalo

Former Member
0 Likes

Hi Vadim,

there are some changes in my scope of audittrail from 2 member into 9. i divide the ADJUST into 8 and retain the INPUT.

I created a property from aduittrail dimension named "DATAFS" and tagged the INPUT as "I" and the 8 adjustment with "A". is my scripts still works likes this?

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%

*XDIM_FILTER ACCOUNT = [ACCOUNT].Properties("DTRANS") = Y

*XDIM_MEMBERSET AUDITTRAIL =      INPUT,ADJ_E,ADJ_F,ADJ_I,ADJ_L,ADJ_O,ADJ_S,ADJ_V,ADJ_B

*XDIM_MEMBERSET CURRENCY = LC, NO_CURR

*DESTINATION_APP = FS

*SKIP_DIM = CAPEXTYPE,LOCATION,STATIONTYPE,ASSETCLASS,COSTCENTER

*ADD_DIM COMPANY = COSTCENTER:COMPANYCODE,PROFITCENTER = COSTCENTER:PROFIT_CTR

*WHEN AUDITTRAIL.DATAFS

*IS "I"

*REC(EXPRESSION=%VALUE%, AUDITTRAIL=INPUT_TRNS)

*IS "A"

*REC(EXPRESSION=%VALUE%, AUDITTRAIL=ADJUST_TRNS)

*ENDWHEN

former_member186338
Active Contributor
0 Likes

You can even put the destination audittrail ID in this property - DATAFS (INPUT_TRNS or ADJUST_TRNS).

Then the script will be better:

*WHEN AUDITTRAIL

*IS *

*REC(EXPRESSION=%VALUE%, AUDITTRAIL=AUDITTRAIL.DATAFS)

*ENDWHEN

Vadim

Former Member
0 Likes

Hi Vadim,

Again thank you very much for the support. i have one more problem,

creating a package for my scripts. i used the allocation and modify it like this:

but while running the package i got a failed status with a log like this:

former_member186338
Active Contributor
0 Likes

Sorry, but you modified it incorrectly...

The SELECTION is not passed to the script!

Create a new package based on the chain DEFAULT_FORMULAS and change the name of the script. Correct the SELECTINPUT prompt as required.

Vadim

former_member186338
Active Contributor
0 Likes

Something like:

PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%")

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,EXPFS.LGF)

Former Member
0 Likes

Hi Vadim,

thank you so much,

Regards,

Marlon

Answers (3)

Answers (3)

former_member5472
Active Contributor
0 Likes

Hi,

As Vadim suggested, you need to come up with a logic to define "how you can derive the missing dimension values".

I think, you can define profit center from costcenter. Generally there exists a relation between the two.( i may be wrong here).

I don't know about company. If its single company then you can fix it to a single value.

Prat

former_member186338
Active Contributor
0 Likes

Hi Marlon,

First of all "i don't have a BADI person to configure my script" - incorrect, script and BADI are not related in general

Second - for sure help about DESTINATION_APP will be helpful

And at the end:

STATIONTYPE  PROFITCENTER

ASSETCLASS   COMPANY

what is the relation?

What is the storage type of FS cube - PERIODIC or YTD?

Vadim

Former Member
0 Likes

Hi Vadim,

Hi Marlon,

First of all "i don't have a BADI person to configure my script" - incorrect, script and BADI are not related in general - thanks for the info, i just read some materials for scripting the calling the BADI to do the scripts in pushing data to another model

Second - for sure help about DESTINATION_APP will be helpful   - i read some, but i don't know how to define the missing dimension from destination model.

And at the end:

STATIONTYPE  PROFITCENTER

ASSETCLASS   COMPANY - None PROFITCENTER AND COMPANY dimension are the missing dimension from source model

what is the relation?

What is the storage type of FS cube - PERIODIC or YTD? - source and destination model are both periodic.

Vadim

- Thanks very much Vadim for replying and guiding me here.

Regards,

Marlon

former_member186338
Active Contributor
0 Likes

What is the idea how to get members of the missing dimensions?

Is it a fixed member or member contained in the property of other member or...

Vadim

Former Member
0 Likes

HI,

You can use *destination_APP. There are lots of threads on SCN please read about it.

Kindly go through below links.

*DESTINATION_APP - SAP BusinessObjects Planning and Consolidation - SAP Library

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e025fa8d-1c22-2e10-cd9f-c488c7eea...

Hope this will help you.