How to Use getDBTransaction() in Controller Class

I am using the below code.
     OADBTransaction tx = (OADBTransaction)getDBTransaction();
                         java.sql.Connection pConncection = tx.getJdbcConnection();
               ConcurrentRequest cr = new ConcurrentRequest(pConncection);
But receiving the below error method getDBTransaction not found in class cust.oracle.apps.pos.changeorder.webui.extendViewOrderPGCO
Should I extend AM and use this code in AM or can I use this code in extended Controller.
Thanks for your help.
HP.

OADBTransaction tx = (OADBTransaction)getDBTransaction();
java.sql.Connection pConncection = tx.getJdbcConnection();
ConcurrentRequest cr = new ConcurrentRequest(pConncection);
Connection conn = (Connection)oapagecontext.getApplicationModule(oawebbean).getOADBTransaction().getJdbcConnection();
ConcurrentRequest cr = new ConcurrentRequest(conn);http://oracleanil.blogspot.com/2009/04/itemqueryvoxml.html
Thanks
--Anil
http://oracleanil.blogspot.com

Similar Messages

  • How to Use JavaScript in Controller Class...

    Hi All,
    Can any one tell me how to use JavaScript in Controller Class.
    Requirement is:
    I have
    Radio Group(RG1),
    Two Radio Buttons(RB1,RB2),
    Two messageTextInput(MTI1,MTI2),
    if i click RB1 i should Prompt to the end user to "Enter value for MTI1" or
    If i click RB2 i should prompt "Enter value for MTI2" while submitting page.
    Please let me know the steps to use JavaScript and the above client validation...
    Regards
    Alem...

    Using javascript is against the standard. I can tell you a workaround instead of you setting the javascript, check if that would be acceptable.
    You can use PPR and set the required property on the messageTextInput on clicking of the radio button. By doing this you will let UIX generate the javascript for you to handle the client side validation. But the validation will happen only on click of the submit button. The visual indicator is good enough to tell that the value has to be entered to the item.

  • How to use these method of class CL_GUI_PDFVIEWER

    how to use these methods in the class CL_GUI_PDFVIEWER
    1) CREATE_ANNOTATION
    2) GET_ANNOTATION_INFO
    3) SET_ANNOTATION_SETTINGS

    Hi,
       Refer
    https://forums.sdn.sap.com/click.jspa?searchID=10926572&messageID=1803295
    Regards
    Kiran

  • How to use commit work in class cl_bls

    Hi,
    When i have used commit work after email sent,
    it goes into dump.
    Here is the code segment:
      try.
        -------- create persistent send request ------------------------
          send_request = cl_bcs=>create_persistent( ).
        -------- create and set document -------------------------------
          pdf_content = cl_document_bcs=>xstring_to_solix( pdf_tab ).
          document = cl_document_bcs=>create_document(
                i_type    = 'PDF'
                i_hex     = pdf_content
                i_length  = bytecount
                i_subject = sub ).  "#EC NOTEXT
        add document object to send request
          send_request->set_document( document ).
        --------- add recipient (e-mail address) -----------------------
        create recipient object
          recipient = cl_cam_address_bcs=>create_internet_address( recip-recip ).
        add recipient object to send request
          send_request->add_recipient( recipient ).
        ---------- send document ---------------------------------------
          sent_to_all = send_request->send( i_with_error_screen = 'X' ).
         commit work.
          if sent_to_all is initial.
            message i500(sbcoms) with recip.
          else.
            message s022(so).
          endif.
      ------------ exception handling ----------------------------------
      replace this rudimentary exception handling with your own one !!!
        catch cx_bcs into bcs_exception.
          message i865(so) with bcs_exception->error_type.
      endtry.
    What could be the reason?
    Is there any way to use commit work in class while sending email as in SO_NEW_DOCUMENT_ATT_SEND_API1 fm?
    Thanks.

    Hi,
    I have used
    submit program.....
    but in update task i have used it.
    "Z_SD_ORDER_UPDATE".    program is a print driver program.
    However error says:
    There is probably an error in the program
    "Z_SD_ORDER_UPDATE".  
    This program is triggered in the update task. There, the
    following ABAP/4 statements are not allowed:
    -  CALL SCREEN
    -  CALL DIALOG
    -  CALL TRANSACTION
    -  SUBMIT
    I used submit as:
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                      WITH output = ' '
                    AND RETURN.
    Instead of submit i want to use commit work but i also get a dump after commit work too.
    How can i use commit work in above code?
    Thanks.

  • How to Use Pattern and Matcher class.

    HI Guys,
    I am just trying to use Pattern and Matcher classes for my requirement.
    My requirement is :- It should allow the numbers from 1-7 followed by a comma(,) again followed by the numbers from
    1-7. For example:- 1,2,3,4,5 or 3,6,1 or 7,1,3 something like that.
    But it should not allow 0,8 and 9. And also it should not allow any Alphabets and special characters except comma(,).
    I have written some thing like..
    Pattern p = Pattern.compile("([1-7])+([\\,])?([1-7])?");
    Is there any problem with this pattern ??
    Please help out..
    I am new to pattern matching concept..
    Thanks and regards
    Sudheer

    ok guys, this is how my code looks like..
    class  PatternTest
         public static void main(String[] args)
              System.out.println("Hello World!");
              String input = args[0];
              Pattern p = Pattern.compile("([1-7]{1},?)+");
              Matcher m = p.matcher(input);
              if(m.find()) {
                   System.out.println("Pattern Found");
              } else {
                   System.out.println("Invalid pattern");
    }if I enter 8,1,3 its accepting and saying Pattern Found..
    Please correct me if I am wrong.
    Actually this is the test code I am presenting here.. I original requirement is..I will be uploading an excel sheets containg 10 columns and n rows.
    In one of my column, I need to test whether the data in that column is between 1-7 or not..If I get a value consisting of numbers other than 1-7..Then I should
    display him the msg..
    Thanks and regards
    Sudheer

  • UIX/JSP - How to use the UIX Controller with UIX/JSP

    After reading the UIX Developers Guide I am under the impression that I could use the UIX Controller with UIX/JSP pages. Is this correct and are there any available examples?
    Bill G...

    It's correct, but I'm afraid we don't have much (read as "any")
    documentation on how to do that - besides reading through the
    gobs of Javadoc and guessing how to put it together.
    Half of the problem is solved by registering JspPageDescriptions
    on a PageBroker (e.g., UIXPageBroker) to tell the UIX Controller
    to use a JSP to render a particular page, instead of a UIX XML
    document.
    The other half is getting the JSP to send requests back to
    the UIX Controller. Depending on how you've chosen to name
    your pages, create either a DefaultPageEncoder or ExtensionPageEncoder
    inside your JSP, and use that to create destination URLs.

  • How to use the opportunity stub classes to retrieve the opportunity objects

    Hello ,
    I have downloaded WSDL file for opportunity and i have created the stub classes by using axis as WSDL to java. Can any body suggest me , how can i use those created stub classes to retrieve the opportunity objects ?.
    Thanks,
    --bdr_09
    Edited by: bdr on Feb 3, 2009 1:54 AM

    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Tools8.html#63055

  • How too use the string tokeniser class to format date strings

    Using the code below I want to write a method which takes a string as a parameter and process it as follows:
    Input: 21/07/62
    Output: 21st July 62
    I wish to do this using the string tokenizer class. Can anyone help??
    import java.io.*;
    public class Input
    public static void main(String args[]) throws IOException
    String theString;
    BufferedReader stdin = new BufferedReader(
    new InputStreamReader(System.in));
    System.out.println("Enter your string now please");
    theString = stdin.readLine(); // throws IOException
    System.out.println("You entered ***" + theString + "***");
    }

    You can certainly use a StringTokenizer to parse your date into three numbers but I think you should use SimpleDateFormat, which will even help you generate your desired format: http://java.sun.com/j2se/1.4/docs/api/java/text/SimpleDateFormat.html

  • How to use user defined exception class

    Hi all
    I just need som help with creating a user defined exception class.
    Im writing a small/simple text editor.
    My exception class looks like this:
    public class myExcp extends Throwable
         private String message;
         public myExcep(String message)
              this.message = message;
         public void display()
              System.out.println(message);
    I would like to use it when a user tries to open a exe-file instead of a txt file.
    Here is some code from the editor:
    if (e.getSource() == open)
    saveOld();
    if (fc.showOpenDialog(null)== JFileChooser.APPROVE_OPTION)
    readFile(fc.getSelectedFile().getAbsolutePath());           
    saveas.setEnabled(true);                
    So, should I use exception here or at the readFile method?
    readfile:
    private void readFile(String fileName)
    try
    String tmp = fileName.substring(fileName.length() -4, fileName.length());
    if (!tmp.equals(".exe"))
    FileReader r = new FileReader(fileName);
    textarea.read(r, null);
    r.close();
    currentFile = fileName;
    label.setText(currentFile);
    changed = false;
    catch (IOException e)
    JOptionPane.showMessageDialog (this, "Cannot find the file " + fileName);
    Where and how do I use my exception class.
    Do I need to create an instance? Where?
    Should the exception class extend Exception instead?
    Thank you in advance /

    Extend Exception, not Throwable. It's a checked exception that way.
    Follow the Sun coding standards and make that exception class name start with a capital letter.
    When you extend Exception, override all four ctors.
    What's that display method you added? Isn't getMessage() good enough?
    You need to create a new instance just before you throw the exception, of course.
    Sounds like a terrible design, by the way. Exceptions shouldn't be used like "go to" for app logic. They should signal unrecoverable conditions. You can easily recover from the situation you've described simply by displaying a pop-up that tells the user to open only text-readable file types. I think that's a better solution.
    %

  • How to use constructer for javafx class

    hi
    when i create an instance of javafx class i do like this :
    var instance = ClassName{
    attribute1 : value1
    attribute2 : value2
    so i have to put all attributes as public ...wich is not respect the OOP rules !!
    how can i avoid this ?
    thx

    to preserve encapsulation you can use the public-init modifier like so
    public-init var foo;This allows initialization from public and read from public but write only from within the same script (file).
    All of the access modifiers are explained here: [http://java.sun.com/javafx/1/tutorials/core/modifiers/|http://java.sun.com/javafx/1/tutorials/core/modifiers/]

  • How to use Common Structure in class!!

    Hi,
    I have 3 different structures being used in the 3 different methods containing one select query and populate the  internal table and exported now i want to use single method and pass the internal table depending on the structure which is receives
    Plz help me how i can achieve.
    Thanks...

    In the class this is how i have declared
    DATA_PACKAGE_STRUCTURE     Instance Attribute     Public     Type     /BIC/CS8E_HNOD     
    Method parameters       SELECT_METHOD                          
    Methods      Exception                                      
    Parameter               Type  Pas       Opt     Typing M     Associated Type
    DATA_PACKAGE            Import                Type          ANY                
    IT_AGRS                          Export               Type          ZTY_AGR_USERS      
    IT_AUTHMAP                   Export               Type          ZTY_ZAGR_AUTH      
    ABORT                             Export               Type         SY-SUBRC           
    i have declared DATA_PACKAGE with type ANY as per ur post let me know how will i create dynamic internal table and
    in attribute declare different structure such as /BIC/CS8E_HNDEL.
    Thanks...

  • How to use a ps3 controller with labview

    Hello, I am trying to implement a ps3 controller in labview but am having trouble. I was wondering if anyone knew how to do this or had any ideas for me. Thanks for the help

    Hi Keaton
    I'm not too sure how the inputs of the controllers work on a lower level, but Sixaxis offers a driver to integrate the ps3 controller onto a pc. It is available at this website:
    http://dl.qj.net/playstation-3/tools-and-utilities/sixaxis-driver-for-pc.html 
    This may be an easier starting point that having to go from scratch. You can look into using the call library functions in labview and access some of the functions that may be available in that driver. This seems like a better choice then pulling out wires and using a daq device to read value since you wont actually have to take apart the controller. That being said, for support on that driver, you might have more luck on the sixaxis forums here:
    http://forums.qj.net/
    Hope this helps
    Luke W

  • How to use method of Standard Class

    Hi all,
                  I want to call a pop up in pcui screen in some standard application with some text. I have made Zclass of  standard SAP class which i am using (cl_bsp_accmod_contact in CRM system).
    I think i have to call 'PRINT_STRING' method of  standard class CL_BSP_ELEMENT.
    <i>I am trying to use this code: </i>
    <b>
    data: lr_data type ref to cl_bsp_element.
      concatenate html 'rohit' into html.  (html is a string)
      lr_data->print_string( html ).</b>
    <u>but it gives a dump:</u>
    You attempted to use a 'NULL' object reference (points to 'noth
    access a component (variable: "lr_data").
    An object reference must point to an object (an instance of a class)
    before it can be used to access components.
    I dont know how to assign object reference to an object???
    Plz help me in this regard,
    Thanks in advance,
    Rohit

    Hi ,
    try and use :
    data: lr_data type ref to cl_bsp_element.
    concatenate html 'rohit' into html. (html is a string)
    lr_data->print_string( html = html ).
    You are creating a variable...but not passing the value to the parameter...it is exactly like callin get_data or get_cell_value...!!
    Hope this helps.
    <i><b>Do reward each useful answer.</b></i>
    Thanks,
    Tatvagna.

  • How to use a Measurement Studio class in MFC

    I am new to MFC coming over from VB.NET.
    I have created a VISA class to measure something from an instrument and have a simple dialog box with a Button to invoke the measurement and display it to a text box. I changed the ID of the control and made a member variable for the text box and can code the OnButtonClick event to display text in the Text box as a test.
    The problem is I cannot seem to create an object of the Visa Class that I built in the OnBnClickedRun()function. I can code the OnInitDialog() to make this measurement:
    double power;
    CGetBandPower BPower;
    BPower.Run(power);
    but want to do it when I click on the button. I am using VS.NET 2003 with Measurement Studio 7.0.
    Help

    Hello,
    I think the following other discussion forum post contains useful information for you:
    http://forums.ni.com/ni/board/message?board.id=232&message.id=1306&requireLogin=False
    In particular, read the posts by the names in blue... you'll find paths to great examples which should help you use VISA in the .NET environment.
    Repost if you continue to have any problems!
    Thank you,
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • How to use Fuzzy Logic Controller for transfer function in labview control and simulation loop?

    I am facing problem with fuzzy PD logic controller for transfer function in control and simulation loop.
    Plz Help me in this regard...................
    i have attache snapshot of my program
    Attachments:
    fuzzy in simulation loop.JPG ‏52 KB

    Hi Sankhadip,
    Sorry for the late response. I was looking at your code and
    I noticed that the graph scale does not start from zero. That might be the
    reason why you don't see the transient in the simulation. To change the scales
    simply double click on the lower limit and set it to zero. If this is not the
    expected results, can you please post the expected results, so we can see what are the
    differences between the results . Also, you might be using different
    solvers, and that gives different results as well.    
    Thanks and have a great day.
    Esmail Hamdan | Applications Engineering | National
    Instruments

Maybe you are looking for