HI, Experts,
I don't know exactly how to use *FUNCTION at script logic. is there any documentation? May anybody pass the link?
Now, we are using SAP BPC 10.o NW.
We have a script logic with a BADI and we would like to pass parameters that change by a function.
The logic is something like that below. May anybody helps me? Can I use *FUNCTION inside the logic script or I need to move to mdxlib?
*FUNCTION DIA_PGTO()
IIF((([SALESAGREEMENT].CURRENTMEMBER.PROPERTIES("SELLERTYPE"))="INTERNO"),"05",IIF(RIGHT(([SALESAGREEMENT].CURRENTMEMBER.PROPERTIES("RECEIPTMONTHADJ")),2)<="07","10",IIF(RIGHT(([SALESAGREEMENT].CURRENTMEMBER.PROPERTIES("RECEIPTMONTHADJ")),2)<="15","18","10")))
*ENDFUNCTION
*FUNCTION MES_PGTO()
IIF((([SALESAGREEMENT].CURRENTMEMBER.PROPERTIES("SELLERTYPE"))="INTERNO"),1,IIF(RIGHT(([SALESAGREEMENT].CURRENTMEMBER.PROPERTIES("RECEIPTMONTHADJ")),2)>"15",2,1)))
*ENDFUNCTION
*FUNCTION MES_FIXO()
IIF((([SALESAGREEMENT].CURRENTMEMBER.PROPERTIES("SELLERTYPE"))="INTERNO"),"NULO",([SALESAGREEMENT].CURRENTMEMBER.PROPERTIES("RECEIPTMONTHADJ")))
*ENDFUNCTION
%AUX_DIA_PGTO% = DIA_PGTO()
//*START_BADI SLS_BADI_BUSCA_DIA_UTIL
//PARAM_TIPO_DATA = UTIL
//PARAM_DIA=%AUX_DIA_PGTO% // DIA 07 POR EXEMPLO (2 CASAS DECIMAIS
//PARAM_ADIC_DIA=0 // NÃO ADICIONA NENHUM DIA
//PARAM_MES=MES_PGTO() // MES SEGUINTE
//PARAM_DIRECAO=1 // 1 PARA FRENTE E 0 PARA TRÁS
//PARAM_METRICA=PGTOCOMISSAOVENDA // NOME DA MÉTRICA DESTINO
//PARAM_MES_FIXO=MES_FIXO() // UTILIZAR O MÊS DE CADA REGISTRO COMO BASE DE CÁLCULO
//QUERY=ON
//WRITE=ON
//*END_BADI