Problem Executing Survey API

Hello everyone. I'm hoping someone can help me with a problem I'm having running one of the Survey Builder API's. I need to edit certain survey fields using the following API: OPC_SURVEY_BUILD.EDIT_SURVEY. The problems is that when I try to run this API with my survey changes I am receiving the following error:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.OWA_UTIL", line 325
ORA-06512: at "PORTAL.OPC_SURVEY_BUILD", line 3933
ORA-06512: at line 149
Does anyone have any ideas where the error might be coming from? Does anyone have experience using the survey API's?

Hi every one!
Today I want to develop new Survey Portlet, so can I try to develop a new portlet base on Survey Builder Portlet? I find the Oracle Survey API but it still can not be found! Anyone can help me? Thanks in advanced!

Similar Messages

  • How can i execute Spaces API in java main class?

    Hi
    I am able to execute Spaces API through portal application. However if i try to execute it in java main class, its throwing an exception
    "SEVERE: java.io.FileNotFoundException: .\config\jps-config.xml (The system cannot find the path specified)"
    oracle.wsm.common.sdk.WSMException: WSM-00145 : Keystore location or path can not be null or empty; it must be configured through JPS configuration or policy configuration override.
    How can i set this path, so that i can execute Spaces API from java main class.
    Need this main class to configure in cron job, to schedule a task.
    Regards
    Raj

    Hi Daniel
    Currently i have implemented create functionality in my portal application using Spaces API, which is working fine. Now the requirement is, i need to implement a "Cron Job" to schedule a task, which will execute to create space(for example once in a week). Cron job will execute only the main method. So I have created java main class, in which I have used Spaces API to perform create space operation. Then it was giving exception.
    Later I understood the reason, as I am executing the Space API with a simple JSE client, its failing since a simple java program has no idea of default-keystore.jks, jps-config.xml, Security Policy. Hence i have included those details in main class. Now I am getting new error,
    SEVERE: WSM-06303 The method "registerListener" was not called with required permission "oracle.wsm.policyaccess"
    For your reference i have attached the code below, please help. How can i use Spaces API in java main method(i mean public static void main(String[] args) by giving all required information.
        public static void main(String[] args) throws InstantiationException,
                                                      GroupSpaceWSException,
                                                      SpacesException {
            Class2 class2 = new Class2();
            GroupSpaceWSContext context = new GroupSpaceWSContext();
            FactoryFinder.init(null);
            context.setEndPoint("http://10.161.226.30/webcenter/SpacesWebService");
            context.setSamlIssuerName("www.oracle.com");
            context.setRecipientKeyAlias("orakey");
            Properties systemProps = System.getProperties();
            systemProps.put("java.security.policy","oracle/wss11_saml_or_username_token_with_message_protection_client_policy");
            systemProps.put("javax.net.ssl.trustStore","C:\\Oracle\\Middleware11.1.7\\wlserver_10.3\\server\\lib\\cacerts.jks");
    systemProps.put("oracle.security.jps.config","C:\\Oracle\\Middleware11.1.7\\user_projects\\domains\\workspace\\system11.1.1.7.40.64.93\\DefaultDomain\\config\\fmwconfig\\jps-config.xml");
            systemProps.put("javax.net.ssl.keyStore",C:\\Oracle\\Middleware11.1.7\\user_projects\\domains\\workspace\\system11.1.1.7.40.64.93\\DefaultDomain\\config\\fmwconfig\\consumer.jks");
            systemProps.put("javax.net.ssl.keyStorePassword", "Test12");
            System.setProperties(systemProps);
            GroupSpaceWSClient groupSpaceWSClient;
            try {
                groupSpaceWSClient = new GroupSpaceWSClient(context);
                System.out.println("URL: " +
                                   groupSpaceWSClient.getWebCenterSpacesURL());
                //delete the Space
                List<String> groupSpaces = groupSpaceWSClient.getGroupSpaces(null);
                System.out.println("GroupSpaces:: " + groupSpaces.size());
            } catch (Exception e) {
    Regards
    Raj

  • Problem executing function

    Hi All,
    I have a problem executing a function in oracle 10g.
    I am getting an error while executing ....
    Here is a function along with the error i am getting:
    create or replace FUNCTION UnpackArray
    Source IN VARCHAR2 DEFAULT NULL,
    Delimiter IN CHAR DEFAULT ','
    RETURN reSourceArray0 PIPELINED
    IS
    SourceArray00 SourceArray0:=SourceArray0(NULL);
    TYPE REFCURSOR IS REF CURSOR;
    CURSOR0 REFCURSOR;
    DelLen int;
    Pos int;
    Cnt int;
    str int;
    LEN int;
    Holder VARCHAR2(220);
    BEGIN
    --Check for NULL
    IF Source is null or Delimiter is null THEN
    Return;
    END IF;
    --Check for at leat one entry
    IF RTRIM(LTRIM(Source)) = '' THEN
    Return;
    END IF;
    /*Get the length of the delimeter*/
    SELECT LENGTH(RTRIM(Delimiter)) INTO DelLen FROM DUAL;
    SELECT INSTR(UPPER(Source), UPPER(Delimiter)) INTO Pos FROM DUAL;
    --Only one entry was found
    IF Pos = 0 THEN
    BEGIN
    INSERT INTO UnpackArray_TBL
    ( Data )
    VALUES ( Source );
    return;
    OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;
    END;
    END IF;
    /*More than one entry was found - loop to get all of them*/
    SELECT 1 INTO str FROM DUAL;
    << LABEL4 >>
    WHILE Pos > 0
    LOOP
    BEGIN
    /*Set current entry*/
    SELECT Pos - str INTO len FROM DUAL;
    SELECT SUBSTR(Source, str, len) INTO Holder FROM DUAL;
    /* Update array and counter*/
    /* Update array and counter*/
    INSERT INTO UnpackArray_TBL
    VALUES ( Holder );
    /*Set the new strting position*/
    SELECT Pos + DelLen INTO str FROM DUAL;
    SELECT INSTR(UPPER(Source), UPPER(Delimiter), str) INTO Pos FROM DUAL;
    OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;
    END;
    END LOOP;
    /*Set last entry*/
    SELECT SUBSTR(Source, str, length(RTRIM(Source))) INTO Holder FROM DUAL;
    -- Update array and counter if necessary
    IF length(RTRIM(Holder)) > 0 THEN
    INSERT INTO UnpackArray_TBL
    VALUES ( Holder );
    OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;
    END IF;
    --Return the number of entries found
    Return; LOOP
    FETCH CURSOR0 INTO
    SourceArray00.Data;
    EXIT WHEN CURSOR0%NOTFOUND;
    PIPE ROW(SourceArray00);
    END LOOP;
    CLOSE CURSOR0;
    RETURN;
    END;
    Error is : Compilation failed,line 6 (12:13:25)
    PLS-00201: identifier 'RESOURCEARRAY0' must be declared
    Compilation failed,line 0 (12:13:25)
    PL/SQL: Compilation unit analysis terminated
    Regards,
    Smiley

    Hi,
    I have a problem executing this function. Pls help me solve this issue.
    ---------------------------------Function---------------------------------
    BEGIN
    EXECUTE IMMEDIATE 'DROP TYPE reSourceArray0';
    EXECUTE IMMEDIATE 'DROP TYPE SourceArray0';
    EXCEPTION WHEN OTHERS THEN NULL;
    END;
    CREATE OR REPLACE TYPE SourceArray0 AS OBJECT(Data VARCHAR2(255));
    CREATE OR REPLACE TYPE reSourceArray0 AS TABLE OF SourceArray0;
    BEGIN
    EXECUTE IMMEDIATE 'DROP TABLE UnpackArray_TBL CASCADE CONSTRAINTS';
    EXCEPTION WHEN OTHERS THEN NULL;
    END;
    CREATE GLOBAL TEMPORARY TABLE UnpackArray_TBL(Data VARCHAR2(255)) ON COMMIT PRESERVE ROWS
    CREATE OR REPLACE FUNCTION UnpackArray
    Source IN VARCHAR2 DEFAULT NULL,
    Delimiter IN CHAR DEFAULT ','
    RETURN reSourceArray0 PIPELINED
    IS
    SourceArray00 SourceArray0:=SourceArray0(NULL);
    TYPE REFCURSOR IS REF CURSOR;
    CURSOR0 REFCURSOR;
    DelLen int;
    Pos int;
    COUNT_ADV int;
    START_ADV int;
    LENGTH_ADV int;
    Holder VARCHAR2(255);
    BEGIN
    --Check for NULL
    IF Source is null or Delimiter is null THEN
    Return;
    END IF;
    --Check for at leat one entry
    IF RTRIM(LTRIM(Source)) = '' THEN
    Return;
    END IF;
    /*Get the length of the delimeter*/
    SELECT LENGTH(RTRIM(Delimiter)) INTO DelLen FROM DUAL;
    SELECT INSTR(UPPER(Source), UPPER(Delimiter)) INTO Pos FROM DUAL;
    --Only one entry was found
    IF Pos = 0 THEN
    BEGIN
    INSERT INTO UnpackArray_TBL
    ( Data )
    VALUES ( Source );
    return;
    OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;
    END;
    END IF;
    /*More than one entry was found - loop to get all of them*/
    SELECT 1 INTO START_ADV FROM DUAL;
    << LABEL4 >>
    WHILE Pos > 0
    LOOP
    BEGIN
    /*Set current entry*/
    SELECT Pos - START_ADV INTO LENGTH_ADV FROM DUAL;
    SELECT SUBSTR(Source, start_, length) INTO Holder FROM DUAL;
    /* Update array and counter*/
    /* Update array and counter*/
    INSERT INTO UnpackArray_TBL
    VALUES ( Holder );
    /*Set the new starting position*/
    SELECT Pos + DelLen INTO START_ADV FROM DUAL;
    SELECT INSTR(UPPER(Source), UPPER(Delimiter), START_ADV) INTO Pos FROM DUAL;
    OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;
    END;
    END LOOP;
    /*Set last entry*/
    SELECT SUBSTR(Source, start_, LENGTH(RTRIM(Source))) INTO Holder FROM DUAL;
    -- Update array and counter if necessary
    IF LENGTH(RTRIM(Holder)) > 0 THEN
    INSERT INTO UnpackArray_TBL
    VALUES ( Holder );
    OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;
    END IF;
    --Return the number of entries found
    Return; LOOP
    FETCH CURSOR0 INTO
    SourceArray00.Data;
    EXIT WHEN CURSOR0%NOTFOUND;
    PIPE ROW(SourceArray00);
    END LOOP;
    CLOSE CURSOR0;
    RETURN;
    END;
    --------------------------------Error i am getting--------------------------
    "Parameter 'RETURN_VALUE': No size set for variable length data type: String."
    Thanks and Regards,
    Smiley

  • Problem executing a sql query in 10g environment

    Hi,
    I am having problem executing the following sql query in 10g environment. It works fine in 8i environment.
    I tried to_number(to_char) and it did not work.
    **A.APPL_ACTION_DT >= TO_CHAR("&v_strBeginStatusDate&", 'DD-MON-YYYY') AND A.APPL_ACTION_DT <= TO_CHAR("&v_strEndStatusDate&", 'DD-MON-YYYY')))**
    Any suggestions..
    --Pavan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I would be surprised if that worked in 8i as posted, although I no longer have 8i to test. You do not tell us the error message you are getting, but there are several things wrong with what you posted.
    First, the substitution variable requires only the & at the beginning, you have one on each end of your string, the one at the end will remain in the string that is passed to the database.
    Second, you cannot TO_CHAR a string with a date format as you are trying to do. The TO_CHAR function is overloaded and has two basic forms TO_CHAR(date, format_model) and TO_CHAR(number, format_model). Note that neither takes a string. It would appear that at least current versions of Oracle choose the second signature unless specifically passed a date datatype.
    SQL> select to_char('&h', 'dd-mon-yyyy') from dual;
    Enter value for h: 12
    old   1: select to_char('&h', 'dd-mon-yyyy') from dual
    new   1: select to_char('12', 'dd-mon-yyyy') from dual
    select to_char('12', 'dd-mon-yyyy') from dual
    ERROR at line 1:
    ORA-01481: invalid number format modelalthough I suspect that the error you are getting with your posted code is more likely to be ORA-01722: invalid number.
    Depending on the data type of appl_action_date, you are probably lokoing for TO_DATE instead of TO_CHAR.
    John

  • Oracle 11gR2 to SQL Server 2008 R2 - Problem executing SP on SQL server

    Hi,
    I have this problem: Executing a sp in SQL server from oracle
    --------------------ORACLE SP--------------------
    create or replace
    PROCEDURE DRIVER_SP
    AP IN OUT appl_param%ROWTYPE
    as
    v_sp_name varchar2(50);
    v_control_id number;
    val VARCHAR2(100);
    cur INTEGER;
    nr INTEGER;
    BEGIN
    v_sp_name := ap.MESSAGE_MISC_TEXT;
    v_control_id := ap.control_id;
    cur := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@dblink_sqlserver;
    DBMS_HS_PASSTHROUGH.PARSE@dblink_sqlserver(cur, 'execute ' || v_sp_name || ' ' || to_char(v_control_id));
    LOOP
    nr := DBMS_HS_PASSTHROUGH.FETCH_ROW@dblink_sqlserver(cur);
    EXIT WHEN nr = 0;
    DBMS_HS_PASSTHROUGH.GET_VALUE@dblink_sqlserver(cur, 1, val);
    END LOOP;
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@dblink_sqlserver(cur);
    driver_ap01_log_msg('Procedure returned: ' || val);
    commit;
    exception
    when others then
    driver_ap01_log_msg(sqlerrm);
    END DRIVER_SP;
    --------------------SQL Server SP-----------------------
    ALTER PROCEDURE [dbo].[PA01_SP]
    @control_id integer
    AS
    begin
    --update PA01
    --set infile_control_id = @control_id
    --insert into dbo.PA01LOG(msg) values('test')
    select 0
    end
    THE PROBLEM: Oracle SP calls SQL Server SP and any time I try to INSERT/UPDATE/DELETE (DML) within SQLServer SP it throws an exception on Oracle's end. Once I comment all DML code the proc runs fine.
    +"ORA-28511: lost RPC connection to heterogeneous remote agent using SID=ORA-28511: lost RPC connection to heterogeneous remote agent using SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xxxxxxx)(PORT=1511))(CONNECT_DATA=(SID=dg4msql)))+
    +ORA-02063: preceding line from DBLINK_SQLSERVER"+
    Please help.
    Thanks

    Thanks for your response, it got me closer to my goal. I'm still facing one problem:
    Let me explain what I need to achieve
    Purpose
    Execute an Oracle stored procedure which in turn executes a stored procedure on remote SQLServer which updates local tables on that SQLServer.
    Observations
    The execution of both procedures completes successfully. However, an explicit COMMIT statement must be issued on the Oracle session which initiated the transaction before any data could be read from the SQLServer updated table.
    The following is test exercise for proof of concept.
    PL/SQL code
    declare
    out_arg integer;
    ret_val integer;
    begin
    out_arg := 0;
    ret_val := "dbo"."ZZZ_SP"@DBLINK_SQLSERVER(10, out_arg);
    dbms_output.put_line(to_char(out_arg));
    end;
    SQLServer code
    ALTER procedure [dbo].[ZZZ_SP] (@arg1 integer, @arg2 integer output)
    AS
    begin tran tran1
    insert into dbo.PA01LOG(msg) values('ddd')
    commit tran tran1
    set @arg2 = @arg1 * 100
    select -1
    GO
    I have put the Oracle gateway in Single_Site mode to avoid two phase commit. I want SQLServer to be able to run its own transaction management. I don't want Oracle to be responsible for completing the transactions which take place within SQLServer.
    I fear there might be a gap in my knowledge.
    Any ideas why I need to issue a COMMIT in Oracle session to release the lock from SQLServer table?
    Thanks

  • Create a new user with Privileges to execute Seeded API's

    Hi,
    We have a requirement from our client, they want to create a new user with Privileges to execute Seeded API’s,
    So they dont want to execute using APPS user.
    We want to know is it possible to have a new user for executing seeded API's and if so what all priveleges we need to have.
    We are on 12.1.3 with 11.2.0.3  two node RAC Database on Exadata and Exalogic servers.
    Waiting for your suggestions and replies.
    Thanks

    Hi,
    Plz update this forum,
    and give me a suggestion at the earliest,
    Waiting for your valuable advice.
    Thanks

  • Problems saving survey values

    Hello,
    I have problems with surveys. I want modify the values of a survey from a customer program. If the survey has been saved on-line before from the corresponding transaction, I have no problem. But If it hasn't been saved, I can't do the changes.
    These are the steps in my program:
      - Create an object CL_CRM_SVY_RUNTIME
      - Create an object CL_CRM_SVY_VALUES
      - With this object and the function CRM_SURVEY_GET_RATING I get the field VALUEXML
      - Function CRM_SURVEY_PREPARE_OW to get the set_guid
      - Function CRM_SURVEY_CREATE_OW
      - Function CRM_SURVEY_CHANGE_OW
      - Function CRM_SURVEY_SAVE_OW     
      - Function BAPI_TRANSACTION_COMMIT
    At this point, I have an entry in the CRMD_SURVEY table, and the function CRM_SURVEY_CHECK_OW returns no errors.
    After these steps I create another objects CL_CRM_SVY_RUNTIME and CL_CRM_SVY_VALUES, I get questions and answers, I change their values and I save the new values with method SET_VALUES of class CL_CRM_SVY_RUNTIME.
    As I said before, if the survey had been saved before this process, with these steps I can modify it, but if it has not been saved before, I can't modify it.
    Someone can tell me what I'm doing wrong?
    Thank you.

    Hello
    I am trying to recover the value(rating value - rating) of the questions and answers of questionnaire "T = CRMD_ORDER", you know something on the matter. You can help me?
    You have an example?
    help me please!
    I appreciate it in advance

  • Problem executing .bat file from within Java class

    I'm stumped: I have no problem executing a .bat file that sets classpaths and executes a Java jar, but when I try to execute other executables first and then the .jar, my application hangs and since the DOS box doesn't come up over my GUI, I can't see what's going on.
    This works:
    public void execute() throws Exception {
    String s = "c:\\cs47auxs\\omnijar\\omni.bat";
    Process p = Runtime.getRuntime().exec("\"" + s + "\"");
    p.waitFor();
    JOptionPane.showMessageDialog(frame,
    "The Database Has Been Successfully Reloaded.",
    "Information Message",
    JOptionPane.INFORMATION_MESSAGE);
    Here's the .bat 'omni.bat'
    set JAVA_HOME=c:\j2sdk1.4.2_04\bin
    %JAVA_HOME%\java -jar C:\CS47AUXS\OMNILOADJAR\OmniLoad.jar
    This doesn't work:
    public void execute() throws Exception {
    String s = "c:\\cs47auxs\\omnijar\\jobomni.bat";
    Process p = Runtime.getRuntime().exec("\"" + s + "\"");
    p.waitFor();
    JOptionPane.showMessageDialog(frame,
    "The Database Has Been Successfully Reloaded.",
    "Information Message",
    JOptionPane.INFORMATION_MESSAGE);
    Here's the .bat file 'jobomni.bat'
    SET NETX_HOME=C:\CS47AUXS
    SET COBOL_HOME=C:\CS47AUXS\OFFLINE
    CD %NETX_HOME%
    CALL SET-NETX.CMD
    CD %COBOL_HOME%
    SSBPPC10 JOBOMNI X
    SET JH=C:\J2SDK1.4.2_04\BIN
    SET OMNI_HOME=C:\CS47AUXS\OMNILOADJAR
    CD %OMNI_HOME%
    %JH%\java -jar omniload.jar
    Can anyone shed some light here? Even when I execute the application from the command line the new DOS box doesn't become visible nor can I see any errors. If I could just get that visibility, I could probably figure out what is going wrong.

    Same problem with me as well.... Badly looking for a solution...
    I predict the following:
    - If your batch file has pretty less number of dos/shell commands then it gets executed fine with exec() and proc.waitFor();
    - If you increase the number of dos/shell commands in the bat file then try executing it then it definately hangs at proc.waitFor();
    Even "cmd.exe /C C:\\test.bat" hangs... if the commands are more...
    Is this some sort of bug? or am i doing anything wrong? I tried searching for solution on the net and search forums... but couldnt find a solution for the same.. not sure where i missed, what i missed...
    Incase some one finds a solution.. do post it here...
    Message was edited by:
    amadas

  • Problem In Calling API  fa_addition_pub.do_addition

    Hello friends,
    I am workin on the addition Of asset program
    In which i called API fa_addition_pub.do_addition
    but when i am executing it it gives me error
    Error(157,1): PLS-00306: wrong number or types of arguments in call to 'DO_ADDITION'
    Error(196,1): PLS-00201: identifier 'UPDATE_ERROR_MSG' must be declared
    THE CODE WHICH I USED IS GIVEN BELOW
    PLZ HELP ME TO SOLVE THIS PROBLEM.
    CREATE OR REPLACE PROCEDURE APPS.FA_ADDITION_API (p_row_number NUMBER) AS
    l_trans_rec fa_api_types.trans_rec_type;
    l_dist_trans_rec fa_api_types.trans_rec_type;
    l_asset_hdr_rec fa_api_types.asset_hdr_rec_type;
    l_asset_fin_rec_old fa_api_types.asset_fin_rec_type;
    l_asset_fin_rec fa_api_types.asset_fin_rec_type;
    l_asset_fin_rec_new fa_api_types.asset_fin_rec_type;
    l_asset_fin_mrc_tbl_new fa_api_types.asset_fin_tbl_type;
    l_asset_deprn_rec fa_api_types.asset_deprn_rec_type;
    l_asset_deprn_rec_new fa_api_types.asset_deprn_rec_type;
    l_asset_deprn_mrc_tbl fa_api_types.asset_deprn_tbl_type;
    l_asset_desc_rec fa_api_types.asset_desc_rec_type;
    l_asset_type_rec fa_api_types.asset_type_rec_type;
    l_asset_cat_rec fa_api_types.asset_cat_rec_type;
    l_asset_dist_rec fa_api_types.asset_dist_rec_type;
    l_asset_hierarchy_rec fa_api_types.asset_hierarchy_rec_type;
    l_inv_rec fa_api_types.inv_rec_type;
    l_inv_trans_rec fa_api_types.inv_trans_rec_type;
    l_period_rec fa_api_types.period_rec_type;
    l_who_rec fa_api_types.standard_who_rec_type;
    l_inv_tbl fa_api_types.inv_tbl_type;
    l_inv_rate_tbl fa_api_types.inv_rate_tbl_type;
    l_asset_dist_tbl fa_api_types.asset_dist_tbl_type;
    l_tax_book_tbl fa_cache_pkg.fazctbk_tbl_type;
    l_initial_book boolean := TRUE;
    CURSOR xx_addition_cur (p_row_number NUMBER)
    IS
    SELECT *
    FROM xx_reg_book_load_interface
    WHERE ROW_NUMBER = p_row_number;
    -- Get the inventory details for Asset Addition API
    CURSOR xx_dist_info_cur (p_asset_id NUMBER)
    IS
    SELECT fdh.*
    FROM fa_distribution_history fdh
    WHERE fdh.transaction_header_id_in = (SELECT MIN(transaction_header_id)
    FROM fa_transaction_headers fth
    WHERE fth.asset_id = p_asset_id
    AND fth.transaction_type_code in ('TRANSFER IN', 'TRANSFER IN/VOID') );
    -- AND transaction_header_id_in = p_transaction_id
    -- AND NVL (transaction_units, 1) > 0;
    -- Get the inventory details for Asset Adjustment API
    CURSOR xx_inv_rec_type_adj_cur (p_row_number NUMBER)
    IS
    SELECT fai.invoice_transaction_id_in, fai.deleted_flag,
    fai.invoice_number, fai.po_number, fai.unrevalued_cost,
    fai.project_id, fai.task_id, fai.payables_code_combination_id,
    fai.fixed_assets_cost, fai.source_line_id, fai.payables_cost,
    xrbli.transaction_type_code, fai.ap_distribution_line_number,
    fai.description, fai.po_vendor_id,
    fai.payables_units,
    fai.invoice_id,
    fai.invoice_date
    FROM fa_asset_invoices fai, xx_reg_book_load_interface xrbli
    WHERE fai.invoice_transaction_id_in = xrbli.invoice_transaction_id
    AND xrbli.ROW_NUMBER = p_row_number;
    -- Out parameter for Addition API
    l_return_status VARCHAR2 (1);
    -- Out parameter for Addition API
    l_mesg_count NUMBER := 0;
    -- Out parameter for Addition API and used for error tracking
    l_mesg VARCHAR2 (4000);
    -- Index for inventory record table
    l_dist_rec_count NUMBER := 0;
    l_inv_rec_count NUMBER := 0;
    l_stat_class VARCHAR2(50) ;
    BEGIN
    -- Open XX_ADDITION_CUR cursor by passing the period
    FOR p_asset_addition IN xx_addition_cur (p_row_number)
    LOOP
    -- ASSET_FIN_REC_TYPE Asset Structure
    l_asset_fin_rec.date_placed_in_service :=p_asset_addition.date_placed_in_service;
    l_asset_fin_rec.COST := p_asset_addition.COST;
    l_asset_fin_rec.depreciate_flag := 'YES'; -- YES for all the records
    -- Transaction Info
    /* BEGIN
    SELECT segment4
    INTO l_stat_class
    FROM fa_categories_b fcb
    WHERE fcb.category_id = p_asset_addition.asset_category_id ;
    EXCEPTION WHEN OTHERS THEN
    l_stat_class := NULL ;
    END ;
    IF ( NVL(l_stat_class,'*') = 'I' ) THEN
    l_trans_rec.transaction_subtype := 'AMORTIZED' ;
    END IF ;
    l_trans_rec.who_info := l_who_rec;
    -- ASSET_HDR_REC_TYPE Asset Structure (Asset ID should not be there for Addition API)
    l_asset_hdr_rec.book_type_code := p_asset_addition.book_type_code;
    -- ASSET_DESC_REC_TYPE Asset Structure
    l_asset_desc_rec.asset_number := p_asset_addition.asset_number;
    l_asset_desc_rec.description := p_asset_addition.description; ----modify by anand
    l_asset_desc_rec.current_units := p_asset_addition.current_units;
    l_asset_desc_rec.asset_key_ccid := p_asset_addition.asset_key_ccid;
    -- ASSET_TYPE_REC_TYPE Asset Structure
    l_asset_type_rec.asset_type := p_asset_addition.asset_type;
    -- ASSET_CAT_REC_TYPE Asset Structure
    l_asset_cat_rec.category_id := p_asset_addition.asset_category_id;
    -- Initialize the count
    l_inv_rec_count := 0;
    -- INV_REC_TYPE Invoice Structure
    FOR i IN xx_inv_rec_type_adj_cur (p_row_number)
    LOOP
    --IF l_asset_id_count p_asset_adjustment.asset_id THEN
    l_inv_rec_count := l_inv_rec_count + 1;
    l_inv_trans_rec.transaction_type := i.transaction_type_code;
    --l_inv_rec.source_line_id := i.source_line_id;
    l_inv_rec.fixed_assets_cost := i.fixed_assets_cost;
    l_inv_rec.payables_cost := i.payables_cost;
    l_inv_rec.payables_code_combination_id :=i.payables_code_combination_id;
    l_inv_rec.invoice_number := i.invoice_number;
    l_inv_rec.po_number := i.po_number;
    l_inv_rec.unrevalued_cost := i.unrevalued_cost;
    l_inv_rec.project_id := i.project_id;
    l_inv_rec.task_id := i.task_id;
    l_inv_rec.deleted_flag := i.deleted_flag;
    l_inv_rec.description := i.description;
    l_inv_rec.po_vendor_id := i.po_vendor_id;
    l_inv_rec.ap_distribution_line_number :=i.ap_distribution_line_number;
    l_inv_rec.payables_units := i.payables_units;
    l_inv_rec.invoice_id := i.invoice_id;
    l_inv_rec.invoice_date := i.invoice_date;
    l_inv_tbl (l_inv_rec_count) := l_inv_rec;
    --l_asset_id_count := p_asset_adjustment.asset_id;
    --END IF;
    END LOOP;
    -- ASSET_DIST_REC_TYPE and ASSET_DIST_TBL_TYPE Asset Structure
    FOR i IN xx_dist_info_cur (p_asset_addition.asset_id
    -- , p_asset_addition.transaction_header_id
    LOOP
    l_dist_rec_count := l_dist_rec_count + 1;
    -- l_asset_dist_rec.assigned_to := i.assigned_to;
    l_asset_dist_rec.units_assigned := i.units_assigned;
    l_asset_dist_rec.expense_ccid := i.code_combination_id;
    l_asset_dist_rec.location_ccid := i.location_id;
    l_asset_dist_tbl (l_dist_rec_count) := l_asset_dist_rec;
    END LOOP;
    -- Update to 0 for further use
    l_dist_rec_count := 0;
    --fnd_file.put_line(fnd_file.log, 'Calling the Addition API') ;
    -- Call Addition api
    fa_addition_pub.do_addition
    (p_api_version => 1.0,
    p_init_msg_list => fnd_api.g_false,
    p_commit => fnd_api.g_false,
    p_validation_level => fnd_api.g_valid_level_full,
    x_return_status => l_return_status,
    x_msg_count => l_mesg_count,
    x_msg_data => l_mesg,
    p_calling_fn => 'FA_ADDITION_API', ---modify by anand
    px_trans_rec => l_trans_rec,
    px_dist_trans_rec => l_dist_trans_rec,
    px_asset_hdr_rec => l_asset_hdr_rec,
    px_asset_desc_rec => l_asset_desc_rec,
    px_asset_type_rec => l_asset_type_rec,
    px_asset_cat_rec => l_asset_cat_rec,
    px_asset_hierarchy_rec => l_asset_hierarchy_rec,
    px_asset_fin_rec => l_asset_fin_rec,
    px_asset_deprn_rec => l_asset_deprn_rec,
    px_asset_dist_tbl => l_asset_dist_tbl,
    px_inv_tbl => l_inv_tbl,
    px_inv_rate_tbl => l_inv_rate_tbl
    --fnd_file.put_line(fnd_file.log, 'Addition API returned status as : '|| l_return_status) ;
    IF (l_return_status = fnd_api.g_ret_sts_success)
    THEN
    l_mesg_count := fnd_msg_pub.count_msg;
    IF l_mesg_count > 0
    THEN
    l_mesg :=CHR (10)|| SUBSTR (fnd_msg_pub.get (fnd_msg_pub.g_first,fnd_api.g_false),1,512);
    FOR i IN 1 .. (l_mesg_count - 1)
    LOOP
    l_mesg :=l_mesg|| CHR (10)|| SUBSTR (fnd_msg_pub.get (fnd_msg_pub.g_next,fnd_api.g_false),1,512);
    END LOOP;
    fnd_msg_pub.delete_msg ();
    END IF;
    l_mesg := 'FAILED (' || SQLERRM || '): ' || l_mesg;
    -- Procedure to update XX_REG_BOOK_LOAD_INTERFACE table with rejection reason
    update_error_msg ('Addition', l_mesg, p_asset_addition.ROW_NUMBER);
    ELSE
    -- Display the successful record
    fnd_file.put_line (fnd_file.output,p_asset_addition.asset_number|| ' -> '|| p_asset_addition.description|| ' for asset Addition Success.'); --- modify by anand
    END IF;
    -- Delete PLSQL table and record type variables data
    --empty_rec;
    END LOOP;
    END fa_addition_api;
    tahnk you

    You call do_addition with a wrong set of parameters or you use the wrong datatypes from your parameters.
    Check what parameters ( and their datatypes ) that procedure expects.
    Also check if you have the right privileges for using UPDATE_ERROR_MSG and that a synonym exists for it.
    fa_addition_pub.do_addition
    (p_api_version => 1.0,
    p_init_msg_list => fnd_api.g_false,
    p_commit => fnd_api.g_false,
    p_validation_level => fnd_api.g_valid_level_full,
    x_return_status => l_return_status,
    x_msg_count => l_mesg_count,
    x_msg_data => l_mesg,
    p_calling_fn => 'FA_ADDITION_API', ---modify by anand
    px_trans_rec => l_trans_rec,
    px_dist_trans_rec => l_dist_trans_rec,
    px_asset_hdr_rec => l_asset_hdr_rec,
    px_asset_desc_rec => l_asset_desc_rec,
    px_asset_type_rec => l_asset_type_rec,
    px_asset_cat_rec => l_asset_cat_rec,
    px_asset_hierarchy_rec => l_asset_hierarchy_rec,
    px_asset_fin_rec => l_asset_fin_rec,
    px_asset_deprn_rec => l_asset_deprn_rec,
    px_asset_dist_tbl => l_asset_dist_tbl,
    px_inv_tbl => l_inv_tbl,
    px_inv_rate_tbl => l_inv_rate_tbl
    );

  • Problem executing prinln statement in web application

    Following code works fine in web application but print statements are not being executed. If I run the program as standalone, print statements do execute correctly.I don't know what is the problem.
    import java.sql.*;
    import java.util.Properties;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Adaptor extends Object {
    private final String driverPrefixURL = "jdbc:oracle:oci8:@";
    private final String driver = "oracle.jdbc.driver.OracleDriver";
    private static String ds ="jdbc.datasource";
    private static String username;
    private static String password;
    private static String dataSource;
    private static Adaptor instance = null;
    /** Creates new Adaptor */
    public Adaptor() {
    try
    InputStream is = ClassLoader.getSystemResourceAsStream (ds);
    Properties p = new Properties();
    p.load (is);
    dataSource = p.getProperty("datasource.dbname");
    if (dataSource == null)
    throw new Exception ("Datasource name in null");
    username = p.getProperty("datasource.username");
    password = p.getProperty("datasource.password");
    int vendor = DriverUtilities.ORACLE;
    try
    Class.forName(driver);
    catch(Exception sqle)
    System.err.println("Error making pool: " + sqle);
    catch (Exception e)
    System.out.println(e + " Unable to read resource to get data source");
    // return;
    public synchronized Connection getConnection() throws java.sql.SQLException
    Connection c = null;
    System.out.println("DbAdaptor.getConnection()");
    // logWriter.log("DbAdaptor.getConnection()", LogWriter.INFO);
    try{
    c = DriverManager.getConnection(driverPrefixURL+dataSource, username, password);
    catch(SQLException ex)
    System.out.println ("\n*** SQLException caught in db.free***\n");
    while (ex != null) {
    System.out.println ("SQLState: " +
    ex.getSQLState ());
    System.out.println ("Message: " +
    ex.getMessage ());
    System.out.println ("Vendor: " +
    ex.getErrorCode ());
    ex = ex.getNextException ();
    System.out.println ("");
    return c;
    public String getconnectionInfo()
    return null;
    synchronized public static Adaptor getInstance()
    if (instance == null)
    instance=new Adaptor();
    System.out.println("sending instance on " + new java.util.Date());
    return instance;
    protected void finalize() throws Throwable
    super.finalize();

    System.out.println() statements print to the console of the web server. If you want to print them to the browser, you should use out.println("Some debug info here..."); An alternative is use the log("Some debug info here...") to log the errors etc.,. to the web application log file.
    http://java.sun.com/webservices/docs/1.1/api/javax/servlet/GenericServlet.html#log(java.lang.String)
    http://java.sun.com/webservices/docs/1.1/api/javax/servlet/GenericServlet.html#log(java.lang.String, java.lang.Throwable)

  • Unable to execute java api method with another user than OWF_MGR...

    Sorry if this question seems stupid but I just begin with oracle products... ;-)
    When i specify another user than the owf_mgr, as KWalker for instance, I get permission problems when I use Java API.
    But when I do the same via the web it is OK.
    Dis I miss a step in the installation?
    Thanks
    Roland

    You need to give the execute grant on wf_engine object of owf_mgr to Kwalker.

  • I really have problems understanding adf api

    HI, please
    If some one know about a document explaining in deep adf api, INCLUDING EXAMPLESi, I'll appreciate it, thank you.
    The problem is I'm some stupid and really can't get it.
    I tried to make what I had done in oracle forms, this is finding equivalents to some of their functions, and I really can't
    For the developer team, please don't forget in the jdeveloper 12g to include an extensive group of examples.
    if you could relate to the functions and properties on oracle forms, will be great too.
    at least only for blocks.
    If you want to sell it, I think the best you improve the documentation
    the more developers will enjoy using adf api
    greeting.

    Hi Ronald I can make a simple abm, the point is to create your own personalized abm,
    The features that our navigator has are in example:
    To control the primary keys to be enabled or disabled when you navigate, and apply visual atributes depending if they are enabled or disabled.
    the display of a LOV showing a list of what you queried.
    the display of the records you had queried without quering them.
    etc.
    I can send you and example if you want to see how it works to your mail.
    But i can demostrate no body know really how adf api works, i.e. I had asked for example this
    Hi how can I execute a getQueryHitCount() on getbindings
    and no body could answer it, I was looking for an equivalent of get_block_property('block',CURRENT_RECORD)
    My point Ronald is if oracle want to sell adf, the best you have your documentation the more you will sell it.
    I'm talking of having the same documentation you had for oracle forms.
    if oracle would had done a better documentation of api maybe our customer could be using in this moment adf instead or oracle forms.
    like this http://download.oracle.com/otn_hosted_doc/forms/forms/A73074_01.pdf
    I don't want full or copmlex example only a simple reference to make understand how to perform basic functionality.
    If you could make an equivalent of every property and function in form to adf, showing a simple example will be great specialy for you to, because there will be less need of blogs and questions
    I'm showing an example of what I would like about adf features using an "adf block", to demostrate I'm not asking something you didn't do before.
    NEXT_BLOCK built-in
    Description
    Navigates to the first navigable item in the next enterable block in the navigation sequence. By default,
    the next block in the navigation sequence is the block with the next higher sequence number, as defined
    by the order of blocks in the Object Navigator. However, the Next Navigation Block block property can
    be set to specify a different block as the next block for navigation purposes.
    If there is no enterable block with a higher sequence, NEXT_BLOCK navigates to the enterable block
    with the lowest sequence number.
    Syntax
    PROCEDURE NEXT_BLOCK;
    Built-in Type restricted procedure
    Enter Query Mode no
    Parameters
    none
    NEXT_BLOCK examples
    ** Built-in: NEXT_BLOCK
    ** Example: If the current item is the last item in the
    ** block, then skip to the next block instead of
    ** the default of going back to the first item in
    ** the same block
    ** trigger: Key-Next-Item
    DECLARE
    cur_itm VARCHAR2(80) := :System.Cursor_Item;
    cur_blk VARCHAR2(80) := :System.Cursor_Block;
    lst_itm VARCHAR2(80);
    BEGIN
    lst_itm :=
    cur_blk||’.’||Get_Block_Property(cur_blk,LAST_ITEM);
    IF cur_itm = lst_itm THEN
    Next_Block;
    ELSE
    Next_Item;
    END IF;
    END;
    simple and clear the definition and a very short example.
    thank you for your time :)

  • Problems with Reflection API and intantiating an class from a string value

    I want to instantiate a class with the name from a String. I have used the reflection api so:
    static Object createObject(String className) {
    Object object = null;
    try {
    Class classDefinition = Class.forName(className);
    object = classDefinition.newInstance();
    } catch (InstantiationException e) {
    System.out.println(e);
    } catch (IllegalAccessException e) {
    System.out.println(e);
    } catch (ClassNotFoundException e) {
    System.out.println(e);
    return object;
    Let's say my class name is "Frame1".
    and then if i use:
    Frame1 frm = (Frame1) createObject("Frame1");
    everything is ok but i cannot do this because the name "Frame1" is a String variable called "name" and it doesn't work like:
    name frm = (name) createObject("Frame1");
    where i'm i mistaking?
    Thanks very much!

    i have understood what you have told me but here is a little problem
    here is how my test code looks like
    Class[] parameterTypes = new Class[] {String.class};
    Object frm = createObject("Frame1");
    Class cls = frm.getClass();
    cls.getMethod("pack",parameterTypes);
    cls.getMethod("validate",parameterTypes);
    everything works ok till now.
    usually if i would of had instantiated the "Frame1" class standardly the "cls" (or "frm" in the first question ) object would be an java.awt.Window object so now i can't use the function (proprietary):
    frame_pos_size.frame_pos_size(frm,true);
    this function requires as parameters: frame_pos_size(java.awt.Window, boolean)
    because my cls or frm objects are not java.awt.Window i really don't find any solution for my problem. I hope you have understood my problem. Please help. Thanks a lot in advance.

  • Problem executing programs after instaling Studio 8.1

    I had JDK 1.5 installed on my computer. I earlier used to code my programs either in a text-editor or JCreator & run them from the command prompt.
    I recently installed Studio Enterprise 8.1. My programs execute successfully from the IDE. They also complie successfully from the command prompt. But whenever I try to run them now from command prompt or JCreator, I always get a
    Exception in thread "main" java.lang.NoClassDefFoundError: <class name>
    exception. Even when I am not using packages & the programs being run reside in the current directory only, where java.exe resides.
    Can somebody help me????

    The last few lines of the output are as follows:
    [Loaded java.util.zip.ZipFile$2 from shared objects file]
    [Loaded java.util.zip.Inflater from shared objects file]
    [Loaded java.lang.Math from shared objects file]
    [Loaded java.security.PrivilegedActionException from shared objects file]
    Exception in thread "main" java.lang.NoClassDefFoundError: sample
    [Loaded java.lang.Shutdown from shared objects file]
    [Loaded java.lang.Shutdown$Lock from shared objects file]
    There was a whole series of Loaded module above these, from which I could not figure out any problem.

  • Unique Problem executing a Non Interactive Adobe Invoice form

    I am approaching the forums after going through a tremendous check on both the ABAP Program and the Adobe form .
    We were almost on completion of invoice , everything was working from the header and the main body and we tested it.
    We have been developing the invoice for 35 bus days and we finally reached to Terms page when the adobe form does not show in print preview.
    We removed all the elements in the form which we changed lately and brought it back to the same stage where it was running smoothly, still the same issue , when we run the abap program it says form is executed but does not result in a pdf , our small test programs and default pdf test programs are all showing up in preview.
    ADS is working ,test programs are working fine its the custom program that is not generating a pdf .
    Did u have seen situations like these , any good suggestions to resolve this problem.

    If the test programs are working fine then I think the problem will be with the custom program.
    Please check the program and let me know.
    Thanks,
    Chandra Indukuri

Maybe you are looking for