‎2007 Mar 14 9:10 AM
Hello !
I have a field namend s_vmeng (Call Quantity in Sales Unit of Measure).
Its length is 15 and decimal places are 3.
When I insert e.g 345 into s_vmeng it converts automatically
to 345,000. How can I reach that my input remains 345.
I konw I can divide into 1000. But my question is
where can I do this division. Within select-options declaration ore
else where other ?
Regrads
Ilhan
SELECT-OPTIONS:
s_vmeng FOR VMENG NO-EXTENSION NO INTERVALS.
‎2007 Mar 14 9:17 AM
hi,
at selection-screen.
s_vmeng-low = s_vmeng-low / 1000.
modify s_vmeng.
‎2007 Mar 14 9:17 AM
hi,
at selection-screen.
s_vmeng-low = s_vmeng-low / 1000.
modify s_vmeng.
‎2007 Mar 14 9:19 AM
Hello,
data: wa_input type i,
wa_output type i.
wa_input = '1.000'.
CALL FUNCTION 'ROUND'
EXPORTING
INPUT = wa_input
IMPORTING
OUTPUT = wa_output
EXCEPTIONS
INPUT_INVALID = 1
OVERFLOW = 2
TYPE_INVALID = 3
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write:/ wa_output.
Regards,
Vasanth
‎2007 Mar 14 9:19 AM
its correct only
345,000
since this is a packed decimal it will display decimals as .000 in ur system it may be , for the separator .
345 is displaying to u as 345,000
this is <b>000</b> decimals 3 .
No need to divide for this stuff .
If u have assigned a character variable for this then it would have displayed 345 alone but since its dataype packed its displaying with decimals
???
Execute the code...
<b>tables : ekpo.
select-options : s_vmeng for ekpo-menge .
initialization .
s_vmeng-low = '345'.
append s_vmeng.</b>
regards,
vijay.
‎2007 Mar 14 9:27 AM
hi IIhan
use function module in
DATA: vmeng(5) TYPE p DECIMALS 3,
vcmeng(8) TYPE c.
SELECT-OPTIONS : s_vmeng FOR vmeng NO-EXTENSION NO INTERVALS .
AT SELECTION-SCREEN .
vcmeng = s_vmeng-low.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = vcmeng
IMPORTING
output = vcmeng.
START-OF-SELECTION.
WRITE: / vcmeng.
**Reward all the helpful answers***
With Regards
Navin Khedikar
‎2007 Mar 14 9:33 AM
HI
Sorry for first one Please check it
DATA: vmeng(15) TYPE p DECIMALS 3.
SELECT-OPTIONS : s_vmeng FOR vmeng NO-EXTENSION NO INTERVALS .
AT SELECTION-SCREEN .
s_vmeng-low = s_vmeng-low / 1000.
MODIFY s_vmeng.
**Reward all the helpful answers***
With Regards
Navin Khedikar