on 08-24-2011 5:40 PM
Hello everyone,
I am working with BPC 7.5 NW SP08 and trying to make an script logic using WHENISESEENDWHEN, but having some problems.
This is my code
*XDIM_MEMBERSET R_REGALIAS=Antes
*WHEN R_CATSOCIO
*IS Regalias
*REC(EXPRESSION=%VALUE%,R_REGALIAS=Despues)
*ELSE
*REC(EXPRESSION=(100-([R_CATSOCIO].[Regalias]))*%VALUE%/100,R_REGALIAS=Despues)
*ENDWHEN
What i would expect is that when R_CATSOCIO = Regalias the *REC inside the *ELSE would not be executed but actually when is Regalias, is doing both *REC
I have try also writing *IS NOT Regalias (I wrote not beacuse i do not why the message does not allow to write symbol less than, greater than) instead of else, but is getting executed also.
Is this a normal behavior or is a known problem? Thanks for your answers
Edited by: cegarcia on Aug 24, 2011 6:42 PM
Thanks Gersh for your answer,
Lest suppose i have sent the following data by an input schedule
TIME, R_CATSOCIO, R_REGALIAS, SIGNDATA
2010, Regalias, Antes, 20
2010, Socio1, Antes, 15
2010, Socio2, Antes, 10
2010, Socio3, Antes, 15
2010, Socio4, Antes, 60
After runnnig the script logic i would expect this new data
2010, Regalias, Despues, 20 --- First *REC
2010, Socio1, Despues, 12 --- Second *REC
2010, Socio2, Despues, 8 --- Second *REC
2010, Socio3, Despues, 12 --- Second *REC
2010, Socio4, Despues, 48 --- Second *REC
The last 4 records are saving ok, the "error" is on the record containing R_CATSOCIO = Regalias, instead of copying the value from "antes" to "despues" is saving the sum of the execution of first *rec (20) and the second one (16) so i am getting:
2010, Regalias, Despues, 36
I think is a bug 'cause it should execute only the first *REC for Regalias, I just want to be sure before writing a note.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have done what you suggested and add a memberset for R_CATSOCIO=Regalias, the i have executed the scrip logic test in BW, and this is the result, again it shows the 2nd *REC is being executed, when it should not.... Thanks.
#dim_memberset=2
R_REGALIAS:Antes,1 in total.
R_CATSOCIO:Regalias,1 in total.
REC :%VALUE%
CALCULATION BEGIN:
QUERY PROCESSING DATA
QUERY TIME : 146.83 ms. 16 RECORDS QUERIED OUT.
QUERY REFERENCE DATA
CALCULATION TIME IN TOTAL :15.04 ms.
16 RECORDS ARE GENERATED.
CALCULATION END.
#dim_memberset=2
R_REGALIAS:Antes,1 in total.
R_CATSOCIO:Regalias,1 in total.
REC :(100-([R_CATSOCIO].[Regalias]))*%VALUE%/100
CALCULATION BEGIN:
QUERY PROCESSING DATA
QUERY TIME : 164.60 ms. 16 RECORDS QUERIED OUT.
QUERY REFERENCE DATA
QUERY TIME : 121.91 ms. 16 RECORDS QUERIED OUT.
CALCULATION TIME IN TOTAL :16.65 ms.
16 RECORDS ARE GENERATED.
CALCULATION END.
Hi Gersh,
Thanks for your help, today i tried again the same code yesterday had problems and works fine, i don not have any clue what was wrong, i just have delete all data in my application, and have ask basis team and they said they have just updated something related with the java stack, but nothing with abap stack.
Perhaps there was some worng data in my app and with the deltion it was fixed.
Thanks again.
CarlosE
Hello,
Why do you think that script is executing both *RECs? I used *ELSE in BPC NW 7.5 SP03 and it worked fine for me.
I'd suggest restricting your selection just to 1 record and assign a different value to R_REGALIAS in one of the RECs. Than check if you got 2 records in result or just one. If you got 2 - open an OSS Message (it's a bug). If you'll get 1 record then everything is working correctly.
Regards,
Gersh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
3 | |
1 | |
1 | |
1 | |
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.