cancel
Showing results for 
Search instead for 
Did you mean: 

BPC 10 - DM Package copy values from one entity to many from report

joao_dias1175_5
Explorer
0 Kudos
528

HI experts,

I'm new in DM advanced script and Logic Script coding, so i need some help for copying data with it.

I've created this allocation package witch i can copy data from one to many entities:

PROMPT(SELECTINPUT,%SOURCE%,,,"%ENTITY_DIM%")

PROMPT(SELECTINPUT,%DEST%,,,"%ENTITY_DIM%")

INFO(%EQU%,=)

INFO(%TAB%,;)

TASK(/CPMB/ALLOCATION_LOGIC,EQU,%EQU%)

TASK(/CPMB/ALLOCATION_LOGIC,TAB,%TAB%)

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

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

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

TASK(/CPMB/ALLOCATION_LOGIC,LOGICFILENAME,COPIA_DATA_REF_LB.LGF)

TASK(/CPMB/ALLOCATION_LOGIC,MEMBERSELECTION,SOURCE%EQU%%SOURCE%%TAB%DEST%EQU%%DEST%)

And i'm passing values to Script Logic:

*XDIM_MEMBERSET AUDITORIA = AUDMAN

*XDIM_MEMBERSET CENARIO_EVTE = CENPN

*XDIM_MEMBERSET PERIODO = NA_PERIODO

*XDIM_MEMBERSET CONTA = C0110

*XDIM_MEMBERSET UNIDADE = NA_UNIDADE

*XDIM_MEMBERSET VERSAO = TVERS1

*XDIM_MEMBERSET PROJETO = $SOURCE$

*WHEN PROJETO

*IS *

*FOR %M%=$DEST$

*REC(EXPRESSION=%VALUE%,PROJETO=%M%)

*NEXT

*ENDWHEN

It's working, but i need to turn it dinamic, without prompts. For it, i already have an fixed SOURCE Entity (NA_PROJETO) and i would like to copy the value from this entity only for the Entity members that are in my report, not to all members i have in my dimension.Any kind of help is welcome.Thanks in advance,João Vitor Dias

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

"only for the Entity members that are in my report"

DM package know nothing about your report 🙂

You will need to pass target entity members...

You can use VBA to pass values to DM prompts automatically - read my blog:

https://blogs.sap.com/2017/06/16/simple-vba-function-to-pass-parameters-to-dm-packages/