‎2006 Dec 04 2:51 PM
Hi All,
I am writing code to populate a key figure in a structure. The formula is like:
kf1 = nodim( kf2 ) * kf3.
nodim is a function - Value Without Dimension (Unit-free). This is used in a query to calculate a key figure. My requirement is to simulate the functionality in the code.
How to declare or define the method or function 'nodim'?
Please advise.
Message was edited by:
Sachin Guptha
‎2006 Dec 04 3:14 PM
Hi,
try something like
CLASS calc DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
nodim
importing kf_in type any
returning value(kf_out) type any.
ENDCLASS.
CLASS calc IMPLEMENTATION.
METHOD nodim.
* do the nodim calculation here...
kf_out = kf_in.
ENDMETHOD.
ENDCLASS.
The code should work. Actually I have no idea about the algorithm behind NODIM.
Regards,
Clemens
‎2006 Dec 04 4:09 PM
‎2006 Dec 04 4:24 PM
Oops,
you may have noticed that it's syntactically not correct.
returning value(kf_out) type any.
can not be type any. Specify INT4 or whatever may be applicable. Sorry.
Regards,
Clemens
‎2006 Dec 04 7:00 PM
Hi,
I have a question. I am writing code to populate 2 key figures (kf1 and kf2).
kf1 = kf3 + kf4.
kf2 = nodim(kf5) * kf6.
The code for kf1 already exists in a method. Where to write the CLASS definition and implementation for populating the second key figure (kf2).
Thanks
‎2006 Dec 04 9:21 PM
Hi Sachin,
possibly I don't understand in depth what you are going to do.
You said
kf1 = kf3 + kf4.
and
code for kf1 already exists in a method.
Does the method do the addition of kf3 + kf4? what's the method's name and where is it declared? Where do kf3 and kf4 come from?
Still I don't know what the nodim function is going to do. nodim is used for dimensionless. What does thius mean in your contect? And where does kf5 and kf6 come from?
CLASS definition and implementation can be written anywhere in your program or defined in the class builder making it reusable.
I think the question is: if the implemented method is thought for populating the second key figure (kf2), then how to populate values (parameters?) kf5 and kf6 and how to interpret nodim function - is it just the decimal value of an exponential number a.bcdeEnn or what?
Could you please explain the circumstances of the task (in other words: What the hell are you doing?)
Kind regards,
Clemens