cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Forms : problem with Float Variable

Former Member
0 Kudos

Hi Expert,

I have a probelm with Float variable. In my smart forms one fields of table QAMV contain value like 8.0000000000000000E+01.

I have to remove the exponent and display value like 80.

I have tried wa_qamv-sollwert(E10.4).. but it not working.

Can U suggest me some solution.

Regards

Swati.

Edited by: Swati Namdev on Apr 27, 2010 12:19 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Please follow the steps.

1. In your smart form create a variable w_val ,, type,, associate type --> CHAR10

2. Now write a code, jsut above your node where u wud like to get this value... For this Create -> Flow Logic -> Program Lines.. Now you have editor..

3. In input parameters , put i_tab-QAMV.. and in output parameter put w_val... and Code like below

CALL FUNCTION 'MD_CONV_QUANTITY_FLOAT_TO_PACK' 
  EXPORTING 
    iv_menge       = i_tab-qamv 
  IMPORTING 
    EV_MENGE       = w_val.

4. Now grag and drop this w_val from global data field list...your this w_val will have the rounded value.. Pls try this and check.. It will work.

Regards,

Lokesh.

Edited by: Lokesh Tarey on Apr 27, 2010 9:28 AM

Answers (1)

Answers (1)

former_member755502
Participant
0 Kudos

Hi Swati,

you can look for some standard FM in SE37. you can search with FLOAT etc. There are some standrd FM which converts floating numbers in integers.

Regards,

Sambaran Ray