on 01-08-2015 11:09 PM
Dear experts,
I'm new to BPC. I'm using BPC 10 NW. I've implemented a new Badi for UJ_CUSTOM_LOGIC. This Badi is executed from Data Manager in a package.
I have an issue when reading parameters from IT_PARAM internal table within the Badi.
Script that runs from a package in Data Manager:
Abap code that read the parameters table it_param (it comes through the interface in method execute):
As you can see is a simple read table.
Issue:
If I run it from DM this above read fails (sy-subrc=4) and can't read my parameters.
But if I run it from UJKT it executes fine (sy-subrc=0) and reads my parameters ok.
UJKT run:
DM run:
I can't figure out why it behaves differently?
It's not to do with the read statement as it works fine from UJKT.
Am I missing something from DM side? May be some permissions?
Anybody experienced this ever? Any clues?
Thanks and regards,
Laura
why you use extra move statement ?
what is the content of LWA_PARAM here ? (on your DM debugging screen)
why you are not directly checking
if lwa_param-hashvalue <> 'OFF' ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok dont worry we will resolve it
try the extra safest metod.
put your "while" code above the "read table" statement.
and here
check IT_PARAM again and be sure QUERY=OFF is there
after READ statement please double click on la_param and check the QUERY parameter.
one possibility is, maybe there are spaces and DM is sending with to many space to IT_PARAM but in UJKT it maybe deleted already so lets be sure about it.
if still you get sy-subrc = 4 or 8 (please check also after read statement )
start a loop and check the lwa_param-hashvalue.
>>>please check here al the values and parameters
loop at it_param into lwa_param.
endloop.
dm doesn't put space normally maybe the consultant who wrote the SL wrongly put extra spaces or any other problem.
Because, the UJKT script logic is given by BPC consultant i think, and you don't have access to BPC Web Admin i assume ? is it like that ?
So best way is, just do a loop-endloop and check all the parameters one by one with HASHVALUE and HASHKEY in LWA_PARAM .
Or give me remote access i check coz i also get crazy it is not possible.
no it is correct
but loop endloop will give you answer.
comment all your code.
use this.
while sy-subrc = 0.
endwhile.
* when you go in debug, set subrc=4 here and let while to finish.
loop at IT_PARAM into LWA_PARAM.
break-point. <<<<here please check what you have in LWA_PARAM-HASHVALUE and LWA_PARAM-HASHKEY in all loop cycles and see what you have in QUERY. Because as i see from your screenshot QUERY=OFF is there.
endloop.
Hi Bilen,
The issue was caused by the spaces before and after the equal sign in the logic script file.
You were right!!
I removed them from the script in BPC Web Admin tool and re run the package from DM and it worked.
Somehow, when running a package that it's not the default logic it adds spaces randomly to the parameters or betted said it just doesn't remove them.
Strange! as this is not the case for the scripts running in default logic or from UJKT where I'm using the very same script provided by the consultant with the spaces before and after the equal sign and they work.
May be it's like you said before: it remove the spaces automatically in those cases?
But for sure it's not removing the spaces from the script running from a package.
Thank you very much!
Hi Bilen,
Do you want to hear something odd?
I tried to reproduce the issue again adding the spaces before and after the equal sign on every parameter and it worked ok anyway (???)
But previously didn't work at all, the images I posted at the beginning of my post proves it.
Do you know of some known issue in regards to the refresh with BPC 10 NW? and is it possible that this occurred because I'm working inside a Citrix box?
Just wondering to prevent this from happening in the future..
Thanks a lot for your advice!! it did work although now I can't reproduce the issue again.
that is strange, i am thinking how it is possible but maybe there was tab ? becase tab also seen as space on textedit but maybe in the backend causing some problems . It is hard to reproduce the problem.
If you check standard CL_UJK_RUN_LOGIC, they are using some regular expressions, wild cards to catch the parameters entered to the script logic. Maybe one of the space which wasn't a space originally caused this error.
I didn't have this problem in my BPC projects but i had a one spacing problem for one of the master data member.
ID was 'PRODUCT1' but actually it was stored as ' PRODUCT1' or 'PRODUCT1 ' . There was space in the beginning or end something like that . I was throwing my computer from the window because read table was not working.
anyway i don't think you will have problems like that, really hard to face.
good luck.(you need a bit )
Hi Laura,
Why do you want to check if QUERY is OFF?
those are hardcoded into the logic script, you just need to make sure they are OFF in the LGF file.
try use READ TABLE it_param WITH KEY hashkey = 'QUERY'
don't use TABLE KEY.
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andy,
Why do you ask why do I check for QUERY = OFF? I was told that in order to read from the cube instead of using the data that comes in CT_DATA I need to set this parameter to OFF. Is that correct? I'm barely new to BPC and the way it works.
Regarding the READ TABLE stmt now I'm using WITH KEY in my last version of the code.
However, I've tried WITH KEY and WITH TABLE KEY as well and didn't worked.
Somehow, running from DM was adding some spaces from the script although this seems to be some random behaviour?? when I removed the spaces before and after the equal sign in every parameter in the script it worked.
I tried putting back the space to make it fail again and it didn't fail!
Is there any know issue related to the refresh in BPC front-end or is it needed to log off/on from BPC Web Admin and BW system (Abap) as well with every change and I'm not aware of?
Thanks!
Hi Laura,
Yes, query=off means that you need to read the BPC model yourself, you usually hardcode in the LGF file, so I don't know why you need to check in your code again. all you need to do is to make sure in your LGF file that QUERY=OFF.
That is very strange, I think maybe its because you copy and paste it from somewhere initially, and space is not really a space, in future maybe try to delete spaces and retype again.
Andy
I know that, I just think that is a wasted step.
If QUERY = ON in the LGF, then by the time you get to the BADI it already load all the data from the Model, so if you check in BADI or not, the data already been read, thus time wasted!
QUERY = on is already executed before you do a check in the BADI.
Andy
Alright guys
Happy Monday! (at least in this part of the world)
I understand what you mean with double checking the value of query.
To be honest, here they check query and write like this so I copied it from previous badis because as I mentioned before I'm still learning BPC as I'm new to BI/BW world. I will not check its value from now on if it's a waste of time
Thanks for sharing your knowledge!
Today the consultant showed me how she copied the script. She copied from the comment block from my code to Excel, from there she edit it and then copy it to the logic script file. That's how we've got the extra random spaces in it! although you don't get to see them in the script.
Lesson learnt: don't copy and paste it, write it yourself in the logic script file.
Thanks a lot for your recommendations/suggestions Andy and Bilen!
Cheers!
Hi Maria,
You can try
QUERY = ON
WRITE = ON
Go through the following link
Shrikant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shrikant,
Thanks for your input however the requirement is to implement a custom logic badi not a process chain and I'm passing my parameters in a proper manner as they work on UJKT.
The badi works fine when triggered from UJKT or an input schedule but it doesn't read its parameters when executing from Data Manager.
Even more, it happens only for this badi as I've tested other badis with the same reading logic and they work from DM. I have deleted and re created this badi and the result is the same; the reading statement fails and as you can see is a really simple read statement therefore there is some else either around the package or around the badi that I'm not seeing.
Thanks
Hi Shrikant,
Would you guide me in how to acquire it? as I'm a developer not a BPC consultant.
I can access the script logic file (.LGF) for this process:
*START_BADI ZBC_5000_PLAN_01_006
TIME = %TIME_SET%
ACCOUNT = 100000,100100,100200,100300,100400,100500,100600,100700
READ_DS = FILE
WRITE_DS = AUTOPOST
QUERY = OFF
WRITE = OFF
*END_BADI
Thank you very much.
User | Count |
---|---|
15 | |
3 | |
2 | |
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.