2 Replies Latest reply: Sep 29, 2014 10:25 AM by Hannes Peiffer RSS

    Calculated Formula in Script

      Hey all,


      I have defined a variable as follows on the surface (not in the script):


      SUM({<S_Artikel.Statistik = {'yes'} >}Scanning.UMSATZ) -SUM({<S_Artikel.KontenGruppe = {"UMSCN"}>}Scanning.UMSATZ)


      Now I want this definition in the script, so I can define this formula as a Dimension in the Table "S_Artikel". On the surface I want to make a Listbox where I can choose this dimension.


      Is there a way I can do this. The only way I can think of is a "mapping load" of the Scanning.UMSATZ into the S_Artikel.


      I hope it was not too confusing :-)



        • Re: Calculated Formula in Script
          Marcus Sommer

          It will be depend from your datamodel but I think you will need to merge all neccessary fields into a single table. But why want you this transfer into the script - especially these kind of expressions is often better used within the gui and not in the script. If you have already problems with your performance you will rather need a different approach in your datamodel.


          - Marcus

            • Re: Calculated Formula in Script

              Hi marcus,


              I have merged alle necessary fields into one table. The challenge here the fact that I want the second SCANNING.Umsatz substracted from the first SCANNING.Umsatz.


              What I want is a dimension like

              if (S_Artikel.Statistik = 'yes' or S_Artikel.KontenGruppe = 'UMSCN', 'Teilegruppenstatistik') as S_Artikel.Dimension


              In future I want to build a cascaded if-clause, where I can refer to some possible variations in a listbox.


              As I said, the challenge here is that the second part of the if-clause (S_Artikel.KontenGruppe = 'UMSCN') is substracted from the first part (S_Artikel.Statistik = 'yes')


              Perhaps I can provide a sample-qvw.