How to convert date which is coming from a file

Hi All,
I am reading the content from the file in which date is also one field, but i am while inserting into the database i'm getting an exception because it is not able
to insert into the database because the database date format is different from the one which is coming from a file.
The datatype value of the database is Date.
Can anyone help me on this if anybody having an idea.
Regards,
CH

Hi,
Even if I'm using JavaEmbeddedActivity also i'm getting an error. Please have alook at the below code once
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
public class ConvertDateToStringExample {
public static void main(String args[]){
DateFormat dateFormat = new SimpleDateFormat("dd-nn-yyyy hh:mm:ss");
//to convert Date to String, use format method of SimpleDateFormat class.
String strDate = dateFormat.format(getVariableData('inputVariable','payload','/client:process/client:Date'));
System.out.println("Date converted to String: " + strDate);
Error Message:
Error(21,33): Failed to compile bpel generated classes.
failure to compile the generated BPEL classes for BPEL process "DateProcess" of composite "default/DateProcess!1.0"
The class path setting is incorrect.
Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
Well it's not at all allowing me to insert the format while passing the input arguments.
Regards,
CH

Similar Messages

  • How to read data which is coming to IP

    Hi,
    I'm building an application that needs to read data which is coming from GPRS modem and reply to the same after some action.
    Through Mobile GPRS i'm sending data to our website IP. Here i need to receive that data. How can i do this..?
    Please any one help..

    YogishGS wrote:
    Through Mobile GPRS i'm sending data to our website IP. Here i need to receive that data. How can i do this..?Seems like a basic networking question.
    [java socket tutorial|http://java.sun.com/docs/books/tutorial/networking/sockets/]

  • How to know date and time information from Trace File defaultTrace.X.trc?

    Hi, all.
      i'm using EP 6.0 SP9 patch 1.
      As you know, default trace is written in the <SID>\JC00\j2ee\cluster\server0\log\defaultTrace.X.trc.
      By using the default trace formatter, it shows like the following sample messages.
    #1.5#0011110E7B2000590000000100000A100003EC71562E6EBC#1104396451585#com.sap.jms.server.ServerClientAdapter##com.sap.jms.server.ServerClientAdapter#Guest#18####716257115a3f11d9b73b0011110e7b20#SAPEngine_Application_Thread[impl:3]_23##0#0#Error#1#/Applications/JMS#Plain###JMS internal error at ServerClientAdapter! JMS Service is not started!#
      My questions are
      1. how do we retrieve the date and time information from the above message? It seems that this message has date and time info because LogViewer shows the date and time based on the above message.
      2. how do we change the above date format to easier one
    like "YYYY:MM:DD:hh:mm:ss"? i know that it can be configured from the Visual Admin --> Services --> Log Configurator but i don't know the exact place for the trace file.
      Thanks.

    Hi Sejoon,
    I use the standalone Logviewer to read the log files. Works great.
    "If you have an SAP Web Application Server Java 6.20 or below you may also get a standalone_logviewer.zip file at the SAP Service Marketplace at service.sap.com/download &#8594; SAP NetWeaver &#8594; Release ‘04. In this case JDK version 1.3 or higher must be installed on the system. The java version must be same on the server and the client.
    In the SAP Web AS Java 6.30 installation a folder named logviewer_standalone can be found under: <path Of J2EE installation>/<SysID>/JC<nr>/j2ee/admin/logviewer_standalone. Verify that the batch file logviewer.bat is installed in the directory logviewer-standalone.
    (source -> http://help.sap.com/saphelp_nw04/helpdata/en/e4/540c404a435509e10000000a1550b0/frameset.htm)
    Best wishes,
    Noel

  • Need help with how to store data in array in from reading file

    i have a file named xxx.txt
    i need to retreive data from that file. the data that i want to retrieve is enclosed with << >>
    temp xxx-123 ccc << 90.5>>
    haha xxx-563 sss 85.2
    after a few lines, the another record appear.
    temp2 xxx-123 ccc << 190.5>>
    haha2 xxx-563 sss 885.2
    i would like to record down the data, 90.5 & 190.5, how do i go about doing so, will appreciated it if someone would guide me along. thanks

    After you have read a line from the file either
    find the location of << and >> and substring the stuff in between or
    use regex (regular expression) however this is advanced and may be beyond your level of understanding.

  • How to read data in correct format from EXCEL file into an internal table??

    Hi Experts,
    My requirement is to upload data from an excel file on presentation server into an internal table on <b>SRM</b> server.
    I used 'GUI_UPLOAD' function module to achieve the same but all the the data is getting uploaded in # only.I had set in the 'HAS_FIELD_SEPARATOR' to 'X' to overcome this problem.
    But all the efforts are in vain. The function module 'ALSM_EXCEL_TO_INTERNAL_TABLE' doesn't exist on SRM Server and I am not getting any other function module having similar functionality available on SRM server.
    I have written the following code:-
    TYPES: BEGIN OF ty_addr_loc,
             userid    TYPE xubname,      "User Id
             addr_code TYPE char4,        "3 Digit Site Location Code/4 Digit
                                                       "Alternate Address
             loc_id    TYPE bbp_location, "Indicator: Address is standard address
            END OF ty_addr_loc.
    *Retrieving file name
    parameters: p_file type rlgrap-filename.
      DATA:
        Local variable holding file name
          l_file TYPE string,
        Local Variable holding the file type,
          l_type TYPE filetype VALUE 'ASC',
        Local Variable holding the field separator
          l_sep  TYPE char01,
          i_tab type standard table of ty_addr_loc.
    Clearing local variables
      CLEAR:
            l_file,
            l_sep.
    Initializing the local variables
      MOVE p_file TO l_file.
      l_sep = 'X'.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = l_file
          filetype                      = l_type
          has_field_separator           = l_sep
       HEADER_LENGTH                 = 0
       READ_BY_LINE                  = 'X'
       DAT_MODE                      = ' '
       CODEPAGE                      = ' '
       IGNORE_CERR                   = ABAP_TRUE
       REPLACEMENT                   = '#'
       CHECK_BOM                     = ' '
       VIRUS_SCAN_PROFILE            =
       NO_AUTH_CHECK                 = ' '
    IMPORTING
       FILELENGTH                    =
       HEADER                        =
        TABLES
          data_tab                     = i_tab
       EXCEPTIONS
         file_open_error               = 1
         file_read_error               = 2
         no_batch                      = 3
         gui_refuse_filetransfer       = 4
         invalid_type                  = 5
         no_authority                  = 6
         unknown_error                 = 7
         bad_data_format               = 8
         header_not_allowed            = 9
         separator_not_allowed         = 10
         header_too_long               = 11
         unknown_dp_error              = 12
         access_denied                 = 13
         dp_out_of_memory              = 14
         disk_full                     = 15
         dp_timeout                    = 16
         OTHERS                        = 17
      IF sy-subrc <> 0.
      Throwing an information message
        MESSAGE i003. "Data Upload Failed
        LEAVE LIST-PROCESSING.
      ENDIF.
    Please tell me a way out. I have to make a delivery urgently.
    Thanks in advance,
    Swati Gupta

    Hi
    Try the FM <b>KCD_EXCEL_OLE_TO_INT_CONVERT</b>
    Sample:
      call function 'KCD_EXCEL_OLE_TO_INT_CONVERT'
           exporting
                filename                = i_filename
                i_begin_col             = l_begin_col
                i_begin_row             = l_begin_row
                i_end_col               = l_end_col
                i_end_row               = l_end_row
           tables
                intern                  = xt_intern
           exceptions
                INCONSISTENT_PARAMETERS = 201
                UPLOAD_OLE              = 201.
      if sy-subrc <> 0.
        e_subrc = sy-subrc.
        exit.
      endif.
    <b>reward if Helpful.</b>

  • How to display data in combo box from xml file.

    Hi All,
            I have the data in xml file.
      <jukebox>
        <song>
            <title>When the Levee Breaks</title>
            <artist>Kansas Joe and Memphis Minnie</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
        <song>
            <title>Better Leave that Stuff Alone</title>
            <artist>Will Shade</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
        <song>
            <title>Walk Right In</title>
            <artist>Cannon's Jug Stompers</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
    </jukebox>
    and i want to display the only url in combo box list. for that how can load this xml file and how can i show.
    Can any one help me.
    thanks
    Raghu.

    Raghuvasa,
    Get the XML file data into an XML variable in your code, say var jukebox: xml. Then do
    combo.dataProvider = jukebox.song.url
    or as a shortcut
    combo.dataProvider = jukebox.descendants("url")
    The latter will pull out elements with tag name url at any depth in the xml structure, so sometimes you have to be careful, but in your case there should be no problem.
    Richard

  • Insert data into oracle table from XML file

    I need to insert data into oracle table from XML file
    If anybody handled this type of scenario, Please let me know how to insert data into oracle table from XML file
    Thanks in advance

    The XML DB forum provides the best support for XML topics related to Oracle.
    Here's the FAQ on that forum:
    XML DB FAQ
    where there are plenty of examples of shredding XML into Oracle tables and such like. ;)

  • How to Convert Date to Month in Database which is pointing to EBS, Not DWH.

    Hi Friends,
    We are planning to create reports in OBIEE and the Source is EBS. That means, we don’t want to depends on Datawarehouse and Informatica and OBIApps. We just create some reports and they are pointing to EBS database.
    For testing purpose, we have taken one HR Report and it containsthe below columns:
    Month (Dim)
    Revenue Per Employee Headcount (Fact)
    Average Cost per Active Workforce Headcount (Fact)
    In my little investigation, we found that Revenue column is coming from EBS: GL_BALANCES. And we configured W_Day_D base table in DAC as there is no Month column in EBS (Not sure).
    *** Coming to my problem, how can I call Month column in my database pointed to EBS. How to convert Date to Month in my database.
    I could be wrong but anyone please look into this issue.. How can I create columns for that exact OBI report in EBS database instead of DwH.
    Thanks in Advance..
    Raghu Nagadasari

    Hi Veeresh,
    You are right. Here, no need of using W_DAY_D table, but, we need all the stuff from the table and to explain my problem i have taken that table as an example. Now, we ran scripts for W_MONTH_D and W_DAY_D tables with EBS columns. So, we are getting data for the tables. In the same manner we have to create scripts for the below tables.
    W_GL_ACCOUNT_D
    W_GL_OTHER_F
    W_STATUS_D
    W_MCAL_DAY_D
    W_EMPLOYMENT_STAT_CAT_D
    W_WRKFC_BAL_A
    W_DAY_D (Completed)
    W_MONTH_D (Completed)
    But, we are not aware of EBS Tables and their columns much. So, we are back tracing from RpD --> DAC --> Info --> EBS for each and every column and its taking much time.
    So, if anyone of you facing the same issue, please share the EBS tables for the corresponding OBI tables, which are mentioned above.

  • How to change the column value which is coming from DO by a calculated field?

    Hi all,
    I want to change a column value based on my calculated field value. I have a column which is coming from DO which is based on External Data Source. I have a calculated field in my report. When there is any change in the calculated field then the column which is coming from DO needs to be changed. It means the DO needs to get updated when there is a change in the calculated field. Or like if the calculated field meets some condition then I need to change/update the same in the DO. This has to be done on the fly. the report should not submitted for this. when there is a change in the calculated column the DO column needs to get updated.
    Thanks,
    Venky.

    Ok, I've been a customer for very many years, I'm on a fixed retirement
    income.  I need to reduce my bills, my contract ends in  Dec. I will be
    pursuing other options unless I can get some concessions from Verizon.  My
    future son-in-law was given this loyalty plan, so I know this is a
    reasonable request.  My phone number is (removed)  acct number
    (removed)
    >> Personal information removed to comply with the Verizon Wireless Terms of Service <<
    Edited by:  Verizon Moderator

  • How to remove the buttons which are coming from a report?

    Hi All,
    I need to remove the buttons from an iview which is a sap transaction. when i execute the  report program which uses a ldb (PCH) shows a selection screen having all the buttons.
    We have created variants for this.Now i want to remove the buttons which are coming from the report program.how to do this ?
    Lakshmi.

    Hi,
    I think u r mentioning about the addition buttons that appear in the selection screen when using a logical database. for removing these buttons u can use a function module RS_SET_SELSCREEN_STATUS  for setting ur own pf-status
    do this in "at selection screen output" of the program..
    in the tables parameter, u have the option for giving the ok-codes that u want to remove. append all the ok-codes into this table.
    for getting the ok-codes u can use "tab" and go the button.. press F1. it will give the ok-code.
    Regards,
    Anoop

  • How to convert date from ccyymm format to mmddyy

    hi,
    How to convert date from ccyymm format to mmddyy

    Please don't multipost. This question has been answered in your first post.
    How to convert date to ccyymm format
    Regards,
    Jo

  • How to update dunning data coming from a file to data base

    Hi,
    we have a requirement wherein we are getting the dunning level, dunning date and reason code data for  customer accounts from a file and they have to be updated in the customer master data (knb5 table) and document level (bseg-rstgr).
    If anyone knows about any function modules or bapi which can fulfill this requirement please let us know asap.
    Thanks,
    Simmi

    CSFGF wrote:
    Hi ,
    I want to store the data into text file,which is coming from visa-read.
    I tried visa read to file ,but it's not working.
     Am new to labview plz help me out.
    Thanks in advance. 
     Share the code you have so far with us so that we can check what's going wrong.

  • Sharepoint List to Telerik Grid, Where data is not coming from database into List.

    SharePoint List to Telerik Grid, Where data is not coming from database into List.
    Here, i have a SharePoint list , where configurable text are stored, using some utility.
    I want to convert that SharePoint list into Telerik grid, with all Editable Option which i have in SharePoint.

    I know little about Telerik Grid, only find following article about Telerik integrate with SharePoint:
    http://www.telerik.com/help/aspnet-ajax/moss-spradlistview_designer_general.html
    a similar question:
    http://www.telerik.com/forums/how-to-bind-to-a-sharepoint-list-using-radgrid
    Thanks,
    Qiao Wei

  • How to Convert Date (DD.MM.YYYY) to be just DD

    Hi experts,
    I have no idea how to convert Date format (DDMMYYYY) to be just DD.
    Example:
    I have date: 31.10.2009
    now i just want to show in report as 31.
    I just known if we just want to show month only, we could use the 0CALMONTH2. but how if i need the day only?
    Are there any way, either in query (BEx) or modeling (Routine/Formula in Update Rules or Transfer Rules) which could fulfill the requirement?
    Many thanks..
    Warm Regards,
    Tika

    Hi,
    go through the link below and modify according to your requirement
    Date conversion from YYYYMMDD to DD.MM.YYYY
    Regards,
    Marasa.

  • HOW TO CONVERT DATE INTO NUMBERS

    HI,
    what the syntax for converting date into No. Ex from the first date of the month till current date how many days are there, this No of days needs to be divided by the net sale of the month.
    i have searched in formulas fields but i am not able to find such option...
    please help.
    Thanking you,
    UMAR NAYAB.

    Hi,
    Stratos and Sastry
    the formula given by you shows the variation for the current month of suppose 30 days
    but if the month is of 31 days or 28 days (feb) how will the system will able to generate the report accordingly.
    i want to make a report in which it should show the net sales by the current month and current date.
    so the system should automated by the number of days in a month.
    thanking you..
    UMAR NAYAB.

Maybe you are looking for

  • Mid-2010 Macbook Pro Randomly goes back to login screen?

    My mid-2010 MBP will randomly log me out.  I'll be on the internet or working on a paper and it will go to the blue screen that occurs when you're booting up the computer and then to my login screen, where I have to type in my username and password a

  • Itunes installed, wouldn't restart properly, and now won't open at all.

    I updated ITunes today (I have Vista) and it seemed to download fine.  When I restarted my computer to finish the install, my computer would not reboot.  I had to sut-it down manually.  I had to go back-up and restore my computer to get it to boot up

  • Error in protocol iview in EP6 SP6 Patch4

    Hi Community, we have installed the following portal version: Portal Version Details #Mon Aug 02 20:24:54 CEST 2004 Creation-Date=20040802 Creation-Time=1802 Manifest-Version=1.0 Implementation-Title=Portal version.info JDK-Version=1.3.1 Creation-Use

  • Compounding using previous row values

    Greetings! Im trying to write SQL in Oracle 10.2.0.4. I have no success using OVER , PARTITION analytic functions. Can someone help with this requirement.. Data : with t as (select 1 AS Calc_Seq, 700 as erncd, 0.05 as pct, 22 Hrly from dual union all

  • Powerpoint 98 Viewer for default?

    When I receive a .pps attachment, I click on it and a message comes up, giving choices and I click on 'Chose Application'. Microsoft 98 Power Point Viewer is an option I click on. OS9 Classic starts up (which takes 30 or 40 sectonds) and then Power P