Function module to convert string to decimals?
HI,
is there any function module to convert string value in to decimals...string value contains exponent form...or any other way to convert if there is no funtion module..
please let me know...
Thanks
Venkatesh
Like this?
data: str type string.
data: f type f.
data: p type p decimals 3.
str = '1.2345678900000000E+08'.
f = str.
p = f.
write:/ p.
Regards,
RIch Heilman
Similar Messages
-
Need a function module to convert xstring to string in web dynpro applicati
hi,
need a function module to convert xstring to string in web dynpro application other than HR_KR_XSTRING_TO_STRING.
Moderator message: please (re)search yourself first.
Edited by: Thomas Zloch on Nov 17, 2010 5:31 PMHi,
Check the following link:
FM to convert XString to String
Regards,
Bhaskar -
Function module for converting number to exponential???
Hi All
please tell me Function module for converting number to exponential.
Deepaktry:
REPORT Zconvertf.
parameters p1 type p decimals 2 default '4711.99'.
data f1 type f.
move p1 to f1.
write: / p1, f1.
hope that helps
Andreas -
Function Module to convert amount to amount in words
Dear Guru ,
I want to know is there any sap standard Function Module to convert amount value to amount in words
Thanks & RegardsHi..
Use FM SPELL_AMOUNT.
This function module converts an amount or number into words. It can be used as follows:
Convert a number into words
To do this, the transfer parameters LANGUAGE and AMOUNT have to be entered.
Convert an amount into words
To do this, the fields LANGUAGE, CURRENCY, and AMOUNT have to be entered.
Program RF_SPELL contains a sample call of the function module. You can use it for test purposes.
REPORT ZSPELL.
TABLES SPELL.
DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '1234510'.
SY-TITLE = 'SPELLING NUMBER'.
PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
FORM SPELL_AMOUNT USING PWRBTR PWAERS.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = PAMOUNT
CURRENCY = PWAERS
FILLER = SPACE
LANGUAGE = 'E'
IMPORTING
IN_WORDS = T_SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
ENDFORM. " SPELL_AMOUNT
I hope it helps.
Reward pts if helpful
Regards
- Rishika Bawa -
Function module to convert value to caps ie capital
hi
please let me knwo function module to convert small lettter to upper case lettter
regards
aroraHi,
Use the code below to convert into uppercase:
Report YUPPER.
DATA : smal1 TYPE char1 VALUE 'a',
smal2 TYPE string VALUE 'abcdef'.
TRANSLATE : smal1 TO UPPER CASE,
smal2 TO UPPER CASE.
WRITE:/ smal1,
/ smal2.
Otherwise the FM's are:
/SAPDII/SPP05_CONVERT_UPPERCAS
2054_TRANSLATE_2_UPPERCASE
AIPC_CONVERT_TO_UPPERCASE
HR_99S_CONV_UPPER_CASE....So many
Regds.
Suman -
Is there any function module to convert hexadecimal format to normal decima
Hi,
is there any function module to convert hexadecimal format to normal decimals.
Regards,
Nandha.HI Naddy,
simply do this..
parameters : num1(5) type x.
data : dec type i.
dec = num1.
write : dec.
remember to pad the input with zeros
regards
satesh -
Any1 aware of a function module to convert a number in exponential form
any1 aware of a function module to convert a number in exponential form to normal form...
eg... a no. like 8.00000000000004E-01
8.88888888888884E-01
and
a no. like 1.50000000000000E+00
9.44444444444442E-01I think you can just move from type F to type p.
p = f .
Regards,
Rich Heilman -
Function module for converting the foreign currency to words
hi,
can anybody tell me about the function module for converting the foreign currency to words format.
Like 25.50 USD
should be "Twenty Five Dollar & Fifty Sents."
foreign currency can be anyone like USD, JPY, EUR etc.
Regards
Nitin VarshneyHi,
Try using the FM SPELL_AMOUNT
Check this wiki
[SPELL_AMOUNT|https://wiki.sdn.sap.com/wiki/display/Snippets/SpelltheAmountenteredin+words]
Regards
Sarves -
Function module to convert date and time
Hi ,
Requirment is i want to create a file in the application server.So the file name should be in the following format.
0XX-XXXX-YYYYMMDDHH.format.
in this HH-hours.I need to take current date and time.so is there any function module to convert into this format.If it is not there how to create file name in this format.
Thanks,
MRREPORT ZTEST_CONV.
data: time_stamp TYPE timestampl.
GET TIME STAMP FIELD time_stamp.
You can try with GET TIME STAMP
But it will be in Different format. -
Problem with Time stamp function module for converting US to Japan
Hi All,
I need standard function module for converting US Timestamp to Japan, Can any one let me know is there any standard function modules.
thanks in advance!
Regards,
Kalidas.T
Edited by: Kalidas Thirumoorthy on May 5, 2009 5:29 PM
Edited by: Kalidas Thirumoorthy on May 5, 2009 5:30 PM
Edited by: Kalidas Thirumoorthy on May 5, 2009 5:30 PMTry this way:
CONVERT TIME STAMP <tst> TIME ZONE <tz> INTO DATE <d> TIME <t>.
CONVERT DATE <d> TIME <t> INTO TIME STAMP <tst> TIME ZONE <tz>.
<tst> is of type P(8) or P(11) with 7 decimal places
<tz> of type C(6)
Refer to help.sap.com for more details. -
Function module for converting weight unit to another unit.
What is the function module for converting weight unit to another unit.
I want to convert LB to KG.
Tried with fm UNIT_CONVERSION_SIMPLE.
INPUT 100
NO_TYPE_CHECK
ROUND_SIGN X
UNIT_IN LB
UNIT_OUT KG
But there is no output.
Can some one help.The trick here is we need decalre input output with non-character data type like VBPLK-BRGEW.
We can test using normal SE37.
I tested and this program worked fine:
data: UNIT_IN LIKE T006-MSEHI,
UNIT_OUT LIKE T006-MSEHI,
output LIKE VBPLK-BRGEW,
input LIKE VBPLK-BRGEW.
input = 10.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = INPUT
UNIT_IN = 'LB' "UNIT_IN
UNIT_OUT = 'KG' "UNIT_OUT
IMPORTING
OUTPUT = OUTPUT.
write: output. -
Function modules for converting Char value to hexadecimal value
Hi All,
Function modules for converting Char value to hexadecimal value.
Thanks in advanceHi,
use this function module:
<b>RSS_UNIQUE_CONVERT_TO_HEX</b>
regards
Debjani
Rewards point for helpful answer -
Function module to convert to time stamp format
Hi friends,
can you tell me any function module to convert date and time to time stamp format?
kind regards.Just use
CONVERT DATE d
TIME t [DAYLIGHT SAVING TIME dst]
INTO TIME STAMP tst
TIME ZONE tz.
look at this example
DATA:
tstamp type timestamp,
d TYPE D VALUE '19971224',
t TYPE T VALUE '235500'.
SET COUNTRY 'US'.
CONVERT DATE d TIME t INTO
TIME STAMP tstamp TIME ZONE 'UTC+12'.
" tstamp : 19971224115500
" (12/24/1997 11:55:00)
CONVERT TIME STAMP tstamp TIME ZONE 'UTC+12' INTO
DATE d TIME t.
Also look at the blog..
/people/himanshu.gupta/blog/2006/11/14/abap4-date-time-and-timestamps
Raja T
Message was edited by:
Raja Thangamani -
Function module to convert date form yyyy/mm/dd to dd/mm/yyyy format
Can any one tell me Function module to convert date form yyyy/mm/dd to dd/mm/yyyy format?
have a look at the WIKI FAQs...they are very useful
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abapDevelopmentand+Programming&
For this it says:
<i>How to convert a date to internal or external format?
Use the functions modules CONVERT_DATE_TO_EXTERNAL or CONVERT_DATE_TO_INTERNAL
to convert the date. When converting to external format, the date format from the user's user profile will be used. When converting to internal format, the result will be in YYYYMMDD format.</i> -
FUNCTION MODULE TO CONVERT DATE / TIME INTO WORDS.
HI EXPERTS,
FUNCTION MODULE TO CONVERT DATE / TIME INTO WORDS.
PLS DO HELP.....Hiii gita
we have another FM SPELL_AMOUNT
regards
Jaipal
Maybe you are looking for
-
I recently updated iTunes to version 10.3.1.55. Since then when I try to sync my IPod classic it says on the top of iTunes (where the barbers pole is) "Step 1of1 Determining Tracks to Sync". This stays like that for about 15 minutes before a message
-
Hey everyone, Has anyone experienced a problem where you're making a phone call and the person at the other end can hear you only for like 3 seconds -- dead silence for 10 seconds -- and can hear you for another 3 seconds? I've just started to have t
-
How to use file upload component inside a portlet
Hi Thank you for reading my post. does file upload works inside portlets ? can some one help me with a sample code , does it need some tricks ? Thank you
-
Human task notification after due date/expiration date/...
I would like to set a due date (or expiration date) to Human task, and set some notification before this time. Ok, it seemed very easy: - i set due date to 5 minutes in human task -> Deadlines - i set notifications in human task -> notification and i
-
To get a datatable object in javascript
How do i get a datatable object in javascript? <html:dataTable id="tabData"/> i use document.getElementById("tabdata"); to get the data table object in javascript I get an error.. How do I do this?