on 07-19-2013 11:09 AM
Hi Gurus/ Experts.
I have a trouble with my Smartform, especially with my numbers field. For example i will use field NETWR.
in my smartform the decimal is like this 123.321.231,000 how to remove the 000 please help me gurus / experts, and how to remove ,000 in quan field ? reward is available.
Hi Ri Zaldy,
the reason for your problem is that your field is of type CURR.
So it has a reference field, which already determines the number
of digits after the decimal point. So usually it doesn't
make sence to use the formatting option (.0), too.
If you want to change the number of digits in your Smartform
nevertheless, you should define a new number field (which is
not of type CURR or QUAN) in your form, put ...-NETWR into it (e.g. via an ABAP node) and print the new field with formatting option (.0).
Best Regards,
Hedvig
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hedvig
Thank you for your clear answer, you give me the light, so I can come out from the darkness.
Please tell me, must the new field is custom ? I mean must I create a table ?
Please help me just need 1 more step to clear this trouble
I will give you helpful, but please help me to finish this one.
Hi Ri Zaldy
No need to create a table,
just add one more variable in global definitions
like net type p decimals 0 .
then before your passing value to node , just assign netwr value to your custom field net .
net = wa-netwr.
then display like &net(C)&
Regards,
Bastin.G
Hi Ri Zaldy
anyway your assigning values to smartforms right (like &NETWR&) ?
before displaying values add another program lines before that by right click option
better make a changes in smartforms
Regards,
Bastin.G
Hi Ri Zaldy
Happy to see your words Cheers
much appreciated comments from you thanks a lot
Regards,
Bastin.G
Ri Zaldy wrote:
how to make quantity's decimals gone ?
if i understood correctly,
why its coming with decimals that reason is already here told by Hedvig Rohonyi .
if you want to eliminate decimals while displaying means, please follow what i have suggested you already i hopt it helps
Regards,
Bastin.G
Hi Zaldy,
Please try below one..
Defined three global parameters like
data: lv_actvalue type string,
lv_result type string,
lv_dec type string.
lv_actvalue = wa_ekko-netwr.
split lv_actvalue at '.' into lv_result lv_dec.
Now use lv_result for output field.
Otherwise change your user settings in SU01.
Thanks,
Satya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Zaldy,
1. In smart forms --> Types Tab ---> take your table types declaration part netwr type as char10.
2. Code initialization part---> after select query ---> netwr value pass to lv_actvalue ---> split to lv_actvaue into lv_result and lv_dec.
3. remaining all values and lv_result value append to your table.(i.e., as per types declaration ).
Thanks,
Satya.
Hi,
You can show the currency or Quantity field without decimals using below format
Zero decimals: &<Variable>(.0)&.
For various formating options you can refer below WIKI Link.
I hope this helps you
- Harshad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ri Zaldy,
Try to check in debug mode how the netwr values.if the value is showing what you mentioned i think go to SU01---> click on the default values--> in decimal notification check the format(necessary then try to change the format).
Regards,
Gurunath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
&field(R10.2)&
&NETWR(R10.2)&
This will print of total length of 10 with 2 decimal places..
&NETWR(R10.x)& where x is the number of decimal place
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Set the option in command in your element text as this
&NETWR(.0)&
I hope this helps you
Regards
Eduardo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.