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
former_member186338
Active Contributor

Try multiple variables in *FOR:

*SELECT(%NODOS_ZACCOUNT%,ID,ACCOUNT,ZACCOUNT_AB <> '')
*SELECT(%ZACCOUNTS%,ZACCOUNT_AB,ACCOUNT,ZACCOUNT_AB <> '')

*DESTINATION_APP = ZMODEL_2
*ADD_DIM AUDIT_TRAIL = LOAD
*ADD_DIM ZCONCEPT = NO_CONCEPT
*RENAME_DIM FLOW = ZFLOW
*RENAME_DIM ACCOUNT = ZACCOUNT
*SKIP_DIM = SCOPE

*WHEN ACCOUNT
*FOR %NODOS%=%NODOS_ZACCOUNT% AND %ZACCOUNT%=%ZACCOUNTS%
*IS BAS(%NODOS_ZACCOUNT%)
*REC(EXPRESSION=%VALUE%,ACCOUNT=%ZACCOUNT%,MEASURES=PERIODIC)
*NEXT
*ENDWHEN
adolfo_vigo
Explorer
0 Kudos

Thanks Vadim but it didn't work. The script i have used:

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

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

*XDIM_MEMBERSET ACCOUNT = %NODOS_ACCOUNT%

*XDIM_MEMBERSET CATEGORY = ACT

*XDIM_MEMBERSET DATASRC = INPUT

*XDIM_MEMBERSET ENTITY = 0070

*XDIM_MEMBERSET FLOW = F99

*XDIM_MEMBERSET INTERCO = INONE

*XDIM_MEMBERSET RPTCURRENCY = LC

*XDIM_MEMBERSET SCOPE = NON_GROUP

*XDIM_MEMBERSET TIME = 2021.12

*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 = SCOPE

*WHEN ACCOUNT

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

*IS BAS(%NODOS_ACCOUNT%)

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

*NEXT

*ENDWHEN

Now, i only have this data in model 1, so the member destiny it will be A000004:

But the result shows something like this:

*WHEN ACCOUNT

*IS BAS(61111,61112,61113,6112,6113,61141,61143,6115,6116,6121,6122,612313,612314,612315,612316,612317,612318,612319,61231A,61231C,61231D,61233,612341,612342,612343,6123441,6123442,6123451,6123452,6123453,6123454,6123455,6123456,6124,6125,6126,6127,62111,62112,6211311,6211312,62114,621151,62117,621181,621211,621221,621231,6212321,621233,6221,62211331,62211332,6221321,6221322,6221323,6221324,6221325,6221326,6221328,622132A,62221,62222,62223,62224,6223,6224,62251,6228,6231,6232,62331,62332,62333,62334,62342,623513,623514,623515,623516,62351A,62351B,62353,62354,62361)

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

*IS BAS(61111,61112,61113,6112,6113,61141,61143,6115,6116,6121,6122,612313,612314,612315,612316,612317,612318,612319,61231A,61231C,61231D,61233,612341,612342,612343,6123441,6123442,6123451,6123452,6123453,6123454,6123455,6123456,6124,6125,6126,6127,62111,62112,6211311,6211312,62114,621151,62117,621181,621211,621221,621231,6212321,621233,6221,62211331,62211332,6221321,6221322,6221323,6221324,6221325,6221326,6221328,622132A,62221,62222,62223,62224,6223,6224,62251,6228,6231,6232,62331,62332,62333,62334,62342,623513,623514,623515,623516,62351A,62351B,62353,62354,62361)

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

*IS BAS(61111,61112,61113,6112,6113,61141,61143,6115,6116,6121,6122,612313,612314,612315,612316,612317,612318,612319,61231A,61231C,61231D,61233,612341,612342,612343,6123441,6123442,6123451,6123452,6123453,6123454,6123455,6123456,6124,6125,6126,6127,62111,62112,6211311,6211312,62114,621151,62117,621181,621211,621221,621231,6212321,621233,6221,62211331,62211332,6221321,6221322,6221323,6221324,6221325,6221326,6221328,622132A,62221,62222,62223,62224,6223,6224,62251,6228,6231,6232,62331,62332,62333,62334,62342,623513,623514,623515,623516,62351A,62351B,62353,62354,62361)

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

......But nevertheless, it does not save any data. It seems too that in case that it works, it will be save data from all NODOS_ACCOUNT in each ZACCOUNT member.I wonder, how we can say that for member ACCOUNT 61111 it corresponds A0000004, this match is the key. The result should be like:

WHEN ACCOUNT

*IS BAS(61111)

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

*IS BAS(61112)

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

.....Thanks again!