Skip to Content

When running from DMP can't read parameters from Badi

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

abap.PNG (17.1 kB)
UJKT0.png (11.1 kB)
UJKT1.png (27.0 kB)
UJKT2.png (75.0 kB)
DM1.png (21.3 kB)
DM2.png (73.3 kB)
DM0.png (6.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 09, 2015 at 04:13 AM

    😀 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' ?

    Add comment
    10|10000 characters needed characters exceeded

    • 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 )

  • Jan 09, 2015 at 04:49 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 09, 2015 at 07:05 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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!