How to get two out param which is used in Procedure

hi experts,
Am keep on thinking, but not yet answer myself.. so am here
Using Jdev11.1.1.5.0-adfbc.
I had in db, procedure like this
PROCEDURE proc_find_x_cal_year_period
     p_bu                    VARCHAR2,
     p_date                    DATE,
     p_year           OUT          NUMBER,
     p_period             OUT           NUMBER
).................i wrote like this in My AM, Procedure is execution and printing out param values Perfect
    public void ProcFindxCalYearPeriod(String pbu,
                                    oracle.jbo.domain.Date pdate)
            CallableStatement st = null;
            try{
            String sql = "begin proc_find_x_cal_year_period" +
                "(:pbu," +
                ":pdate," +
                ":pyear," +
                ":pperiod)" +
                ";" +
                "end;";
            st=getDBTransaction().createCallableStatement(sql,this.getDBTransaction().DEFAULT);
            st.setObject("p_bu",pbu);
            st.setObject("pdate",pdate);
            st.registerOutParameter("pyear",Types.VARCHAR);
            st.registerOutParameter("pperiod",Types.VARCHAR);
            st.execute();
            System.out.println("pyear" +(String)st.getObject("pyear"));
            System.out.println("pperiod" +(String)st.getObject("pperiod"));
            catch(SQLException e)
            throw new JboException(e);
            finally
            if(st!=null)
            try{
            st.close();
            catch(SQLException e){}
            }what i did/my need:
i paste this ProcFindxCalYearPeriod in my one of the Eo and while am validating one of the field,this procedure should call at the time of calling, two out parameters set into two of the corresponding setter methods.
(String)st.getObject("pyear")
(String)st.getObject("pperiod")value is here i want to set into setAttributeInternal("x",(String)st.getObject("pyear") );
setAttributeInternal("x1",(String)st.getObject("pperiod") );
i hope you all understood.

In your procedure you should create an object to hold the outputs and return this object
public ProcResult ProcFindxCalYearPeriod(String pbu, oracle.jbo.domain.Date pdate)
            CallableStatement st = null;
            try{
            String sql = "begin proc_find_x_cal_year_period" +
                "(:pbu," +
                ":pdate," +
                ":pyear," +
                ":pperiod)" +
                ";" +
                "end;";
            st=getDBTransaction().createCallableStatement(sql,this.getDBTransaction().DEFAULT);
            st.setObject("p_bu",pbu);
            st.setObject("pdate",pdate);
            st.registerOutParameter("pyear",Types.VARCHAR);
            st.registerOutParameter("pperiod",Types.VARCHAR);
            st.execute();
            System.out.println("pyear" +(String)st.getObject("pyear"));
            System.out.println("pperiod" +(String)st.getObject("pperiod"));
            //assuming that you are getting the desired outputs
            *ProcResult outputs=new ProcResult();*
            *outputs.setOutParam1((String)st.getObject("pyear"));*
            *outputs.setOutParam2((String)st.getObject("pperiod"));*
            *return outputs;*
            catch(SQLException e)
            throw new JboException(e);
            finally
            if(st!=null)
            try{
            st.close();
            catch(SQLException e){}
            }Now you call this procedure like this
ProcResult execProc= ProcFindxCalYearPeriod(paramValue1, paramValue2);
//you can get the proc outputs by calling
String firstOutput = execProc.getOutParam1();
String second = execProc.getOutParam2();But the question is why you are calling setAttributeInternal() while you are validating an attribute?
I think this is not correct.

Similar Messages

  • How to get the form name which is used in standard tcode like me23n in sap

    how to get the form name which is used in standard tcode like me23n in sap
    Moderator message: four out of four threads locked, please read and understand the following before posting further:
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|Asking Good Questions in the SCN Discussion Spaces will help you get Good Answers]
    Edited by: Thomas Zloch on Nov 18, 2011 1:32 PM

    how to get the form name which is used in standard tcode like me23n in sap
    Moderator message: four out of four threads locked, please read and understand the following before posting further:
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|Asking Good Questions in the SCN Discussion Spaces will help you get Good Answers]
    Edited by: Thomas Zloch on Nov 18, 2011 1:32 PM

  • How to get the OUT value of a PL/SQL procedure?

    that is to say, I want to get a number form a procedure which code is familiar to:
    create or replace procedure get_salary(
    name in varchar2,
    id in varchar2,
    salary out number
    In java code, How to get the value of salary?
    PLZ

    You'll want something like this:
    CallableStatement stmt;
    Connection        conn;
    << Create connection to database >>
    stmt = conn.prepareCall( "{call get_salary( ?, ?, ? )}" );
    stmt.setString( 1, someName );
    stmt.setString( 2, someID   );
    stmt.registerOutParameter( 3, java.sql.Types.INTEGER );
    stmt.executeUpdate();
    int outSalary = stmt.getInt( 3 );Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to Get In & Out of Match, Get your Downloads and Run

    How to Get In & Out of Match, Get your Downloads and Run 
    So you have read the marketing hype, and are thinking what you really want is to pay for the service to upgrade your low quality bitrate files to a bit better 256KBPS rate easily, as don’t fancy rebuying/ reimporting or other method
    This guide should show you the fastest route to achieve you upgrades
    It assumes you’re working from your main music library, and know something about IT, and have <25k of music files
    Backup your music files
    If you know how to do this, its simple right – so once done then move to step 2, if not read below so you don’t blame me for a loss
    Transfer Hardware
    your choice the transfer hardware, suggest offline harddrive via USB3.0 (blue USB connector/eSata/ 1494b/1GB NIC/etcetera but your call
    If you use USB2.0/ 100MB NIC/1394a or other lower transfer method, accept the time hit
    Don’t use Time Backup/local disk backup software unless you have RAID 5 setup or better (and if wondering what that is, you almost certainly don’t then)
    Don’t use  internet backup service unless you live next door to the hosting company, with stunning internet connection to envy 99.9% of the human race, remember this is the fast method folks)
    Transfer Software
    I am assuming you know how to do a copy n paste/ robocoby/xcopy/drag n drop or whatever method turns you on via finder/explorer/cmd window ect
    Caveat #01: If not sure how to do above, then stop now as you are not IT literate ready for this
    Find your music files and back them up
    Now keep the computer running, preferably with nothing else running from this point for ease of use bar an active internet connection, and power saving switched off
    If you know where the files are great, backup the files, but some don’t so for them as below
    Caveat #02: if you don’t know how to find them your most likely on default settings, or sitting with a legacy from a past upgraded machine - below should help but you might want to stop now if you have never been curious about the location before
    Within iTunes , go to [Edit/Preferences/Advanced] and note down the location shown for Itunes Media Location
    In the same location of preferences, hit [Keep iTunes Media Folder organised] and let the application do its stuff.  You will end up with the location in 1ciii a ready to copy location which for simplicity of topic, copy the whole folder and its subfolders.  You may end up with some extra copies of music files (an iTunes safety mechanism, but it won’t show in the folder location, and we can ignore later on)
    Enable Match (after paying for the service)
    Run Match
    Accept that the Apple iTunes process is not perfect, may crash/stop/pause and reboots will be needed, and we can move on so to speak. Key here is you cannot do an unattended script or assume no end user interaction needed L
    Turn on iTunes Match, notice the new ITunes Match on the left hand sidebar, click it, then hit the Start button – if it works and you eventually get to STEP 3 perfect.
    If it fails before getting to STEP 3, reboot and restart
    If this still fails to get to STEP 3, then create a new iTunes database (browse forums on how to do), read your media files from the location in 1civ
    Stop MATCH  (the upload process only, not the service)
    Once STEP 3 starts, CLICK STOP - ASAP, as all this does it upload data, and you don’t want to do this, just get your upgraded files (remember the title of this entry your reading!)
    This also avoids future issues with Album art lost
    Delete Matched low bitrate files
    Create a NEW SMART playlist, with two criteria
    Show all files with bitrate is less then 256
    Show all files where iCloud status is MATCHED
    In the new playlist, click it and it shows the files we want to blow away. 
    Click Edit / Select All then
    Click ctrl in windows/apple  (cmd) logo in mac, and press delete button, ensuring you do NOT tick the delete from iCloud Option.  Now want a few mins for it do do its stuff.
    Download Upgraded BitRate Files
    In the same location as 5, reselect all, and right click, and select the option to download all, and off it goes
    On the lefthand sidebar in iTunes, click Downloads, and you will then see in the middle bottom screen an option for simultaneous downloads (select it)
    Your done Just let the app now do its stuff. I would ignore the message saying you can get on with other things, and use anther machine, preferably not using the same internet connection.
    Optional Steps:
    Click randomly from the Itunes/Matched/256KBPS listed files, and play them.  Not all the files, one every 30 or so, and just the start, then last few seconds to check not dead or corrupt files.
    Update your Step 1 backup with the new files, which is going to take up more space, guess at 40%.
    Kill your iTunes Match account (both the recurring automatic subscription, and  the account if not continuing to use the store part of iTunes)

    bump

  • How to get graininess out of black areas?

    How to get grainiesss out of black or dark areas?

    you can't.
    a) too low light recording results in 'noise' due to in-camera amplification
    b) noise is handled by the compressors as 'content'; which results in blocky artefacts.
    for FCPX are plugins avail, as the famous Natress DeNoiser, which smoothen such pictures (very well). a $$$ solution.-
    next time more light …

  • How to get two parameters in the same line of selection screen?

    hello
    i need to get my selection csreen like bellow.
    r1 radiobuttion  -some space --p1 parameter
    i should not get the parameter in the next line of  radiobuttion.
    how to get two parameters in the same line of selection screen?

    hi....
    modify the following code
    it will work
    SELECTION-SCREEN BEGIN OF BLOCK SL1 WITH FRAME TITLE TEXT-003.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(15) TEXT-001
                     FOR FIELD P1.
    SELECTION-SCREEN POSITION POS_LOW.
    PARAMETERS : P1 TYPE   C USER-COMMAND R2 RADIOBUTTON GROUP R2 DEFAULT 'X',
      P2 TYPE SCARR-CARRNAME,
      P3 TYPE CHAR1 RADIOBUTTON GROUP R2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK SL1.

  • How to get two empty columns in reporting?

    Hi Experts,
    How to get Two empty columns in  a report, i have taken a formula and i have given '=0' in the formula box after executing the query that two columns containing zero's, but i don't want zero's, i want to display empty columns.
    pl help to do this,
    thanks & regards
    venakt

    Hi
    In the Query designer go to Properties and Select Active n Zero Supression
    also select Supress Zeros from the drop down.
    Regards
    M.A

  • How to get the  Checked box which are clicked

    for(int k=0;.....
    jsp code
    <input type=checkbox name=checkbox value='<%=k%>' >
    how to get the particular Checkbox which are checked???

    String[] checkedValues = request.getParameterValues("checkbox");You'll get an array filled with the values only for the checked boxes. In other words, if no boxes are checked, checkedValues will be null or checkedValues.length == 0, not sure, going from memory.
    Hope this helps!
    Patrick

  • Someone not me put a flash drive in the dvd slot   any ideas on how to get it out?

    Someone not me of course put a fash card into the dvd slot.  its in the computer how could i get it out?

    Can also use a slim set of tweezers to try to pull it out. Just be careful, so you don't damage the drive any. Hopefully, it's not already damaged by the flash card being put in.

  • My 4gb SDHC flash mem card is stuck in DVD slot on my iMac 27". How to get it out?

    I misplaced my 4GB flash memory card (Canon camera) in the DVD slot (above the card slot) and it disappeared while I was trying to get it out. Naturally I inadvertently (spelled "stupidly") knocked it inside and could not figure out how to get it out. The dust rubber "shields" hide it and I've tried to find it with a toothpick and wedge it out, to no avail. Are there any ideas or suggestions others may have used to get it out (I know turning it on it side and shaking won't work). Why in the world did they design it like it is -- I've had it happen to me and others have also told me of their misadventures, but they also were able to gradually get it out. This time, it's in too deep. Can I ignore it and still use the CD/DVD slot without it blowing up?

    You might need to take to an Apple technician or apple dealer to let them take apart the iMac and remove the flash memory card. if you're very careful you might try a pair of needle nose pliers and a flashlight but it's easy to do damage to the DVD internal mechanical if you're not real careful.
    A good story to tell your grand kids maybe ;-)
    Good luck

  • How to get data out of XML?

    Hi,All.
    I am running SAX (JAXP1.01) in Applet to process XML file. My question is how to get data out of xml format according to the field name (@age,@rank etc)
    and write into string buffer seperated by comma.
    Should I use SAX or DOM? (file size is big)
    My xml as follow :
    <ROOT>
    <FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@team/relay}">
         <ObjectName>Field124</ObjectName>
         <FormattedValue>HUNTER</FormattedValue>
         <Value>HUNTER</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@age}">
         <ObjectName>Field125</ObjectName>
         <FormattedValue> 19</FormattedValue>
         <Value> 19</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@Rank}">
         <ObjectName>Field126</ObjectName>
         <FormattedValue>43</FormattedValue>
         <Value>43</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{results.athrel_name}">
         <ObjectName>Field127</ObjectName>
         <FormattedValue>1-1 NORRIE</FormattedValue>
         <Value>1-1 NORRIE</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield2}">
         <ObjectName>Field128</ObjectName>
         <FormattedValue>1:54.75</FormattedValue>
         <Value>1:54.75</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield1course}">
         <ObjectName>Field129</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield1std}">
         <ObjectName>Field130</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield2course}">
         <ObjectName>Field131</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield2std}">
         <ObjectName>Field132</ObjectName>
         <FormattedValue>QT</FormattedValue>
         <Value>QT</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@points(left)}">
         <ObjectName>Field133</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@pointsdecimal}">
         <ObjectName>Field134</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:decimal" FieldName="{@points(right)}">
         <ObjectName>Field135</ObjectName>
         <FormattedValue>0</FormattedValue>
         <Value>0.00</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield1}">
         <ObjectName>Field136</ObjectName>
         <FormattedValue>1:55.98</FormattedValue>
         <Value>1:55.98</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@Rank}">
         <ObjectName>Field137</ObjectName>
         <FormattedValue>43</FormattedValue>
         <Value>43</Value>
    </FormattedReportObject>
    Repeat...
    </FormattedReportObject>
    </ROOT>
    ------------------------------------------------

    For big files use SAX: quicker and less memory usage.
    The xerces parser from Apache has some examples. Basically what you do is scan the XML, remembering what tag you are and once you find the right tag, read the contents.

  • The headphone connector broke off inside my Ipod, any suggestions on how to get it out?

    The headphone connector broke off inside my Ipod, any suggestions on how to get it out?

    See this previous discussion:
    Broken headphone jack! 3.5mm dillemma....: Apple Support Communities

  • I have a 5C, the screen broken it only shows the backlight. Problem is its locked in airplane mode any ideas on how to get it out?

    Phone is locked in Airplane mode, Is there a way to get it out without having to use the touch screen because it is broken.

    No. That is a software switch, and could only be activated/deactivated from the screen. I suggest you make an appointment at the Genius Bar of the nearest Apple store to see about getting the device repaired. Many of the Apple Stores are now equipped to repair/replace screens in house. I had one replaced today for my daughter's iPhone 5c in the US and the cost was $129.00 plus tax.

  • HT4623 After i updated my iPhone i realized i do not have my camera anymore how to get it back? I also using a new notebook so I do not have a back up to transfer it from.  Please help

    After i updated my iPhone i realized i do not have my camera anymore how to get it back? I also using a new notebook so I do not have a back up to transfer it from.  Please help

    I'm assuming you mean you don't have your camera application (which is not saved on any backup anyway).
    One way to find it is to get to your home screen, swipe the screen from right to left, and type "Camera" in the search field.  Camera is a core Apple app and cannot be deleted, so it must be there somewhere.
    An alternate approach is to do Settings > General > Reset > Reset Home Screen Layout

  • I had a "pdf export" plan and upgraded it to "pdf pack" plan and it was charged the full price of the new plan in my credit card. How to get the refund of the non used part of the old plan?

    I had a "pdf export" plan and upgraded it to "pdf pack" plan and it was charged the full price of the new plan in my credit card. How to get the refund of the non used part of the old plan?

    Hi edilsoncf,
    I've seen your question on several forums, and responded there. Did you get your subscription sorted out?
    See: How do I get a refund if I have multiple Acrobat service subscriptions?
    Best,
    Sara

Maybe you are looking for

  • Difference in Reserved(KB) values in disk usuage by table report for a single table

    hi Recently we have moved a table(only data) from one of our prod server which is 36GB through import\export wizard. Reserved size\data size in new server is very much less compared to our prod server. DETAILS IN PROD-->reserve -36.4gb,data-10gb,indx

  • Any luck with a 3.1.3 fix? Aside from the one(s) that have yet to work

    Any luck with 3.1.3 anyone? I am captive to a wi-fi connection and its getting really annoying not being able to use the 3g service when I leave my house. The solution(s) provided so far have done nothing to fix the problem. This is in regards to app

  • DVD Pro 4 upgrade to FCP Studio?

    Hi I have DVD Pro 2 on my Mac and can buy a v4 upgrade which gives me the chance to get the FCP Studio from Apple store. My question is: What do I need for the upgrade to the Studio version? Point is, I have DVD Pro 2 installed on my Mac but the v4 I

  • WM Stock Removal

    Hi, I have the following situation (and i'm kinda new to WM), hope someone can assist. - materials/batches are received from the vendor in container and/or barrels. It is possible that a quanitity of material from one batch is delivered in a few cont

  • Report file not found error

    We recently upgraded from JBoss 4.2 to JBoss 5.1.  Our Crystal reports were working fine in JBoss 4.2, but we've had several issues in 5.1.  after resolving several issues, I have reached a point where the application iis unable to locate the .rpt fi