Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to declare decimal point variable in smart forms

Former Member
0 Likes
2,889

hi,

in smart forms ,

global definitions

how to declare decimal point variable plz

explain with example.

Edited by: rajeshreddy 007 on Jul 19, 2008 10:14 AM

hi,

in smart forms ,

global definitions

how to declare decimal point variable plz

explain with example.

Edited by: rajeshreddy 007 on Jul 19, 2008 10:14 AM

2 REPLIES 2
Read only

Former Member
0 Likes
1,406

Hi Rajesh,

To get a Decimal point variable in smart form just refer your field to a dictionary field which is of type CURR.

For example if you want for currency field you can define a global variable like this

w_price type sflight-price.

In the table Sflight the field Price is of type CURR and has 2 Decimal points.

If you have to define your own type just click on the Types Tab in global definitions. write this :

Types :

type_s_price type p decimals 2.

Now in Global Data Tab

w_price type type_s_price

Regards,

Swapna.

Edited by: NagaSwapna Thota on Jul 19, 2008 10:23 AM

Read only

Former Member
0 Likes
1,406

Hi rajeshreddy,

Global Defination ==> Global Data Tab.

dec_var TYPE VBAK-VBEAF ==> For DEC Lenght 5 Decimalplacess 2

dec_var2 TYPE VBAK-STCUR ==> For DEC Lenght 9 Decimalplacess 5

Go to SE11 and there u can search for the existing fields in some tables for ur need of type DEC

OR...

U can create your own Data Element according to ur requirement an use it as a TYPE

For Eg.. Create Dataelement name it as ZDEC

Type : DEC

Give length : 10

Decimal places : 3

Now u can use it in ur smartform Global Defination ==> Global Data Tab.

Var_3 TYPE ZDEC

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7