How can I convert the this Char to Currency?

Question: How can I convert the this Char to Currency?

Using the PERFORM Method in my Sap Script, I was able to retrieve a numeric value of 3,399.40 for my intab rec 1 and 2,456.70 for my intab rec 2.

Now, in my sub routine in my form program how would I be able to convert this char values to numeric types so I could use them for computation thank you.

Note intab-value is type Char 255...



Answer:
E.g

TRANSLATE INPUT_TAB-VALUE USING ', '.

CONDENSE INPUT_TAB-VALUE NO-GAPS.

VALUE = INPUT_TAB-VALUE.

Answer:
Please ignore the post above, it won't help you.

Look at FMs MOVE_CHAR_TO_NUM or CHAR_NUMC_CONVERT
_________________
Kind Regards

Rosie Brent

Please remember to search the forum and check the FAQ before posting questions, thank you.

Tuly Idiot most of the time, part-time Guru

Answer:
FM CHAR_NUMC_CONVERT not available in 4.6c try CHAR_NUMC_CONVERSION
_________________
Thanks
Rex

Answer:
Something like this.



FORM ..... ITAB STRUCTURE ITCSY
               OTAB STRUCTURE ITCSY.

DATA : NUM1 LIKE EKPO-NETWR,
           NUM2 LIKE EKPO-NETWR.

READ TABLE ITAB WITH KEY <...>

WHILE SY-SUBRC = 0.
REPLACE ',' WITH SPACE INTO ITAB-VALUE.
ENDWHILE.

CONDENSE ITAB-VALUE NO-GAPS.

NUM1 = ITAB-VALUE.

**SAME FOR NUM2.



KRK

Answer:
Roy J is correct and kumar has an extended version also ok.

Rosie: Your example does not work, but Roy J's work.

So please ignore the post above from Rosie, it won't help you.



Test for function group      SCNV                     
Function module              CHAR_NUMC_CONVERSION     
Upper/lower case                                     
                                                     
Runtime:        28 Microseconds                       
                                                     
                                                     
  Import parameters               Value               
                                                     
  INPUT                           2,456.70           
                                                     
                                                     
  Export parameters               Value               
                                                     
  NUMCSTR                         2,456.70           
                                                     

Copyright ?2007 - 2008 www.jt77.com