Converting SSN Number

can anybody tell me the logic to convert ssn number
421-64-8951 to 421648951 .Plz answer urgently,points will be awarded undoubtedly.

u can use REPLACE statement
DATA :  TEST1(11) type C VALUE '421-64-8951'.
REPLACE ALL OCCURRENCES OF '-' IN  TEST1 WITH ''.
*Note : its two times single qoute at last in above statement without any space between quotes
OR
USE CONCATENATE with Offset settings...
See below code
DATA:TEST1(11) type C VALUE '421-64-8951',
TEST2(3) type c,
TEST3(2) type c,
TEST4(6) type c,
TEST5(9) TYPE C.
move test1+0(3) to test2.
move test1+4(2) to test3.
move test1+7(6) to test4.
concatenate test2 test3 test4 into test5.
write:/ test5.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7

Similar Messages

  • Gettin error Cannot convert to number in RTF Template

    Hi,
    I am working on xml template development i am getting the followinf error
    Font Dir: C:\Program Files\Oracle\XML Publisher Desktop\Template Builder for Word\fonts
    Run XDO Start
    RTFProcessor setLocale: en-us
    FOProcessor setData: D:\Tickets\Remittance Advice XMLP\canada_report1.xml
    FOProcessor setLocale: en-us
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeProcessXSL(XSLT10gR1.java:586)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:383)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:201)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:161)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1015)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:968)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:209)
         at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1561)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:951)
         at RTF2PDF.runRTFto(RTF2PDF.java:626)
         at RTF2PDF.runXDO(RTF2PDF.java:460)
         at RTF2PDF.main(RTF2PDF.java:251)
    Caused by: oracle.xdo.parser.v2.XPathException: Cannot convert to number.
         at oracle.xdo.parser.v2.XSLStylesheet.flushErrors(XSLStylesheet.java:1526)
         at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:517)
         at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:485)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:264)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:150)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:187)
         ... 16 more
    I have checked the code and problem was due to following code i dont know where i went wrong
    <xsl:variable xdofo:ctx="incontext" name="inner_group" select=".//G_SEL_INV_DATA"/><?for-each:$inner_group?><?if:(position()-1) mod $no_of_lines_per_page=0?><xsl:variable name="first_rec" xdofo:ctx="incontext" select="position()"/>
    Please help me to solve this issue...
    Thanks
    Rajesh

    What was the problem in the template? I am facing the same error, when I put a conditional in the data field, it throws the XML-22036: (Error) Cannot convert to number.
    error, where if the element was printed directly it works fine.
    error
    <Line 984, Column 130>: XML-22036: (Error) Cannot convert to number.
    @Line 984 ==> <xsl:variable name="v148" select="format-number(string(xdoxslt:one($v147)), string('###0.00'), string('_DECIMALFORMAT'))"/>
    End of Process.
    <format>
    Number, ###0.00
    <DATA >BROKEN
    If (to_number(../DocumentPayableCount) + to_number(Extend/NumberOfPO) + sum(to_number(../DocumentPayable/Extend/Commentlength))) <= 7 then Extend/InvoiceAmount end if
    <DATA >ALSO BROKEN
    If (../DocumentPayableCount + Extend/NumberOfPO + sum(../DocumentPayable/Extend/Commentlength)) <= 7 then Extend/InvoiceAmount end if
    <DATA> WORKS
    then Extend/InvoiceAmount

  • I just read the tutorial and did exactly what it was telling me to do, and I still can't get it done. Once I have selected the file, I get a box that pops up that says "Subscribe now to convert unlimited number of files to PDFs. Subscribe Now.  I already

    I just watched the tutorial and did exactly what it was telling me to do, and I still can't get it done. Once I have selected the file, I get a box that pops up that says "Subscribe now to convert unlimited number of files to PDFs. Subscribe Now.  I already have done this! I am a subscriber!  Arrrrhhhgggg!

    Hello Kathie,
    Please let me know what exactly are you trying to do using Adobe online service.
    You might try accessing the same service for some other PDFs and check.
    Have you signed up correctly at "https://cloud.acrobat.com/" using your Adobe ID credentials.
    If the same message pops up, then please visit Contact Customer Care as they could let you know if there is any problem with your account.
    Hope to get your response.
    regards,
    Anubha

  • How to convert a number to FLOAT with 9 decimal values.

    Hi all,
    I need to convert a number like '10.02' to a floating point number with 9 decimal values like '10.022111221'. I think that the right function is TO_BINARY_FLOAT, but how can I obtain 9 decimal values? If I use the following syntax:
    select TO_BINARY_FLOAT(num) from table
    I obtain a floating point values with a variable number of decimal numbers after the ".", instead I need 9 number after ".".
    Regards,
    Maurizio.

    Hi,
    the number I need to select is the result of a product, for example:
    select (Num_A * Num_B) from Table;
    Num_A has 2 decimal numbers, like 12.01 and Num_B could be: 12.111111111.
    Now, Num_A * Num_B = 653.999999994
    but I issue:
    select TO_BINARY_FLOAT(54.00 * 12.111111111) from Table
    I obtain:
    654, a rounded value, but I need 653.999999994.

  • How can I convert a number to char in javascript

    How can I convert a number i.e ascii number to char in javascript.
    ex: 55 to A

    How can I convert a number i.e ascii number to char in javascript.
    Quite simple: By asking in a forum that deals with javascript and not with java.
    Have no clue...
    Maybe on http://www.irt.org

  • Hi want to convert a number in crore, e.g. 10000000 to 1.00 Can anybody help on this?

    Hi All,
    I want to convert a number in crore format.
    My basic problem is, I am using a custome format:
    #,##0.00,,,%;
    Here main task is done by ,,,%.
    Each comma (,) is dividing a number by 1000. Thus three commas are dividing a number by 10^9 digits.
    But I need number in crore (i.e. 10^7), Thus we have used this percent sign (%).
    Here I can get required Value but appended percent (%) to it. I can temporary hide this using wrap text.
    But I need exact solution to convert a number in crore.
    Can anybody help me regarding the same.

    Hi Neha,
    You can use EPMScaleData function, in that give scaling factor as per your requirement.
    For more details you can go through following link
    How to use EPMScaleData in a fully dynamic report
    Regards,
    Shrikant

  • 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-01

    I think you can just move from type F to type p.
    p =  f .
    Regards,
    Rich Heilman

  • Convert a number value to a date

    Post Author: Jeremiah
    CA Forum: Formula
    I'm using Crystal Reports XI. I'm coming across a problem trying to convert a
    number value to a date.  I'm using formula below: if not isnull({qryStoreCheckIn.CHECKINDATE})  or {qryStoreCheckIn.CHECKINDATE}="0"the(stringvar MyDate:= ToText({StoreCheckIn.CHECKINDATE},0,"");cdate(2000 + val(left(MyDate,1)),val(mid(MyDate,2,2)),val(right(MyDate,2))))  
    For this line, I'm receiving an error msg of that "A month number must be between 1 and 12
    Here are some of the field's data examples
    70608
    70501
    0
    61231 Would anybody have any ideas on how to solve this?

    Post Author: SKodidine
    CA Forum: Formula
    You are getting the error "A month number must be between 1 and 12" because you are trying to convert 0 to a date.  The third data item in your field data.
    I suggest you default the date to some date when it is zero or eliminate 0 as a date from your formula such as:
    if not isnull({qryStoreCheckIn.CHECKINDATE})
    then(stringvar MyDate:= ToText({StoreCheckIn.CHECKINDATE},0,"")
    else
    If {qryStoreCheckIn.CHECKINDATE} = 0 then (stringvar MyDate:= "00101");  // If date is zero then it is set to 2000/01/01
    After this, you will not have problems with a zero date.

  • Essbase 9.3 Calc scripts. Pb with dates. How to convert (string = number) ?

    Hello,
    I've a problem with Essbase(Planning?) Scripts on version 9.3. It looks simple but I do not find any (clean) solution :
    On my Essbase database, I have a member called "Reference_Date" on my axis Indicators. It is a date data type, that is to say, it displays a number corresponding to a YYYYMMDD format. For example : 20091029 for October 29th 2009.
    In calc scripts I often need to compare the month included in that "Reference_Date" with the current Member of my Time Axis (I have 12 Months members based on the format M02 for February for example). The final aim is to calculate a number of complete years since that "Reference_Date".
    But theses two elements are not of the same "type" (one is a number value and the other is a "member" in Time Axis). So I'm forced to convert one of this two elements in order to compare it.
    For example I can extract the month value of the "Reference_Date"' and put an "M" before it to have a Time member equivalent or I can convert the member Name M10 to a number (10))
    in both cases I have the same type problem : I don't know how to convert a string into a number nor how to convert a number into a string.
    (For example @CONCATENATE doesn't work with numbers). and that my only remaining problem.
    I didn't find any Essbase Function which do this (conversion number <=>string).
    Is anyone have an Idea ?
    Thanks for your help
    Best regards

    I don't know any way for you to compare your data against your metadata. Not directly. To me it makes little enough sense to try that I'm not surprised the developers didn't provide for it.
    I've converted member names to strings, manipulated the strings (calc script functions are not good at this), and turned them back into member names, but that's really the only use I've had for string manipulation. I don't think an equivalency operator even exists for string data. And I see no way to begin thinking of a member name, once converted to a string, as a number.
    It makes even less sense to me to try thinking of a data value as a string. Even text values in Sys 11 are stored as numbers. Not encoded characters, but just a number to look up somewhere.
    I think you can do what you want though, with something like this...
    IF (@ISMBR("FY08"))
    vYr = 2008;
    ELSEIF (@ISMBR("FY09"))
    vYr = 2009;
    ENDIF;
    IF (@ISMBR("M01"))
    vMth = 1;
    ELSEIF (@ISMBR("M02"))
    vMth = = 2;
    ENDIF;
    "Years_Since_Reference" = ((vYr * 100) + Mth) - ("Reference_Date" / 12);
    Obviously, the math will need some work, coz that doesn't actually work, but the logic above essentially turns your metadata into numbers, which is what you are after.
    Good luck,
    -- Joe

  • Optimize function to correct a string to be converted to number

    Hi,
    I have imported almost 6.5 milion rows into a table (using sql loader) from a flat file (which contains the NUL caracter (ASCII 0) - not space, not NULL). To make the load easier I set the datatype as VARCHAR2 for all columns. For columns with string data I used a TRIM(REPLACE(field,' ','')) to get rid of the NUL and it works.
    But for the column that must be converted to numeric I am trying to use to_number () function and it fails because the numeric data is mixed with other characters.
    To solve this problem I created this function :
    CREATE OR REPLACE
    FUNCTION string_to_number
    (p_string_source IN VARCHAR2 ) RETURN VARCHAR2 IS v_output_string varchar2(150);
    -- This function takes a string as parameter and has 2 outputs:
    -- 1. If the source string cannot be converted to number throw 'Error' as the output message to identify the line with the issue
    -- 2. A string that can be converted successfully as Number;
    -- The necessity of this function came up after an import from a flat file where the resulted string contained strange characters shown as spaces
    --check if '-' is exists and is on the first position or if in the source string exists more than one '.'
    -- ASCII codes accepted in the string :
    -- 45 '-' ; 46 '.' ; from 48 (0) to 57 (9)
    BEGIN
    DECLARE v_minus VARCHAR2(1);
    v_dot INTEGER;
    BEGIN
    SELECT substr(p_string_source,1,1) INTO v_minus FROM dual;
    SELECT instr(p_string_source,'.',1,2) INTO v_dot FROM dual;
    --check if '-' is exists and is on the first position or if in the source string exists more than one '.'
    -- ASCII codes accepted in the string :
    -- 45 '-' ; 46 '.' ; from 48 (0) to 57 (9)
    IF v_minus NOT IN ('-','.','0','1','2','3','4','5','6','7','8','9')
    -- or there are two dots '.' in the string
    OR v_dot <> 0
    THEN v_output_string := 'Error';
    ELSE
    BEGIN
    -- for every character of the string we'll check if it's a number to add it to the outcome string;
    -- if it's not an accepted character it will be ignored
    DECLARE v_length_source int := length(p_string_source);
    v_counter int :=1;
    v_add_in_number VARCHAR2(1);
    BEGIN
    FOR v_counter IN 1..v_length_source LOOP
    BEGIN
    SELECT SUBSTR(p_string_source,v_counter,1) into v_add_in_number from dual;
    IF v_add_in_number IN ('-','.','0','1','2','3','4','5','6','7','8','9')
    THEN v_output_string := v_output_string ||v_add_in_number;
    END IF;
    END;
    END LOOP;
    END;
    -- in case the string is in format '.00034' we'll add a 0 in front of the string to be accepted as argument by TO_NUMBER function
    IF v_minus = '.'
    THEN v_output_string := '0'||v_output_string;
    ELSE
    BEGIN
    v_output_string := v_output_string;
    END;
    END IF;
    END;
    END IF;
    END;
    RETURN v_output_string;
    END;
    The main idea is to check every string (the parameter will be the value from the Amount column) for permitted characters that compose a numeric value:
    1. To begins with numeric, '-' or '.'
    2. To have only one '.' (as a decimal separator);
    3. To compare every character of the string with the permitted ones - the non-compliant will be rejected
    This way the resulting string (v_output_string) will be successfully converted to number
    I admit that I don't have much experience using PL/SQL that is why I am asking your help to optimize this function to improve its performance. Could you help me on this, please ?
    TIA,
    JohnP
    Edited by: petresion on 04-Oct-2012 01:33

    Perform a function here on all 6.5 million of rows will never be efficient.
    I would modify Peter's approach a little bit,
    1. Load directly into staging t1 without any checking (or create an external table)
    2. Transfer from t1 to a list partitioned t2 with list values in ('yes', 'no','null','other')
    --simple check using translate()
    3. Apply your special function only on rows in the 'other' partition (hopefully much fewer rows left)
    --other checks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Field For SSn number

    Hi All,
    Can anybody please tell me the field for SSN number.And in whcih table it will stored.
    I have srached in PA002 but it is not avaliable.
    Can anybody help me.
    Thanks,

    Hi,
    This field is applicable to US. You would find this in IT0002-Pesonal Data. If the country grouping is 10, you would automatically get this field in IT0002.
    Regards,
    Suhasini

  • Need Help on How to Convert a Number Field to an Hour/Minute

    Post Author: syracuse2
    CA Forum: Crystal Reports
    I have a field that shows a duration, i.e. 125.  I would like to convert the number of 125 to 2hr and 5 min.  Any suggestions on how to do this?

    Post Author: GraemeG
    CA Forum: Crystal Reports
    Create a formula and paste the following into it (sorry I use Basic Syntax):
    'Ive laboured a point here a bit so you can get an idea of what you can do.
    'Heres 3 variables - one with your duration and two others for hours and minutesshared xDuration as numbershared xHours as numbershared xMins as number
    'Put some data into the duration and calculate the hours and minutesxDuration = 125xHours =  truncate(xDuration/60)xMins = remainder(xDuration,60)
    'You can then use the variables to get a string with unformatted hours and mins'formula = xHours + "hours " + xMins + "Mins"
    'or you format the hours and minutes nicely'formula = CStr(xHours,0) + "hours " + CStr(xMins,0) + "Mins"
    'or you can make it all into one formula without the need for xHours and xMins variablesformula = CStr((truncate(xDuration/60)),0) + "hours " + CStr(remainder(xDuration,60),0) + "Mins"

  • How to mask SSN number in Identification Number field in BP?

    Hello Gurus,
    We have a requirement to mask the initial 5 digits of SSN number when displayed in the Identification Number field in the Identification tab of BP transaction. What is the best way to go ahead with this enhancement?
    We do not want to encrypt the data at the database level. Just encrypt at while displaying SSN Number on BP transaction.
    If anyone has carried out such enhancement, would appreciate if you can share how you did it?
    Thanks to all in advance,
    Shyamak

    Shyamak,
    This is for CRM -
    Go the PBO of the screen that has identification details. In a suitable PBO module, you can implement and implicit enhancement point and change the data in internal table.
    In my system it is function group BUD0. It would be same in yours as well. Screen is 1520 for me, it may be something else for you. I would have done in module - 'pbo_1520'. Do it at the end of this module. Internal table name GT_BUT0ID
    You need to so something similar in ECC
    Cheers
    Niraj

  • Regarding SSN Number in Personal data

    Hi All,
    In ESS, if we change the SSN number of an employee in the Personal Data, it is not getting reflected in the SAP R/3 data and the SSN Number is reset to Space.
    Did anyone experienced the same problem, if yes can you please suggest the solution for the same.
    Thanks in advance,
    Shashi,

    Bharat can you please be more detail. Am also facing the same problem. Its odd. Problem with just the SSN number of the Peronal ldata screen. When we update the SSN value from front end, its gone, its not getting reflectedand even the old numbe rs gone. Suprised how it is possible since SSN is a mondatory field and how could it save through BAPI or RFC without a mandatory field. I guess it shold be a problem with the underlying RFC func that is used to update data into the infotypes. Any suggestions???
    Sam

  • Hide SSN Number in 0employee_attr

    Hi,
           I want to hide SSN Number in the extractor "0employee_attr". have tried RSO2 to eddit the data source, but I get the message which says " 0EMPLOYEE_ATTR is extracted using functional module HR_BIW_GET_MASTER_DATA" and it does not allow me to edit the data source. Any idea how I can address this issue...

    Go to RSA6 transaction and edit the datasoruce over there...
    You can hide the field there and save.
    RSO2 transaction is used only for generic datasources it cant be used for standard ones.
    Edited by: mansi dandavate on Aug 14, 2009 6:58 AM

Maybe you are looking for