‎2007 Jan 12 11:57 AM
Hi all.
I have some variables on a smartform, but the decimals are specified dynamically on a table, for instance, the table tells me that a fields must be printed with 2 decimals, other field with 4 decimals, and so on.
How can I print those fields with dynamic decimals??
Thanx
Jesus
‎2007 Jan 12 12:36 PM
Hi,
have different variables with all kinds of decimal points (like var1 with decimals 2, var2 with decimals 4 etc). Fill the field value in any one of these variables depending upon your condition & display the same with a condition (use 'conditions' tab).
‎2007 Jan 12 11:59 AM
&itab-field1(.2)&------->two decimal
&itab-field2(.4)&------>four decimal.
‎2007 Jan 12 12:04 PM
Hi Kishan.
Thank you for your answer, but that would work if I know the decimals..... the thing is that they are specified dynamically, so I would need to do something like &itab-field1(.N)&, where N is the number of decimals.
I tried this on the smartform, but it is not allowed.
Jesus
‎2007 Jan 12 12:31 PM
‎2007 Jan 12 12:36 PM
Hi,
have different variables with all kinds of decimal points (like var1 with decimals 2, var2 with decimals 4 etc). Fill the field value in any one of these variables depending upon your condition & display the same with a condition (use 'conditions' tab).
‎2007 Jan 12 1:12 PM
hi jesus,
as kishan told... you can explicitily give the Decimal number like &v_numb(.2)& or
&v_numb(.4)&...
how many decimal V_numb contains? and there should on condition to print 2 dicmals or 4 decimals...
wht i suggest you is create two textelments... on is withe (.4) and another one with (.2)... then in Condition tab of the textelemten give the condtion..
If you want more clear info... plese expliain on which condtion you want that
<b>Please Close this thread.. when u r problem ise solved</b>
Reward if Helpful
Regards
Naresh Reddy K
‎2007 Jan 12 1:21 PM
Hi All.
The thing is that the decimla numbers are configured on a table, there could be many different values, not just 2 and 4, that was just an example.
What I need to do is the equivalent of
<b>WRITE var1 DECIMALS var_dec</b>
where var_dec has the number of decimals that come from the table.
Thanx
Jesus
‎2007 Jan 12 1:34 PM
if it is the case the values will be printed as it is... still yopu face any problem..
you do on thing ... before printing the value create program lines <b>move the Value to cahracter format Varialble..</b> so that you can print.. as you want..
Message was edited by:
Naresh Reddy