2008 Jun 18 8:24 PM
Hello all,
I have a quantity field which has a value 11.000.
I need to print it as 11 (no trailing zeroes ). But if the quantity is 11.23, then it shud print 11.23.
To acheive this, In sapscript, We used to write the quantity field with a C in bracket.
for eg. &CAUFVD-GAMNG(C)&
How Could I acheive this same functionality in smart forms ?
I beleive CIZ shud work in smartforms also..but unfortunately it is not..
Am i missing something.. ?
Thank you so much for your time.
2008 Jun 18 8:51 PM
I donot think control commands are possible in Smartform like in sapscript. You have to create a program lines node and there u can write ur logic to meet this requirment.
Ex:
data: val type p decimals 3 value '10.230'.
data: l_char type c length 10.
data: l_whole_no type c length 10.
data: l_decimal type c length 3.
l_char = val.
split l_char at '.' into l_whole_no l_decimal.
if l_decimal = '000'.
l_char = l_whole_no.
endif.
Regards,
Joy.
I donot think control commands are possible in Smartform like in sapscript. You have to create a program lines node and there u can write ur logic to meet this requirment.
Ex:
data: val type p decimals 3 value '10.230'.
data: l_char type c length 10.
data: l_whole_no type c length 10.
data: l_decimal type c length 3.
l_char = val.
split l_char at '.' into l_whole_no l_decimal.
if l_decimal = '000'.
l_char = l_whole_no.
endif.
Regards,
Joy.
2008 Jun 18 8:51 PM
I donot think control commands are possible in Smartform like in sapscript. You have to create a program lines node and there u can write ur logic to meet this requirment.
Ex:
data: val type p decimals 3 value '10.230'.
data: l_char type c length 10.
data: l_whole_no type c length 10.
data: l_decimal type c length 3.
l_char = val.
split l_char at '.' into l_whole_no l_decimal.
if l_decimal = '000'.
l_char = l_whole_no.
endif.
Regards,
Joy.
2008 Jun 18 9:31 PM
Thank you Joyjit.
I still cant beleive, Smart forms dont have any short cut to do this.
Those 3 (CIZ) were such beautiful commands.. Smart forms is the advanced version of sapscripts, and ..
There might be some other short cut..other than writing code for each and every currency and quantity fields..
Thanks much for your response.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |