How to convert SAP dateTime field to Oracle date field

Hi All,
            We have a scenario where the incoming data is in the following format:
< ReconciliationData >
    < RowID > 9 </ RowID > 
    < Run_ID > 7 </ Run_ID > 
    < Control_ID > 5.40 </ Control_ID > 
    < Control_Name > MTD CHARGES TO CARP ORDERS INVENTORY </ Control_Name > 
    < Start_Month > 008 </ Start_Month > 
    < End_Month > 008 </ End_Month > 
<b>   < SAP_Time > 20070828190545 </ SAP_Time > </b>
    < SAP_Count > 4 </ SAP_Count > 
    < SAP_Amount > 5000.00 </ SAP_Amount > 
    </ ReconciliationData >
On the receiver side is oracle database. SAP TIME field has to go into Oracle Date field. it should be transformed to structure yyyy/mm/dd hh:mm:ss format.
How do i go about doing it?
Regards,
XIer

hey
did u try the DateTrans function?if that does not work then u can write a simple UDF for it
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
Thanx
Aamir

Similar Messages

  • How to convert raw to number in oracle 8

    Does anyone know how to convert a raw data to number format ???
    If i do: select dump(50,16) from dual, it will return bytes c1 33.
    With this bytes in a raw variable, how can i convert it to a number variable in Oracle 8.
    PS: Oracle 8 doesn't have utl_raw.cast_to_number function...
    Thanx.

    Thanx for help... But...
    This examples are very usefull, but only converts a value in HEX to number.
    In my case, i need a routine that convert the bytes of value 50 (i.e. 2 bytes -> C1 33) into a number variable. If i only use hex to number, will return wrong value. I need to convert this bytes (C1 33) into original number, i mean, value 50.
    Using dump function for 50, will return C1 33...
    How can i make to convert C1 33 back to value 50??
    I think that is the same of the utl_raw.cast_to_number, but i'm using Oracle 8, and this function is in Oracle 9...
    Anyone have idea ??

  • How to make SAP standard field as mondatory in a screen

    hi all,
    i need to make SAP standard field as mondatory in a screens EG31, EG34,EG71
    TO DO THAT   I HAVE TO USE : EXIT_SAPLE30D_002 
    so can anybody tell me how that

    You can use standard program RSMODPRF.
    Execute this standard program without giving any input
    and select the data element whatever you want to make mandatory and click on Assign prog/screen button click OK and come back.
    now give required data element and execute the program again
    and write the code to make that datea element mondatory.
    hope it helps...

  • DateTime is stored as an int. How to convert to datetime format??

    According to the database, StartTime is stored as int: 471895438
    When Viewed in the software it comes out like this: 9/29/2010
    10:05:26 AM
    Any ideas on how to convert this using sql?
    -Tim

    I tried to play with some "reverse engineer" to get the convert value but I dont see the logic. since I dont find a pure date that fit the convert but maybe this will help:
    declare @I INT = 471895438
    declare @DT datetime = '20100929 10:05:26'
    select
    @DT
    ,DATEADD(MS, @I*(-1), @DT)
    ,DATEADD(SECOND, @I*(-1), @DT)
    --,DATEADD(MINUTE, @I*(-1), @DT) -- out of range
    (No column name) (No column name) (No column name)
    2010-09-29 10:05:26.000 2010-09-23 23:00:30.563 1995-10-16 16:01:28.000
    by those result I guess that it is in MINUTE or SECOND
    and according to those result i will need to guess that one of those convert may work for the OP:
    SELECT DATEADD(MILLISECOND, @I, '2010-09-23 23:00:30.563')
    SELECT DATEADD(SECOND, @I, '1995-10-16 16:01:28.000')
    * I tried to use datetime2 as well and check the result for microsecond and nanosecond but the solution was not better and look like 2010-09-29 10:05:25.5281046, 2010-09-29 09:57:34.1045620
    ** This is really strange if someone use a value like 2010-09-23 23:00:30.563 as a base time, and even the base value 1995-10-16 16:01:28.000 then it look strange! but maybe this is the time that the developer born or some other specific time that fits his
    needs :-)
    ** I used my birthday date (but never not a min time), several times in application that I developed as a base time :-)
    [Personal Site] [Blog] [Facebook]

  • How to convert the text field into currency field

    Hi,
    I have an requirement to converting the text field into currency.
    If I convert directly it gives dump.
    If I convert this to Numeric means it takes the decimals also as whole value.
    Is there any FM to convert the text field into Currency field.
    Please advice me.
    Thanks in advance.

    Hi,
    I am on an SRM sytem, which unfortunately does not have th FM: PSSV_TEXT_INTO_FIELD_CURRENCY.
    But I also need to transfer a string value like '12,99' to a field with type curr.
    Can i Do that manually, or is there another FM?
    I have already checked code with write to or pack/unpack.
    But without success yet.
    Something like this:
    DATA: g_str(11) type c.
    DATA: g_p type p.
    WRITE '12,99' TO g_str CURRENCY 'EUR'.
    is no use for me. Finally I need to move g_str to my curr-field, which causes st22.
    also: PACK g_str to <curr-field or g_p> dumps.
    Help appreciated.
    regards, matthias

  • How to convert varchar to BLOB in oracle 10g?

    Hi all,
    I have 2 columns A and B which are of varchar2(2000) dataype.
    I would like to concatinate these 2 columns and convert them into BLOB in oracle 10g.
    Any help is appreciated.
    Regards,
    Ravi

    don't use BLOB to store large text, use CLOB instead
    anyway:
    SQL> create table test
      2  (txt varchar2(10)
      3  ,other varchar2(10)
      4  );
    Table created.
    SQL>
    SQL> insert into test values ('some text', 'other text');
    1 row created.
    SQL>
    SQL> create table test2
      2  (col blob)
      3  /
    Table created.
    SQL>
    SQL> insert into test2
      2  select utl_raw.cast_to_raw (txt||other)
      3    from test
      4  /
    1 row created.
    SQL> select *
      2    from test2
      3  /
    SP2-0678: Column or attribute type can not be displayed by SQL*Plus
    SQL>
    SQL> select utl_raw.cast_to_varchar2(col)
      2    from test2
      3  /
    UTL_RAW.CAST_TO_VARCHAR2(COL)
    some textother text
    SQL>
    SQL> drop table test
      2  /
    Table dropped.
    SQL> drop table test2
      2  /
    Table dropped.

  • How to convert HTTP to HTTPS in Oracle Application Server 10g(10.1.3)

    Can you please suggest notes to convert HTTP to HTTPS in Oracle Application Server 10g(10.1.3) as we need this to integrate the custom apps with EBS(12.1.3)?
    Appreciate your quick response,
    RM

    For Oracle EBS R12, the docs provided above should be helpful. If you want to configure the application server with SSL (assuming you have 10gAS installed), please refer to Oracle AS10g documentation -- Secure Sockets Layer (SSL)
    Oracle Application Server 10g Release 3 Documentation
    http://www.oracle.com/technetwork/middleware/ias/documentation/index.html
    Secure Sockets Layer (SSL)
    http://download.oracle.com/docs/cd/B25221_04/core.1013/b25209/part4.htm#BEHBDFGD
    Thanks,
    Hussein

  • How to configure SAP 4.7 to Oracle 9i Real Application Cluster ?

    We are using SAP 4.7 running on Oracle 9i with HP-UNIX clustering.
    If we change our existing SAP 4.7 for Oracle 9i Real Application Cluster, is it very complicated ?
    Do we need to re-install SAP and Oracle ?

    Both 4.7 and Oracle 9 are already out of support.
    If you plan to use RAC then I'd first upgrade the application and the database and then implement RAC. You won't have support for your environment without additional costs.
    Markus

  • How to convert from Datetime to number?

    chg_date_time
    40265.492
    SELECT c.chg_date_time, TO_DATE('01011900','DDMMYYYY')+CHG_DATE_TIME FROM CHNGHIST C
    After execute:
    30/03/2010 11:48:29
    In the above query, we convert number to datetime.
    Now I want to convert from Datetime to number.
    i.e., 30/03/2010 11:48:29 = ? (40265.492)
    Thanks
    Nihar

    Hello,
    This would do it :SQL> select to_date('30/03/2010 11:48:29','dd/mm/yyyy hh24:mi:ss') - TO_DATE('01011900','DDMMYYYY') nmbr from dual;
          NMBR
    40265,492
    1 row selected.

  • Need help on how to create the simple mapping using ORACLE DATA INTEGRATOR

    Hi guys,
    am new to learn odi.. please share me or steps how to develop the simple mapping using ODI...

    Hi,
    I am a newbie to Oracle Data Integrator as well. You should have a look here first; http://www.business-intelligence-quotient.com/?p=379
    Try to play around with ODI and then come back if you have specific questions. You should better move to this ODI-forum; Data Integrator
    Good Luck,
    Daan Bakboord
    http://obibb.wordpress.com

  • How to convert Visiprise 4.2 DB dump data into SAP ME 5.2 dump data

    Hi,
    Currently i am working in two versions of SAP ME : (1.) Visiprise 4.2  and (2.) SAP ME 5.2 . I have many Oracle DB '.dmp' files for the Visiprise 4.2 version. I want all of them to be converted to the SAP ME 5.2 version. I analyzed the DB schema for both and found lots of changes like index , data type , size , even some columns and tables are added in SAP ME 5.2 . My Visiprise 4.2 instance uses Oracle 9i and SAP ME uses Oracle 11g but that is not a big problem to convert and load . Can anyone help how i can change the Visiprise 4.2 DB dump data compatible with SAP ME 5.2 data since there is lots of change in schema?

    Hi,
    You have to run all DB upgrade and data migration scripts available in 5.2 release to make your 4.2 DB compatible with ME 5.2. These scripts should contain all the DB structure and data changes. The scripts should be available in Clients installation. For detailed process check ME 5.2 Upgrade guide that should be available on SMP.
    Regards,
    Konstantin

  • How to convert sap script to pdf and send it as email attachment

    hi,
    my requirement is to convert a standard sales order form to pdf and send it as email attachment. get me some sample code for the same
    thanks in advance

    Hi
    See this sample code and after that use the fun module to send the mail
    SO_NEW_DOCUMENT_ATT_SEND_API1
    REPORT zzz_jaytest .
    Types Declaration
    TYPES : BEGIN OF ty_pa0001,
    pernr TYPE pa0001-pernr,
    bukrs TYPE pa0001-bukrs,
    werks TYPE pa0001-werks,
    END OF ty_pa0001.
    Internal Table Declaration
    DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
    i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
    i_content_txt TYPE soli_tab, "Content
    i_content_bin TYPE solix_tab, "Content
    i_objhead TYPE soli_tab,
    Work Area Declaration
    w_pa0001 TYPE ty_pa0001, "For pa0001 Details
    w_res TYPE itcpp, "SAPscript output
    "parameters
    w_otf TYPE itcoo, "For OTF
    w_pdf TYPE solisti1, "For PDF
    w_transfer_bin TYPE sx_boolean, "Content
    w_options TYPE itcpo, "SAPscript output
    "interface
    Variable Declaration
    v_len_in TYPE so_obj_len,
    v_size TYPE i.
    Constants Declaration
    CONSTANTS : c_x TYPE c VALUE 'X', "X
    c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
    c_otf TYPE sx_format VALUE 'OTF', "OTF
    c_pdf TYPE sx_format VALUE 'PDF', "PDF
    c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
    c_bin TYPE char10 VALUE 'BIN', "BIN
    c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
    "File Name
    c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
    START-OF-SELECTION.
    Selecting the records from pa0001
    SELECT pernr bukrs werks FROM pa0001
    INTO TABLE i_pa0001 UP TO 10 ROWS.
    Setting the options
    w_options-tdcopies = 1 ."Number of copies
    w_options-tdnoprev = c_x."No print preview
    w_options-tdgetotf = c_x."Return of OTF table
    w_options-tddest = c_locl."Spool: Output device
    Opening the form
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    form = c_form
    device = c_printer
    language = sy-langu
    OPTIONS = w_options
    IMPORTING
    RESULT = w_res.
    LOOP AT i_pa0001 INTO w_pa0001.
    Writting into the form
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    element = 'MAIN'
    window = 'MAIN'.
    ENDLOOP.
    Closing the form
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    RESULT = w_res
    TABLES
    otfdata = i_otf
    EXCEPTIONS
    unopened = 1
    bad_pageformat_for_print = 2
    send_error = 3
    spool_error = 4
    codepage = 5
    OTHERS = 6.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Converting OTF data to single line
    LOOP AT i_otf INTO w_otf.
    CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
    INTO w_pdf.
    APPEND w_pdf TO i_content_txt.
    ENDLOOP.
    Converting to PDF Format
    CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
    EXPORTING
    format_src = c_otf
    format_dst = c_pdf
    devtype = c_printer
    CHANGING
    transfer_bin = w_transfer_bin
    content_txt = i_content_txt
    content_bin = i_content_bin
    objhead = i_objhead
    len = v_len_in
    EXCEPTIONS
    err_conv_failed = 1
    OTHERS = 2.
    v_size = v_len_in.
    Downloading the PDF File
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    bin_filesize = v_size
    filename = c_name
    filetype = c_bin
    TABLES
    data_tab = i_content_bin.
    If you r using this function module check it once....
    call function 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    IMPORTING
    bin_filesize = v_len_in
    TABLES
    otf = i_otf
    lines = i_tline
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    others = 4.
    Fehlerhandling
    if sy-subrc <> 0.
    endif.
    or u can use the standard program RSTXPDFT4 to download the script into PDF format onto a particular location
    follow this link for sample program.
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci1121833,00.html
    check...
    How to send smart form via email
    /people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp
    Regards
    Anji

  • 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 install SAP 4.7/2000/Oracle

    Hi Friends,
    how to install the 4.7/oracle on windows 2000 server
    Please give me the steps
    Regards
    Satish

    Hi Satish,
    Good morning.
    Do you have access to http://service.sap.com/instguides
    regards
    Anand.M

  • How to convert a numeric field representing UNIX time to a standard report

    Looking for some help on the creation of a formula that will allow me to convert a numeric string which represent Unix time to a standard date format.
    Sample string value "1199149200", Jan 1 2008, 1 AM

    Hi,
    Use the DateAdd formula convert Unix epoch to normal datetime (Unix epoch = number of seconds that have elapsed since January 1, 1970).
    DateAdd("s", 1199149200, datetime("01/01/1970 00:00:00"))
    Cheers,
    Fritz

Maybe you are looking for

  • Help needed on Benefits in SAP.

    Hi Everyone , Where can i find the list and description of all Benefits plans maintained in system ? Where can i find out how each plan has been configured . i.e. whats plans use benefits module , what plans are just It0014 wage types for the deducti

  • Mass Upload doesn't work

    Hi everybody, i am trying to upload user photos via mass upload iview. Therefore i create a folder (c:\photos). In this folder i have two files a)  mapping.properties.txt with the line: Anton=1011 b) 1011.jpg I use the iView for Massupload from conte

  • Urgent please help - brocade zoning and changing WWN

    Hi all, we have had an issue with one of the devices on our SAN network, this means chaning the device, the engineer said we will need to change the name of the World wide name on the brocade to match. My question is, what is the WWN for? and do you

  • ID and passwords not accepted by remote server

    IDs and passwords for various site - mainly banks - seem not to be transmitted/recognised. The remote site screen returns to its original state before the data was entered with no explanation of why it didn't respond. I can successfully enter these s

  • Help calculating mailbox size

    Hi, What is the best way to calculate the maximum mailbox size I can give to my users? I know how to set their quotas but I don't know what I can set it to.  Is there a "maximum total of all mailboxes" size that is specified that I can divide by the