How to manage Long field data Instead of  Substr..............

Hi,
I have one long column and need to check the existence of perticular key word in all records. So I used below
function. Sometimes the length is more than 4000 bytes so i want to check string from 4000 bytes to 8000 bytes etc . till end of the string . result of string Passing to the Sbstr function. Anbody can help me to read the long data column value above 4000 bytes to 8000 etc.
I tried like DBMS_SQL.COLUMN_VALUE_LONG(V_cursor,4000 , 8000, 3, l_buffer, l_buffer_len ); its returning null.???
FUNCTION Get_string(--)
Begin
DBMS_SQL.PARSE( V_cursor, V_Qry, dbms_sql.native );
DBMS_SQL.DEFINE_COLUMN_LONG(V_cursor, 1);
IF (DBMS_SQL.EXECUTE_AND_FETCH(V_cursor) > 0) THEN
DBMS_SQL.COLUMN_VALUE_LONG(V_cursor, 1 , 4000, 3, l_buffer, l_buffer_len );
IF L_Buffer IS NOT NULL THEN
L_Buffer := REPLACE(l_buffer, ' ', NULL);
END IF;
END IF;
DBMS_SQL.CLOSE_CURSOR(V_cursor);
RETURN l_buffer;
End;
Regards
Bijesh K

Knowing that TEXT column of all_views is of a LONG type, you can manage to query when doing sth like
SQL>  SELECT view_name
  FROM (SELECT view_name,
               EXTRACTVALUE (
                  dbms_xmlgen.getxmltype ('select text from all_views where owner = '''
                     || owner || ''' and view_name =''' || view_name || ''''), '//text()') text
          FROM all_views
         WHERE owner = 'SYS' AND ROWNUM <= 10)
WHERE LOWER (text) LIKE '%apply_database_link%'
VIEW_NAME                    
ALL_APPLY                    
ALL_APPLY_CONFLICT_COLUMNS   
ALL_APPLY_DML_HANDLERS       
ALL_APPLY_KEY_COLUMNS        
4 rows selected.Hope you get the idea ....

Similar Messages

  • 8i+WebDB HELP:How to make longer fields for "News items"

    8i+WebDB
    How do I create longer fields for my "News items"?
    If I try to publish long sized News I receive an Error:
    "Ora-02005: Implisit(-1) Length not valid for this bind or define
    data type". I HAVE chosen "long field" settings in the DB
    (8.1.5.0.0)
    Are there any parameter settings in WebDB to allow longer
    fields??
    PLEASE HELP!!
    null

    Hi, Lu:
    If I understand your question correctly, you want to modify the FSG of recociliation account of Vendor/Customer to make sure Cost Center/WBS field display in transaction F-22/F-43 for example, right?
    I am not sure whether it is possible, I also tried in ECC6.0 but failed to show these two fields. And I think that doesn't make sense to assign CO object to AP/AR reconciliation account, but assign it to Revenue/Expense account in following line items.
    And You can use New General Ledger functionality Document Splitting to derive corresponding CO object information to Reconciliation Account line item, but it is enabled only in General Ledger level, not in subledger level.
    If you find any other meaningful solution, please also share with us.
    Thanks & BR, Lawrence

  • How to update flex field data on a human task?

    After entering a human task and assigning the data how do you then update flex field data whilst the task is still assigned. I'm using the task services to communicate with the task and applying filters based on the flex field data.
    I want to update the data when actions take place on the task e.g. suspend, aquire, release.
    Any ideas?

    You can fetch the task , change the flex attribute value and update the task. Find below the steps we do for updating one of the TextAttribute
    Task completeTask =  // get the task using task query service
    completeTask.getSystemMessageAttributes().setTextAttribute2(updatedfolderName);
    completeTask = // update the task using "updateTask" method

  • How to handle multiple fields data

    Hi All,
    My data is :
    FldName           FldTypeCode          Text
    Sandya            02                         nothing
    Raj                 01                         12/Oct/2008
    Lokesh            03                          12546
    Harish             04                          12565.35
    King                01                          12/Nov/2007
    Cobra              02                          texttype In the UI I have give with refcursor all three fields data. now from UI to DB he is passing all values to update at a time.
    Q) Now My question is How to update all the values.
    Eg: Create procedure procdname (ip_allvalues in typerecord)
    is
    begin
    --statements;
    end;
    the above procedure input parameter can handle all three fields data when they pass,
    1) If the parameter handles, which type i need to create ?
    2) How i need to update multiple records at a time?
    Please can any body...
    Thanks in advance..

    sanjuv wrote:
    In the UI I have give with refcursor all three fields data. now from UI to DB he is passing all values to update at a time.
    Q) Now My question is How to update all the values.With an update statement. Identify the row with a where condition and then set the new values. That's one of the first reasons why primary keys are used.
    1) If the parameter handles, which type i need to create ?
    2) How i need to update multiple records at a time? If you don't explain how you User Interface is designed to work nobody can tell you anything about it. Anyway for such things there is no need to define any type.
    Usually the application should submit an update command(like the following one) for each row to update.
    update <table_name>
         set field_1= <value1>,
              field_2= <value2>
              field_n= <valuen>
    where <primary key column> = <primary key value of the row to update>Bye Alessandro
    Edited by: Alessandro Rossi on 6-ott-2008 16.37

  • How to reference LONG field in trigger

    I am trying to create a trigger (update and delete) for auditing purposes. The source table has a long field and I need to insert all columns (which includes the long field) into an audit table if any column in the source record changes or if the source record is deleted. I cannot reference :old.longfield or do a select into.
    If anyone has a suggestion or has done it in the past, please email me at [email protected] or post an answer.
    Thank You so much for your help !!!!!

    As you have noticed, you cannot reference the value of a LONG column using :old/:new in a trigger. The work around is to instead process your audit information (including the LONG value) in an after statement trigger. Here is an example to get you started:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:605685::NO::F4950_P8_DISPLAYID

  • How to manage the "no data" loading in process chain

    Hi,
    I want to load some master data in delta mode with a process chain. The treatment works good except in one case.
    If I have no data selected during the extraction ( cause the system doesn't find any data matching with the delta field ), the process chain appears in red as if some problems was encountered instead of giving a traffic light green.
    How is it possible to manage this case of treatment as a normal treatment ?
    Thanks for your help.

    Marc,
    in RSMO ,
    Using Settings -> Evaluation of Requests ->
    if no data is available in the system, the request
    select Green (is Judged to be successful). this will cause the load to be successful if Zero records are fetched and the Process chain will not fail.
    Cheers
    Tushar

  • Project Manager sorting by date instead of alphabetically

    I just upgraded from RH7 to RH8 and my topics in the Project Manager are now sorted by date last updated instead of alphabetically. I've been poking around and doing searches but not finding how to change the sort order in the Project Manager.
    Any ideas?

    Hi there
    Have you tried clicking the sort icon?
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 moments from now - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcererStone Blog
    RoboHelp eBooks

  • How to store text field data from web dynpro application in pcd ?

    Hi Forum,
    I am new to web Dynpro.
    I want to store user specific data (a text field value) from a wd application in PCD and access it every time the user runs the application.How can I achieve this?
    Thanks,
    Mickey.

    Hi
    I created the "read" and "update" methods in my application service. How can I call them? I created and implemented the methods just like here: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/340fc0ea-0c01-0010-74bf-965b11031e77
    Operations:
    - readMyEntityService:
    - updateMyEntityService
    Implementation:
    retValue = getMyEntityService().read(key);
    getMyEntityService().update(dS0);
    In Web Dynpro there is this update method with the code above (in my original post).
    How can I call the update-method????????
    Kind regards
    Bettina

  • How to manage SAP Masters Data in Multi Lauguages

    Dear All;
    We are using ECC5 unicode version.
    So far we only use in Japan, but we are trying to use this system in Thailand too.
    And some of the customer and vendor master record will be used in JPN and THI.
    I would like to know how to save the 2 languages' texts in same customer/vendor record like company name or address.
    Could you please teach me ?
    Rgds
    Y.Kaneko

    Hi,
    Please read the below statements pertaining to Unicode.
    What is Unicode?
    Unicode is an international standard that assigns characters from virtually every language and script a unique Unicode Scalar Value, which is a number written in hexadecimal notation.
    What are the advantages of Unicode?
    Unicode provides the solution to the problem of multiple, possibly incompatible code pages:
    1.Unicode currently defines over 98,000 characters, with room for over 1 million characters.
    2.Unicode defines each character only once
    3.In a Unicode SAP system you can display and maintain character data from any language with any logon language. For example, you can logon to your system in Japanese and maintain Russian data.
    Unicode attempts to support all of the scripts used in the world. Where more than one language shares a set of symbols that have a historically related derivation, the union of the set of symbols of each such language is unified into a single collection identified as a single script.
    All Unicode characters are not 2 bytes long.
    The Unicode Encoding determines the length of a character. A character in one of the Unicode Encoding can be bigger than 1 byte, and therefore Unicode characters can be longer than characters defined in other standard code pages.
    The Unicode encoding standards that can be used are UTF-8, UTF-16 or UTF-32.
    Reward points if useful.
    Thanks and Regards,
    Litta.

  • How to manage XFDF form data stored in sharepoint

    Hi All,
    I have developed a rating form tool in acrobat to get the readers feedback. I am saving the feedback data in a sharepoint when the user click the SUBMIT button. It is working very well and the feedback data is getting stored in the Sharepoint.
    Now, its time to generate a report based on the feedback I am receiving in the Sharepoint. I need to collect the data from the sharepoint and generate a report for the management.
    Is there anyway to pull the data from the Sharepoint directly from Acrobat? and when the pdf file is getting distributed there are lot of additional characters being added after the pdf file name (4AA0-1068EEW_7c9ab3f540b39941be0626d074eec68a.xfdf). It results, when I try to copy the .xfdf files from sharepoint to my local folder, Windows says "The file name is too long and cannot be copied" and hence I miss some of the data stored in the sharepoint.
    Someone, please help me to collect and manage the data and generate a report.
    Thanks in advance.
    Regards,
    Muthuraj. D

    Create a servlet which gets an InputStream of the file and writes it to the OutputStream of the response and call this servlet in `src` attribute. That's basically all.
    Here's an example which covers the most of the minimum needs: [http://balusc.blogspot.com/2007/04/imageservlet.html].

  • How to read LONG RAW data from one  table and insert into another table

    Hello EVERYBODY
    I have a table called sound with the following attributes. in the music attribute i have stored some messages in the different language like hindi, english etc. i want to concatinate all hindi messages and store in the another table with only one attribute of type LONG RAW.and this attribute is attached with the sound item.
    when i click the play button of sound item the all the messages recorded in hindi will play one by one automatically. for that i'm doing the following.
    i have written the following when button pressed trigger which will concatinate all the messages of any selected language from the sound table, and store in another table called temp.
    and then sound will be played from the temp table.
    declare
         tmp sound.music%type;
         temp1 sound.music%type;
         item_id ITEM;
    cursor c1
    is select music
    from sound
    where lang=:LIST10;
    begin
         open c1;
         loop
              fetch c1 into tmp; //THIS LINE GENERATES THE ERROR
              temp1:=temp1||tmp;
              exit when c1%notfound;
         end loop;
    CLOSE C1;
    insert into temp values(temp1);
    item_id:=Find_Item('Music');
    go_item('music');
    play_sound(item_id);
    end;
    but when i'm clicking the button it generates the following error.
    WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXCEPTION ORA-06502.
    ORA-06502: PL/SQL: numeric or value error
    SQL> desc sound;
    Name Null? Type
    SL_NO NUMBER(2)
    MUSIC LONG RAW
    LANG CHAR(10)
    IF MY PROCESS TO SOLVE THE ABOVE PROBLEM IS OK THEN PLESE TELL ME THE SOLUTION FOR THE ERROR. OTHER WISE PLEASE SUGGEST ME,IF ANY OTHER WAY IS THERE TO SOLVE THE ABOVE PROBLEM.
    THANKS IN ADVANCE.
    D. Prasad

    You can achieve this in many different ways, one is
    1. Create another VO based on the EO which is based on the dest table.
    2. At save, copy the contents of the source VO into the dest VO (see copy routine in dev guide).
    3. commiting the transaction will push the data into the dest table on which the dest VO is based.
    I understand that if we attach VO object instance to region/page, we only can pull and put data in to only one table.
    if by table you mean a DB table, then no, you can have a VO based on multiple EOs which will do DMLs accordingly.Thanks
    Tapash

  • How to retrieve long text data

    Dear all,
    How can i retrieve the long text for document line item
    Gone thru this in forum..but unable to get the correct one
    some say to use READ_TEXT FM
    Pls advise steps
    Rgds
    Naresh

    Hi,
    Please find here with link for bringing the long text.
    http://scn.sap.com/thread/497205
    Regards,
    Ramana

  • How to insert long text data in oracle for LONG column type??

    Anybody who can tell me what is best way to store long text (more than 8k) in Oralce table.
    I am using Long datatype for column but it still doenst let me insert longer strings.
    Also I am using ODP.Net.
    Anybody with a good suggestion???
    Thanks in advance

    Hi,
    Are you getting an error? If so, what?
    This works for me..
    Greg
    create table longtab(col1 varchar2(10), col2 long );
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    using System.Text;
    public class longwrite
    public static void Main()
    // make a long string
    StringBuilder sb = new StringBuilder();
    for (int i=0;i<55000;i++)
    sb.Append("a");
    sb.Append("Z");
    string indata = sb.ToString();
    Console.WriteLine("string length is {0}",indata .Length);
    // insert into database
    OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl");
    con.Open();
    OracleCommand cmd = new OracleCommand();
    cmd.CommandText = "insert into longtab values(1,:longparam)";
    cmd.Connection = con;
    OracleParameter longparam = new OracleParameter("longparam",OracleDbType.Long,indata .Length);
    longparam.Direction = ParameterDirection.Input;
    longparam.Value = indata ;
    cmd.Parameters.Add(longparam);
    cmd.ExecuteNonQuery();
    Console.WriteLine("insert complete");
    //now retrieve it
    cmd.CommandText = "select rowid,col2 from longtab where col1 = 1";
    OracleDataReader reader = cmd.ExecuteReader();
    reader.Read();
    string outdata = (string)reader.GetOracleString(1);
    Console.WriteLine("string length is {0}",outdata.Length);
    //Console.WriteLine("string is {0}",outdata);
    reader.Close();     
    con.Close();
    con.Close();
    }

  • How to display table field data using checkbox

    Dear sir,
              I have created PR using ME51N.  Our PR datas in EKPO table. 
              I have created select-option with prdat and Checkbox for to view PR open or closed status.
              I want check PR status details from date to date using check box.
             I have created the following code, but i will not generate output
    DATA: BEGIN OF leban OCCURS 0.
            INCLUDE STRUCTURE ekpo.
    DATA END OF leban.
    DATA new(1).
    SELECT-OPTIONS ldat FOR sy-datum. "NO-DISPLAY.
    parameters lopen like new AS CHECKBOX USER-COMMAND opn.
    parameters lclose like new as checkbox user-command cls.
    at selection-screen.
    if ldat is initial.
       message 'Enter a value' type 'W'.
    endif.
    case sy-ucomm.
    when 'opn'.
       perform getpr.
       perform findopenpr  tables leban.
    endcase.
    form getpr.
    select * from ekpo into leban where PRDAT in ldat.
    append leban.
    endselect.
    endform.
    form findopenpr tables ekpo.
        IF LOPEN = 'X'.
           select single * from ekpo into leban where PRDAT IN LDAT AND banfn = lopen.
           SORT leban BY bnfpo.
           CLEAR leban.
           if not sy-subrc = 0.
             message  'PR OPEN' type 'S'.
           ENDIF.
           WRITE: / LEBAN-BANFN.
        ENDIF.
    endform.
    With Regards,
    Baskaran

    Hi,
    Try this way,
    You shouldnt be writing two select statements into the same internal table. Also i dont see any use of perform getpr. so remove that and try
    DATA: BEGIN OF leban OCCURS 0.
    INCLUDE STRUCTURE ekpo.
    DATA END OF leban.
    DATA: BEGIN OF leban1 OCCURS 0.
    INCLUDE STRUCTURE ekpo.
    DATA END OF leban1.
    DATA new(1).
    SELECT-OPTIONS ldat FOR sy-datum. "NO-DISPLAY.
    parameters lopen like new AS CHECKBOX USER-COMMAND opn.
    parameters lclose like new as checkbox user-command cls.
    at selection-screen.
    if ldat is initial.
    message 'Enter a value' type 'W'.
    endif.
    IF LOPEN = 'X'.
    select single * from ekpo into leban where PRDAT IN LDAT AND banfn = lopen.
    if sy-subrc = 0.
    message 'PR OPEN' type 'S'.
    ENDIF.
    WRITE: / LEBAN-BANFN.
    endif.
    if LCLOSE = 'X'.
    select single * from ekpo into leban1 where PRDAT IN LDAT AND banfn eq space.
    if sy-subrc = 0.
    message 'PR CLOSE' type 'S'.
    ENDIF.
    WRITE: / LEBAN1-BANFN.
    ENDIF.
    Regards,
    Vik
    Edited by: vikred on Aug 7, 2009 6:55 PM
    Edited by: vikred on Aug 7, 2009 7:23 PM

  • How to manage the regulatory data import into specification database?

    Hi experts,
    We have a EH&S implementation project for a distribution company which has no other sap module and very limited scope.
    They want to get the 3E data, compare and update and send/updates with vendors and customers and also inteface the data with AS 400.
    They are not willing to use  the Ariel ADM tool and any other additional licensing, due to limited scope.The 3E is sending the file in xml format. So the EH&S OCC connector could be used. but this again needs the use of ehs expert, which needs additional licensing and scope increase.
    Does anybody worked on intergrating 3E data into specifications without usig ADM and OCC?
    Regards
    Milmuk

    Thanks C.B.
    Our requirement is just to import the regulatory data for the compliance check from 3E. Once the data gets captured in specification property tree, we can utilize it further. We don't have the scope and resources to make a complex design.
    If the specification system could be able to receive the regulatory content in any other file format, we can ask 3E to provide the files in that format ( if possible). As I understand,the standard systems used are IMDS or OCC or Ariel ADM. IMDS also seems to have a separate license.
    Does anybody worked on integrating 3E/regulatory  data into specifications without using ADM and IMDS? ( very much using the standard SAP out of the box functionality). We are using ECC 6 with EhP 5.
    Regards
    Milmuk

Maybe you are looking for

  • Help me to solve this issue: 50% of servers are down .

    Hi folks, I am new in OBI field and when I installed OBI 11g on my system everything is working fine except analytics URL:( http://localhost:7001/analytics ) its not working. nearly when I checked my ( em ) URL I got another issue Admin server is up

  • Can I have two accounts on one imac

    can I have two accounts on one imac

  • Help needed in Drag and Drop and  resizing of image icons

    Hi all, I'm doing a project on Drag and Drop and resizing of image icons. There is one DragContainer in which i have loaded the image icons and i want to drop these image icons on to the DropContainer. After Dropping these icons on to the DropContain

  • Retained Earnings Statement (Financial Statement Version) Issues

    1. If I post any thing, will it update Retained earnings account automatically or can I create any formula? 2. The requirement is  how the Retained Earnings –Beginning of year will update from P&L statement? 3. How the Retained Earnings P+L result w

  • Inerative JPG in PDF

    I am making an interative PDF file that is an online application form.  Typically people have filled out the form, saved and emailed or printed it and then mailed it. They have had to include pictures as part of the applicaiton. I want to create an i