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
Request clarification before answering.
Hi Ana,
You are doing something strange to my mind: in the functions you are referencing CURRENTMEMBER and trying to pass the result to BADI... What is the idea?
B.R. Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI, Vadim,
I want to change the parameter according to the dimension properties. For example, if the seller is internal, the payment of the commission of it falls on the fifth day, but if the seller is external, the commission should be paid on the 10th or 18th of the same month.
As I said before, I don't know how to use *FUNCTION and I need same examples or any documentation... Maybe it's not possible to make a logic like this and I have to create another ...
Could you help me?
Regards,
Ana Teresa
Hi Ana,
*FUNCTION is useless for this purpose.
You have a badi in your script logic and you have to supply some parameters for this badi.
Let's assume that your script is launched by DM (is it correct?) and user will select ONLY one member of SALESAGREEMENT dimension. Then you can use *SELRCT to put the property value in some %% variable and provide this variable as a badi parameter:
*SELECT(%SETYPE%,"[SELLERTYPE]",SALESAGREEMENT,"[ID]='SALESAGREEMENT_SET'")
and use %SETYPE% as a badi parameter that will be replaced by the property valye SELLERTYPE.
But it's better (as Gersh recommended) to read this property inside BADI code!
B.R. Vadim
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.