Skip to Content
author's profile photo Former Member
Former Member

displaying amount in small letters

hi,

im using 'HR_IN_CHG_INR_WRDS ' FM to display amount in words.the value is getting displayed as 'TWENTY TWO

Rupees' .but i want it to display as 'Twenty two' only and there should not be 'Rupees' at the end.for this i tried to copy std.FM into ZHR_IN_CHG_INR_WRDS along with new Zfunction group.it's not allowing me to copy like this.it's asking access key.please provide me solution.

Thanks

k srinivas

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 12:19 PM

    It should allows you to copy it to a Z FM. First you have to create a z function group and make sure that it is activated.

    Then try to copy it to a Z FM and make sure that the Function Group is your Z FG.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 12:19 PM

    Use TRANSLATE To change to lower case.

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 12:22 PM

    hi

    translate the text using

    translate v_text to lower case

    or pass the text to FM to get the first letter of the word in CAPS

    Test for function group OLDS

    Function module STRING_UPPER_LOWER_CASE

    Uppercase/Lowercase

    Runtime: 215 Microseconds

    Import parameters Value

    DELIMITER 10

    STRING1 SAP INDIA

    Export parameters Value

    STRING Sap india

    OR THIS

    Test for function group JYKE

    Function module ISM_CONVERT_TO_LOWER_CA

    Uppercase/Lowercase

    Import parameters Value

    INPUT SHIVA

    Export parameters Value

    OUTPUT shiva

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 12:46 PM
    "After your FM write this code..
    DATA :itab TYPE TABLE OF string.
    DATA : wa_itab TYPE itab.
    DATA : amount(255) VALUE 'TWENTY TWO Rupees'.
    DATA : amount_words TYPE string .
    
    
    SPLIT amount AT space INTO TABLE itab.
    LOOP AT itab INTO wa_itab.
      TRANSLATE wa_itab TO LOWER CASE.
      TRANSLATE wa_itab+0(1) TO UPPER CASE.
      IF wa_itab EQ 'Rupees'.
        wa_itab = space.
      ENDIF.
      MODIFY itab FROM wa_itab.
      CONCATENATE amount_words  wa_itab INTO amount_words
      SEPARATED BY space.
    
    ENDLOOP.
    
    WRITE :/ amount_words.
    
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.