cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Fill data/zero instead of NULL with a data action - sap analytics cloud

Deb_
Participant
0 Likes
3,500

Hello

I want to fill a number (usually 0 or 1, in this case zero) in a range of unbooked data.
the script I wrote is'

IF RESULTLOOKUP([d/ACCOUNT] = "QUANTITY")=NULL
THEN
DATA([d/ACCOUNT] ="QUANTITY") = 0 
ENDIF

I have few IFs and Memberset that focus my data action of course, but this part of the formula just don't work.
I tried with "1" it didn't work either


is it possible to fill with a data action a NULL range???

thanks

Deb

Accepted Solutions (0)

Answers (3)

Answers (3)

hartmut_koerner
Product and Topic Expert
Product and Topic Expert

Hi Deb,

for me it worked with a "1", but not with the "0".

Best regards
Hartmut

Deb_
Participant
0 Likes

but I need a zero..... in this case
can you help?

hartmut_koerner
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Deb,

at least with a workaround: For me, the following worked:

IF RESULTLOOKUP([d/ACCOUNT]="QUANTITY")= NULL THEN
  DATA([d/ACCOUNT]="QUANTITY") = 1 
  DATA([d/ACCOUNT]="QUANTITY") = RESULTLOOKUP([d/ACCOUNT]="QUANTITY") * 0 
ENDIF

Best regards
Hartmut

Deb_
Participant
0 Likes

I'm gonna try and come back to you - thanks!

hartmut_koerner
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Deb,

in the meantime I have find out that this works as designed. Assigning 0 only works for booked data, not for unbooked.
There is a special handling for "0" in order to prevent the unnecessary creation of 0-records.

A simpler workaround might be the following, please try it out:

INTEGER @ZeroVariable
@ZeroVariable=0

IF RESULTLOOKUP([d/ACCOUNT]="QUANTITY")= NULL THEN
  DATA([d/ACCOUNT]="QUANTITY") = @ZeroVariable 
ENDIF

Best regards
Hartmut

Deb_
Participant
0 Likes

Hey Hartmut
I've tried it on one item only, the DA works very slow, but it seems to work
thank you very much!!!!
you saved me 🙂
I'm taking it from here

have a nice day!

0 Likes

Hi,

Try

DATA([d/ACCOUNT] ="QUANTITY") = 1-1

For some reason we can't book 0 directly...

JefB
SAP Champion
SAP Champion
0 Likes

Might be more performant to use

MEMBERSET [d/ACCOUNT]="QUANTITY"
DATA.APPEND()=.00

Or perhaps you can set this config keyword to let RESULTLOOKUP() statements return zero values.

CONFIG.GENERATE_UNBOOKED_DATA = ON