How to handle the procedure that reutrn object types as out parameter

I have a procedure where it returns object(CREATE OR REPLACE TYPE xyz AS OBJECT) as a OUT parameter.
Now i have to pull the data from this type and need to send the data in excel.
Procedure will fetch data and assign it to object with lot of validations and local parameters variables..
How can i push the data from the out parameter and need to send that in excel..Its an oracle database 10g..

here's a basic example...
SQL> set serveroutput on;
SQL> create or replace type t_obj as object (x number, y number);
  2  /
Type created.
SQL> ed
Wrote file afiedt.buf
  1  create or replace package mypkg as
  2    procedure testit(p_obj out t_obj);
  3    procedure callme;
  4* end;
  5  /
Package created.
SQL> ed
Wrote file afiedt.buf
  1  create or replace package body mypkg as
  2    procedure testit(p_obj out t_obj) is
  3    begin
  4      p_obj := t_obj(1,2);
  5    end;
  6    procedure callme is
  7      v_obj t_obj;
  8    begin
  9      testit(v_obj);
10      dbms_output.put_line('X='||v_obj.x||' Y='||v_obj.y);
11    end;
12* end;
SQL> /
Package body created.
SQL> exec mypkg.callme;
X=1 Y=2
PL/SQL procedure successfully completed.
SQL>

Similar Messages

  • Please help me how concatenate all the error messages and send it as out parameter value.

    Hi Experts,
    Please help me how concatenate all the error messages and send it as out parameter value.
    Thanks.

    Agree with Billy, exception handling is not something that is done by passing parameters around.
    PL/SQL, like other languages, provides a suitable exception handling mechanism which, if used properly, works completely fine.  Avoid misuing PL/SQL by trying to implement some other way of handling them.

  • How to handle the events of business object (BAPI)

    Hi,
    How to register to BAPI event and handle?
    For example, for a business object 'inv', there is an event as 'created'.
    I want to insert entry in a z table when an inv is created.
    I assume that the 'created' event is triggered when an inv is created.
    How i can register to that event and handle that event so that i can
    insert an entry in z table.
    Thanks,
    Prasad

    ComponentListener?
    : jay

  • How to handle the records that contain different number of columns

    hi all,
    I have a file (as source data)includes order information like:
    H,P001,Smith,Sunnyvale
    D,P001,PR97623,150,10.99,Ice cream
    D,P001,PR33267,45,32.66,Popcorn
    T,P001
    H,P003,Williams,San Jose
    X,P003,PR23563,19,25.54,Peanuts
    T,P003
    I want to transfer the file record to three target tables,
    the record marked "H" to "Summary" table and sum money of the detail
    the record marked "D" to "Detail" table
    the record marked "X" to "Error" table
    the expect result as below:
    Summary table
    Order_No Customer Address Total_Money
    P001 Smith Sunnyvale 3118.2
    (※3118.2=150*10.99+45*32.66)
    Detail table
    Order_No Prodcut_Id Prodcut_Name Quantity Price
    P001 PR97623 Ice cream 150 10.99
    P001 PR33267 Popcorn 45 32.66
    Error table
    Head Order_No Record_No
    X P003 6
    (※6 is the line no in the file)
    How can I do this in ODI , could anyone give some hints?

    Hi AGUI,
    You can do this by the following way,
    1) create the File datastore for the file with 6 columns
    while creation select the following option file format as Delimited
    record seperator as MS-DOS and field sep as other specify "," in the text box.
    -- check the file datastore maps correctly by view the data.
    2) create the interface int1 for transfer the data from this file to temp table( the temp table should have one more column for getting the line number( it should be the sequence number).
    3) create the another interface int2, in this interafce you need to transfer the data from the[b] temp table to Detail table (use filter for gatting D record.
    4) create the interace int3 transfer the data from the temp table to Summary table. please keep the total_money field as null for this interace
    and use Odi procedure for updating this field with reference of details table.
    5) create interface int4 for transfer the error date by transferinf from temp table to error table.
    Thanks,
    Madha

  • How to handle the call transaction in method of a custom business object

    Hello all,
    There is a custom report " RPTCORAPP" for approving leaves . As per my requirement i have develop a copy of leave workflow and for approval process i have call  "RPTCORAPP" in Custom method of custom object. i have made a transaction for this custom report for approving attendances. I am calling this method though call transaction statement within method.
    Problem: while approving the attendance workitem is not disappearing from the portal. Problem is due to call transaction statement.
                   once workitem come to the user, user click on it. control goes to the report, which display all the leave to approve on
                   the portal.
                   If after approving/ rejecting attendance user close the screen.workflow remain in the "process" status.Control wont come  back after call transaction statement in the method.
                 At the same time if user clicks on back button inspite of closing the screen. it is working fine. workitem disappears from the portal.
    How to handle the scenarion. if after approving/rejecting, i want the control to come back to the NEXT STATEMENT after call transactionstatement in my method.
    Please help it out........:)

    Hi swami,
    thanks for reply. but i am not using BDC in my method. iam just calling a custom transaction thriugh statement
    Call transaction 'ZHR_APPROVE_CLINOUT'. This transaction directly run the report RPTCORAPP and display all the request.

  • How to handle the Date & Time Object?

    Hi,
    I have big problem.I am working on j2ee application(using jsp & servlets).I am using Jboss App Server. The server is placed in India.
    But there is two offices, one is in India ,another one is in USA.
    But i want to handle the date and timestamp object commonly,
    But this object should be able to calculate their own date & timestamp object( e.g.,India,USA ).How can i solve this issue?.
    Help appreciated!
    P.Saravanan

    Hi,
    I have big problem.I am working on j2ee application(using jsp & servlets).I am using Jboss App Server. The server is placed in India.
    But there is two offices, one is in India ,another one is in USA.
    But i want to handle the date and timestamp object commonly,
    But this object should be able to calculate their own date & timestamp object( e.g.,India,USA ).How can i solve this issue?.
    Help appreciated!
    P.Saravanan

  • How do I get to see the procedures that are running?

    Good afternoon. How do I get to see the procedures that are running?
    Thanks.
    Daniel Sousa

    I agree with Billy: never use undocumented procedures, they can change anytime.
    The link you were referring to is probably this one: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:767025833873 and the post was not from Tom Kyte but from a reviewer.
    The comment from Tom was:
    sorry -- x$ tables are magical and I give no help in that area at all.
    The same user that posted the query added in a following post:
    Tom, I agree 101% - X$ are "magical", they CAN and WILL change anytime, without warning, and worse, NO READ-CONSISTENCY here - so, in a very busy db, chances are of X$ being "late", not refreshed, or alike.
    Regards.
    Al

  • How to handle the contents of a carousel

    Hi,all
    Now I have a trouble in how to handle the contents of a carousel.
    I use codes below:
              locator=(PMTElementaryStream es).getDvbLocator();
              serviceDomain.attach(locator);
              dsmccObject=new DSMCCObject(serviceDomain.getMountPoint().toString());
              file=new File(serviceDomain.getMountPoint().toString());
              content= file.list();
    to get some file or directories, such as *.png, *.class, *.mpg, xml, MHPdataloader, sport, and so on.
    How can I do for next procedure.
    Thank you.

    What do you want to do next? You can create a DSMCCObject that refers to one of the files in your carousel, and use this to control the loading and caching of that file. To actually read a file, however, you will need to create a FileInputStream or RandomAccessFile that refers to that file. You can then use this like any other file access.
    This may help you:
    // create a new ServiceDomain object to represent
    // the carousel we will use
    ServiceDomain carousel = new ServiceDomain();
    // now create a Locator that refers to the service
    // that contains our carousel
    org.davic.net.Locator locator;
    locator = new org.davic.net.Locator
      ("dvb://123.456.789");
    // finally, attach the carousel to the ServiceDomain
    // object (i.e. mount it) so that we can actually
    // access the carousel.  In this case, we don't specify
    // the stream containing the carousel in the locator, so
    // we pass in the carousel ID as part of the attach
    // request
    carousel.attach(locator, 1);
    // we have to create our DSMCCObject with an absolute
    // path name, which means we need to get the mount point
    // for the service domain
    DSMCCObject dsmccObj;
    dsmccObj = new DSMCCObject(carousel.getMountPoint(),
      "graphics/image1.jpg");
    // now we create a FileInputStream instance to access
    // our DSM-CC object.  Alternatively, we could create
    // a RandomAccessFile instance if we wanted random
    // instead of sequential access to the file.
    FileInputStream inputStream;
    inputStream = new FileInputStream(dsmccObj);
    // we can now use the FileInputStream just like any
    // other FileInputStream

  • How to handle the table control in bapi?

    how to handle the table control in bapi? example va01.
    i pass multiple line item what is the procedure?
    header detail same .
    eample ship to party
           sale to party.
    line item mulptiple
    10 mat1
    2o mat2
    30 mat3.
    in bapi we can pass sinle line item.
    any way to handle multiple line item pass through the bapi.
    Message was edited by:
            Karthikeyan Pandurangan

    BAPI is not going through the screen flow logic so you need not to worry about the table control. Just check in the BAPi there must be one table parameter for line items just pass one int table with your data to that table parameter it will automatically update the tables.
    Regards
    shiba dutta

  • How to handle stored procedure response having multiple queries

    Hi Friends,
    While working in JDBC to RFC scenario,I faced an issue that my stored procedure is having multiple SQL queries in it. First Select and then update and again some select options.So,how to handle the response of the stored procedure. I read that while using sender JDBC
    " db.processDBSQLStatement=<SQL-Select-Statement>
    Either specify a valid SQL SELECT statement to select the data to be sent from the specified database, or specify an SQL EXECUTE statement to execute a stored procedure that contains exactly one SELECT statement  "
    So, please suggest me is there any other way to catch the output of the stored procedure.Because, if select statement is working fine but if any other quires fails then data inconsistencies can happen.Kindly help me out.
    Thanks and Regards,
    Nutan

    Hi nutan,
    >>Already exception is handled in SP.But,issue is that select will never fail so, sender adapter will get the resultset from select and continue process.But if later any other query fails in SP adpter wont be getting any response.
    Along with exception you need to handle the case when some other query fails. A SP is like a procedure which will do a certain list of activities before providing the output. So during this activity if some query fail then you can send back the response with a message!!!! And in XI handle this error (by routing it to some error receiver etc)
    >>I need to try something like creating a temporary table and inserting the resultset of slect statement in that. and perform all other operations and after successful completion of all the queries.Again i want to get all the values from the temporary table. So,whether I can write such query in the sender communication channel.Please suggest me for this.
    Approach looks ok, but think of the delay for JDBC sender adapter. IT will invoke your SP and will wait for it to fill a table and do all the processing. I guess this may become a issue for you.
    Check on the frequency of this interface and message size before taking this design approach
    Regards
    Suraj

  • How to handle the OK button of the parameters prompt of a crystal report

    Hi,
    how to handle the OK button of the parameters prompt of a crystal report in vba.NET?
    I want to use the parameter prompt from the crystal report itself and I want to know when the report is ready. I need to export programatically by sending email to a list of employees after the parameters has been set. The emails I send depends on the results of the report.
    Im using a CrystalReportViewer control  in VS2010 and Crystal Report for VS2010 v13.0.1.220.

    Right. But the parameter screen is driven by the viewer. Unless you create your own parameter screen and pass the parameters to the report via code.
    Another thing I am not sure about:
    "Then by code I want to read all the employees id from the report and send email to them with specified pages of the report. (1 page per employee)"
    How do you plan on reading the employee ID from the report? I am not aware of any API that will read a value in a report so that you can then decide what page to send to whom.
    I think you're approaching this kinda backwards. A question to ask is; can you do what you are trying to do in code in the CR designer? If not, using APIs will not work either. I suspect your approach should be a report that uses an employee filter. Run the report for employee x, get the report populated with the data for that employee and email it. Repeat for employee x1, employee x2, etc.
    - Ludek

  • How to handle the stale cheques in EBRS

    Dear Guru's
    Can any bady explain me how to handle the stale cheque cases in EBRS, and what are the possible transaction codes using for that.
    Any help can be greatly appreciated.
    Regards,
    kishroe

    Hi
    any bady know about this plz respond.
    Thanks in Advance
    kishore

  • How to handle the extended vo in the extended controller

    Hi,
    I want to know how to handle the extended vo attributes in the extended controller.
    I extended CompetenceElementsVO as 'CompetenceElementsEx' with 2 transient attributes called col1 and col2.
    Here i want to pass value according based on some condition. for this i want to know how to handle these attributes.
    I tried by using the extended vo name in the controller, if i use means then it is throwing error after the extended controller is implemented.
    Same time if i try to refer this attributes from the original vo definition, jdev itself showing error.
    please tell me how to handle this?
    Thanks in advance,
    SAN

    Hi San,
    You have to extend the controller where your region is associated with,
    And in that controller you get the AM(if there is more than one AM and your VO is associated with a child AM, first you have to get your required AM) and then
    get the ViewObject(standard).
    Then you should be able to get your newly added attributes.
    Please find the below sample code to get the AM handle and VO from there, update the code according to your requirement,
         Get all the VOs under the Root AM
         writeLog(pageContext, "Room AM"+ pageContext.getRootApplicationModule());
    String[] rootViewNames = pageContext.getRootApplicationModule().getViewObjectNames();
    /* writeLog(pageContext," Length of the VOs from Rootm AM "+rootViewNames.length);
    for (int j =0 ;j<rootViewNames.length ;j++ )
    writeLog(pageContext,j +" Value "+rootViewNames[j]);
         // Get requested AM from Root am
    public OAApplicationModule getRequestedAM(OAPageContext pageContext, String requestedAMName)
    writeLog(pageContext,"Requested AM called to check the AM "+requestedAMName );
    String amName = "";
    String objectivesAMName = requestedAMName;//"ObjectivesAM";
    String nestedAMArray[] = pageContext.getRootApplicationModule().getApplicationModuleNames();
    pageContext.writeDiagnostics(this,"Root AM=>"+pageContext.getRootApplicationModule().getName() + " Child AMs=>"+ nestedAMArray.length,1);
    OAApplicationModule currentAM = null;
    currentAM = (OAApplicationModule)pageContext.getRootApplicationModule();
    for(int i = 0; i < nestedAMArray.length; i++)
    amName = nestedAMArray;
    pageContext.writeDiagnostics(this,"Nested AM Name=>"+amName + "and amName.indexOf(objectivesAMName) "+amName.indexOf(objectivesAMName),1);
    currentAM = (OAApplicationModule)pageContext.getRootApplicationModule().findApplicationModule(amName);
                        //Get the view names
                   String[] viewNames = currentAM.getViewObjectNames();
    for (int i =0 ;i<viewNames.length ;i++ )
    writeLog(pageContext,i +" Value "+viewNames[i]);
    if(!(amName.indexOf(objectivesAMName)==-1))
    pageContext.writeDiagnostics(this,"Found Handle to My Nested AM " + amName ,1);
    break;
    return currentAM;
    Get the VO from the AM
    OAViewObject objAssessmentVO = (OAViewObject)yourAM.findViewObject("yourVO");
    Thanks.
    With Regards,
    Kali.
    OSSi.

  • How to handle the #error in ssrs expression

    hi 
    Please any one help me to resolve this #error ,
    I have a calculated filed in that expression i given a if condition like below 
    data of column is coming like this 0 , 0.0 
    =IIF(Fields!Column1.Value=0,0,((Fields!Column2.Value - Fields!Column1.Value)/( Fields!Column1.Value)))
    how to handle the #error 
    Please let me know any one 

    Hi deepuk23,
    According to your description, when you use the IIF() function in the report you got some error,right?
    The issue can be caused by the column1 and column2 have different datatype, I assumed that one is integer and another is float, when the Column1 is 0 or null,  because IIF() function always evaluates both the true part and the false part, even
    though it returns only one of them, it will throw out the error. 
    To resolve the issue, you should use a nested IIF() function to avoid the zero-divisor in any rate like below:
    =IIF(Fields!Column1.Value=0,0,((Fields!Column2.Value - Fields!Column1.Value)/(IIF(Fields!Column1.Value=0,1,Fields!Column1.Value))))
    For more information, please refer to this article:
    FAQ: Why does the “Attempted to divide by zero” error still happen?
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • How to handle the errors in transformations

    Hi
    I am using SOA, JDev 10.1.3.3.
    How to handle the exceptions in transformations.
    If any thing goes wrong in transformation then how to handle that situation.
    I am not getting any kind of instances like errored out..
    Please help me out
    Regards
    Pavankumar

    I think your issue is that your process is going into manual recovery.
    In the console click on the tab BPEL processes. There is a link on the left for manual recovery. Do you see your processes there?
    What happens if you put your transformation into a scope. The in that scope you have a catch All. In this catch All routine just do a terminate. This will error your process but you should see it appear in the console.
    cheers
    James

Maybe you are looking for

  • Ipod keeps restarting/ wont show up in itunes or my computer...

    Recently my ipod has been freezing after listening to it for about 20-30 minutes, i would reset it and it would remain frozen after the reboot until the battery died. Now it wont even take a charge, it keeps showing the apple symbol then the unhappy

  • Conflict cleaning, reassurance please

    I have around 3200 regular conflicts in an single article of 40 articles the other 39 have no conflicts. today I have 3,100 with no discernable difference between the table dbo.MSmerge_conflict_Orc_Pub_My_Table and the users table My_Schema.My_Table

  • Tap-to-click w/ synaptics

    Anyone have any experience making tap-to-click work with synaptics? I've messed around with it for a while, and can't seem to figure it out, and I kinda miss it. I'm running a gateway m-6843, using the standard synaptics driver on a fairly new arch i

  • List of suported USB printers for AP-Express

    HI, can some one help me in finding an official list of supported usb printers for AP-Express? I have two printers and none of them works. I am thinking of buying new one, but only if I will be able to print via AE....( Canon i-SENSYS MF4730) is the

  • Function not returning any rows

    If I run this code with a standard SQL statement it will return (1) row - which is correct. But when I try to use a function it is not returning any records. Could someone point what I'm doing wrong? Also, if a use BindByName if get Oracle error: ORA