cancel
Showing results for 
Search instead for 
Did you mean: 

How to transfer data between models through BADI (CUSTOM LOGIC)?

adolfo_vigo
Explorer
0 Kudos

Hi community,

I'm working on SAP BPC 10.1 Standard and i have the following requirement. We need to move data between two models with a custom logic BADI. Why we can not use *DESTINATION APP?

We need to save data in the ZACCOUNT, and these members are defined in the source dimension ACCOUNT. The correct would use something like ACCOUNT.ZACCOUNT_A, but in this case the destination ZACCOUNT is not defined in base members, is define in parent nodes and we can not define at base level. So, we would like to know if its possible by script logic or the most probably, it would be possible by BADI? Which is the sentence or how we can move data between models in BADI, how would be the code? A little example.

BADIs reads correctly parent members data, so we only need to read their ZACCOUNT property and move to other model. But we don't know how to do it through BADI.

Product version:

SAP BPC 800 SPS 10 (04/2013)

SAP BW 750 0022

Thanks in advance

View Entire Topic
adolfo_vigo
Explorer
0 Kudos

I've tried this:

*SELECT(%NODOS_ZACCOUNT%,"[ID]","ACCOUNT",ZACCOUNT_A <> '')

*SELECT(%ZACCOUNTS%,"[ZACCOUNT_A]","ACCOUNT",ZACCOUNT_A <> '')

*DESTINATION_APP = ZMS_REP_PACKAGE

*ADD_DIM AUDIT_TRAIL = LOAD

*ADD_DIM ZCONCEPT = NO_CONCEPT

*RENAME_DIM FLOW = ZFLOW

*RENAME_DIM ACCOUNT = ZACCOUNT

*SKIP_DIM = ACTIVITY,DATASRC,PROFITCTR,RECURRENCE,SCOPE

*WHEN ACCOUNT

*FOR %NODOS%=%NODOS_ZACCOUNT% AND %ZACCOUNT%=%ZACCOUNTS%

*IS BAS(%NODOS%)

*REC(EXPRESSION=%VALUE%,ACCOUNT=%ZACCOUNT%)

*NEXT

*ENDWHEN

And the result seems good:

WHEN ACCOUNT

*IS BAS(61111)

*REC(EXPRESSION=%VALUE%,ACCOUNT=A000004)

*IS BAS(61112)

*REC(EXPRESSION=%VALUE%,ACCOUNT=A000005)

*IS BAS(61113)

*REC(EXPRESSION=%VALUE%,ACCOUNT=A000005)

*IS BAS(6112)

*REC(EXPRESSION=%VALUE%,ACCOUNT=A000006)

*IS BAS(6113)

*REC(EXPRESSION=%VALUE%,ACCOUNT=A000007)

*IS BAS(61141)

*REC(EXPRESSION=%VALUE%,ACCOUNT=A000008)

*IS BAS(61143)

*REC(EXPRESSION=%VALUE%,ACCOUNT=A000010)

*IS BAS(6115)

But it does not save any data:

ENDWHEN ACCUMULATION: 0 RECORDS ARE GENERATED.

SCRIPT RUNNING TIME IN TOTAL:4.00 s.

LOG END TIME:2022-10-06 11:30:28

former_member186338
Active Contributor

Check scope!