Override doDML for custom type

Hi,
I'm overriding the doDML method of my entity class. Instead of inserting directly into a certain table I redirect the insert handling to a special PL/SQL package method. This works fine, until I want to use a custom as one of the columns of the table / one of the arguments of the package method.
E.g. the custom type looks like this:
  CREATE OR REPLACE TYPE mylist AS TABLE OF VARCHAR2(10);I use this type for a nested table column in a certain table. The PL/SQL does some pre-/post-processing and inserts a new record in the table my entity object is based on. When I create the entity using the Entity wizard it correctly detects the column as of SQL type mylist and Java type oracle.jbo.domain.Array with elements of type String.
Anyway, the prepared statement I create looks something like the following:
  String stmt = "BEGIN mypkg.insert(:1, :2); END;";
  PreparedStatement p = e.getDBTransaction().createPreparedStatement(stmt, 2);
  if (getId() != null) p.setInt(1, getId().intValue());
  else p.setNull(1, Types.INTEGER);I want to set the 2nd parameter (which is of the mylist type) in a similar way. But I don't know which SQL type I should choose from. If I choose Types.ARRAY I get an invalid type error, the same goes for Types.OBJECT, and Types.BLOB. And which set... method should I call on the prepared statement? And what should I pass to this method? The Array object of the results of the getData() method of the Array object?
Regards,
Peter

Types.ARRAY should be the right sql-type
The value should be an oracle.sql.ARRAY instance.
To prepare and return one of this type you
first need to prepare the Array domain for DML by calling arrayDomain.prepareForDML(jdbcconn) (passing in the jdbc connection object) and then call arrayDomain.getData()to use in your setObject() call.

Similar Messages

  • Multiple "Bill To" for Customer type Business Partners

    Hi all!
    Can someone tell me when the functionality of Multiple "Bill To" addresses for Customer type Business Partners became available? I have a customer on 2007A SP00 PL06 and we cannot create more than one, while in my test system at 2007A SP00 PL41 I do.
    Thanks,
    Richard.

    Dear Richard,
    You are requested to check this in the latest patch and see if the issue is resolved for you.
    Becasue in earlier patches this problem is there.
    In case the issue is not resolved, please update the message.
    Regards
    Vikas Rastogi

  • Procedure for custom type

    Hi,
    I found from the replies by Jerry(PM) about the example procedure for custom type in the url
    http://technet.oracle.com:89/ubb/Forum82/HTML/000379.html, but when we click on the link above, it says page cannot be displayed. is there a different url to access that code. Basically i am trying to create a custom type image with border, height and width resized than the one loaded into the portal. so after creating the attributes, what all should i pass as parameters to the pl/sql procedure? i saw in one example item_id and i don't know what that is and how it should be passed.?
    any help please....
    thanks

    HI Jerry,
    Thanks. That is was i was looking for. But i have a question in that procedure. You are passing p_itemid as a parameter for attribute itemid. i assume it is a number. but my question is what is being passed in that. if we have a attribute as itemid, then the user using that custom item type, has to type in something right. what will they type in the itemid. why do we need itemid?
    I am trying to create a custom item type for image with width and height. so i can have those two attributes created and then added to the custom item type called cust_image and then in the procedure, i can call a procedure and pass only width and height right. do i have to pass itemid too?my question is in that case what will be there in itemid and why is it being passed?
    thanks for your help and reply again.
    thanks
    valli

  • Overriding paint for customizing JButton??? Shouldn't be paintComponent?

    Hi
    Shouldn't we always override paintComponent to customize the painting of a component?
    Why MetalScrollButton in javax.swing.plaf.Metal overrides paint instead of paintComponent?
    Should I override paint if I want to write my own LnF?
    Thanks.

    As is said in the online doc about paint(), "This method actually delegates the work of painting to three protected methods: paintComponent, paintBorder, and paintChildren. They're called in the order listed to ensure that children appear on top of component itself. Generally speaking, the component and its children should not paint in the insets area allocated to the border. Subclasses can just override this method, as always. A subclass that just wants to specialize the UI (look and feel) delegate's paint method should just override paintComponent."
    That means you can override paint(), , but in this case you'll have to draw the border yourself... and if you have a composite custom component (a panel containing labels, for example), you will have to call the label's paintComponent() methods by yourself...
    Hope this helped,
    Regards

  • How to override setText for custom JButton

    Hi
    From the Swings Hack book, I have the code for a custom JButton.
    I would like to setText for this button so that the text is set over the image on the button.
    Would someone know how I can do this?
    import java.awt.*;
    import javax.swing.*;
    public class ImageButton extends JButton {
        public ImageButton(String img) {
            this(new ImageIcon(img));
        public ImageButton(ImageIcon icon) {
            setIcon(icon);
            setMargin(new Insets(0,0,0,0));
            setIconTextGap(0);
            setBorderPainted(false);
            setBorder(null);
            setText(null);
            setSize(icon.getImage().getWidth(null),
                    icon.getImage().getHeight(null));
    }Thanks!

    Something like this should do it...
    import java.awt.*;
    import javax.swing.*;
    public class ImageButton extends JButton {
         private static final long serialVersionUID = 1L;
         public ImageButton(ImageIcon icon, String text) {
              setIcon(icon);
              setMargin(new Insets(0, 0, 0, 0));
              setIconTextGap(0);
              setBorderPainted(false);
              setBorder(null);
              setText(text);
              setSize(icon.getImage().getWidth(null), icon.getImage().getHeight(null));
    }Or just add a public setText() method accepting a String...

  • Can "Customer Type" be set automatically with webform submission?

    Is there a way to set the "Customer Type" automatically once a customer submits a webform?
    For example, in a site for a High School I have a webform for parents to sign up and register and another one for students. Once they complete the forms they are all listed as Customers (CRM), but "Customer Type" is blank. I've been looking but haven't been able to find a way for "Customer Type" to be set to "Parent" or "Student" depending on which form they filled out. Is this possible?

    Hi,
    Unfortunately not possible at this stage.  Only an admin user can update the customer type manually in the back-end. 
    Kind regards,
    -Sidney

  • How to use custom aspx page as template for custom content type

    Hi,
    I have created custom content type and custom aspx page. I want to use aspx page as template for custom content type.
    Can anybody please let me know how to accomplish this?
    Any help would be appreciated.
    Thank you,
    AA.

    Check if you are looking for the below
    http://www.sharepointpals.com/post/How-to-Create-a-Page-Layout-(PageLayout)-with-ContentType-in-SharePoint-2013
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • I need to set up an expense form so that our consultant can "filter" by customer type, program type, and finally the purpose of the trip. For instance: the customer types are churches, schools, organizations. The program type would be fund raising, gift p

    I need to set up an expense form so that our consultant can "filter" by customer type, program type, and finally the purpose of the trip. For instance: the customer types are churches, schools, organizations. The program type would be dependent on the customer type selection from the first list. Some examples would be: fund raising, gift planning, surveys, and others. The purpose of the trip would be dependent on the program type selected from the second list. Some examples of trip purposes would be: presentation, design, prospecting. Further, the purpose of trip selection from the third drop-down box would then have to determine the values of other fields by expense type: such as commission, airfare, hotel. etc. I've tried pop-up menu but can't figure out how to "select" from the final popup list and have it populate a field for the purpose of the trip. I've tried to look at the JavaScript examples for dependent drop-down boxes, but can't find any that quite fit what I'm trying to accomplish. I am very new to all of this. No training in writing Javascripts - just trying to wing it. The form has to be very simple for our consultants to use, but also give our office the detail we need to process through the correct account numbers. I would appreciate any detailed step-by-step instructions - kind of a javascript for dummies type of info. HELP!

    An AcroForm is the name given to the type of PDF form that you create in Acrobat. An XFA form is the type of form that you create in LiveCycle Designer. Although they are both PDF files, they are very different structurally and have significant;y different scripting models. So pay attention to the information on AcroForms and ignore anything about XFA. Be sure to get the sample PDF forms so you can look at how it works and where the scripts are placed.
    What you want to do will require scripting, and if you don't have the experience and are unable to use the information in the tutorials to create what you want, you might consider getting someone who has experience do this for you. I'll often suggest code if I can do so quickly, but what you want requires more than a few minutes.

  • Need F4 Help for custom container element based on partner type

    Hi Friends
    I am displaying customer details in custom container .In that custom container I have a field Partner number,Partner type etc etc..
    I included F4 help for partner number field, In that I referenced the following field.Now its coming perfectly.
      wa_cat1-f4availabl = 'X'.
       wa_cat1-ref_table = 'KNA1'.
      wa_cat1-ref_field = 'KUNNR'.
    But as per my requirement, customer wants to get the different F4 help when the partner type eq "Contact Person".
    Rest of the partner type(Ship to party, Sold to party,Reseller, End user) should show the above one.
    So I dont know, where I have to change, because in the field catelod level there is no option to control particular type in the column.
    Kindly help me on this.
    Thanks
    Gowrishankar

    Hi Jose
    Thanks for your Input.I created Event Receiver than Defined and implemented a method to get F4 help for customer number and email id field.Already F4 help is available for Email ID.Now I want to Include the F4 help for partner number field, it will call the search help based on partner type.I can able to get the partner number field search help, but F4 help is not working for email id.
    I am not sure some whee its over writing some values or I am not sure.If I comment partner number F4 help class, I can able to get the F4 help for email address.
    Plz guide to me to fix the same.
    Thanks
    Gowrishankar

  • IDOC type for customer master

    Hi friends,
    Could anyone explain me about...
    <b>
    Use existing IDOC types to send the customer master data, vendor master data and material master data from the sender system to the receiver system.</b>

    Hi,
    Please maintain distribution model (BD64)  and partner profile (WE20), RFC connection (SM59) for message type DEBMAS (customer), DEBMAS (vendor) and MATMAS (material master).
    Once the above configuration done, then you can use the following transactions to send the IDocs.
    1.  BD12 - Send Customer IDocs (Sender -> Receiver) or
         BD13 - Get Customer IDocs (Receiver -> Sender)
    2.  BD14 - Send Vendor IDocs (Sender -> Receiver) or
         BD15 - Get Vendor IDocs (Receiver -> Sender)
    3.  BD10 - Send Material IDocs (Sender -> Receiver) or
         BD11 - Get Material IDocs (Receiver -> Sender)
    Regards,
    Ferry Lianto

  • Date type-specific Customizing missing for date type ACTActPln

    Hi all.
    I'm using a Web Service obtained by copying the CRM 7.0 built-in WS APPTACTCRTRC.
    I'm using it to create Appointments using an Adobe Interactive Form.
    It goes everything fine (a Date is created in the system, with all the input data properly set) excepted the dates...
    The WS uses two TIMESTAMPS, TIMESTAMP_FROM for StartDateTime and TIMESTAMP_TO for EndDateTime, whereas the GUI transaction to create Dates accepts dates and times in separated fields.
    Going in Debug I can see that the execution ends with the following error, referred to the involved entity (CRM_APPOINTMENT):
    Date type-specific Customizing missing for date type ACTActPln
    CRM_APPOINTMENT uses date profile 0000000001 with three possible date types: ORDERACTUAL, ORDERPLANNED and ORDERPROPOSED and I cannot find anywhere date type ACTActPln (just to add it in customizing).
    Is anyone able to enlight me?
    Thank you in advance!
    Alessandro
    PS I've years of experience in Java programming but I'm quite new to the SAP world. Maybe the problem is not a problem at all, but it seems to me as such. Even if it has a trivial solution, please let me know. Thx!

    Hi,
    Well I was about to write that you should enter date in decimal format. but you already did that as mentioned in How to set a date in a Form where the bound date format is a decimal?
    In response to following from above thread (copied for others to understand my response)
    Hi all.
    I'm successfully using the LiveCycle Designer and I've managed to remotely create Appointments using a CRM Web Service (a mere copy of APPTACTCRTRC).
    The only problem I'm encountering is that I'm not able to set the dates/times (start and end of the appointment).
    Dragging each of the two fields from the WSDL based Data Connection I obtain a Decimal Field limited to 15 digits.
    How can I write a date and time in such a field?
    I've tried with a retroverse date as YYYYMMDDHHmmss (for example, 20100301124500) but it does not work
    (the appointment is indeed created, but with the start date and time fields filled with
    the current date/time and the end date and time fields filled with the current date and time plus 10 minutes).
    The retroverse date above is only 14 digit long, so, maybe, this is the problem.
    But, given the field definition, I'm not able to fill a blank space between the date and the time.
    I'm not able to put a dot either.
    What should I do?
    Any suggestions?
    Thank you in advance.
    Alessandro
    15 digit in UTC time format here is fraction of second so you should enter 201003011245000 (add one more zero).
    14th Oct 2010 16:00 should be written as 201010141600000, so just try it and and see if it works, I guess if you do not supply end time then by default it will be starttime + 10 min but this is just guess.
    Regards,
    Gourav

  • Inspection type for customer return of returnable package material

    Hi Guys,
             I send the returnable package to the customer , while reciving that material to my stock (when the customer return to me ) i want to create outbound delivery with out order refference .
    I want system to create inspection lot after doing PGR of the outbound delivery .
    The inspection lot sould have the option of result recording and stock posting when i do usage decission
    This requirement not met by inspection type 06 , i want to create new inspection type to met above mentioned all requirement .
    please provide the steps to be performed to met the same.
    Thanks and regards
    Thamizhchelvan G

    Hi,
    The 06 - Inspection type is not stock relevant and also it is not possible to change because it is SAP std.
    1. If you want inspection for Customer with stock, active 05 - Inspection type in Material Master, and move the stock from customer return to QI by using MB1B with Movement type 457 Stock transfer returns to QI. After that system will create the Inspection lot in 05 Inspection type.
    2. If don't want stock for inspection and directly post to Unrestricted using MB1B with movement type 453 Transfer posting to returns from customer to Unrest.
    3. Customer return to Blocked stock using MB1B with mvt type 459 Stock transfer returns to blocked
    Case2.
    Inspection type 05 is a stock relevant inspection type.
    To use 05 you must assign the 05 inspection type to the delivery item in configuration.
    Follow this path.
    Tcode vov6 - there will be schedule line category DN.
    go to details of DN.In Business data, check which movement type is assigned here.
    I think in your case it will be 651.
    Change it to 655 and try now.
    hope it will work.
    Thanks
    Vinay

  • Fld selection for movement type 601/ act 425000 differs for customer goods

    hi all
    When i try to do PGI for delivery, i am getting given below error.
    "Fld selection for movement type 601/ act 425000 differs for customer goods movement (015)" Please guide me to solve this issue. Rgds
    Madhavan
    Edited by: Madhavan SR on Apr 14, 2010 3:09 AM

    Hi,
    Please run report RM07CUFA for the movement type and account, and check the field selection for
    "Customer goods movement" if the setting is consistent or not.
    Thanks and regards,
    Polly

  • Output types for customer master

    Hi,
    How do I create an output type for customer master and assign it to an output determination procedure for customers. Thanks for the help in advance.
    Regards,
    Vijay

    Any bright ideas guys?

  • Custom segment does not exist for message type Debmas_cfs

    Hi,
    I have created a custom segment YEXTRA for basic type DEBMAS06.
    I have done the configuration in We82 and We20.
    I have implemented the segment in User Exit "EXIT_SAPLVV01_001". Now when I am executing the TCODE BD12  then it is creating the Idoc with custom segment. But when I apply the filter on sales org in BD64 then it starts giving me error that " Segment Y**** does not exist for message type DEBMAS_CFS.
    Kindly suggest if I need to do some other configuration also.
    Thanks.
    Regards,
    SAurabh

    Hi Gearge,
    To add custom segments, you should create an extension.
    the TCODE is we30.
    Refer this link:
    http://help.sap.com/saphelp_erp2005/helpdata/en/dc/6b7d6243d711d1893e0000e8323c4f/frameset.htm
    Regards,
    Ravi

Maybe you are looking for

  • Is there any way to have a clear or transparent dock. Or to change the dock at all I would love to see that!

    It is exasperating that the iPhone dock cannot be adjusted in any way. I would love to see a transparency slider or a few style choices. C'mon apple. This makes sense!

  • IBook G4 will not recognize Super Drive

    There is a DVD stuck in my optical Super Drive. The drive now is no longer recognized in the system profiler either. There is no noise at all coming from the drive on startup or when an eject is attempted. This is a second-hand iBook so unfortunately

  • How to ensure Premiere Pro saves nothing to my computer's hard drive

    I recently installed CS5 on my MacBook Air. I have a 1TB Time Capsule (wireless external hard drive) and I want Premiere Pro to save exclusively to that drive and not to my computer's hard drive. I have all of my source files for my project (audio, v

  • Map Builder - Fenced Center Line

    Hi everyone In order to depict depressed contours using Map Builder (ver 11.1.1.0.0), I would like to use a fenced center line with a pattern similar to this: ___|___|___|___|___ . However, Map Builder seems not to be able to create a fenced line wit

  • XWin window manager with virtual desktops

    So I'm resuming my search for an X11 window manager that provides virtual desktops. I also would like just a little bit of keyboard customization, i.e., assign an F key to raise a window. Keystrokes to move between virtual desktops would be nice. Any