Change Parameter from VarChar2 to CLOB

Hi,
I have a function csvToArray which takes a csv string and converts it to an array.
PROCEDURE csvToArray(p_csvString IN VarChar2,
p_count OUT PLS_INTEGER,
p_array OUT ARRAY_T) IS...
Unfortunately the size of the csvString being passed in exceeds 32K, so I was thinking about changing the type of the csvString from Varchar2 to CLOB,i.e
PROCEDURE csvToArray(p_csvString IN CLOB,
p_count OUT PLS_INTEGER,
p_array OUT ARRAY_T) IS...
The procedure only uses the string functions instr and substr to find the elements of the csv string to place in an array.
I've tested the change and it works, but is there anything I should consider with the change to the data type, or will the above always work fine? The extreme max size of p_csvString would be around 150K.
Database version is 10.2.0.4.0
Thanks

Hi,
This test maybe helpful
Passed Length 65K test
create or replace procedure my_pro ( pclob clob)
is
begin
  dbms_output.put_line('clob passed LEN:' ||
   dbms_lob.getlength(pclob) );
end;
Procedure created.
SQL> exec my_pro( to_clob(lpad('x',32767,'c')||lpad('x',32767,'c')||'x'));
clob passed LEN:65535
PL/SQL procedure successfully completed.SS

Similar Messages

  • Accessing "changing parametes " from JCo

    Hi all,
         I would like to access a RFC having "changing" parameters (eg EMPLOYEE_READ_APPLICANTNUMBER). How do I do it? How do I build a custom repository metadata for such a RFC??
    when I check the RFC library there the new function RFCCallRecieveEx() seems to support changing parameters but not the older one RFCCallRecieve(), but when I see the trace I see that the RFCCallRecieve() is the one being and therefore I get a RFC_SYS_EXCEPTION error.
    Can somebody tell me how to solve the problem? Has somebody tried building metadata for RFC/BAPI containing changing parameters
    Thanks in Advance
    Dilip

    I'm new to JCO and java so I'm not sure how you would handle this on the java side but as a work around you could probably just create a custom ABAP function module that called the original function module.
    Just specify all the parameters of the new function module as either IMPORTING or EXPORTING, then inside the new function module call the old one with the parameters as per the interface of the original function module.
    On the java side just call the new function module and all your parameters should work ok with the JCO.
    The "CHANGING" parameter is really more of an internal ABAP designation indicating the value may be changed during execution.  You can change a parameter that is not designated as changing.  The two behave a little differently if the program is terminated before execution is completed and it adds clarity to the interface, but other than that there really aren't many benefits.

  • The most effective way from varchar2 to CLOB?

    this is my table's TAB structure on Oracle 10g r2:
    TAB_ID (PK),
    TAB2_ID (FK constraint to TAB2(TAB2_ID), index created),
    TEXT varchar2(4000)
    What is the most effective way to convert varchar2(4000) column to CLOB column?
    1. create new table TAB_NEW with column TEXT as CLOB,
    then insert /*+ APPEND */ into TAB_NEW SELECT * FROM TAB,
    then rename table TAB to TAB_OLD,
    then drop constraint and indexes
    then rename TAB_new to TAB
    then add constraints primary key and foreign key,
    then add index on TAB2_ID
    then drop table TAB_OLD
    OR
    2. rename column TEXT(varchar2) to TEXT_OLD
    then add column TEXT(type CLOB)
    then update(how the most effective?) TAB set TEXT=TEXT_OLD
    drop column TEXT_OLD.

    1 will work, as you can assign a VARCHAR2 to a CLOB and Oracle will convert it.
    2 is redundant.
    Sybrand Bakker
    Senior Oracle DBA

  • Insert concatenated data from Varchar2 to Clob

    Hi,
    I have a table with the following structure:
    create table logmst (logno varchar2(10), log_detail1 varchar2(4000), log_detail2(4000));
    I would like to concatenate the data from log_detail1 and log_Detail2 into a Clob datatype. So, i have created another table:
    create table test(id varchar2(10), filedesc clob default empty_clob());
    I tried:
    insert into test (id, filedesc) select logno, to_clob(log_Detail1 || log_Detail2) from logmst;
    System shows ORA-01489: result of string concatenation is too long.
    Can somebody help? Thanks in advance.

    You have to write a small procedure. You cannot achieve this using a SQL statment.
    Declare
       myClob CLOB;
       logNo logMst.logNo%type;
       col1 logmst.log_detail1%type;
       col2 logmst.log_detail2%type;
       length_col1 number;
    begin
        For rec in (select logNo, log_Detail1, log_Detail2 from logMst)
        loop
                  logNo := rec.LogNo;
                  col1 := rec.Log_Detail1;
                  col2 := rec.Log_Detail2;
                     myClob := empty_clob();
                    dbms_lob.createtemporary(myClob, TRUE);
                    length_col1 := length(col1);
                    dbms_lob.write(myClob , length_col1,1,col1);
                    dbms_lob.write(myClob , length(col2), length_col1+1,col1);
                   -- Write here SQL statemnt to write this CLOB to your table...
        end loop;
    end;Thanks,
    Dharmesh Patel

  • Calling PLSQL Procedure with CLOB input parameter from JDBC

    Hi..
    I've got a PLSQL procedure with a CLOB object as input parameter:
    function saveProject (xmldoc CLOB) RETURN varchar IS
    I want to call that procedure from my JDBC Application as...
    String data = "..."
    CallableStatement proc = conn.prepareCall
              ("begin ? := saveProject (?); end;");
    neither
    proc.setCharacterStream(2, new StringReader(data, data.length());
    nor
    proc.setString(2, data);
    will work.
    The Application throws java.sql.Exception: ... PLS-00306 wrong
    number or types of arguments in call 'SAVEPROJECT'
    How can I use set setClob method?
    The Problem is: with Oracles CLOB implementation I can't create
    an Instance, and from the CallableStatement a can't get a
    Locator for a CLOB-Object.
    This CLOB stuff makes me really nuts!
    please somebody help me.. thanks
    Alex

    Hi All,
    You can not make it like that.
    You can not make clob as input parameter.
    Do you want an easy way?
    This is the easy way.
    sample:
    function myFunction(S varchar2(40))
    return integer as
    begin
    insert into TableAAA values(S)
    --TableAAA only contains 1 column of clob type
    end;
    This will work the problem with this is the parameter is in
    varchar2 right? so there will be limited length for it.
    You can do this to call that function:
    nyFunction('My String that will be input into clob field');
    There's another slight difficult way, I understand that you have
    installed Oracle client/server in your system, try to look at
    jdbc folder and try to find demo.zip in that folder, you can
    find several ways of doing thing with jdbc.
    Have a nice day,
    Evan

  • How to pass parameter from FM to report without changing interface of FM

    Hello experts,
    How can I pass a table name from a FM to the report calling the FM, without changing the existing interface of the FM.
    Thanks,
    Ajay.

    Hi,
    I f you want to pass any parameter from FM to Report or Vice-versa, parameter should me maintained in the FM otherwoise you can't pass any other than existing parameters.
    Otherwise create a custom FM.
    Regards,
    Sunil

  • Passing changing parameter to RFC of ECC 6.0 from webdynpro java

    Hi,
          I need to use a simple ZRFC from ECC 6.0 for ESS customization in one of the ESS components (Portal 7.0). There is a  changing parameter in the zRFC which should return a set of multiple values. I can see one single parameter under as input parameter (directly under the main node) and i can set a value for it. How to pass the values to changing parameter (it is a structure of multiple fields) while executing the model. Can any one please provide the code sample of executing the model.
    Regards
    Ramesh

    Hi,
          This is my Model Node. Ch_Ethnicity is supposed to hold a set of rows (table). It is at both Input and Output. Currently I am passing only Im_Raky which is a code and I should get the table of descriptions into Ch_Ethnicity parameter under the Output Node. But webdynpro Model is expecting some input to the Ch_Ethnicity parameter under the Input Node also. This is the problem and when I have contacted Ababp team, I am asked to send an empty table structure for Ch_Ethnicity parameter under Input Node also. Can you suggest me the code to send an empty table structure as input according to the below given context.
    Z_Get_XXXXXX_Input
    Ch_Ethnicity
    ---Zhr_Ethnicity
    ethcode
    ethdesc
    AndSoOn Attrib N
    Output
    Z_Get_xxxxxx_Output
    Ch_Ethnicity
    Zhr_Ethnicity
    ethcode
    ethdesc
    AndSoOn Attrib N
        |----
    Im_Raky
    Regards
    Ramesh

  • Transaction/program to change AVAILABLEFLAG parameter from table UJ0_PARAM_APP

    Hi Experts,
    Do you know if is there a transaction/program to change BPC environment status (for example, a transaction/program that changes AVAILABLEFLAG parameter from table UJ0_PARAM_APP to "0" or "1").
    Regards,
    Danilo

    Hi Danilo,
    i'm trying to use the same method as you in BPC 7.5.
    Did the method worked for you to set offline and online the application?
    Could you please tell me how you used it?
    Thanks.
    Amine

  • [svn:osmf:] 14474: Adding a 'dispatchInitialChangeEvent' parameter to the ' watch' method in order to allow the initial change event from being dispatched, continued.

    Revision: 14474
    Revision: 14474
    Author:   [email protected]
    Date:     2010-02-28 23:53:31 -0800 (Sun, 28 Feb 2010)
    Log Message:
    Adding a 'dispatchInitialChangeEvent' parameter to the 'watch' method in order to allow the initial change event from being dispatched, continued.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/metadata/MetadataWatcher.as

    *Feedback*
    "Use the form below to send us your comments. We read all feedback carefully, but please note that we cannot respond to the comments you submit."
    http://www.apple.com/feedback/ipad.html
    We can complain about Apple's business decisions, but these discussions are user to user talk about possible solutions.
    Here are the places to report bugs:
    Get an account at
    http://developer.apple.com/  then submit a bug report to http://bugreporter.apple.com/
    Once on the bugreporter page,
       -- click on New icon
       -- See if you need to attach a log file or log files, clicking on Show instructions for gathering logs.  Scroll down to find the area or application that matches the problem.
       -- etc.

  • [svn:osmf:] 14473: Adding a 'dispatchInitialChangeEvent' parameter to the ' watch' method in order to allow the initial change event from being dispatched.

    Revision: 14473
    Revision: 14473
    Author:   [email protected]
    Date:     2010-02-28 23:45:28 -0800 (Sun, 28 Feb 2010)
    Log Message:
    Adding a 'dispatchInitialChangeEvent' parameter to the 'watch' method in order to allow the initial change event from being dispatched.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/metadata/MetadataWatcher.as

    Perhaps you're not handling the "EndOfStreamEvent" correctly/at all, and thus not freeing up the socket to listen for the "NewReceiveStreamEvent " after the initial stream has ended...
    ?

  • How do i handle out parameter from a stored procedure in a vb form?

    hi all,
    I want to return a varchar2(500) type of out parameter from a pl/sql stored procedure to a vb form?? how do i do this??
    regards
    akshay

    Well, when you create the parameter collection for your command object, just set the correct value for the direction component.
    You would set it to one of the below, depending on if the parameter is IN OUT or only OUT:
            <parameter_obj>.Direction = ParameterDirectionEnum.adParamInputOutput
            <parameter_obj>.Direction = ParameterDirectionEnum.adParamOutput

  • Passing a parameter from one form to another

    Hi
    I'm trying to pass a parameter from one form to another. I've read lots of postings about this, and I have succeeded in calling the second form using code behind one of the existing Portal buttons (insert). Here is the code:
    DECLARE
    pro_id NUMBER;
    pro_link VARCHAR2(1200);
    BEGIN
    pro_id := p_session.get_value_as_number(
    p_block_name => 'DEFAULT',
    p_attribute_name => 'A_PRO_ID');
    pro_link := portal30.wwv_user_utilities.get_url(
    'CINTRA_APP.PRO_LINK_1',
    'WKG_PRO_ID',pro_id,
    '_WKG_PRO_ID_cond','=');
    PORTAL30.wwa_app_module.set_target(pro_link,'CALL');
    END;
    Trouble is, the parameter does not get passed. This could be because:
    the field I'm trying to populate is based on an LOV ?
    the target form is not set up to receive parameters? (I read this somewhere, but how do you do it?)
    Thanks
    Manfred

    Dear InoL
    My Header Form coding as follows.
    When I press the button to move to the lines the following code executes
    PASSING FORM CODING;
    DECLARE
         pl PARAMLIST := GET_PARAMETER_LIST('PL_AT');
    BEGIN
         IF NOT ID_NULL(pl) THEN
              DESTROY_PARAMETER_LIST(pl);
         END IF;
         pl := CREATE_PARAMETER_LIST('PL_AT');
         ADD_PARAMETER(pl,'P_AT',TEXT_PARAMETER,:HWSI_ASSET_TAG);
         CALL_FORM('E:\IT_SYSTEM\6i\HWDYNAMICINFO.FMX',NO_HIDE,DO_REPLACE,NO_QUERY_ONLY,PL);
    END;
    RECEIVING FORM CODING;
    Written on WHEN_NEW_FORM_INSTANCE
    BEGIN
         IF :PARAMETER.P_AT IS NULL THEN
              GO_ITEM('NZK_HW_DYNAMIC.OS_ASSET_TAG');
              ENTER_QUERY;
         ELSE
              SET_BLOCK_PROPERTY('NZK_HWSTATIC_INFO',DEFAULT_WHERE,'HWSI_ASSET_TAG ='||:parameter.p_at);
             SET_BLOCK_PROPERTY('NZK_HWSTATIC_INFO',DEFAULT_WHERE,'HWSI_ASSET_TAG ='||:parameter.p_at);
              EXECUTE_QUERY;
              GO_ITEM('NZK_HW_DYNAMIC.OS_ASSET_TAG');
         END IF;
    END;
    Created PARAMETER as P_AT, Data Type CHAR, MAX LENGTH 30
    Thank you
    NZK

  • How to send more than one parameter from FORM to REPORT?

    Dear all,
    i can send one parameter from FORM to REPORT. but when i send more than one parameter it gives error: frm 41214 unable to run report.
    here is the code i think the error is in the following line of procedure:
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_date_from='||v_date_from||'p_date_to='||v_date_to);
    where to place the parameters and is there any space is required?
    Thanks
    Muhammad Nadeem

    Dear Saeed Iqbal,
    thanks for you reply.
    dear i am using Form 10g run_product is not supported in this version.
    i am using RUN_REPORT_OBJECT.
    PROCEDURE rep_gl_ledger IS
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(50);
    v_date_from date;
    v_date_to date;
    v_detail_id_from varchar2(100);
    v_detail_id_to varchar2(100);
    v_voucher_type varchar2(100);
    --req_no char(17);
    BEGIN
    v_date_from :=      :ledger_para.p_date_from;
    v_date_to :=      :ledger_para.p_date_to;
    v_detail_id_from :=      :ledger_para.p_detail_id_from;
    v_detail_id_to :=      :ledger_para.p_detail_id_to;
    v_voucher_type :=      :ledger_para.p_voucher_type;
    repid := find_report_object('gl_ledger');
    --repid := find_report_object('REPORT80');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rep_online_FRHome');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_date_from='||v_date_from||'p_date_to='||v_date_to);
    --SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no');
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    /* Display report in the browser */
    WEB.SHOW_DOCUMENT('http://'||:GLOBAL.G_IP||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?','_blank');
    ELSE
         message('Error when running report');
    END IF;
    END;
    Regards:
    Muhammad Nadeem

  • Missing Required Parameter 'from' for event 'open' -- InDesign CS3 Error

    Now that I've upgraded to OS 10.6, and I'm getting this weird error message (Missing Required Parameter 'from' for event 'open') when I open CERTAIN InDesign files by double-clicking on the icon. Other files open okay. Everything SEEMS to open okay when I open CS3 and go to FILE and OPEN.
    Anyone else having this problem? Any advice?

    I was having this problem too and then noticed that the files that would not open had special characters in the name, # or % for example.
    I changed the name to exclude these characters and they all opened just fine.
    If that doesn't work, it may be, if you use it, Suitcase Fusion. Extensis says that if your computer name is too long or also has special characters in it that it could be a problem in OSX 10.5 and later. Go into System Preferences/Sharing and edit your name to within 20 simple characters.
    I hope this helps.
    Message was edited by: Dyrian

  • ABAP program to take input parameter from variant, execute KSB1 and export

    Hi Friends,
    My client asking  change request in CO
    The Change request is "ABAP program to take input parameter from variant, execute KSB1 and export the output into an excel sheet and park the document in a designated location"
    Pls let me know  actually i am a FICO consultant what i can do in this change request
    Thanks,
    Santi

    Hi
    First I dont you would need to create a ABAP to generate the report in Excel.
    You can look at this option. Execute the report Go to->Change Layout, Click on the view option, On the Preferred View Select Microsoft Excel, Save the layout, provide a layout name with /XYZ.
    Now when you want to execute KSB1 with excel, just execute KSB1 with /XYZ layout, it would open in Excel, export to which ever location you want.
    Or just simply save the report as Excel using the Excel button on the tool bar.
    Regards,
    Suraj

Maybe you are looking for