Parsing today's date into a String

How can I parse today's date into a String using this format: dd.mm.yyyy??? I taken a look at SimpleDateFormat, but I couldn't figure it out...
Herman Svensen

Hi Herman
this is copied from the api docs:
// Format the current time.
SimpleDateFormat formatter
     = new SimpleDateFormat ("yyyy.MM.dd G 'at' hh:mm:ss a zzz");
Date currentTime_1 = new Date();
String dateString = formatter.format(currentTime_1);
http://java.sun.com/j2se/1.3/docs/api/java/text/SimpleDateFormat.html
So what is the problem to figure out?

Similar Messages

  • Field Update workflow action - Updating today's date into a field

    Hello there.
    I was hoping someone might be able to help with an error currently being experienced with regards to this workflow action.
    The requirement is for a workflow rule to action the printing of today's date into a custom field on an Activity record. The workflow rule condition is (PRE('<Status>') <> 'Completed') AND ([<Status>] = 'Completed'). This appears to be working and triggering the action correctly.
    The custom field to be updated is of type 'Date'. The value being updated into this field is 'Today()'. Overwrite existing values is checked.
    The default value for the field is also 'Today()'. Thus the workflow action involves overwriting the default value (i.e. the date the record was created) to the current date when the Status is switched to completed.
    When the workflow is triggered the following error message occurs:
    "Unable to evaluate workflow rule for the following reason:
    Update [Custom field name] : The value '01/18/2008' cannot be converted to a date time value. (SBL-DAT-00359) (SBL-ODS-00500)"
    One odd observation is that this error only occurs when trying to update activities that were created on previous days - (it will not overwrite the default value of 15/01/2008 with 18/01/2008). The workflow does not return an error message when asked to overwrite a value which is equal to itself (i.e. if the default value was 18/01/2008, the workflow runs without error, although the value stays the same as you would expect.)
    Can anyone shed any light on this? One potential thought is that our CRM is set up so that all dates appear in a different format - i.e. dates appear as dd/mm/yyy, rather than mm/dd/yyyy. Could this be contributing to this issue?
    Any help very much appreciated indeed.
    Thanks,
    Kieran
    ps. The reason for doing all this is that 'Completed date' for an activity does not appear in reporting. This has been raised with Oracle and apparently an 'enhancement request' has been registered.

    Guys,
    using the following statement, it does display the current system time
    Mid(Timestamp(),4,2)+'-'+Mid(Timestamp(),1,2)+'-'+Mid(Timestamp(),7,4)+' '+Mid(Timestamp(),12,8)
    Now When i do this , it displays me a time which is 3 hours ahead
    Mid(Timestamp(),4,2)+'-'+Mid(Timestamp(),1,2)+'-'+Mid(Timestamp(),7,4)+' '+Mid(Timestamp() + (3.0/24.0),12,8)
    My problem is to now display the difference of the current time stamp and the the time which shows 3 hours ahead in one field
    Thats is substracting the first timestamp syntax fro mthe second timestamp syntax
    and ofcourse if I copy paste both the syntaxes and put a minus sign in between, it doesnt work
    Timestamdiff is not allowed in workflows or field validations :(
    Anyone has any ideas?
    Nick

  • Reading decimal data into a string

    Hi,
    I am having an issue in converting the non char data like decimal into character.  Here is my code In the output I see '#' signs where I am supoose to get certain amount values in the decimal format. I require it because I need to download the data into a file. Any thoughts?  Rest of the code looks fine. Thanks in advance,
    VG
    field-symbols: <fs_table> type standard table,
                   <fs_wa>,
                   <fs_string>.
         CREATE DATA v_dref Type table of (v_tabname).
          assign v_dref->* TO <fs_table>.
          select * from (v_tabname) into table <fs_table>.
          loop at <fs_table> assigning <fs_wa>.
              assign component sy-index of structure <fs_wa> to <fs_string> casting type c.
              if sy-subrc = 0.
                write:/ <fs_string>.
             else.
               write: <fs_string>.
              endif.
            endloop.
    output:   10000100000001019999123120090101                                        ############0001

    @-Clemens - I tried your code , some problems with decimals values , adds a * in front.
    @Vinu - Just some rough modification to the code written by Clemens
    PARAMETERS:p_table TYPE tabname.
    DATA:wf_maximum TYPE i,
         wf_total_fields TYPE i,
         wi_count TYPE i,
         wf_ltype TYPE c,
         wf_length TYPE i,
         wi_index TYPE i.
    DATA:i_comp TYPE cl_abap_structdescr=>component_table,
          wa_comp LIKE LINE OF i_comp,
         wa_fields TYPE abap_compdescr.
    DATA:lr_data TYPE REF TO data,
         lr_line TYPE REF TO data,
         wf_data_str TYPE REF TO data,
         wf_type_struct TYPE REF TO cl_abap_structdescr.
    FIELD-SYMBOLS:<fs_table> TYPE STANDARD TABLE,
    <fs_wa>     TYPE ANY,
    <fs_line> TYPE ANY,
    <fs_field_s> TYPE ANY.
    CREATE DATA lr_data TYPE TABLE OF (p_table).
    ASSIGN lr_data->* TO <fs_table>.
    CREATE DATA lr_line LIKE LINE OF <fs_table>.
    ASSIGN lr_line->* TO <fs_line>.
    SELECT * FROM (p_table) INTO TABLE <fs_table> UP TO 20 ROWS.
    CLEAR:wf_ltype,wi_count.
    DESCRIBE FIELD <fs_line> TYPE       wf_ltype
                               COMPONENTS wi_count.
    LOOP AT <fs_table> ASSIGNING <fs_wa>.
      AT FIRST.
        wf_maximum = 0.
        wf_total_fields = wi_count.
        WHILE wi_count GT 0.
          wi_index = sy-index.
          ASSIGN COMPONENT wi_index OF STRUCTURE <fs_wa> TO <fs_field_s>.
          IF sy-subrc EQ 0.
            DESCRIBE FIELD <fs_field_s> TYPE          wf_ltype
                                        OUTPUT-LENGTH wf_length.
            IF wf_maximum LT wf_length.
              wf_maximum = wf_length.
            ENDIF.
          ENDIF.
          wi_count = wi_count - 1.
        ENDWHILE.
        CLEAR:wa_comp,i_comp[].
        wa_comp-name = 'FIELD'(005).
        wa_comp-type ?= cl_abap_elemdescr=>get_c( wf_maximum ).
        APPEND wa_comp TO i_comp.
        TRY.
            wf_type_struct =
            cl_abap_structdescr=>create( p_components = i_comp ).
          CATCH cx_sy_struct_creation.
        ENDTRY.
        CREATE DATA: wf_data_str TYPE HANDLE wf_type_struct.
        ASSIGN:wf_data_str->* TO <fs_line>.
      ENDAT.
      DO.
        ASSIGN COMPONENT sy-index OF STRUCTURE <fs_wa> TO <fs_line>.
        IF sy-subrc = 0.
          WRITE <fs_line>.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
    ENDLOOP.

  • Parsing the respective data in the String which is dynamic

    Hi,
    I have customer application, in which we are handling the validation for customer details through a custom validator
    For example, if I have not entered the mandatory value for custFirstName.I will get an error message in my java class as below:-
    String errMsg = "Required value missing for CustomerVO.custFirstName"
    Here I need to parse the error message (ie) I need only the field and VO which causes this error hence i need "CustomerVO.custFirstName" only
    so that I can write the code to set the value for custFirstName
    Like
    if (mandatoryErrMsg){
    //parse the errorMsg and get the respective field with VO (ie)CustomerVO.custFirstName
    //and set the value
    CustomerVO customerVO = new CustomerVO();
    customerVO.setCustName("xxx");
    save(customerVO);
    Like wise i will get a different field with different VO
    Like :-
    String errMsg = "Required value missing for AddressVO.State"
    Here I need to write a generic method which parse the only the respective VO and field like in this case AddressVO.State.
    Since the VO and field can be anything. What is the min and max limit we need set for parsing and hoe we can parse only the
    respective VO and field. please provide your opinion on this.
    Thanks.

    Ram wrote:
    As per your previous post, it seems you need to parse only the last word of the error message. You can easily get the last word of the error message by using substring and lastIndex() methods.
    For example,
    String errMsg = "Required value missing for CustomerVO.custFirstName";
    String lastWord = errMsg.substring(errMsg.lastIndexOf(" ")+1);You will get "CustomerVO.custFirstName" as the value for lastWord. Now you can easily split the value String.split() method by "VO." as delimiter.
    lastWord.split("VO.");
    That's one possible approach. Without knowing more details about the forms the error message can take, we can't know if it will work in all cases. Which I pointed out in my first response, and which the OP chose to ignore when demanding we solve his problem for him in his reply.

  • Insert Today's Date  into query

    I created a query and want it to filter based on todays date. How do I automatically add todays date to the query so the user does not need to type it in?

    Yes you are right. You will need to use WHERE convert(varchar, T0.refdate, 103) = convert(varchar, getdate(), 103)
    This is because the getdate() is actually a datetime field and returns current date and current time so in the previous statement you are asking for journal fields where the posting date = todays date AND the exact time that the query is run which is never going to be true.
    If you just use getdate()-1 you will also get yesterdays' journals posted after this time yesterday.

  • Best way to put binary-data into string?

    Hi there!
    What I want to do is to transfer binary data via HTTP/GET so what I have to do is to transfer binary data into a string.
    Currently I do this the follwing way:
          byte[] rawSecData = new byte[4]; //any binary datas
          ByteArrayOutputStream secBOS = new ByteArrayOutputStream(4);
          DataOutputStream secDOS = new DataOutputStream(secBOS);
          for(int i=0; i < rawSecData.length; i++)
            secDOS.writeByte(rawSecData);
    secDOS.flush();
    String secData = secBOS.toString();
    System.err.println("Lenght of resulting String: "+secData.length());
    I know that this way already worked fine, however I now set up my system up again with another linux-distro and now strange things happen.
    e.g. the secData string differs in lenght from run-to-run between 2 and 4 and I don know at all why?
    Transferring the binary-stuff into string-stuff (e.g. short-binary 255 255, String: 65536) is not possible for me because of various reasons.
    The funny thing is that I remeber that this already worked some time ago and I can figure out why it now doesnt...
    Please help!

    First of all thanks a lot for your help!
    Yes, I already think its an encoding problem, but how can I specify the encoding in my application in a portable way. I dont have an idea what to do.
    My applikation should run as applet on many different 1.1+ VMS (msjvm, netscape-1.1.5, ...).
    Thanks again, lg Clemens

  • Insert data into a database table from a string

    Hi,
    I am need to insert data into a table from  the text file. I pull the data into an internal table using GUI_UPLoad. I read the data into an internal table and concatenate data into a string. I need to do this because the structure of the table is dynamic. it is used to upload a series of tables each with different structure, But the data is stored in the string v_tabledata.  How to do that.
    after uploading the data  from the textt file into a table
    oop at i_final.
       v_tabname = i_final-table_name.
      concatenate i_final-table_rec1 i_final-table_rec2 i_final-table_rec3
                  i_final-table_rec4 i_final-table_rec5 into v_tabledata.
    from  'v_table data'  i need to upload the data into a table and the structue of the table is known dynamically. Any thoughts using field symbols?
    Thanks,
    VG

    Let me see if I've understood your issue
    You have a file to be uploaded into an internal table but this file has many different layouts and then you don't know how to link these fields with the internal table...is it your issue?
    Then you've read the internal table, you've sent it to a string divided by space or something else and then are you trying to read this string to send it to a table?
    We could read the standard tables which maintain the program names, table names etc... (DD* tables, as the DD03L table) and then create some rules...
    We could create a parameter table to read your file/table dynamically...
    Please, try to rewrite in other words your problem...because there are a lot of ways to achieve your issue...
    Alexandre Mendes

  • How can I convert IDoc in XML format w/DTD into a string?

    I want to send by e-mail outbound IDoc in XML format with its document type definition (DTD).
    I want to be able to get the same output result into a string than the XML file IDoc port type with DTD activated.  I have created a FM (based on SAP "OWN_FUNCTION") assigned to an IDoc port of type ABAP-PI that executes the following processing steps:
    1-Extract outbound IDoc information to get the sender & recipient mail addresses (EDP13 / EDIPHONE tables).
    2-Convert & Transform IDoc data into XML string using FM IDX_IDOC_TO_XML.
    3-Prepare and send e-mail with XML attachement using FM SO_NEW_DOCUMENT_ATT_SEND_API1.
    I cand generate the e-mail with the XML file attachement but FM IDX_IDOC_TO_XML does not convert the IDoc with proper formating and DTD.
    What should I use to accomplish the IDoc conversion to XML w/DTD into a string?
    Should I use XSLT tools ?
    How does that work?
    Thank you
    Carl

    muks wrote:
    Use decimal string to number
    Specifically, you can define a constant with a different datatype on the input on the lower left if you need a different datatype (e.g. U8, I64, DBL, etc) Are all your values integers or do you also need to scan fractional numbers? In this case, you should use "fract/exp string to number" instead.
    LabVIEW Champion . Do more with less code and in less time .

  • Xml data into non-xml database.. solution anyone?

    Hi,
    My current project requires me to store the client's data on our servers. We're using Oracle9i. Daily, I will download the client's data for that day and load it into our database. My problem is that the data file is not a flat file so I can't use sql*loader to load the data. Instead, the data file is an xml file. What is the best way to load xml data into a non-xml database? Are there any tools similar to sql*Loader that will load xml data into non-xml database? Is it the best solution for the client to give me an XML dump of their data to load into our database, or should I request a flat file? My last resort would be to write some sort of a script to parse the xml data into a flat file, and then run it through sql*loader. Is this the best solution? One thing to note is that these files could be very large.
    Thanks in advance.
    -PV

    I assume that just putting the XML file into an
    extremely large VARCHAR field is not what you want.
    Instead, you want to extract data elements from the
    XML and write them to columns in a table in your
    database. Right?Yes. Your assumption is correct.
    It sounds like you already have a script that loads a
    flat file into your database. In that case I would
    write an XSL transformation that converts the client's
    XML into a correctly-formatted flat file.Thank you. I'll look into that. Other suggestions are welcome.

  • How can I use today's date as default value in query string filter web part in SharePoint

    I have a query string filter on my web part page. I am trying to figure out how I can set it's default value to Today? I can't find anything online...

    Hi,
    Per my understanding, you might want to set a default value to the Query String Filter Web Part.
    It would not be able to set default value to the Query String Filter Web Part with the OOTB features available.
    By default, with a Query String Filter Web Part in the current page, we can filter other web part in the same page by adding parameters and values in the address bar
    of browser.
    If setting the “Query String Parameter Name” of a Query String Filter Web Part as “t”, then we can filter the corresponding connected web part by inputting such an
    URL into the address bar:
    http://sharepoint/SitePages/Page1.aspx?t=value1
    Suppose you want to filter the list view with a value dynamically when user opens this page, as a workaround, we can generate an URL with the parameters needed when
    page loaded, then redirect user to this URL afterwards. This can be achieved using JavaScript.
    About how to redirect user to other page with an URL:
    http://www.tizag.com/javascriptT/javascriptredirect.php
    How to get today’s date using JavaScript:
    http://www.w3schools.com/js/js_dates.asp
    Best regards      
    Patrick Liang
    TechNet Community Support

  • How to put a String(date) into Date (java.util.date)??

    hi there
    I got a GUI here and I need to read some JMaskedTextFields from it. I put them all into Strings. Now I need to pass them to the search-function, but one of the search arguments is not string. Its Date. I tried to initialize Date with Date(String s) but he doesnt take it. Now Im asking how can I do this the easiest way?
    The String has only digits and a . betwenn them, like this: 12.02.1978 and I want to pass this into the Date.
    thx for helping :-)

    thx
    Now I got it so far, it looks like this:
    String datumVon = suchen_kriterien_datVon_JMaTextFeld.getText();
    String datumBis = suchen_kriterien_datBis_JMaTextFeld.getText();
    SimpleDateFormat formatter = new SimpleDateFormat ("dd.MM.yyyy");
    ParsePosition pos = new ParsePosition(0);
    Date datVon = formatter.parse(datumVon, pos);
    Date datBis = formatter.parse(datumBis, pos);
    System.out.println(datVon);
    System.out.println(datBis);
    The Problem is that he only makes the first print when both dates are given. If I only give him the first, so he prints the first. If I give him only the scond, so he prints the second. But when I give him both, he only prints the first!!! why?

  • How to parse xml data into java component

    hi
    everybody.
    i am new with XML, and i am trying to parse xml data into a java application.
    can anybody guide me how to do it.
    the following is my file.
    //MyLogin.java
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    class MyLogin extends JFrame implements ActionListener
         JFrame loginframe;
         JLabel labelname;
         JLabel labelpassword;
         JTextField textname;
         JPasswordField textpassword;
         JButton okbutton;
         String name = "";
         FileOutputStream out;
         PrintStream p;
         Date date;
         GregorianCalendar gcal;
         GridBagLayout gl;
         GridBagConstraints gbc;
         public MyLogin()
              loginframe = new JFrame("Login");
              gl = new GridBagLayout();
              gbc = new GridBagConstraints();
              labelname = new JLabel("User");
              labelpassword = new JLabel("Password");
              textname = new JTextField("",9);
              textpassword = new JPasswordField(5);
              okbutton = new JButton("OK");
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 1;
              gbc.gridy = 5;
              gl.setConstraints(labelname,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 2;
              gbc.gridy = 5;
              gl.setConstraints(textname,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 1;
              gbc.gridy = 10;
              gl.setConstraints(labelpassword,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 2;
              gbc.gridy = 10;
              gl.setConstraints(textpassword,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 1;
              gbc.gridy = 15;
              gl.setConstraints(okbutton,gbc);
              Container contentpane = getContentPane();
              loginframe.setContentPane(contentpane);
              contentpane.setLayout(gl);
              contentpane.add(labelname);
              contentpane.add(labelpassword);
              contentpane.add(textname);
              contentpane.add(textpassword);
              contentpane.add(okbutton);
              okbutton.addActionListener(this);
              loginframe.setSize(300,300);
              loginframe.setVisible(true);
         public static void main(String a[])
              new MyLogin();
         public void reset()
              textname.setText("");
              textpassword.setText("");
         public void run()
              try
                   String text = textname.getText();
                   String blank="";
                   if(text.equals(blank))
                      System.out.println("First Enter a UserName");
                   else
                        if(text != blank)
                             date = new Date();
                             gcal = new GregorianCalendar();
                             gcal.setTime(date);
                             out = new FileOutputStream("log.txt",true);
                             p = new PrintStream( out );
                             name = textname.getText();
                             String entry = "UserName:- " + name + " Logged in:- " + gcal.get(Calendar.HOUR) + ":" + gcal.get(Calendar.MINUTE) + " Date:- " + gcal.get(Calendar.DATE) + "/" + gcal.get(Calendar.MONTH) + "/" + gcal.get(Calendar.YEAR);
                             p.println(entry);
                             System.out.println("Record Saved");
                             reset();
                             p.close();
              catch (IOException e)
                   System.err.println("Error writing to file");
         public void actionPerformed(ActionEvent ae)
              String str = ae.getActionCommand();
              if(str.equals("OK"))
                   run();
                   //loginframe.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    }

    hi, thanks for ur reply.
    i visited that url, i was able to know much about xml.
    so now my requirement is DOM.
    but i dont know how to code in my existing file.
    means i want to know what to link all my textfield to xml file.
    can u please help me out. i am confused.
    waiting for ur reply

  • How to parse whole xml elements into a java String

    hello everybody,
    I am trying to parse whole xml into a string for example
    my xml file is as below:
    <root>
        <element>
           <data id="1">1</data>
        </element>
        <element>
           <data id="2">2</data>
        </element>
    </root>
    in java whole data should be transfered as
    String xmlString ="<root><element><data id=\"1\">1</data></element><element><data id=\"2\">2</data></element></root>";or in a simple way can xml be copied into a string? any assistance ...
    thanQ in Advance.
    Han.

    This code is to convert xml document to a string.
                             try {
                                  javax.xml.transform.TransformerFactory tfactory = TransformerFactory.newInstance();
                                  javax.xml.transform.Transformer xform = tfactory.newTransformer();
                                  javax.xml.transform.Source src = new DOMSource(xmlString);
                                  java.io.StringWriter writer = new StringWriter();
                                  StreamResult result = new javax.xml.transform.stream.StreamResult(writer);
                                  xform.transform(src, result);
                                  //System.out.println(writer.toString());          
                             } catch (TransformerConfigurationException e) {
                                  e.printStackTrace();
                             }catch(Exception ex )
                                  ex.printStackTrace();
                             }

  • Optimize a data parser that converts CLOB into table

    I am importing complex array data from Cold Fusion into ORACLE using a stored procedure. What I've done is convert the data into a CLOB, pass it into ORACLE, then parse it into a temporary table using a pipelined function. Unfortunately the array is large (16k rows) and it's taking a while to run.
    What I'm looking is a better optimization for the data conversion. I've tried XML and the dbms_xmlstore but it was too slow. I am on 10g and don't have access to the log files or even the ability to trace anything. All I can do is look for better ways to do things and then try them.
    Any suggestions or help to improve things would be welcome.
    Warren Koch
    The function converts the array of object into a custom delimited CLOB ( ; betwen values, | between rows) that looks like this:
    prop1;prop2;prop3|prop1;prop2;prop3|prop1;prop2;prop3|prop1;prop2;prop3|
    Here is the code I created.
    CREATE OR REPLACE TYPE THE_IMAGE_TYPE AS OBJECT
    IMAGE_NAME VARCHAR2(100),
    IMAGE_SIZE INTEGER,
    IMAGE_LOC INTEGER
    CREATE OR REPLACE TYPE THE_IMAGE_TABLE AS TABLE OF THE_IMAGE_TYPE
    CREATE GLOBAL TEMPORARY TABLE IMAGE_IMPORT
    image_name VARCHAR2(25 BYTE),
    loc NUMBER(11),
    image_size NUMBER(11)
    ON COMMIT PRESERVE ROWS
    NOCACHE;
    FUNCTION convert_image_data(
         in_image_clob IN CLOB
         RETURN the_image_table PIPELINED
    AS
         image_clob CLOB := in_image_clob;
         image_delim_index PLS_INTEGER;
         image_index PLS_INTEGER := 1;
         row_string VARCHAR2(1000);
         out_rec THE_image_type;
    BEGIN
         out_rec := the_image_type(NULL, NULL, NULL);
         IF SUBSTR(in_image_clob, -1, 1) != '|'
         THEN
              image_clob := image_clob || '|';
         END IF;
         image_delim_index := INSTR(image_clob, '|', image_index);
         WHILE image_delim_index > 0
         LOOP
              row_string := SUBSTR(image_clob, image_index, image_delim_index - image_index);
              row_string := REPLACE(row_string || '::::', ':', ' :');
              out_rec.image_name := SUBSTR(TRIM(REGEXP_SUBSTR(row_string, '[^:]+', 1, 1)), 1, 25);
              out_rec.image_loc := make_number(REGEXP_SUBSTR(row_string, '[^:]+', 1, 2));
              out_rec.image_size := make_number(REGEXP_SUBSTR(row_string, '[^:]+', 1, 3));
              PIPE ROW(out_rec);
              image_index := image_delim_index + 1;
              image_delim_index := INSTR(image_clob, '|', image_index);
         END LOOP;
         RETURN;
    EXCEPTION
         WHEN OTHERS
         THEN
              RAISE;
    END;
    Used in my code like this:
    EXECUTE IMMEDIATE 'TRUNCATE TABLE image_import';
    FOR x IN (SELECT * FROM TABLE(convert_image_data(in_imagelist))
    WHERE image_name IS NOT NULL)
    LOOP
    INSERT INTO image_import (image_name, loc, image_size)
                   VALUES (x.image_name, x.image_loc, x.image_size);
    END LOOP;

    Is there any chance you can just use 1 SQL statement here? I gave it a shot based on the string you posted, not by trying to reverse engineer your code so it's possible i got it entirely wrong :)
    select
        regexp_substr(image_row, '[^;]+', 1, 1) as image_name,
        regexp_substr(image_row, '[^;]+', 1, 2) as image_size,
        regexp_substr(image_row, '[^;]+', 1, 3) as image_loc   
    from
       select
           regexp_substr(the_data, '[^|]+', 1, level) as image_row
       from
          select
             'prop1;prop2;prop3|prop4;prop5;prop6|propa;propb;propc|propd;prope;propf|' as the_data
          from dual
       connect by level <= length (regexp_replace(the_data, '[^|]+'))  + 1
    17  where image_row is not null;
    IMAGE_NAME                     IMAGE_SIZE                     IMAGE_LOC
    prop1                          prop2                          prop3
    prop4                          prop5                          prop6
    propa                          propb                          propc
    propd                          prope                          propf
    4 rows selected.
    Elapsed: 00:00:00.00

  • Reading any value from table into a string (Especially date etc..)

    How would I read any value from a table into a string?
    Currently doing the following...
    data ret_val type string.
    select single (wa_map-qes_field) from z_qekko into ret_val
    where
    angnr = _angnr.
    When the source field is a date it bombs though.
    The result goes into a BDCDATA-fval.
    regards
    Dylan.

    Tried...
    1    DATA: lp_data TYPE REF TO DATA.
    2    FIELD-SYMBOLS: <value> TYPE ANY.
    3    CREATE DATA lp_data LIKE (wa_map-qes_field).
    4    ASSIGN lp_data->* TO <value>.
    5    SELECT SINGLE (wa_map-qes_field) FROM zquadrem_qekko INTO <value> WHERE angnr = _angnr.
    Complains that (wa_map-qes_field) is not defined in line 3.
    Think that the bracket thing is only available via SQL.
    What about CREATE DATA lp_data type ref to object. ?
    Would the above declaration work?
    regards

Maybe you are looking for