Amount in words display Problem in sapscript

Hi All,
I am worked on cheque print out. I have an amount in words u2018nine crore seventy two lakh thirty three thousand nine hundred ninety nine rupees fifty eight paise onlyu2019 based on the amount value, I have a number of character 105. How will u split the character 50 and 55 character?

Hi,
Try this code
First 50 characters will be in first line of OUT_LINES. Remaining you can concatenate from line 2 and 3
DATA : OUT_LINES TYPE TABLE OF STRING.
CALL FUNCTION 'RKD_WORD_WRAP'
  EXPORTING
    TEXTLINE                  = 'nine crore seventy two lakh thirty three thousand nine hundred ninety nine rupees fifty eight paise only'
*   DELIMITER                 = ' '
    OUTPUTLEN                 = 50
* IMPORTING
*   OUT_LINE1                 =
*   OUT_LINE2                 =
*   OUT_LINE3                 =
TABLES
   OUT_LINES                 = OUT_LINES
* EXCEPTIONS
*   OUTPUTLEN_TOO_LARGE       = 1
*   OTHERS                    = 2
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Similar Messages

  • How to display amount in words in the last page

    Hi,
    I am very new to Oracle Report, but v.good experience in Crystal report.
    How can i display amount in words for an invoice amount total in the last page of the invoice and after total amount. I created a new non repeating frame and put the amount in words inside that, and set the frames diplay property Print on Last Page, but the problem is already there is a repeating frame to print all the invoices item, and the total in figure. But the amount in words frame is not always coming after the total amount,either it should be at the bottom of the last page in fixed position, otherwise it should move just below the total amount.
    I am using Oracle 11g.
    Thanks in advance...
    Fsl

    Hi ,
    Use This function
    create or replace FUNCTION xxg4_zen_conv_words (p_amount IN Number) RETURN Varchar2 IS
    --Creation Date   :  11-DEC-2009
    --Purpose         :  This Function returns amount in words.
    --Parameters      :
    --1) p_amount : Only positive and negative values are allowed.
    Precision can be entered upto 10 digits and only 2 scales
    are allowed e.g 9999999999.99
    -- Index by Tables to store word list
    TYPE typ_word_list IS TABLE OF Varchar2(200) INDEX BY BINARY_INTEGER;
    t_typ_word_list typ_word_list;
    TYPE typ_word_gap IS TABLE OF Varchar2(200) INDEX BY BINARY_INTEGER;
    t_typ_word_gap typ_word_gap;
    -- Local Variables
    v_amount Number := p_amount;
    v_amount_length Number;
    v_words Varchar2(10000);
    v_point_found Varchar2(1) := 'N';
    v_point_value Number;
    BEGIN
    /*Getting value after point if found */
    v_point_value := SUBSTR(v_amount,(INSTR(v_amount,'.',1) + 1),2);
    /*Checking whether amount has any scale value also */
    v_point_found := CASE WHEN (INSTR(v_amount,'.',1)) = 0 THEN 'N'
    WHEN (INSTR(v_amount,'.',1)) > 0 THEN 'Y'
    END;
    /*Converting amount into pure numeric format */
    v_amount := FLOOR(ABS(v_amount));
    v_amount_length := LENGTH(v_amount);
    t_typ_word_gap(2) := 'and Paise';
    t_typ_word_gap(3) := 'Hundred';
    t_typ_word_gap(4) := 'Thousand';
    t_typ_word_gap(6) := 'Lakh';
    t_typ_word_gap(8) := 'Crore';
    t_typ_word_gap(10) := 'Arab';
    FOR i IN 1..99
    LOOP
    t_typ_word_list(i) := To_Char(To_Date(i,'J'),'Jsp');
    END LOOP;
    IF v_amount_length <= 2
    THEN
    /* Conversion 1 to 99 digits */
    v_words := t_typ_word_list(v_amount);
    ELSIF v_amount_length = 3
    THEN
    /* Conversion for 3 digits till 999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,1))||' '||t_typ_word_gap(3);
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,2,2));
    ELSIF v_amount_length = 4
    THEN
    /* Conversion for 4 digits till 9999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,1))||' '||t_typ_word_gap(4);
    IF SUBSTR(v_amount,2,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,2,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,3,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,3,2));
    END IF;
    ELSIF v_amount_length = 5
    THEN
    /* Conversion for 5 digits till 99999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,2))||' '||t_typ_word_gap(4);
    IF SUBSTR(v_amount,3,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,3,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,4,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,4,2));
    END IF;
    ELSIF v_amount_length = 6
    THEN
    /* Conversion for 6 digits till 999999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,1))||' '||t_typ_word_gap(6);
    IF SUBSTR(v_amount,2,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,2,2))||' '||t_typ_word_gap(4);
    END IF;
    IF SUBSTR(v_amount,4,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,4,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,5,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,5,2));
    END IF;
    ELSIF v_amount_length = 7
    THEN
    /* Conversion for 7 digits till 9999999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,2))||' '||t_typ_word_gap(6);
    IF SUBSTR(v_amount,3,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,3,2))||' '||t_typ_word_gap(4);
    END IF;
    IF SUBSTR(v_amount,5,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,5,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,6,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,6,2));
    END IF;
    ELSIF v_amount_length = 8
    THEN
    /* Conversion for 8 digits till 99999999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,1))||' '||t_typ_word_gap(8);
    IF SUBSTR(v_amount,2,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,2,2))||' '||t_typ_word_gap(6);
    END IF;
    IF SUBSTR(v_amount,4,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,4,2))||' '||t_typ_word_gap(4);
    END IF;
    IF SUBSTR(v_amount,6,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,6,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,7,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,7,2));
    END IF;
    ELSIF v_amount_length = 9
    THEN
    /* Conversion for 9 digits till 999999999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,2))||' '||t_typ_word_gap(8);
    IF SUBSTR(v_amount,3,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,3,2))||' '||t_typ_word_gap(6);
    END IF;
    IF SUBSTR(v_amount,5,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,5,2))||' '||t_typ_word_gap(4);
    END IF;
    IF SUBSTR(v_amount,7,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,7,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,8,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,8,2));
    END IF;
    ELSIF v_amount_length = 10
    THEN
    /* Conversion for 10 digits till 9999999999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,1))||' '||t_typ_word_gap(10);
    IF SUBSTR(v_amount,2,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,2,2))||' '||t_typ_word_gap(8);
    END IF;
    IF SUBSTR(v_amount,4,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,4,2))||' '||t_typ_word_gap(6);
    END IF;
    IF SUBSTR(v_amount,6,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,6,2))||' '||t_typ_word_gap(4);
    END IF;
    IF SUBSTR(v_amount,8,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,8,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,9,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,9,2));
    END IF;
    END IF;
    IF v_point_found = 'Y'
    THEN
    IF v_point_value != 0
    THEN
    v_words := v_words||' '||t_typ_word_gap(2)||' '||t_typ_word_list(CASE WHEN LENGTH(SUBSTR(p_amount,(INSTR(p_amount,'.',1) + 1),2)) = 1 THEN SUBSTR(p_amount,(INSTR(p_amount,'.',1) + 1),2)||'0'
    WHEN LENGTH(SUBSTR(p_amount,(INSTR(p_amount,'.',1) + 1),2)) = 2 THEN SUBSTR(p_amount,(INSTR(p_amount,'.',1) + 1),2)
    END);
    END IF;
    END IF;
    IF p_amount < 0
    THEN
    v_words := 'Minus '||v_words;
    ELSIF p_amount = 0
    THEN
    v_words := 'Zero';
    END IF;
    IF LENGTH(v_amount) > 10
    THEN
    v_words := 'Value larger than specified precision allowed to convert into words. Maximum 10 digits allowed for precision.';
    END IF;
    RETURN (v_words);
    END xxg4_Zen_Conv_Words;
    --Thanks
    SAGAR SANKPAL

  • How to display amount in words for subtotal value?

    Hi All,
    I am diplaying a amount in words for sub-total value after each document number.
    Can any one suggest how to display text for sub-total value not for Grand total?
    I want subtotal at each material for each document number and want to display that subtotal amount in words.
    Thanks and Regards
    Steve

    Thanks Jorge ,
    Is it possible in ALV printing Sut-total text by adding a new line .?
    And where to insert At new or on-chane ?
    Sub-total  calculating automatically not programaticall..
    Regards
    Steve

  • Amount in words in F110 (sapscript -indian format)

    Hi Experts.
    I have changed the F110_PRENUM_CHCK to Z110_PRENUM_CHCK .
    I want the amount to be in word in indian format.
    say Ten Lakh ninty thousand and fifty
    But i am getting the output in "One millon .. " format
    Pls give me the coding and also suggest me how to incorporate in sapscript .
    Window CHECKSPL
    545
    Amount in words -
    &'*** 'SPELL-WORD& &' and 'SPELL-DECWORD&***
    Example for amount and decimal places in words
    &'*** 'SPELL-WORD& &REGUD-WAERS&&' and 'SPELL-DECWORD' Cents'& ***
    Example for numbers in words
    &SPELL-DIG06(6)&&SPELL-DIG05(6)&&SPELL-DIG04(6)&&SPELL-DIG03(6)&&SPELL-DIG02(6)&&SPELL-DIG01(7)&
    Pls revert back its urgent
    Thanks
    Pravesh Deshbhratar

    same code i used in smartform:
    DATA : l_spell_a TYPE pc207-betrg,
    l_local   TYPE string,
    w_len     TYPE i.
    * Internal Table Declaration
    DATA : BEGIN OF t_char OCCURS 0,
    char(80) TYPE c,
    END OF t_char.
    l_spell_a = l_amtsum.
    CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
    EXPORTING
    amt_in_num         = l_spell_a
    IMPORTING
    amt_in_words       = l_spell
    EXCEPTIONS
    data_type_mismatch = 1
    OTHERS             = 2.
    IF sy-subrc = 0.

  • AMOUNT IN WORDS TO BE DISPLAYED IN LACS RATHER THAN IN MILLI

    Hello Experts,
    I want to display "Amount in Words" in lacs rather than in million in PLD of an A/R Invoice . How can i do this
    Thanks in advance

    hi Divya,
    You need to create functions in SQl and apply FMS to get values from function in UDF and pick UDF value on pld.
    Check Amount in words thread for functions.
    Thanks,

  • Amount in words problem

    Hi All,
    Please help me to get Amount in words in Indian standards
    i.e
    if amount is 125000 then it should print
    "One Lakh Twenty-five thousand rupees only"
    All these I need in a Check Print layout
    here i  can see amount but how will i get Amount in words there.
    I have made a query CheckPrint
    which contains follwing fields from OPCH (A/P Invoice table)
    DocNum , DocDate, CardName, DocTotal.
    I just want DocTotal in words so that i can display it on the layout and get the print on Cheque.
    I am using SAP 2005 B version.
    Please help I am not a trained professional in SAP Business One
    Kindly do the needful.
    Thanks and Regards,
    Murtaza Piyersoap

    Hi Murtaza,
    I had a similar issue, and I addressed it by:
    1. Creating a UDF in the Payments>Title called AmountInWord of Type AlphaNumeric Structure Text (i.e. in OVPM Table)
    2. Created a Function called I_ConvertN2W in the database, which converts any number into Words as per Indian Style i.e. Lakh, Crore
    3. In the SBO_SP_TransactionNotification, I am filling the Value in the UDF on every Add of Outgoing Payment
    4. In the PLD for the printing of the cheque, I am using the UDF, instead of the SAPB1 Amount (which is non Indian Style)
    Step 1:
    Create the UDF as mentioned above, I guess no further explanation required
    Step 2:
    Creating the Function I_ConvertN2W, but first you will have to create all the support functions, I am listing the function in the order of creation
    CREATE FUNCTION I_Modulus (@INPUT INT, @DIVIDER INT) 
    RETURNS INT AS 
    BEGIN
    DECLARE @RETVAL AS INT, @MODULUS AS INT
    IF @INPUT = @DIVIDER
    BEGIN
         SET @RETVAL = 0
    END
    IF @INPUT < @DIVIDER
    BEGIN
         SET @RETVAL = @INPUT
    END
    SET @MODULUS = @INPUT
    WHILE @MODULUS >= @DIVIDER
    BEGIN
         SET @MODULUS = @MODULUS - @DIVIDER
    END
    SET @RETVAL = @MODULUS
    RETURN (@RETVAL)
    END
    CREATE FUNCTION I_Mid (@sInput VARCHAR(8000), @iStart INT, @iLen INT) 
    RETURNS VARCHAR(8000) AS 
    BEGIN
    --Adapted from the Mid function of Visual Basic
    DECLARE @sRetVal AS VARCHAR(8000)
    IF @iLen = 0
    BEGIN
         SET @iLen = LEN(@sInput)-(@iStart-1)
    END
    SET @sRetVal = RIGHT(@sInput,LEN(@sInput) - (@iStart-1))
    SET @sRetVal = LEFT(@sRetVal,@iLen)
    RETURN (@sRetVal)
    END
    CREATE FUNCTION I_CN2W_GetWord (@cValue INT) 
    RETURNS nvarchar(10)
    AS 
    BEGIN
    DECLARE @sRetVal AS NVARCHAR(10)
    SET @sRetVal =
         CASE
              WHEN @cValue = 0 THEN ''
              WHEN @cValue = 1 THEN 'One'
              WHEN @cValue = 2 THEN 'Two'
              WHEN @cValue = 3 THEN 'Three'
              WHEN @cValue = 4 THEN 'Four'
              WHEN @cValue = 5 THEN 'Five'
              WHEN @cValue = 6 THEN 'Six'
              WHEN @cValue = 7 THEN 'Seven'
              WHEN @cValue = 8 THEN 'Eight'
              WHEN @cValue = 9 THEN 'Nine'
              WHEN @cValue = 10 THEN 'Ten'
              WHEN @cValue = 11 THEN 'Eleven'
              WHEN @cValue = 12 THEN 'Twelve'
              WHEN @cValue = 13 THEN 'Thirteen'
              WHEN @cValue = 14 THEN 'Fourteen'
              WHEN @cValue = 15 THEN 'Fifteen'
              WHEN @cValue = 16 THEN 'Sixteen'
              WHEN @cValue = 17 THEN 'Seventeen'
              WHEN @cValue = 18 THEN 'Eighteen'
              WHEN @cValue = 19 THEN 'Ninteen'
              WHEN @cValue = 20 THEN 'Twenty'
              WHEN @cValue = 30 THEN 'Thirty'
              WHEN @cValue = 40 THEN 'Forty'
              WHEN @cValue = 50 THEN 'Fifty'
              WHEN @cValue = 60 THEN 'Sixty'
              WHEN @cValue = 70 THEN 'Seventy'
              WHEN @cValue = 80 THEN 'Eighty'
              WHEN @cValue = 90 THEN 'Ninty'
         END
    RETURN (@sRetVal)
    END
    CREATE FUNCTION I_CN2W_GetTens (@sValue as NVARCHAR(100)) 
    RETURNS NVARCHAR(100) AS 
    BEGIN
    DECLARE @sTens AS NVARCHAR(100), @iNum AS INT, @cnt AS INT, @iDigit AS INT, @sRetVal AS NVARCHAR(100)
    SET @iNum = CAST(@sValue AS INT)
    SET @sTens = ''
    IF @iNum <= 20
    BEGIN
         SET @sRetVal =  dbo.I_CN2W_GetWord(@iNum)
    END
    ELSE
    BEGIN
         SET @cnt = 1
         WHILE @iNum > 0
              BEGIN
                   SET @iDigit = dbo.I_Modulus(@iNum, 10)
                   IF @cnt = 1
                        SET @sTens = dbo.I_CN2W_GetWord(@iDigit)
                   ELSE
                   BEGIN
                        SET @iDigit = @iDigit * 10
                        SET @sTens = dbo.I_CN2W_GetWord(@iDigit) + ' ' + @sTens
                   END
                   SET @cnt = (@cnt + 1)
                   SET @iNum = (@iNum / 10)
              END
         SET @sRetVal = @sTens
    END
    RETURN (@sRetVal)
    END
    CREATE FUNCTION I_CN2W_GetHundreds (@sValue NVARCHAR(100)) 
    RETURNS NVARCHAR(100) AS 
    BEGIN
    DECLARE @rstHun as NVARCHAR(100), @sHun as NVARCHAR(100), @sTens AS NVARCHAR(100), @sRetVal as NVARCHAR(100)
    IF RTRIM(LTRIM(@sValue)) = '000'
    BEGIN
         SET @sRetVal = ''
    END
    ELSE
    BEGIN
         SET @sHun = SUBSTRING(RTRIM(LTRIM(@sValue)),1,1)
         SET @sTens = dbo.I_CN2W_GetTens(SUBSTRING(RTRIM(LTRIM(@sValue)),2,2))
         IF (LEN(RTRIM(LTRIM(@sTens))) > 0)
         BEGIN
              SET @rstHun = dbo.I_CN2W_GetWord(CONVERT(INT, @sHun))
              IF (LEN(RTRIM(LTRIM(@rstHun))) > 0)
              BEGIN
                   SET @rstHun = @rstHun + ' Hundred and ' + @sTens
              END
              ELSE
              BEGIN
                   SET @rstHun = @sTens
              END
         END
         ELSE
         BEGIN
              SET @rstHun = dbo.I_CN2W_GetWord(CONVERT(INT, @sHun)) + ' Hundred'
         END
         SET @sRetVal = @rstHun
    END
    RETURN (@sRetVal)
    END
    CREATE FUNCTION I_CN2W_GetThousands (@sValue NVARCHAR(100)) 
    RETURNS NVARCHAR(100) AS 
    BEGIN
    DECLARE @rstHun as NVARCHAR(100), @rstThou AS NVARCHAR(100), @strHun as NVARCHAR(100), @strNum AS NVARCHAR(100), @strThou AS NVARCHAR(100)
    DECLARE @sRetVal as NVARCHAR(100)
    IF @sValue = '00000'
    BEGIN
         SET @sRetVal = ''
    END
    ELSE
    BEGIN
         SET @strNum = RTRIM(LTRIM(@sValue))
         SET @strHun =
              CASE
                   WHEN LEN(@strNum) = 4 THEN SUBSTRING(@strNum,2,3)
                   ELSE SUBSTRING(@strNum,3,3)
              END
         SET @strThou = SUBSTRING(@strNum,1,LEN(@strNum)-3)
         SET @rstHun = dbo.I_CN2W_GetHundreds(@strHun)
         SET @rstThou =
              CASE
                   WHEN CAST(@strThou AS INT) <= 20 THEN dbo.I_CN2W_GetWord(CONVERT(INT, @strThou))
                   ELSE dbo.I_CN2W_GetTens(@strThou)
              END
         IF (LEN(@rstThou)>0)
         BEGIN
              SET @rstThou = @rstThou + ' Thousand ' + @rstHun
         END
         ELSE
         BEGIN
              SET @rstThou = @rstHun
         END
         SET @sRetVal = @rstThou
    END
    RETURN (@sRetVal)
    END
    CREATE FUNCTION I_CN2W_GetLakhs (@sValue NVARCHAR(100)) 
    RETURNS NVARCHAR(100) AS 
    BEGIN
    DECLARE @rstThou as NVARCHAR(100), @rstLakhs AS NVARCHAR(100), @strLakhs as NVARCHAR(100), @strNum AS NVARCHAR(100), @strThou AS NVARCHAR(100)
    DECLARE @sRetVal as NVARCHAR(100)
    IF @sValue = '0000000'
    BEGIN
         SET @sRetVal = ''
    END
    ELSE
    BEGIN
         SET @strNum = RTRIM(LTRIM(@sValue))
         SET @strThou =
              CASE
                   WHEN LEN(@strNum) = 6 THEN SUBSTRING(@strNum,2,5)
                   ELSE SUBSTRING(@strNum,3,5)
              END
         SET @strLakhs = SUBSTRING(@strNum,1,LEN(@strNum)-5)
         SET @rstThou = dbo.I_CN2W_GetThousands(@strThou)
         SET @rstLakhs =
              CASE
                   WHEN CAST(@strLakhs AS INT) <= 20 THEN dbo.I_CN2W_GetWord(CONVERT(INT, @strLakhs))
                   ELSE dbo.I_CN2W_GetTens(@strLakhs)
              END
         IF (LEN(@rstLakhs)>0)
         BEGIN
              SET @rstLakhs = @rstLakhs + ' Lakh ' + @rstThou
         END
         ELSE
         BEGIN
              SET @rstLakhs = @rstThou
         END
         SET @sRetVal = @rstLakhs
    END
    RETURN (@sRetVal)
    END
    CREATE FUNCTION I_CN2W_GetCrores (@sValue NVARCHAR(255)) 
    RETURNS NVARCHAR(255) AS 
    BEGIN
    DECLARE @rstCro as NVARCHAR(255), @rstLakhs AS NVARCHAR(255), @strNum as NVARCHAR(100), @strLakhs AS NVARCHAR(255), @strCro AS NVARCHAR(255)
    DECLARE @sRetVal as NVARCHAR(255)
    IF @sValue = '000000000'
    BEGIN
         SET @sRetVal = ''
    END
    ELSE
    BEGIN
         SET @strNum = RTRIM(LTRIM(@sValue))
         SET @strLakhs =
              CASE
                   WHEN LEN(@strNum) = 8 THEN SUBSTRING(@strNum,2,7)
                   ELSE SUBSTRING(@strNum,3,7)
              END
         SET @strCro = SUBSTRING(@strNum,1,LEN(@strNum)-7)
         SET @rstLakhs = dbo.I_CN2W_GetLakhs(@strLakhs)
         SET @rstCro =
              CASE
                   WHEN CAST(@strCro AS INT) <= 20 THEN dbo.I_CN2W_GetWord(CONVERT(INT, @strCro))
                   ELSE dbo.I_CN2W_GetTens(@strCro)
              END
         IF LEN(@rstCro)>0
         BEGIN
              SET @rstCro = @rstCro + ' Crore ' + @rstLakhs
         END
         ELSE
         BEGIN
              SET @rstCro = @rstLakhs
         END
         SET @sRetVal = @rstCro
    END
    RETURN (@sRetVal)
    END
    CREATE FUNCTION I_CN2W_GetArabs (@sValue NVARCHAR(255)) 
    RETURNS NVARCHAR(255) AS 
    BEGIN
    DECLARE @rstArab as NVARCHAR(255), @rstCro AS NVARCHAR(255), @strNum as NVARCHAR(255), @strCro AS NVARCHAR(255), @strArab AS NVARCHAR(255)
    DECLARE @sRetVal as NVARCHAR(255)
    IF @sValue = '00000000000'
    BEGIN
         SET @sRetVal = ''
    END
    ELSE
    BEGIN
         SET @strNum = RTRIM(LTRIM(@sValue))
         SET @strCro =
              CASE
                   WHEN LEN(@strNum) = 10 THEN SUBSTRING(@strNum,2,9)
                   ELSE SUBSTRING(@strNum,3,9)
              END
         SET @strArab = SUBSTRING(@strNum,1,LEN(@strNum)-9)
         SET @rstCro = dbo.I_CN2W_GetCrores(@strCro)
         SET @rstArab =
              CASE
                   WHEN CAST(@strArab AS INT) <= 20 THEN dbo.I_CN2W_GetWord(CONVERT(INT, @strArab))
                   ELSE dbo.I_CN2W_GetTens(@strArab)
              END
         IF LEN(@rstArab)>0
         BEGIN
              SET @rstArab = @rstArab + ' Arab ' + @rstCro
         END
         ELSE
         BEGIN
              SET @rstArab = @rstCro
         END
         SET @sRetVal = @rstArab
    END
    RETURN (@sRetVal)
    END
    CREATE FUNCTION I_CN2W_GetKharabs (@sValue NVARCHAR(255)) 
    RETURNS NVARCHAR(255) AS 
    BEGIN
    DECLARE @rstArab as NVARCHAR(255), @rstKharab AS NVARCHAR(255), @strNum as NVARCHAR(255), @strKharab AS NVARCHAR(255), @strArab AS NVARCHAR(255)
    DECLARE @sRetVal as NVARCHAR(255)
    IF @sValue = '10000000000000'
    BEGIN
         SET @sRetVal = 'Hundred Kharab '
    END
    ELSE
    BEGIN
         SET @strNum = RTRIM(LTRIM(@sValue))
         SET @strArab =
              CASE
                   WHEN LEN(@strNum) = 12 THEN SUBSTRING(@strNum,2,11)
                   ELSE SUBSTRING(@strNum,3,11)
              END
         SET @strKharab = SUBSTRING(@strNum,1,LEN(@strNum)-11)
         SET @rstArab = dbo.I_CN2W_GetArabs(@strArab)
         SET @rstKharab =
              CASE
                   WHEN CAST(@strKharab AS INT) <= 20 THEN dbo.I_CN2W_GetWord(CONVERT(INT, @strKharab))
                   ELSE dbo.I_CN2W_GetTens(@strKharab)
              END
         IF @rstKharab IS NOT NULL
         BEGIN
              SET @rstKharab = @rstKharab + ' Kharab ' + @rstArab
         END
         ELSE
         BEGIN
              SET @rstKharab = @rstArab
         END
         SET @sRetVal = @rstKharab
    END
    RETURN (@sRetVal)
    END
    CREATE FUNCTION I_CN2W_GetAbvKharab (@sValue NVARCHAR(255)) 
    RETURNS NVARCHAR(255) AS 
    BEGIN
    DECLARE @rstArab as NVARCHAR(255), @rstAbvKharab AS NVARCHAR(255), @strNum as NVARCHAR(255), @strArab AS NVARCHAR(255), @strAbvKharab AS NVARCHAR(255)
    DECLARE @sRetVal as NVARCHAR(255), @ONLY AS NVARCHAR(10)
    SET @ONLY = 'Only'
    SET @strNum = RTRIM(LTRIM(@sValue))
    SET @strArab = SUBSTRING(@strNum, ((LEN(@strNum)-11)+1),11)
    SET @strAbvKharab = SUBSTRING(@strNum,1,LEN(@strNum)-11)
    SET @rstArab = dbo.I_CN2W_GetArabs(@strArab)
    SET @rstAbvKharab = REPLACE(dbo.I_ConvertN2W(CONVERT(MONEY, @strAbvKharab),0),@ONLY,'')
    SET @rstAbvKharab = @rstAbvKharab + ' Kharab ' + @rstArab
    SET @sRetVal = @rstAbvKharab
    RETURN (@sRetVal)
    END
    CREATE FUNCTION I_ConvertN2W (@curNumber MONEY, @bPrefixCurrencyName BIT)
    RETURNS VARCHAR(400) AS 
    BEGIN
    ---This Function is an Adapted (Scaled Down) version of ConvertN2W from the ITCCF32.dll Custom Functions Library by Infinite Technologies
    ---Original and Adapted (SQL) both Versions authored by Murtaza R.E. This function is provided on AS IS WHERE IS BASIS
    ---This peice of code can be freely used for all puposes, however please Do Not Forget to mention the source
    ---Suggestions and Bugs can be send to me at murtaza1972 at gmail dot com, I do not assure an immediate fix, but will try as time permits
    ---If you find this peice of code helpful, please do drop me a mail, this will encourage me to do something more creative
    DECLARE @sRetVal AS VARCHAR(400), @RUP AS NVARCHAR(10), @PAISE AS NVARCHAR(10), @ONLY AS NVARCHAR(10)
    DECLARE @curr AS MONEY, @strFirst AS VARCHAR(100), @lngDeciLen AS INT, @strDeci AS VARCHAR(100)
    DECLARE @i AS INT, @rstDeci AS VARCHAR(100), @strNum as VARCHAR(400), @lngNum AS INT, @rstNum AS VARCHAR(400)
    DECLARE @rstWord AS VARCHAR(400)
    SET @RUP =
         CASE
              WHEN (@bPrefixCurrencyName = 1) THEN 'Rupees'
              ELSE ''
         END
    SET @PAISE = 'Paise'
    SET @ONLY = 'Only'
    SET @curr = @curNumber
    IF @curr < 0
    BEGIN     
         SET @sRetVal = NULL
    END
    IF @curr = 0
    BEGIN
         SET @sRetVal = @RUP + ' Zero ' + @ONLY
    END
    SET @strFirst = LTRIM(STR(@curNumber,30,2))
    SET @lngDeciLen =
         CASE
              WHEN PATINDEX('%.%',@strFirst) > 0 THEN (LEN(@strFirst)-PATINDEX('%.%',@strFirst))
              ELSE 0
         END
    IF @lngDeciLen <> 0
    BEGIN
         SET @i = CASE
                   WHEN PATINDEX('%.%',@strFirst) > 0 THEN (PATINDEX('%.%',@strFirst) + 1)
                   ELSE 0
              END
         SET @strDeci = dbo.I_Mid(@strFirst, @i, @lngDeciLen)
    END
    ELSE
    BEGIN
         SET @strDeci = '0'
    END
    SET @strDeci =
         CASE
              WHEN LEN(@strDeci) = 1 THEN (@strDeci + '0')
              ELSE @strDeci
         END
    SET @rstDeci = dbo.I_CN2W_GetTens(@strDeci)
    SET @i =
         CASE
              WHEN PATINDEX('%.%', @strFirst)>0 THEN (PATINDEX('%.%',@strFirst)-1)
              ELSE LEN(@strFirst)
         END
    SET @strNum = dbo.I_Mid(@strFirst,1,@i)
    IF (@strNum IS NULL) OR (LEN(@strNum)=0)
    BEGIN
         SET @strNum = '0'
    END
    IF CONVERT(MONEY,@strNum) <= 99999
    BEGIN
         SET @lngNum = CONVERT(INT,@strNum)
         SET @rstNum =
              CASE
                   WHEN (@lngNum <= 20) THEN dbo.I_CN2W_GetWord(@lngNum)
                   WHEN ((@lngNum > 21) AND (@lngNum <= 99)) THEN dbo.I_CN2W_GetTens(@strNum)
                   WHEN ((@lngNum > 99) AND (@lngNum <= 999)) THEN dbo.I_CN2W_GetHundreds(@strNum)
                   WHEN ((@lngNum > 999) AND (@lngNum <= 99999)) THEN dbo.I_CN2W_GetThousands(@strNum)
              END
    END
    IF CONVERT(MONEY,@strNum) > 99999
    BEGIN
         SET @rstNum =
              CASE
                   WHEN ((CONVERT(MONEY,@strNum) > 99999) AND (CONVERT(MONEY,@strNum) <= 9999999)) THEN dbo.I_CN2W_GetLakhs(@strNum)
                   WHEN ((CONVERT(MONEY,@strNum) > 9999999) AND (CONVERT(MONEY,@strNum) <= 999999999)) THEN dbo.I_CN2W_GetCrores(@strNum)
                   WHEN ((CONVERT(MONEY,@strNum) > 999999999) AND (CONVERT(MONEY,@strNum) <= 99999999999)) THEN dbo.I_CN2W_GetArabs(@strNum)
                   WHEN (CONVERT(MONEY,@strNum) <= 10000000000000) THEN dbo.I_CN2W_GetKharabs(@strNum)
                   WHEN (CONVERT(MONEY,@strNum) > 10000000000000) THEN dbo.I_CN2W_GetAbvKharab(@strNum)
              END
    END
    IF (LEN(RTRIM(LTRIM(@rstDeci))) = 0) OR (@rstDeci IS NULL)
    BEGIN
         SET @rstWord = @RUP + ' ' + @rstNum + ' ' + @ONLY
    END
    ELSE
    BEGIN
         IF (LEN(RTRIM(LTRIM(@rstNum))) > 0) OR (@rstNum IS NOT NULL)
         BEGIN
              SET @rstWord = @RUP + ' ' + @rstNum + ' and ' + @rstDeci + ' ' + @PAISE + ' ' + @ONLY
         END
         ELSE
         BEGIN
              SET @rstWord = @rstDeci + ' ' + @PAISE + ' ' + @ONLY
         END
    END
    SET @sRetVal =
         CASE
              WHEN ((LEN(RTRIM(LTRIM(@rstWord)))=0) OR (@rstWord IS NULL)) THEN 'Zero'
              ELSE REPLACE(RTRIM(LTRIM(@rstWord)),'  ',' ')
         END     
    RETURN (@sRetVal)
    END
    Step 3:
    Code in SBO_SP_TransactionNotification
    IF ((@object_type = '46') AND (@transaction_type = 'A')) -- Outgoing PAYMENT
    BEGIN
         DECLARE @sWords AS VARCHAR(400), @iValue AS MONEY
         SET @error = 46
         SET @iValue = (SELECT [CheckSum] FROM dbo.OVPM WHERE DocEntry = @list_of_cols_val_tab_del)
         SET @sWords =
              CASE
                   WHEN @iValue > 0 THEN dbo.I_ConvertN2W(@iValue,0) --call the function only when the value is more than 0
              END
         UPDATE dbo.OVPM
              SET U_AmountInWord = @sWords
              WHERE ((DocEntry = @list_of_cols_val_tab_del) AND ([CheckSum]>0)) --we want to update only when the means of payment is by cheque
         SET @error = 0 --success
    END
    xxxxxxxxxxxxxxxENDxxxxxxxxxxxxxxxxxx---
    This is being currently used by me, and works fine for me, I hope this will be useful to you and others
    Regards,
    Murtaza R.E.

  • Print Layout : Amount in Words

    Hai To All,
           I customize print layout of A/P Invoice on that i have some problem:
    1) there iam calculating total amount.At the bottom of my page that amount should display in words.How to do that???
    2) In between repetitive Area and End of Report there is no border while taking print its not looking good.
    Anyone have idea about this????
    Regards,
    Anitha

    Hi Ani,
              For 1st question:
    1. select the that field. goto Properties
    2. In General Tab u can find Link to Textbox
    3. In that textbox select the field-id of the Total Amount
    4. Now goto Format tab, select the Amount in words check box 
            This is the way u can print Amount in words.
            For 2nd Question:
    1. select the repetitive area in Field Index window
    2. Now goto Properties Window, select the Border Tab
    3. there, in low textbox, put 1.
    Thanks,
    Suresh Yerra

  • Check printing: Amount in words is getting jumbled

    Hi,
    I have a problem in displaying amount in words in check.
    I am getting the amount in words through functuion module SPELL_AMOUNT correctly,i.e,(for example,110,002 ) ONE HUNDRED TEN THOUSAND TWO.
    After getting the amount,i am concatenating the words 'ONLY'  amount  'RIYALS'.In program it is concatenated correctly.Expected output is RIYALS ONE HUNDRED TEN THOUSAND ONLY.
    But when seen on screen,the words are getting jumbled.
    It is getting displayed as TWO RIYALS ONLY ONE HUNDRED TEN THOUSAND.
    (Note: My form is in arabic,since i want to display vendor name in arabic,and rest of the check in english).
    Please help me with some solution.
    Thanks & Regards
    Seshagiri.

    Hi Dishant,
    Sorry for the delay.I am pasting the code below:
    Code in print program:
    Global data:
    data: gv_riyals(6) value 'RIYALS', "RIYALS
          gv_only(4) value 'ONLY',
          gv_halalas(7) value 'HALALAS',
          gv_and(3) value 'AND'.
    Local data:
            data: lw_dummy(25),
                  lw_fraction(2),   "for fraction part of amount in HALALAS
                  lw_integer type i.
            if spell-decimal is initial.
              clear: spell-decimal, dg_100.
            else.
               lw_integer = spell-decimal / 10.
               lw_fraction = lw_integer.
               concatenate '(' lw_fraction '/100)'
                       into lw_dummy.  " SEPARATED BY space.
               condense lw_dummy.
               clear dg_100.
               dg_100 = lw_dummy.
            if  not spell-word is initial.
              condense spell-word.
              gv_spell_word(50) = spell-word.  "Amount in RIYALS
            endif.
         endif.
              call function 'WRITE_FORM'
                exporting
                  window  = 'PAY_DOC'
                  element = 'PAY_DOC'
                exceptions
                  window  = 1
                  element = 2.
              if sy-subrc eq 2 and
                (  err_element-fname ne t042e-zforn
                or err_element-fenst ne 'PAY_DOC'
                or err_element-elemt ne 'PAY_DOC' ).
                err_element-fname = t042e-zforn.
                err_element-fenst = 'PAY_DOC'.
                err_element-elemt = 'PAY_DOC'.
                err_element-text  = text_530.
    *--Code in the script:
    /:  IF &DG_100& EQ ' '
    L1  &gv_only(C)&,,&gv_riyals(C)&,,&spell-word&
    /:  ELSE
    L1  &gv_riyals(C)&,,&gv_spell_word(C)&
    L1  &gv_only(C)&,,&gv_halalas(C)&,,&dg_100(C)&,,&gv_and(C)&
    /:  ENDIF
    Thanks & Regards
    Seshagiri.

  • Function to call to convert amount in words in R12

    Hi Experts,
    I am creating a custom report that will display invoice details. Included in the fields are AMOUNT and AMOUNT_IN_WORDS. I don't have problem for the AMOUNT field since i can retrieve it directly from the table. My concern is on the AMOUNT_IN_WORDS. Is there any function in EBS R12 which i can call directly in the SQL statement of my report to convert the AMOUNT into Words.
    Thanks,
    Nestor

    Hi mpautom,
    What i'm looking for is a built-in function within EBS R12. Because the client doesn't allow creation of function.
    Nestor

  • Reg Currency Description and Amount in words

    Hi
    Can anybody help me out in finding Function Module for Currency Descripton and Amount in words.
    For  Example, if currency type is <b>USD</b> and the amount is <b>29,012.50</b>
    then it should display the currency description as <b>The sum of US Dollars</b> and the amount in words as <b>Twenty Nine Thousand Twelve and Cents Fifty</b> and it should work for any currency type.
    Thanks in Advance.
    Swathi

    Hi swathi,
    Cents are not known in SAP only USD with decimal places in known.
    however check if this can solve teh problem...
    for indian currency inr use the below function module....
    HR_IN_CHG_INR_WRDS
    for usd currency use the following code as an example..
    data: amt_in type  pc207-betrg value '29012.50'.
    data: words type spell.
    data: result type string.
    call function 'SPELL_AMOUNT'
    exporting
       amount          = amt_in
       currency        = 'USD'
      FILLER          = ' '
      LANGUAGE        = SY-LANGU
    importing
       in_words        = words
    EXCEPTIONS
      NOT_FOUND       = 1
      TOO_LARGE       = 2
      OTHERS          = 3
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    concatenate 'USD' words-word 'AND' words-decword 'CENTS'
             into result separated by space.
    write:/ result.
    hope this helps,
    all the best,
    sampath
    award helpful answers

  • My original post, locked by this forum. Display problem related

    Hi G5 Gurus,
    The display problem first, we all know when screen savers display, a click on the mouse will bring you back to the active desktop, this was how it worked., but now, sometimes a click cause the G5 to sleep!
    As for the sleep, I dare not to put it to sleep these days, because I am afriad it may cause a fire by over heating. Sometmes, actually four times in the past few months, my G5 could wake up by itself, followed by a extrem high speed running of the cooling fan, it sounded like a hair dryer running in the same room. Sometimes the sreen could light up, just like real wake up, sometimes, it was black. No clicks the mouse or keyboeard could bring it back to normal, I had to press and hold the power button to turn it off.
    This crazy problem happened for the first time last summer, a dead hard disk was the cost. Apple replaced it, but failed to detect the cooling or power or display problem. I was given one month extended free service, but right after its end, the problem was back and happened even more often.
    Please let me know if any of you had the same problem and please advise what to do.
    100s Gs of thanks.
    Songyan
    iMac G5 Mac OS X (10.4.8)
    la teller
    Posts: 1
    From: Los Angeles
    Registered: Jan 10, 2007
    Re: What's the problem? Display? Power supply? Cooling? My G5's gone mad
    Posted: Jan 10, 2007 2:21 PM in response to: Bad luck G5
    I have the EXACT same problem. In fact, I could not have described it better myself. What gives? I brought it in to the "genius" bar and they repolaced the power supply free of charge but the problem is still there. I noticed they ordered a new logic board but did not end up replacing it after all. Did you have yours replaced and did it work? Is this a known issue?
    imac G5 17 inch Mac OS X (10.3.9)
    Bad luck G5
    Posts: 8
    From: UK
    Registered: Jan 10, 2007
    Re: What's the problem? Display? Power supply? Cooling? My G5's gone mad
    Posted: Jan 11, 2007 1:20 PM in response to: la teller
    Hi La teller,
    Thank you for your reply. The 'genius' here in London only replace the dead hard disk, which I belive was a victim of this problem. I was told they couldn't find anything wrong with the power supply or the cooling system.
    Now at lest I know I am not the only bad luck guy. Let's wait and see if others are having the same problem. I am not sure if this is a known issue to Apple, even if it is, it may take years before they can offer a recall or free repaire. I noticed that some G5s have already been suffering from power problems and a free repaire was offered.
    Thank you again and hope Apple can take our concerns into their consideration soon.
    Songyan
    iMac G5 Mac OS X (10.4.8)
    stopha6
    Posts: 1
    From: US
    Registered: Jan 12, 2007
    Re: What's the problem? Display? Power supply? Cooling? My G5's gone mad
    Posted: Jan 12, 2007 7:43 AM in response to: Bad luck G5
    Hello,
    I'm also having this problem (fan running, won't come out of sleep), just spoke with an apple care rep. He confirmed my suspition that it was software, not hardware as I have just had the logic board and power supply replaced.
    His suggestions were to:
    1. Run disk repair from the startup CD
    try running OS X from a firewire drive and see if the same behavior happens or
    perform and archive and install.
    When the fan starts to run like that it means the OS is not communicating with the hardware properly. The OS could be somewhat corrupt if you were having hardware issues beforehand, hence the need for a reinstall. I will be performing an archive and install after the disk repair, I'll let you know if it fixes the problem!
    iMac G5 Mac OS X (10.4.8)
    Bad luck G5
    Posts: 8
    From: UK
    Registered: Jan 10, 2007
    Re: What's the problem? Display? Power supply? Cooling? My G5's gone mad
    Posted: Jan 14, 2007 12:52 PM in response to: stopha6
    Hi Stopha6,
    Thank you for your message. I never imagined it could be a software issue, cos it looked so hardware.
    Please keep me updated with your progress.
    By the way, as I said in my old posts, a hard disk went dead when this happened for the very first time, how do you read this?
    Thank you.
    Songyan
    iMac G5 Mac OS X (10.4.8)
    Bad luck G5
    Posts: 8
    From: UK
    Registered: Jan 10, 2007
    Re: What's the problem? Display? Power supply? Cooling? My G5's gone mad
    Posted: Jan 15, 2007 6:58 AM in response to: stopha6
    Hi Stopha6,
    After reading your reply again, I realized that the system had already been reinstalled. As I said when it happened for the first time, the hard disk died with it, which was replaced, of course with a new OS X, but the same problem is still happening. May this suggest that it is not just a software problem? Thank you. Songyan
    iMac G5 Mac OS X (10.4.8)
    AG-Nate
    Posts: 5
    From: Pismo Beach,CA
    Registered: Aug 26, 2006
    Re: What's the problem? Display? Power supply? Cooling? My G5's gone mad
    Posted: Jan 14, 2007 3:38 PM in response to: Bad luck G5
    The Fans going at full is only because you have an application that is using a lot of cpu power and therefore causing the imac to heat up so it turns the fans on. The screen-saver and sleep problem you describe sounds like something that may just happen on accident. But this sounds mostly like a software problem. Try making sure to always quit all non-apple products and see if anything changes.
    eMac, iMacG5 Mac OS X (10.4.7) 800mhz 1gig ram, 2ghz 2gigs of ram
    Bad luck G5
    Posts: 8
    From: UK
    Registered: Jan 10, 2007
    Re: What's the problem? Display? Power supply? Cooling? My G5's gone mad
    Posted: Jan 15, 2007 6:50 AM in response to: AG-Nate
    Thank you, Ag-Nate. I will try as you adivised but I con't think the fans were activeted my intensive CPU using. In most of the cases, the problems happened when the Mac was sleeping, when the minimum CPU were being used.
    iMac G5 Mac OS X (10.4.8)
    Timothy Klein
    Posts: 15
    From: Denver, CO, USA
    Registered: Dec 6, 2004
    Re: What's the problem? Display? Power supply? Cooling? My G5's gone mad
    Posted: Jan 31, 2007 1:02 PM in response to: AG-Nate
    "The Fans going at full is only because you have an application that is using a lot of cpu power and therefore causing the imac to heat up so it turns the fans on."
    That's only partly right. A hard-working process will make the fans run at high speed, of course.
    But, the OS is in touch with the firmware of the iMac, telling it how to run the fans, based upon information the OS X kernel is getting about the state of the hardware.
    If the firmware loses touch with the OS for some reason, and is not getting instructions on how to run the fan, it will default to running them at full blast, to be on the safe side (and this "full blast" fan mode is way louder than anything you'll generally experience during normal usage, I know from experience).
    So it may not be so simple as a hard-working cpu process kicking the fans on.
    iMac G5 17" 1.6 GHz Rev. A Mac OS X (10.4.8) 1 GB Ram
    Kensall
    Posts: 2
    From: London, England
    Registered: Feb 2, 2007
    Re: What's the problem? Display? Power supply? Cooling? My G5's gone mad
    Posted: Feb 2, 2007 9:05 AM in response to: Timothy Klein
    Hi I have a 20" G5 imac it's about 18 months old and I am having the same problem, It freezes and the fan runs really loud. It's nothing to do with software as my I.T. guy has done a complete re-install. All of our admin people have imacs of differring ages and the flat panels are all OK but every one of the G5s has had a booting problem. Some fell into the recall for replacement logic boards but the one I have at home is the newest and doesn't. I'm waiting for my apple reseller to get back to me, but it looks like it's the logic board and as none of the serial numbers fall into the recall, I'm expecting a big bill. I'm really disappointed as I've been a professional apple user for over 15 years and have grown to expect a certain amount of honesty and integrity from them. Looking at all of the discussion boards and the amount of people complaining of the same problem the logic boards are defective and apple should be replacing these free of charge.
    i mac G5 Mac OS X (10.4.8)
    a brody
    Posts: 15,170
    From: Silver Spring, Maryland. Don't forget to backup your data!
    Registered: Dec 23, 2000
    Re: What's the problem? Display? Power supply? Cooling? My G5's gone mad
    Posted: Feb 2, 2007 10:27 AM in response to: Kensall
    Kensall,
    Welcome to Apple Discussions!
    As in the other thread I wrote:
    Being from England, you may find the repair program under these pages:
    http://www.apple.com/uk/support/imac/repairextensionprogram/
    http://www.apple.com/uk/support/imac/powersupply/repairextension/
    Check both of them as they refer to different models.
    If neither of yours is under the program, please start a new topic thread so someone can help you.
    http://discussions.apple.com/forum.jspa?forumID=881
    First off, you'll get a wider audience who may be able to solve your problem. Secondly, responses to you won't confuse the original poster with solutions that don't apply to them. And thirdly, you'll know for certain whether or not a response applies to you.
    iMac C2D 2.17/20 inch/iMac G5 1.8 1st gen/iMac G4 800 Mac OS 9 Mac OS X (10.4.8) EyeTV 200, Canon PS A530 , Epson P-R220, iSight, Airport Extreme, 5th Gen iPod

    I am having a very similar problem. My G5 imac has already had the logic board replaced from the leaking capacitor problem. 8 mos. later the power supply was replaced under the second recall program when it failed to start up.
    It had been working now for almost a year, when about 3 mos. ago I started to experience the sudden dimming effect - if the display was untouched the screen would dim about 30% similar to a laptop in energy save mode. I checked and none of these types of options were set in the pref panes. At the same time I would have the iMac go to sleep after a while from non-use, and then when I tried to wake it it would stir for a few seconds and then go right back to sleep. It took 2-3 attempts to wake it up.
    Then last week, as I tried to wake it, it just shut down instead completely. I had to hold the power button down to recycle it to get it to come back to life (3 times).
    Today was it - I found what I thought was a sleeping iMac, but it will not power up at all. I opened the back cover and the power supply is working, but I cannot get the board to energize, I reset the PMU, but the #2 LED won't even blink. It is completely dead.
    Basically every time I used this computer I held my breath that it would not work. After 2 recalls I still only get 9 mos. out of it? Apple is really starting to show it is like the "big" computer makers, the quality is going right down the tubes.
    iMac G5   Mac OS X (10.4.4)  

  • Amount in words in SAP 8.8

    Hello expert,
                        I want to  convert the document amount in words in Indian standard and I am using the  below Functions which I got from sdn and its working fine in SAP 2007 but it is giving error in SAP 8.8 and patch level is 5.........please give the feasible solution.....
    1. Function to Convert one Digit Number to words.
    CREATE    Function dbo.fConvertDigit(@decNumber decimal)
    returns varchar(6)
    as
    Begin
    declare
    @strWords varchar(6)
    Select @strWords = Case @decNumber
         When '1' then 'One'
         When '2' then 'Two'
         When '3' then 'Three'
         When '4' then 'Four'
         When '5' then 'Five'
         When '6' then 'Six'
         When '7' then 'Seven'
         When '8' then 'Eight'
         When '9' then 'Nine'
         Else ''
    end
    return @strWords
    end
    2. Function to convert 2 digit number to words.
    CREATE    Function dbo.fConvertTens(@decNumber varchar(2))
    returns varchar(30)
    as
    Begin
    declare @strWords varchar(30)
    --Is value between 10 and 19?
    If Left(@decNumber, 1) = 1
    begin
    Select @strWords = Case @decNumber
         When '10' then 'Ten'
         When '11' then 'Eleven'
         When '12' then 'Twelve'
         When '13' then 'Thirteen'
         When '14' then 'Fourteen'
         When '15' then 'Fifteen'
         When '16' then 'Sixteen'
         When '17' then 'Seventeen'
         When '18' then 'Eighteen'
         When '19' then 'Nineteen'
    end
    end
    else  -- otherwise it's between 20 and 99.
    begin
    Select @strWords = Case Left(@decNumber, 1)
         When '0' then '' 
         When '2' then 'Twenty '
         When '3' then 'Thirty '
         When '4' then 'Forty '
         When '5' then 'Fifty '
         When '6' then 'Sixty '
         When '7' then 'Seventy '
         When '8' then 'Eighty '
         When '9' then 'Ninety '
    end
    Select @strWords = @strWords + dbo.fConvertDigit(Right(@decNumber, 1))
    end
    --Convert ones place digit.
    return @strWords
    end
    3. Function to convert amt in numbers to words. (Built with the help of above 2 functions)
    CREATE function dbo.fNumToWords (@decNumber decimal(12, 2))
    returns varchar(300)
    As
    Begin
    Declare
    @strNumber varchar(100),
    @strRupees varchar(200),
    @strPaise varchar(100),
    @strWords varchar(300),
    @intIndex integer,
    @intAndFlag integer
    Select @strNumber = Cast(@decNumber as varchar(100))
    Select @intIndex = CharIndex('.', @strNumber)
    if(@decNumber>99999999.99)
    BEGIN
    RETURN ''
    END
    If @intIndex > 0
    begin
    Select @strPaise = dbo.fConvertTens(Right(@strNumber, Len(@strNumber) - @intIndex))
    Select @strNumber = SubString(@strNumber, 1, Len(@strNumber) - 3)
    If Len(@strPaise) > 0 Select @strPaise = @strPaise + ' paise'
    end
    Select @strRupees = ''
    Select @intIndex=len(@strNumber)
    Select @intAndFlag=2
    while(@intIndex>0)
    begin
    if(@intIndex=8)
    begin
      Select @[email protected](left(@decNumber,1))' Crore '
      Select @strNumber=substring(@strNumber,2,len(@strNumber))
      Select @intIndex=@intIndex-1
    end
    else if(@intIndex=7)
    begin
      if(substring(@strNumber,1,1)='0')
      begin
       if substring(@strNumber,2,1)<>'0'
       begin
        if (@strRupees<>NULL and substring(@strNumber,3,1)='0' and substring(@strNumber,4,1)='0' and substring(@strNumber,5,1)='0' and substring(@strNumber,6,1)='0' and substring(@strNumber,7,1)='0' and @intAndFlag=2 and @strPaise=NULL)
        begin
         Select @strRupees=@strRupees+' and ' dbo.fConvertDigit(substring(@strNumber,2,1))' Lakh '
         Select @intAndFlag=1
        end
        else
        begin
         Select @[email protected](substring(@strNumber,2,1))' Lakh '
        end
        Select @strNumber=substring(@strNumber,3,len(@strNumber))
        Select @intIndex=@intIndex-2
       end
       else
       begin
        Select @strNumber=substring(@strNumber,3,len(@strNumber))
        Select @intIndex=@intIndex-2
       end
      end
      else
      begin
       if(substring(@strNumber,3,1)='0' and substring(@strNumber,4,1)='0' and substring(@strNumber,5,1)='0' and substring(@strNumber,6,1)='0' and substring(@strNumber,7,1)='0'  and @intAndFlag=2 and @strPaise='')
       begin  
        Select @strRupees=@strRupees+' and ' + dbo.fConvertTens(substring(@strNumber,1,2))+' Lakhs '
        Select @intAndFlag=1
       end
       else
       begin
        Select @[email protected](substring(@strNumber,1,2))' Lakhs '
       end
       Select @strNumber=substring(@strNumber,3,len(@strNumber))
       Select @intIndex=@intIndex-2
      end
    end
    else if(@intIndex=6)
      begin
       if(substring(@strNumber,2,1)<>'0' or substring(@strNumber,3,1)<>'0' and substring(@strNumber,4,1)='0' and substring(@strNumber,5,1)='0' and substring(@strNumber,6,1)='0' and @intAndFlag=2 and @strPaise='')
       begin
        if len(@strRupees) <= 0
        begin
         if convert(int,substring(@strNumber,1,1)) = 1
         begin
          Select @strRupees=@strRupees+'' + dbo.fConvertDigit(substring(@strNumber,1,1))+' Lakh '
          Select @intAndFlag=2
         end
         else
         begin
          Select @strRupees=@strRupees+'' + dbo.fConvertDigit(substring(@strNumber,1,1))+' Lakhs '
          Select @intAndFlag=2
         end
        end
        else
        begin
         if convert(int,substring(@strNumber,1,1)) = 1
         begin
          Select @strRupees=@strRupees+' and' + dbo.fConvertDigit(substring(@strNumber,1,1))+' Lakh '
          Select @intAndFlag=1
         end
         else
         begin
          Select @strRupees=@strRupees+' and' + dbo.fConvertDigit(substring(@strNumber,1,1))+' Lakhs '
          Select @intAndFlag=1
         end
        end
       end
       else
       begin
        if convert(int,substring(@strNumber,1,1)) = 1
        begin
         Select @[email protected](substring(@strNumber,1,1))' Lakh '
        end
        else
        begin
         Select @[email protected](substring(@strNumber,1,1))' Lakhs '
        end
       end
       Select @strNumber=substring(@strNumber,2,len(@strNumber))
       Select @intIndex=@intIndex-1
      end
    else if(@intIndex=5)
      begin
       if(substring(@strNumber,1,1)='0')
       begin
        if substring(@strNumber,2,1)<>'0'
        begin
         if(substring(@strNumber,3,1)='0' and substring(@strNumber,4,1)='0' and substring(@strNumber,5,1)='0' and @intAndFlag=2 and @strPaise='')
         begin
          Select @strRupees=@strRupees+' and ' dbo.fConvertDigit(substring(@strNumber,2,1))' Thousand '
          Select @intAndFlag=1
         end
         else
         begin
          Select @[email protected](substring(@strNumber,2,1))' Thousand '
         end
         Select @strNumber=substring(@strNumber,3,len(@strNumber))
         Select @intIndex=@intIndex-2
        end
        else
        begin
         Select @strNumber=substring(@strNumber,3,len(@strNumber))
         Select @intIndex=@intIndex-2
        end
       end
       else
       begin
        if(substring(@strNumber,3,1)='0' and substring(@strNumber,4,1)='0' and substring(@strNumber,5,1)='0' and @intAndFlag=2 and @strPaise='')
        begin
         Select @strRupees=@strRupees' and 'dbo.fConvertTens(substring(@strNumber,1,2))+' Thousand '
         Select @intAndFlag=1
        end
        else
        begin
         Select @[email protected](substring(@strNumber,1,2))' Thousand '
        end
        Select @strNumber=substring(@strNumber,3,len(@strNumber))
        Select @intIndex=@intIndex-2
       end
      end
    else if(@intIndex=4)
      begin
       if ( (substring(@strNumber,3,1)<>'0' or substring(@strNumber,4,1)<>'0') and substring(@strNumber,2,1)='0' and  @intAndFlag=2 and @strPaise='')
       begin
        Select @strRupees=@strRupees+' and' + dbo.fConvertDigit(substring(@strNumber,1,1))+' Thousand '
        Select @intAndFlag=1
       end
       else
       begin
       Select @[email protected](substring(@strNumber,1,1))' Thousand '
       end
       Select @strNumber=substring(@strNumber,2,len(@strNumber))
       Select @intIndex=@intIndex-1
      end
    else if(@intIndex=3)
      begin
       if  substring(@strNumber,1,1)<>'0'
       begin
        Select @[email protected](substring(@strNumber,1,1))' Hundred '
        Select @strNumber=substring(@strNumber,2,len(@strNumber))
        if( (substring(@strNumber,1,1)<>'0' or  substring(@strNumber,2,1)<>'0') and @intAndFlag=2 )
        begin
         Select @strRupees=@strRupees+' and '
         Select @intAndFlag=1
        end
        Select @intIndex=@intIndex-1
       end
       else
       begin
        Select @strNumber=substring(@strNumber,2,len(@strNumber))
        Select @intIndex=@intIndex-1
       end
      end
    else if(@intIndex=2)
      begin
       if substring(@strNumber,1,1)<>'0'
       begin
        Select @strRupees=@strRupees+dbo.fConvertTens(substring(@strNumber,1,2))
        Select @intIndex=@intIndex-2
       end
       else
       begin
        Select @intIndex=@intIndex-1
       end
      end
    else if(@intIndex=1)
      begin
       if(@strNumber<>'0')
       begin
        Select @strRupees=@strRupees+dbo.fConvertDigit(@strNumber)
       end
       Select @intIndex=@intIndex-1
      end
    continue
    end
    if len(@strRupees)>0 Select @strRupees=@strRupees+ ' rupees '
    IF(len(@strPaise)<>0)
    BEGIN
    if len(@strRupees)>0 Select @strRupees=@strRupees + ' and '
    END
    Select @strWords = IsNull(@strRupees, '') + IsNull(@strPaise, '')
    select @strWords = @strWords + ' only'
    Return @strWords
    End
    ->> Create 1 UDF in Header on Requrie Documents (ex. Marketing Documents).
    ->> Create 3 Function in MSSQL Server Management.
    ->> Create 1 FMS in Query Generator and save as Query Manager then Assign to UDF for Amount in Words.
    for example:
    Create UDF in Header on Marketing Documents.
    ->> Choose Tools on Top menu.
    ->> User - Defined Fields. -> User Manage Fields.
    ->> Open the User Manage Fields Widnow.
    ->> Marketing Documents. -> Title.
    ->> Select Title and Click Add button in Bottom on User Manage Fields Window.
    ->> Create Amount in Words UDF(Code, Discription and Type - Character) and Add the UDF.
    Create Function in MSSQL Server Management.
    Check this Link, (have 3 Functions in Link).
    http://techcreeze.blogspot.com/2008/11/convert-amount-into-words-according-to_15.html
    1st Funciton - to Convert one Digit Number to words
    2nd Funciton - to convert 2 digit number to words.
    3rd Funciton - to convert amt in numbers to words.
    ->> Open the MSSQL Server Management Window.
    ->> Choose your Company database and Create NEW Query.
    ->> Create 3 Function Queries one by one.
    ->> Create 3 NEW Query Tab and 1st one put the 1st Function then Run the Function. and
    2nd New Query tab put the 2nd Function then Run the Function.
    3rd New Query tab put the 3rd Function then Run the Function.
    Create FMS in Query Generator and Save as Query Manager.
    ->> Adminstration.
    ->> Reports. -> Query Generator.
    ->> Open the Query Generator and put the below FMS query.
    for example : Purchase Order Doc. Toal(in wrods).
    declare @Doc_total numeric (19,6)
    set @Doc_total=$[OPOR.DocTotal]
    select  dbo.fNumToWords (@Doc_total)
    ->> Assign the FMS in UDF on Purchase Order.
    ->> Auto Refresh of Document Total.
    Ex.
    1. Goto the UDF and Clcik ShiftAltF2.
    2. Select the SEARCH BY SAVED QUERY.
    3. Assign the FMS Query.
    4. Select the AUTO REFRESH WHEN FIELD CHENGES.
    5. Select Document Total.
    6. Check the Display Saved Values.

    Hi Neetu,
    its not converting decimal values  in paisa...
    Regards
    Deepak tyagi

  • Wrong Conversion of Amount in Words in Purchase Order print out

    Hi,
    Please help me with the problem in printing of Purchase Order, there is an error in amount in words. For example the total amount in numbers is 93,311.30 however the amount in words will be nine million three hundred  thirty-one thousand one hundred thirty.As per my understanding the amount in number was multiply by 100. Please help what i should check.
    Thanks,
    Richard

    Dear,
    Take the help of the ABAPER guy and check what he written in the program of the PO layout & printout.
    http://help.sap.com/printdocu/core/print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf
    This will solve your problem
    Thanks & regards.
    Varun Bisaria
    Edited by: Varun Bisaria on Oct 21, 2011 2:10 PM

  • Display problem, and maybe worse

    On startup this morning my iMac (PowerPC) G5 display began behaving very strangely. The screen is displaying my usual desktop picture, dock and icons, and finder window. Applications are running, but very oddly.
    The screen is covered in small visible dots, some flashing, some static. When I open a document, or a page in Safari, it displays more or less normally (I can use Word, for example), by then "smears" if I start to scroll down the page. At other times the graphics break up completely.
    I'm guessing this is a display problem, but one other odd symptom is that sometimes if I click on a file in the Finder window, instead of opening the document the window shuts down and re-opens in its starting configuration.
    I tried a restart, but it stuck on a black screen, and I had to force it to stop via holding the start button, and start again from there. I tried accessing system profiler, and it all froze up, requiring another button stop / start.
    It looks like a hardware issue, but I've no idea what kind. Anybody recognise what is happening? (I'm posting this from my iBook).
    Kenny

    Since the update 10.9.4:
    My soundcard is missing and on Safari 7.0.5 video artefacts and flickering.
    On macbook Pro 13 Early  2011

  • Display problem- Missing letters

    Hello there,
    I had a display problem with my 15" mac book pro. Sometimes the words on the menu bar will have missing letters. For example, F le Ed t Vi w and etc. This does not only happen in the main interface, it also occurs when I'm browsing websites (the contents have missing letters too)or open other applications(iphoto, imovie) The problem is getting worse these days, I 'll have to restart my computer every single time when it happens.
    Does anyone have any solution to this technical issue?
    Thank you very much,
    Lilly

    I tried IVMichael's suggestion above and had no joy, but when i restarted i found a file called /Users/your_name/Library/Preferences/com.apple.LaunchServicesQuartantined
    after deleting that and restarting i seem to have solved the problem.
    Good luck

Maybe you are looking for

  • Can't post photos to CS3

    Hi I have dreamweaver CS3 on the same computer that I have had for years, but lately I't won't let me add photos.  Every time I try to add a photo, I get an error message   Dreamweaver can't open .jpg files.  Please choose an HTM XML, or other compat

  • Which is better for educational purpose ( for attending online classes ) ??

    which is better for educational purpose ( for attending online classes ) ?? iPad air 2 or d macbook pro?? what abt iPad pro ?? plz suggest one for me plz

  • Un-Responcive Click Wheel

    This is my First Hard Drive Based iPod, i have owned a 1st gen nano. the problem with my classic is that the click wheel randomly stops responding when scrolling. so when scrolling the albums list the click wheel will stop after every 20 albums. i ha

  • Urgent Help; Everyone has access to restricted rooms

    Hi Everybody, I need some urgent help. I have created some collaboration rooms based on a restricted room template and everyone seems to have access to the room. It is behaving as if it is a public room. Now we are just a couple of days from go-live

  • Open error in creative cloud

    I open my creative cloud but it told me to verify an email that doesn't even exist. I can't use my product and can not verify that email. What shall I do?