Problems with PL/SQL packages

Hello,
I face the following problem with PL/SQL stored procedures. The Oracle
version is 8.0.5 on Windows NT 4. The PL/SQL package has a set of procedures and functions.
The main procedure of the PL/SQL package is triggered from VC++ executable. If for some reason,
an exception is caught in the stored procedure (like no_data_found
exception), then the following problem occurs.
If we try to trigger the stored procedure again through the VC++ executable,
the variables in the stored procedures have the values as in the previous
execution. They are not getting initialised. (The same database connection
is used in VC++ executable).
Currently, only if a new connection to the database is used , the problem is
solved.
Also, change in the input parameters of the procedure is not reflected, once the procedure fails because of any exception. Only the input which was given during the time of execution when the procedure failed,is considered.
What could be the reason for this problem and how can this be corrected?
Please send in your suggestions.
Thanks and Regards,
Ramya Priya
null

Hi Keith,
I am connecting to the database as the package owner..
I have noticed earlier that I have problems when capturing triggers also.. The content of one large trigger contains 36371 characters and when capturing it from DB, the content was truncated to 28020 characters in Designer.
Our ideas with capturing the DB packages/procedures were to use the Designer as version control system.
We wanted to have all objects used in a project in Designer.. entities, tables, triggers, packages, procedures, Forms files, etc. in order to make a configuration for a project release.
Thank you,
Claudia

Similar Messages

  • Problem with pl/sql package

    hi,
    i have requirement where i have to create a PL/SQL package which takes two parameters from procedure where i shd give fromdate and todate as parameter below is the code i am getting two errors
    create or replace PACKAGE AgentTimeReport_XDO_pkg AS
    PROCEDURE AgentTimeReport_Demo_RTF(o_errbuf OUT VARCHAR2
                   ,o_retcode OUT VARCHAR2,p_fromdate IN VARCHAR2,p_todate IN VARCHAR2 );
    END AgentTimeReport_XDO_pkg
    CREATE OR REPLACE
    PACKAGE BODY AGENTTIMEREPORT_XDO_PKG AS
    PROCEDURE AgentTimeReport_Demo_RTF(o_errbuf OUT VARCHAR2
                   ,o_retcode OUT VARCHAR2,p_fromdate IN
    VARCHAR2,p_todate IN VARCHAR2 ) AS
    cursor cs_agenttime
    is
    SELECT
    incident.Incident_Number as ServiceRequestNumber,
    TO_CHAR (incident.incident_date,'DD-MON-YYYY') as ServiceRequestDate,
    incident.Summary as Summary,
    agenttime.agentname as AgentName,
    to_char(agenttime.agentstarttime,'DD-MM-YYYY HH24:MI') as StartTime,
    to_char(to_date('00:00:00','HH24:MI:SS') +
    (agenttime.endtime-agenttime.agentstarttime), 'HH24:MI') as TimeSpent
    FROM cs_incidents_all_b incident,cs_agenttime_agv agenttime
    WHERE agenttime.incident_id=incident.incident_id
    AND incident.incident_date between to_date(:p_fromdate,'DD-MON-YYYY')
    AND to_date(:p_todate,'DD-MON-YYYY');
    BEGIN
    /*First line of XML data should be ‘<?xml version="1.0" encoding='utf-8'?>’*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<?xml version="1.0" encoding="utf-8"?>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<AGENTTIME>');
    FOR cs_agent IN cs_agenttime
    LOOP
    /*For each record create a group tag <G_AGENT_TIME> at the start*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_AGENT_TIME>');
    /*Embed data between XML tags for ex:- <EMP_NAME>Abeesh</EMP_NAME>*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<SERVICEREQUEST_NUMBER>' ||
    cs_agent.ServiceRequestNumber
    || '</SERVICEREQUEST_NUMBER>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<SERVICEREQUEST_DATE>' ||
    cs_agent.ServiceRequestDate ||
    '</SERVICEREQUEST_DATE>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<START_TIME>' || cs_agent.StartTime
    ||'</START_TIME>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<TIME_SPENT>' || cs_agent.TimeSpent
    ||'</TIME_SPENT>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_AGENT_TIME>');
    END LOOP;
    /*Finally Close the starting Report tag*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</AGENTTIME>');
    END AgentTimeReport_Demo_RTF;
    END AGENTTIMEREPORT_XDO_PKG;
    Error(20,44): PLS-00049: bad bind variable 'P_FROMDATE'
    Error(21,13): PLS-00049: bad bind variable 'P_TODATE'
    Help me out
    naveen

    create or replace PACKAGE AgentTimeReport_XDO_pkg AS
    PROCEDURE AgentTimeReport_Demo_RTF(o_errbuf OUT VARCHAR2
    ,o_retcode OUT VARCHAR2,p_fromdate IN VARCHAR2,p_todate IN VARCHAR2 );
    END AgentTimeReport_XDO_pkg
    CREATE OR REPLACE
    PACKAGE BODY AGENTTIMEREPORT_XDO_PKG
    AS
    PROCEDURE AgentTimeReport_Demo_RTF
        o_errbuf OUT VARCHAR2 ,
        o_retcode OUT VARCHAR2,
        p_fromdate IN VARCHAR2,
        p_todate   IN VARCHAR2 )
    AS
      CURSOR cs_agenttime(p_fromdate VARCHAR2,p_todate VARCHAR2)
      IS
         SELECT incident.Incident_Number                                                                      AS ServiceRequestNumber,
          TO_CHAR (incident.incident_date,'DD-MON-YYYY')                                                      AS ServiceRequestDate  ,
          incident.Summary                                                                                    AS Summary             ,
          agenttime.agentname                                                                                 AS AgentName           ,
          TO_CHAR(agenttime.agentstarttime,'DD-MM-YYYY HH24:MI')                                              AS StartTime           ,
          TO_CHAR(to_date('00:00:00','HH24:MI:SS') + (agenttime.endtime-agenttime.agentstarttime), 'HH24:MI') AS TimeSpent
           FROM cs_incidents_all_b incident,
          cs_agenttime_agv agenttime
          WHERE agenttime.incident_id=incident.incident_id
        AND incident.incident_date BETWEEN to_date(p_fromdate,'DD-MON-YYYY') AND to_date(p_todate,'DD-MON-YYYY');
    BEGIN
      /*First line of XML data should be ‘<?xml version="1.0" encoding='utf-8'?>’*/
      FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<?xml version="1.0" encoding="utf-8"?>');
      FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<AGENTTIME>');
      FOR cs_agent IN cs_agenttime(p_fromdate,p_todate)
      LOOP
        /*For each record create a group tag <G_AGENT_TIME> at the start*/
        FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_AGENT_TIME>');
        /*Embed data between XML tags for ex:- <EMP_NAME>Abeesh</EMP_NAME>*/
        FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<SERVICEREQUEST_NUMBER>' || cs_agent.ServiceRequestNumber '</SERVICEREQUEST_NUMBER>');
        FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<SERVICEREQUEST_DATE>' cs_agent.ServiceRequestDate || '</SERVICEREQUEST_DATE>');
        FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<START_TIME>' || cs_agent.StartTime ||'</START_TIME>');
        FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<TIME_SPENT>' || cs_agent.TimeSpent ||'</TIME_SPENT>');
        FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_AGENT_TIME>');
      END LOOP;
      /*Finally Close the starting Report tag*/
      FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</AGENTTIME>');
    END AgentTimeReport_Demo_RTF;
    END AGENTTIMEREPORT_XDO_PKG;Ravi Kumar

  • Problem with procedure in package

    Problem with procedure in package:
    create table accounts
    (acno number(10),
    name varchar2(20),
    balance number(10,2));
    create package banking is
    procedure new_acct(acno NUMBER, name IN VARCHAR);
    procedure acct_dep(acno IN NUMBER, amount IN NUMBER);
    procedure acc_wdr(acno IN NUMBER, amount IN NUMBER);
    procedure acc_bal(acno IN NUMBER, bal OUT NUMBER);
    function acc_drwn(acno IN NUMBER) RETURN BOOLEAN;
    end banking;
    create or replace package body banking is
    procedure new_acct ( acno IN number,
    name IN varchar) is
    begin
    insert into accounts
    (acno, name, balance)
    values
    (acno, name,0);
    end;
    procedure acct_dep(acno IN NUMBER,
    amount IN NUMBER) is
    begin
    update accounts
    set balance = balance + amount
    where acno = acno;
    end;
    procedure acc_wdr(acno IN NUMBER,
    amount IN NUMBER) is
    begin
    update accounts
    set balance = balance - amount
    where acno = acno;
    end;
    procedure acc_bal(acno IN NUMBER,
    bal OUT NUMBER) is
    begin
    declare cursor c_balance(i_acno IN accounts.acno%type) is
    select balance
    from accounts
    where acno = i_acno;
    acc_bal accounts.balance%type;
    begin
    if c_balance%isopen then
    close c_balance;
    end if;
    open c_balance(acno);
    fetch c_balance into acc_bal;
    close c_balance;
    end;
    end;
    function acc_drwn(acno IN NUMBER) RETURN BOOLEAN is
    begin
    declare cursor c_balance(i_acno IN accounts.acno%type) is
    select balance
    from accounts
    where acno = i_acno;
    bal accounts.balance%type;
    begin
    if c_balance%isopen then
    close c_balance;
    end if;
    open c_balance(acno);
    fetch c_balance into bal;
    close c_balance;
    if bal < 0 then
    return true;
    else
    return false;
    end if;
    end;
    end;
    end banking;
    begin
    banking.new_acct(123,'FRANKS');
    end;
    execute banking.acct_dep(123,100);
    execute banking.acc_wdr(123,50);
    Works fine up to this point, however when running the balance check the balance amount is not visible?
    SQL> set serveroutput on
    SQL> begin
    2 declare
    3 bal accounts.balance%type;
    4 begin
    5 banking.acc_bal(123,bal);
    6 dbms_output.put_line('Franks balance is '||bal);
    7 end;
    8 end;
    9 /

    procedure acc_bal(acno IN NUMBER,
       bal OUT NUMBER)
    is
    cursor c_balance(i_acno IN accounts.acno%type) is
       select balance
       from accounts
       where acno = i_acno;
       l_acc_bal accounts.balance%type;
    begin
       open c_balance(acno);
       fetch c_balance into l_acc_bal;
       close c_balance;
       bal := l_acc_bal;
    end;

  • Has anybody had the following error while trying to download iTunes 10.5? There is a problem with Windows Installer package. A program required for this install to complete could not be run.

    Has anybody had the following error while trying to download iTunes 10.5? There is a problem with Windows Installer package. A program required for this install to complete could not be run.

    Go to "control panel" then "add or remove programs".  Highlight "Apple software update"  Choose "change" click "Repair"  This should do the trick.  Then download and install iTunes 10.5 again.

  • Tried to install iTunes 10.5 this morning but an error appeared saying "problem with windows installer package. A program required for this install to complete could not be run." Can someone please help

    I tried to install iTunes 10.5 this morning but an error appeared saying "problem with windows installer package. A program required for this install to complete could not be run." Can someone please help

    Firstly, are you installing iTunes for the first time or are you updating your current version of iTunes?
    If you're installing iTunes for the first time have you tried redownloading the installer package? Perhaps the file you downloaded originally is corrupted...
    http://www.apple.com/itunes/
    If you've tried that, then try installing iTunes as your computer's administrator. To do this right-click the install package and choose "Run as administrator".
    If you're updating iTunes to the most recent version try repairing the Apple Software Update program on your computer. It's under the add/remove programs.
    1. Open the control panel
    2. Open Add/Remove programs (called "Programs and Features" in Windows 7)
    3. Navigate to "Apple Software Update" in the list and click on it
    4. Click on "Change" then select "Repair" (or just select the repair option in Windows 7)
    Once you repair this, try running iTunes and the update again.
    Fingers crossed!

  • HT1349 Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.

    Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.
    Would appreciate help...its driving me up the wall!!

    Perhaps let's first try updating your Apple Software Update.
    Launch Apple Software Update ("Start > All Programs > Apple Software Update"). Does it launch and offer you a newer version of Apple Software Update? If so, choose to install just that update to Apple Software Update. (Deselect any other software offered at the same time.)
    If the ASU update goes through okay, try another iTunes install. Does it go through without the errors this time?

  • Having trouble trying to install itunes 10.5. Receive message saying 'There is a problem with this installer package. A program required for this install to complete could not be found. Please contact product vendor'

    Having trouble trying to install itunes 10.5. Receive message saying 'There is a problem with this installer package. A program required for this install to complete could not be found. Please contact product vendor'

    Managed to get the installation sorted. Go to Control Panel, and where you have a list of all installed programs, repair all the Apple/Itunes related programs. Installation worked fine after that. Hopefully it helps you out too!

  • Has anyone else had problem with the STANDARD package?

    Hi Oracle gurus, has anyone here had the same problem with the STANDARD package? Or do I have to reinstall Oracle to make it work?
    Thanks.
    Ben

    missesboggs wrote:
    I literally just called AT&T and Apple about this today.  I was having issues with iMessage and texting my husband.  His texts back to me would show up as my name.  Turns out it's because we share the same AppleID.  So, I'm currently trying to change mine, but it hasn't worked so far.  I'm on hold with Apple right now to see if I can get it fixed.
    Both of you have registered the same email address for iMessage. If you were using a shared Apple ID and you updated your phones to iOS5, the default will be the Apple ID. Go into settings and change it.

  • HT1926 (iTunes) Problem with Windows installer package?

    (iTunes) Problem with Windows installer package?  I try to install the new version of iTunes but get an error "Problem with Windows installer package.  A Program required for this install could not be run."  Can anyone help shed some light for me as to how to correct this?  I have tried to install the program through Chrome, Explorer and FireFox but have had no success.  I have included a screenshot of the error.  Hopefully it's visable.  Thank you for any help.

    Found answer for anyone else curious.  I love the apple community.  Thanks guys for help!
    https://discussions.apple.com/docs/DOC-3551

  • Trouble with itunes upgrade I receive an error message problem with windows installer package

    I am trying to upgrade itunes.  I am running windows vista 64.  Everytime I try to upgrade I get an error that says Problem with windows installer package.  Anyone know how to fix this?

    No drivers in LowerFilters.
    No drivers in UpperFilters.
    Failed loading CD / DVD drives, error -43. Try doing a repair install on iTunes from the “Add or Remove Programs” control panel.
    I'd start with the following document, with one modification. At step 12 after typing GEARAspiWDM press the Enter/Return key once prior to clicking OK. (Pressing Return adds a carriage return in the field and is important.)
    iTunes for Windows: "Registry settings" warning when opening iTunes

  • Why is itunes saying "there is a problem with this installer package. a program required for this install to complete could not be run. contact your support personnel or package vendor."

    why is itunes saying "there is a problem with this installer package. a program required for this install to complete could not be run. contact your support personnel or package vendor."

    Go to START > ALL PROGRAMS > Apple Software Update. If it offers you a newer version of Apple Software Update, do it but Deselect any other software offered at the same time. Once done, try another iTunes install
    If you can't find ASU, go to Control Panel:
    XP - Add n Remove Programs
    Win7/Vista - Programs n Features
    Highlight ASU, click change then Repair.

  • Compile problem with javax.sql

    I have upgraded to sdk 1.4.2 and tried to compile my code. I am getting an error on import javax.sql.* where I am getting the message "Package does not exist" error. As the result of this any class that is in this package gets an error as well. I am using ant to do the build. It does not seem to have a problem with the other import files and some of my code do compile fine except for this one that contains javax.sql.*. Thanks for your help.

    Are you sure that the javax.sql.* stuff exists in your javac classpath? It seems not to be there. Look for j2ee.jar (from Sun J2EE SDK), or something like that (something like it probably came with your app server).
    Mike

  • Problem in PL/SQL package

    Hi All
    I have following problem in My wrapper package, Kindly help me to figure out this issue.
    My Package:
    type ebs_pricelistHeader_row is record(
      REQUEST_ID                       NUMBER,
      PRICE_LIST_NAME             VARCHAR2(240 BYTE),
    DESCRIPTION                    VARCHAR2(2000 BYTE),
      CURRENCY_CODE             VARCHAR2(30 BYTE),
      BRANCH                             VARCHAR2(40 BYTE),
      EFFECTIVE_FROM             DATE,
      EFFECTIVE_TO                  DATE,
      PRICE_LIST_ID                  NUMBER,
      PROCESS_FLAG               VARCHAR2(1 BYTE)
    My Package body is working fine and also return result that i need
    Problem in Wrapper Package body:
    When i use my above package in SOA Suite a wrapper package and its body gets created but the wrapper package body gives the following errors. this is very strange as i already did these types of tasks that are working fine and no issue with their wrappers.
    Please see the error in my wrapper package body
    http://s24.postimg.org/tco1o0951/wrapper.jpg
    errors are
    Error(12,1): PL/SQL: Statement ignored
    Error(12,10): PLS-00302: component 'DESCRIPTION' must be declared
    Error(13,1): PL/SQL: Statement ignored
    Error(13,10): PLS-00302: component 'CURRENCY_CODE' must be declared
    Error(14,1): PL/SQL: Statement ignored
    Error(14,10): PLS-00302: component 'BRANCH' must be declared
    Please let me know if any other thing is required.
    Kindly help me to resolve this issue. thanks a lot
    Muhammad Nasir

    Wrapper package code
    create or replace
    PACKAGE BODY WRAPPER_EBSPRICELISTSPRCDATA IS
    FUNCTION PL_TO_SQL2(aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_ROW)
    RETURN EBS_SOA_PRICELIX1199385X1X20 IS
    aSqlItem EBS_SOA_PRICELIX1199385X1X20;
    BEGIN
    -- initialize the object
    aSqlItem := EBS_SOA_PRICELIX1199385X1X20(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
    , NULL, NULL, NULL, NULL);
    aSqlItem.REQUEST_ID := aPlsqlItem.REQUEST_ID;
    aSqlItem.PRICE_LIST_NAME := aPlsqlItem.PRICE_LIST_NAME;
    aSqlItem.DESCRIPTION := aPlsqlItem.DESCRIPTION;
    aSqlItem.CURRENCY_CODE := aPlsqlItem.CURRENCY_CODE;
    aSqlItem.BRANCH := aPlsqlItem.BRANCH;
    aSqlItem.EFFECTIVE_FROM := aPlsqlItem.EFFECTIVE_FROM;
    aSqlItem.EFFECTIVE_TO := aPlsqlItem.EFFECTIVE_TO;
    aSqlItem.PRICE_LIST_ID := aPlsqlItem.PRICE_LIST_ID;
    aSqlItem.PROCESS_FLAG := aPlsqlItem.PROCESS_FLAG;
    aSqlItem.CREATED_BY := aPlsqlItem.CREATED_BY;
    aSqlItem.CREATION_DATE := aPlsqlItem.CREATION_DATE;
    aSqlItem.LAST_UPDATED_BY := aPlsqlItem.LAST_UPDATED_BY;
    aSqlItem.LAST_UPDATE_DATE := aPlsqlItem.LAST_UPDATE_DATE;
    aSqlItem.LAST_UPDATE_LOGIN := aPlsqlItem.LAST_UPDATE_LOGIN;
    aSqlItem.EN_PRICE_LIST_NAME := aPlsqlItem.EN_PRICE_LIST_NAME;
    aSqlItem.AR_PRICE_LIST_NAME := aPlsqlItem.AR_PRICE_LIST_NAME;
    RETURN aSqlItem;
    END PL_TO_SQL2;
    FUNCTION SQL_TO_PL2(aSqlItem EBS_SOA_PRICELIX1199385X1X20)
    RETURN APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_ROW IS
    aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_ROW;
    BEGIN
    aPlsqlItem.REQUEST_ID := aSqlItem.REQUEST_ID;
    aPlsqlItem.PRICE_LIST_NAME := aSqlItem.PRICE_LIST_NAME;
    aPlsqlItem.DESCRIPTION := aSqlItem.DESCRIPTION;
    aPlsqlItem.CURRENCY_CODE := aSqlItem.CURRENCY_CODE;
    aPlsqlItem.BRANCH := aSqlItem.BRANCH;
    aPlsqlItem.EFFECTIVE_FROM := aSqlItem.EFFECTIVE_FROM;
    aPlsqlItem.EFFECTIVE_TO := aSqlItem.EFFECTIVE_TO;
    aPlsqlItem.PRICE_LIST_ID := aSqlItem.PRICE_LIST_ID;
    aPlsqlItem.PROCESS_FLAG := aSqlItem.PROCESS_FLAG;
    aPlsqlItem.CREATED_BY := aSqlItem.CREATED_BY;
    aPlsqlItem.CREATION_DATE := aSqlItem.CREATION_DATE;
    aPlsqlItem.LAST_UPDATED_BY := aSqlItem.LAST_UPDATED_BY;
    aPlsqlItem.LAST_UPDATE_DATE := aSqlItem.LAST_UPDATE_DATE;
    aPlsqlItem.LAST_UPDATE_LOGIN := aSqlItem.LAST_UPDATE_LOGIN;
    aPlsqlItem.EN_PRICE_LIST_NAME := aSqlItem.EN_PRICE_LIST_NAME;
    aPlsqlItem.AR_PRICE_LIST_NAME := aSqlItem.AR_PRICE_LIST_NAME;
    RETURN aPlsqlItem;
    END SQL_TO_PL2;
    FUNCTION PL_TO_SQL1(aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_TAB)
    RETURN EBS_SOA_PRICELIX1199385X1X19 IS
    aSqlItem EBS_SOA_PRICELIX1199385X1X19;
    BEGIN
    -- initialize the table
    aSqlItem := EBS_SOA_PRICELIX1199385X1X19();
    IF aPlsqlItem IS NOT NULL THEN
    aSqlItem.EXTEND(aPlsqlItem.COUNT);
    IF aPlsqlItem.COUNT>0 THEN
    FOR I IN aPlsqlItem.FIRST..aPlsqlItem.LAST LOOP
    aSqlItem(I + 1 - aPlsqlItem.FIRST) := PL_TO_SQL2(aPlsqlItem(I));
    END LOOP;
    END IF;
    END IF;
    RETURN aSqlItem;
    END PL_TO_SQL1;
    FUNCTION SQL_TO_PL1(aSqlItem EBS_SOA_PRICELIX1199385X1X19)
    RETURN APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_TAB IS
    aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_TAB;
    BEGIN
    aPlsqlItem := EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_TAB();
    aPlsqlItem.EXTEND(aSqlItem.COUNT);
    IF aSqlItem.COUNT>0 THEN
    FOR I IN 1..aSqlItem.COUNT LOOP
    aPlsqlItem(I) := SQL_TO_PL2(aSqlItem(I));
    END LOOP;
    END IF;
    RETURN aPlsqlItem;
    END SQL_TO_PL1;
    FUNCTION PL_TO_SQL3(aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_ROW)
    RETURN EBS_SOA_PRICELISX1199385X1X2 IS
    aSqlItem EBS_SOA_PRICELISX1199385X1X2;
    BEGIN
    -- initialize the object
    aSqlItem := EBS_SOA_PRICELISX1199385X1X2(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
    , NULL, NULL, NULL, NULL);
    aSqlItem.REQUEST_ID := aPlsqlItem.REQUEST_ID;
    aSqlItem.PRICE_LIST_NAME := aPlsqlItem.PRICE_LIST_NAME;
    aSqlItem.PRODUCT_VALUE := aPlsqlItem.PRODUCT_VALUE;
    aSqlItem.PRODUCT_DESC := aPlsqlItem.PRODUCT_DESC;
    aSqlItem.UOM := aPlsqlItem.UOM;
    aSqlItem.PRIMARY := aPlsqlItem.PRIMARY;
    aSqlItem.VALUE := aPlsqlItem.VALUE;
    aSqlItem.EFFECTIVE_FROM := aPlsqlItem.EFFECTIVE_FROM;
    aSqlItem.EFFECTIVE_TO := aPlsqlItem.EFFECTIVE_TO;
    aSqlItem.PROCESS_FLAG := aPlsqlItem.PROCESS_FLAG;
    aSqlItem.CREATED_BY := aPlsqlItem.CREATED_BY;
    aSqlItem.CREATION_DATE := aPlsqlItem.CREATION_DATE;
    aSqlItem.LAST_UPDATED_BY := aPlsqlItem.LAST_UPDATED_BY;
    aSqlItem.LAST_UPDATE_DATE := aPlsqlItem.LAST_UPDATE_DATE;
    aSqlItem.LAST_UPDATE_LOGIN := aPlsqlItem.LAST_UPDATE_LOGIN;
    aSqlItem.PRICE_LIST_ID := aPlsqlItem.PRICE_LIST_ID;
    RETURN aSqlItem;
    END PL_TO_SQL3;
    FUNCTION SQL_TO_PL3(aSqlItem EBS_SOA_PRICELISX1199385X1X2)
    RETURN APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_ROW IS
    aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_ROW;
    BEGIN
    aPlsqlItem.REQUEST_ID := aSqlItem.REQUEST_ID;
    aPlsqlItem.PRICE_LIST_NAME := aSqlItem.PRICE_LIST_NAME;
    aPlsqlItem.PRODUCT_VALUE := aSqlItem.PRODUCT_VALUE;
    aPlsqlItem.PRODUCT_DESC := aSqlItem.PRODUCT_DESC;
    aPlsqlItem.UOM := aSqlItem.UOM;
    aPlsqlItem.PRIMARY := aSqlItem.PRIMARY;
    aPlsqlItem.VALUE := aSqlItem.VALUE;
    aPlsqlItem.EFFECTIVE_FROM := aSqlItem.EFFECTIVE_FROM;
    aPlsqlItem.EFFECTIVE_TO := aSqlItem.EFFECTIVE_TO;
    aPlsqlItem.PROCESS_FLAG := aSqlItem.PROCESS_FLAG;
    aPlsqlItem.CREATED_BY := aSqlItem.CREATED_BY;
    aPlsqlItem.CREATION_DATE := aSqlItem.CREATION_DATE;
    aPlsqlItem.LAST_UPDATED_BY := aSqlItem.LAST_UPDATED_BY;
    aPlsqlItem.LAST_UPDATE_DATE := aSqlItem.LAST_UPDATE_DATE;
    aPlsqlItem.LAST_UPDATE_LOGIN := aSqlItem.LAST_UPDATE_LOGIN;
    aPlsqlItem.PRICE_LIST_ID := aSqlItem.PRICE_LIST_ID;
    RETURN aPlsqlItem;
    END SQL_TO_PL3;
    FUNCTION PL_TO_SQL0(aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_TAB)
    RETURN EBS_SOA_PRICELISX1199385X1X1 IS
    aSqlItem EBS_SOA_PRICELISX1199385X1X1;
    BEGIN
    -- initialize the table
    aSqlItem := EBS_SOA_PRICELISX1199385X1X1();
    IF aPlsqlItem IS NOT NULL THEN
    aSqlItem.EXTEND(aPlsqlItem.COUNT);
    IF aPlsqlItem.COUNT>0 THEN
    FOR I IN aPlsqlItem.FIRST..aPlsqlItem.LAST LOOP
    aSqlItem(I + 1 - aPlsqlItem.FIRST) := PL_TO_SQL3(aPlsqlItem(I));
    END LOOP;
    END IF;
    END IF;
    RETURN aSqlItem;
    END PL_TO_SQL0;
    FUNCTION SQL_TO_PL0(aSqlItem EBS_SOA_PRICELISX1199385X1X1)
    RETURN APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_TAB IS
    aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_TAB;
    BEGIN
    aPlsqlItem := EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_TAB();
    aPlsqlItem.EXTEND(aSqlItem.COUNT);
    IF aSqlItem.COUNT>0 THEN
    FOR I IN 1..aSqlItem.COUNT LOOP
    aPlsqlItem(I) := SQL_TO_PL3(aSqlItem(I));
    END LOOP;
    END IF;
    RETURN aPlsqlItem;
    END SQL_TO_PL0;
    PROCEDURE ebs_soa_pricelist_pkg$ebs_soa (EBS_PRICELISTLINES OUT EBS_SOA_PRICELISX1199385X1X1,
    EBS_PRICELISTHEADERS OUT EBS_SOA_PRICELIX1199385X1X19
    ) IS
    EBS_PRICELISTLINES_ APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_TAB;
    EBS_PRICELISTHEADERS_ APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_TAB;
    BEGIN
    APPS.EBS_SOA_PRICELIST_PKG.EBS_SOA_PRICELISTS_PRC(EBS_PRICELISTLINES_,
    EBS_PRICELISTHEADERS_
    EBS_PRICELISTLINES := WRAPPER_EBSPRICELISTSPRCDATA.PL_TO_SQL0(EBS_PRICELISTLINES_);
    EBS_PRICELISTHEADERS := WRAPPER_EBSPRICELISTSPRCDATA.PL_TO_SQL1(EBS_PRICELISTHEADERS_);
    END ebs_soa_pricelist_pkg$ebs_soa;
    END WRAPPER_EBSPRICELISTSPRCDATA;

  • Problem with native SQL cursor in generic data source

    Hi, All!
    I am implementing generic data source based on FM.
    Because of complicated SQL I canu2019t use Open SQL and RSAX_BIW_GET_DATA_SIMPLE-example u201Cas isu201D.
    So, I have to use Native SQL. But Iu2019ve got a problem with a cursor. When I test my data source in RSA3, everything is Ok. But, if I start appropriate info-package, I get error u201CABAP/4 processor: DBIF_DSQL2_INVALID_CURSORu201D. It happens after selecting of 1st data package in line u201CFETCH NEXT S1 INTOu2026u201D. It seems to me that when system performs the second call of my FM the opened cursor has already been disappeared.
    Did anyone do things like this and what is incorrect?
    Is it real to make generic data source based on FM with using Native SQL open, fetch, closeu2026

    Hi Jason,
    I don't think this SQL is very valuable It is just an aggregation with some custom rules. This aggregation is performing on info-provider which consists of two info-cubes. Here we have about 2 billion records in info-provider and about 30 million records in custom db-table Z_TMP (certainly, it has indexes). I have to do this operation on 21 info-providers like this and I have to do this 20 times for each info-provider (with different values of host-variable p_GROUP)
    SELECT T.T1, SUM( T.T2 ), SUM( T.T3 ), SUM( T.T4 )
            FROM (
                    SELECT F."KEY_EVENT06088" AS T1,
                            F."/BIC/EV_COST" + F."/BIC/EV_A_COST" AS T2,
                            DECODE( D.SID_EVENTTYPE, 23147, 0,
                                                          23148, 0,
                                                          23151, 0,
                                                          23153, 0,
                                                          23157, 0,
                                                          23159, 0,
                                                          24896734, 0,
                                                          695032768, 0,
                                                          695029006, 0,
                                                          695029007, 0,
                                                          695036746, 0, F."/BIC/EV_COST") +
                              DECODE( D.SID_EVENTTYPE, 23147, 0,
                                                          23148, 0,
                                                          23151, 0,
                                                          23153, 0,
                                                          23157, 0,
                                                          23159, 0,
                                                          24896734, 0,
                                                          695032768, 0,
                                                          695029006, 0,
                                                          695029007, 0,
                                                          695036746, 0, F."/BIC/EV_A_COST") AS T3,
                            DECODE( D.SID_EVENTTYPE, 23147, F."/BIC/EV_DURAT",
                                                          23148, F."/BIC/EV_DURAT",
                                                          23151, F."/BIC/EV_DURAT",
                                                          23153, F."/BIC/EV_DURAT",
                                                          23157, F."/BIC/EV_DURAT",
                                                          23159, F."/BIC/EV_DURAT",
                                                          24896734, F."/BIC/EV_DURAT",
                                                          695032768, F."/BIC/EV_DURAT",
                                                          695029006, F."/BIC/EV_DURAT",
                                                          695029007, F."/BIC/EV_DURAT",
                                                          695036746, F."/BIC/EV_DURAT", 0) AS T4
                      FROM "/BIC/VEVENT0608F" F,
                           Z_TMP G,
                           "/BIC/DEVENT06085" D
                      WHERE F."KEY_EVENT06088" = G.ID
                            AND F."KEY_EVENT06085" = D.DIMID
                            AND G.GROUP_NO = :p_GROUP
                            AND ( F."/BIC/EV_COST" < 0 OR F."/BIC/EV_A_COST" < 0 )
                            AND D.SID_EVENTTYPE <> 695030676 AND D.SID_EVENTTYPE <> 695030678
                    UNION
                    SELECT F."KEY_EVNA06088" AS T1,
                            F."/BIC/EV_COST" + F."/BIC/EV_A_COST" AS T2,
                            DECODE( D.SID_EVENTTYPE, 23147, 0,
                                                          23148, 0,
                                                          23151, 0,
                                                          23153, 0,
                                                          23157, 0,
                                                          23159, 0,
                                                          24896734, 0,
                                                          695032768, 0,
                                                          695029006, 0,
                                                          695029007, 0,
                                                          695036746, 0, F."/BIC/EV_COST") +
                              DECODE( D.SID_EVENTTYPE, 23147, 0,
                                                          23148, 0,
                                                          23151, 0,
                                                          23153, 0,
                                                          23157, 0,
                                                          23159, 0,
                                                          24896734, 0,
                                                          695032768, 0,
                                                          695029006, 0,
                                                          695029007, 0,
                                                          695036746, 0, F."/BIC/EV_A_COST") AS T3,
                            DECODE( D.SID_EVENTTYPE, 23147, F."/BIC/EV_DURAT",
                                                          23148, F."/BIC/EV_DURAT",
                                                          23151, F."/BIC/EV_DURAT",
                                                          23153, F."/BIC/EV_DURAT",
                                                          23157, F."/BIC/EV_DURAT",
                                                          23159, F."/BIC/EV_DURAT",
                                                          24896734, F."/BIC/EV_DURAT",
                                                          695032768, F."/BIC/EV_DURAT",
                                                          695029006, F."/BIC/EV_DURAT",
                                                          695029007, F."/BIC/EV_DURAT",
                                                          695036746, F."/BIC/EV_DURAT", 0) AS T4
                    FROM "/BIC/VEVNA0608F" F,
                         Z_TMP G,
                         "/BIC/DEVNA06085" D
                    WHERE F."KEY_EVNA06088" = G.ID
                          AND F."KEY_EVNA06085" = D.DIMID
                          AND G.GROUP_NO = :p_GROUP
                          AND ( F."/BIC/EV_COST" < 0 OR F."/BIC/EV_A_COST" < 0 )
                          AND D.SID_EVENTTYPE <> 695030676 AND D.SID_EVENTTYPE <> 695030678
                 ) T
            GROUP BY T.T1

  • Error with PL/SQL package

    Hi ,
    I have written a package specification given below :
    create or replace PACKAGE BILL_PACKAGE AS
    storeId varchar2(5);
    startDate varchar2(10);
    FUNCTION F_Bill(str_id IN tel_tr_ltm_bl_py.id_str_rt%TYPE,ws_id IN tel_tr_ltm_bl_py.id_ws%TYPE,v_date IN tel_tr_ltm_bl_py.dc_dy_bsn%TYPE) RETURN boolean;
    END BILLPAYPACKAGE;
    I have written the package body also .Now when i am calling the function F_Bill , I am gettin this error :
    PLS-00201: identifier 'BILL_PACKAGE.STARTDATE' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 3, column 1:
    PLS-00201: identifier 'BILL_PACKAGE.STOREID' must be declared
    ORA-06550: line 3, column 1:
    PL/SQL: Statement ignored
    This same package is running fine on another local database.
    What could be the reason for this?
    Is this an acess issue ?In db which we are getting an error , we are using a user 'ConUser' to connect to a schema 'b_owner'.
    How can we check this if this is a privilege issue.
    Thanks!

    >
    This same package is running fine on another local database.
    What could be the reason for this?
    Is this an acess issue ?In db which we are getting an error , we are using a user 'ConUser' to connect to a schema 'b_owner'.
    How can we check this if this is a privilege issue.The user "ConUSer" needs execute privileges for the pacakge.
    Also it depends how he calls the package or the variables in it.
    You can check the privs with
    select * from all_tab_privs where table_name = 'BILL_PACKAGE';this must be run as user ConUser.
    You could also have a problem with name resolution. The name of the package is not BILL_PACKAGE. It is "b_owner.BILL_PACKAGE".
    If you omit the schema name then the current user is tried. So if you call BILL_PACKAGE then this is translated into "ConUSer.BILL_PACKAGE".
    You can change this by creating a synonym like
    create synonym bill_package for b_owner.bill_package;

Maybe you are looking for

  • Unable to open URL attachment from SBWP in CRM WEB UI

    Hello Gurus, Need your help please. I'm having some problem opening the URL attachment from SBWP via CRM 7 WEB UI (I used a Transaction Launcher for SBWP). The attachment is a Webdynpro application.  I am able to open the attachment in SAP GUI, but n

  • ASM Disk preparation for Datafiles and FRA in Oracle 10g RAC Inst

    Dear Friends, Please clarify wheteher the below method is correct to confiure ASM disks for Datafiles and FRA Partitions provided by IT team for OCR and Voting Disk /dev/sda1 - 150 GB (For +DATA) /dev/sda2 - 100 GB (For +FRA) OS     : RHEL 5.6 (64 Bi

  • SAP Webdispatcher Setup for J2EE 640

    Dear Basis Guru's, I am trying to setup SAP Webdispatcher for our customer system. J2EE Instance is installed  in a hostname called javadev which is in a domain where all other SAP Instnaces are setup ( XYZ.COM). I have installed SAP Webdispatcher in

  • OBJECTS_OBJREF_NOT_ASSIGNED error on selection

    Hi Experts, I am getting crazy trying to figure out whats going on here. I have a Webdynpro screen for creating purchase requisitions and it has been showing a OBJECTS_OBJREF_NOT_ASSIGNED runtime error to the test user when he selects a value on a Ra

  • Will not download 1080p content properly

    I am attempting to upgrade my eligible content to 1080p.  All but two downloaded correctly (though that's debateable because it shows twice in iTunes). Anyway, I have two movies that say they can be downloaded, so I do.  I wait a few hours.  It's don