Class conversion

Hello, I'm stuck into a very simple thing.
I've a class A, and a subclass B. Then I create an object that way:
A myObject = new B();
Then, what do I get from B?
I mean, do I get B methods? B attributes? Not B methods, but overwritten methods such as toString?
And what do I get from A?
I'm very confused.
Thank you.

Lanselot wrote:
Hello, I'm stuck into a very simple thing.
I've a class A, and a subclass B. Then I create an object that way:
A myObject = new B();
Then, what do I get from B?an instance of B.
>
I mean, do I get B methods? B attributes? Yes, but to access them, you'll have to cast:
B myBObject = (B) myObject;If this is the case, it would be better just to write:
B myBObject = new B();and not bother with the variable of type A.
Not B methods, but overwritten methods such as toString?If B overrides methods, you get those overridden methods
And what do I get from A?Anything inherited from A.

Similar Messages

  • Inventory UOM intra-class conversions

    Hi all. I need to know if I can view the on hand quantity in diferent UOM's (primary-secondary and all conversions configured by item)
    thanks a lot
    11.5.10
    Edited by: omator on 11-feb-2010 9:02

    UOM Conversions are standards. One does not define tolerances when defining standards.
    For example 1 Dozen = 12 Nos, it does not make sense to define a conversion like 1 Dozen = 12 nos +/- 1 nos.
    However you may define an item specific UOM Conversion, (which overrides the Standard UOM Conversion) that may define the conversion as, say 1 Dozen = 13 Nos for Item01.
    But to take care of the tolerances as you put it,
    assuming Dozen has been defined as the Primary UOM for an Item, you may ingeniously chose to receive the item in Nos (if Nos and Dozen belong to the same class).
    Eg: if you want to use 1 Dozen = 11 Nos, receive the item in Nos instead of Dozen.
    However, if you have a Secondary UOM defined for the Item, you may define a tolerance for the COnversion between Primary & Secondary UOM using the Deviation +ve & -ve fields in the Item Master.
    Hope this clarifies, Revert if you have a specific scenario.

  • String to Library Class conversion

    Hi guys, i'm having trouble coming up with a good way to
    convert a string to class reference from the library without using
    a lookup table in Actionscript 3.0
    so say i'd loaded in some data from xml and i need to
    generate a new instance of a "Box" from a linked extended Sprite in
    the library.
    without the string i'd just go var myBox = new Box();
    but obviously i can't go var myBox = new "Box"() so i'm kind
    of stuck without using a lookup table to convert the string passed
    to the appropriate Class linkage.
    Any help would be much appreciated,

    flash.utils.getDefinitionByName()
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/utils/package.html#getDefi nitionByName()

  • Class conversion error

    Hi Friends,
    I'm new to Java card technology. I set the environment variable and the remaining properly. I'm using Windows XP platform And using Java 1.4 and Java card 2.1.2. When I run "build_samples.bat" after compiling the Java file successfully, when It tries to convert the class file into JCA or CAP it says an error "unsupported class file format of version 46.0". I don't what it means and how to rectify that?
    Thank you for helping me.

    Use JDK 1.3 as stated in the Java Card Kit or use something like the options -target 1.1 -source 1.3 with the compiler.

  • XML to Java Class Conversion.

    Hi all,
    I need to convert a XML document to Java class.
    Then create numerous objects of this class.
    Convert the multiple objects single XML file
    Im able to convert objects to XML..
    But I need a way to convert XML document to Java class..
    Any ways to do the same??
    Thanks.

    1.Define an XML Schema for the XML document and compile the schema to Java classes.
    2.Unmarshall the XML document with the Java classes.

  • BOR to Classes conversion

    As BOR is being phased out is anyone aware of any tools around to convert some useful BOR's to Classes.
    I think in general in workflow one should try and use classes and objects wherever possible rather than the older BOR method.
    A lot of supplied SAP workflows however are still based on BOR so this area could become a bit of a minefield especially in CRM  and similar type of processing.
    As new projects come on stream I'd be interested to know how people are going to handle this topic.
    Cheers
    jimbo

    This doesn't address the topic. All of the above features can be done via OO classes --you can of course have multi-line objects and "virtual attributes" in a class.
    A problem with BOR is that you can't easily call these from "Classical ABAP" programming so say you want all the partners of a sales order  you normally have to code the functionality  yourself using the relevant tables rather than try and get the attributes of a relevant BOR in your program.
    However once you've  defined say a SALES ORDER class then any ABAP can access the public attributes and methods of  this class .
    With the BOR it's OK via workflow but a "Normal ABAP" program has to do some fancy coding using the "SWO" or workflow macros and functions to access the attributes of the BOR.
    Since these are internal SAP macros and could be deprecated at any time it's really not surprising that outside the Workflow environment BOR's are rarely used in standard ABAP programming.
    BOR was a "stepping stone" used by SAP to implement some of the features of OO abap  before OO abap  became reasonably powerful itself.
    Inheritance, encapsulation etc etc are all standard in OO -- not restricted to BOR's.
    The trick is to ensure your new class has the functionality of the old BOR and use that wherever possible on new projects.
    Like BOR if you extend methods and attributes you don't need to change any existing programs using the relevant classes.
    I'm sure the next major upgrade of sap will implement many more business classes -- the old BOR could be retained by simply calling a Class of the same name having the same attributes and objects for legacy code and workflows.
    For example here's some ABAP code to call a method which returns the Long Text of a Service notification  BOR ZBUS2080 (delagated BOR  BUS2080)
    You can see it's quite a "Dogs Dinner".
    Much more simply and easily done of course if you had a similar CLASS available. (call me=>)  etc.
    Program  ZZREADBOR.
    Sample program to execute a method of a business object
    or return an attribute of a Business object
      can be used in or outside of Workflows etc.
    Use this as a model
    Note on some definitions used in WF / Object
    programming.
    A container is a special type of "generalized"
    parameter used in workflows for passing data
    between steps.
    You can use these in "Normal" programming
    It's just a generalized structure for holding
    data.
    An Attribute in this context means a field e.g Short
    text. The attribute can be a table (multi-lined)
    as well.
    The attribut is defined in the attribute list
    of the business object
    Use transaction SWO1 to see the list.
    Operations on containers are done via
    standard SAP Workflow macros
    swc_function such as swc_create_object.
    You must supply a key to instantiate the object
    and the object name
    (Instantiation means just supplying
    the objects key --such as
    in the case of a sales order the key would be
    the sales order number).
    Parameters
    Enter Business object name e.g ZBUS2080
    key of business object e.g sales doc nr etc.
    Attribute you want if getting an attribute property
    Method name if executing a method.
    For retrieving attributes the data is returned
    in field return.
    For Methods a little extra work is required as follows:
    For Methods you may need extra container
    parameters such as
    tables  (swc_get_tabe container containerElement  Itab)
    To see what elements are needed have a look at the
    Method code (transaction SWO1=== select
    the business object(display) chose the method and then
    select the program button
    container parameters will be identified the code
    by swc_set_element / table  for export parameteres
    swc_get_element / table for import parameters.
    ensure you set your container(s) to persistent
    this ensures the container exists throughout
    the whole run and is available to sub programs
    function modules, methods etc.
    if you don't do this then the container only exists
    in the program and disappears when you enter a function
    module method etc etc.
    Jim Hawthorne       Nov 2005.
    include <cntn01>.    "SWC macros and WF container stuff
    tables: tojtb, swotdv.       "Bus Obj <====> program
    Sample demo executes method getdetail
    which retrieves long text etc from bus object ZBUS2080.
    parameters: p_bus like  tojtb-name default 'ZBUS2080',
                p_key like  swotobjid-objkey default '000300000153',
                p_attrib  like SWOTRA-ATTRIBUTE,
               p_method(32) default 'GETDETAIL'.
    constants: c_attrib value 'A',
                c_method value 'M'.
    data: BEGIN OF RETURN.
      INCLUDE STRUCTURE SWOTRETURN.
    DATA END OF RETURN.
    data: BAPIRETURN LIKE BAPIRETURN.
    data: l_invoke LIKE swotinvoke.
    data: w_prog like tojtb-progname,
          w_runname like tojtb-progname,
          w_super like tojtb-parent,
          w_type(1) type c.
    swc_container container.
    swc_container_to_persistent container.
    data: object like swotrtime-object.
    data: w_object like swotobjid.
    if p_method = ' '.
      w_type = c_method.
    else.
      w_type = c_method.
      endif.
    break-point 1.         .
    w_object-objkey = p_key.
    w_object-objtype = p_bus.
    get actual program name where method / attribute
    exists.
    If verb is not in the object type
    then use the supertype.
    select single progname  parent into (w_prog, w_super)
      from tojtb
      where name eq p_bus.
    select single * from swotdv
            where objtype = p_bus
            and verb = w_type.
    case sy-subrc.
      when 0.
         w_runname = w_prog.
       when 4.
       select single progname  parent into (w_prog, w_super)
      from tojtb
      where name eq w_super.
       w_runname = w_prog.
       endcase.
    case p_method.
    when ' '.
    Method not entered so attribute required.
    CALL FUNCTION 'SWO_PROPERTY_GET'
      EXPORTING
        OBJECT                = w_object
        ATTRIBUTE             = p_attrib
      CHANGING
        VALUE                 =  return.
    EXCEPTIONS
      ERROR_CREATE          = 1
      ERROR_INVOKE          = 2
      ERROR_CONTAINER       = 3
      OTHERS                = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    when others.
    Method required.
    1 ) Must instantiate the object first.
    CALL FUNCTION 'SWO_CREATE'
    EXPORTING
       OBJTYPE                 = p_bus
        OBJKEY                  =   p_key
      IMPORTING
       OBJECT                  = object
       RETURN                  =  return.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Execute the method.
    for swo invoke -- access type 'G' ====> get attribute
                       access type 'C' ====> execute a method
    this function is executed internally.
    in the perform (p_method) statement the sap kernel knows
    that the program is actually a business object type of program
    not a "Normal" abap so the perform gets handled a little
    differently than the usual perform statement.
    You cannot execute the BOR program via SE38.
    set any input and output parameters
    for your method.
    You will have to code them here
    swc_set_element container 'User' p_key.
    l_invoke-object = object.
    l_invoke-lobjtype = p_method.
    l_invoke-verb = p_method.
    l_invoke-objkey = p_key.
    l_invoke-reftype = 'D'.
    l_invoke-synchron = 'X'.
    read comments above again to understand the difference
    in how this statement works compared
    to a normal perfom xxxx in program yyyy.
    if you have more parameters such as container tables then add them
    to the tables statement.
    for example to get long text and other info from business object
    ZBUS2080 (Service Notification)
    data:
          notifheader like bapi2080_nothdre,
          notifhdtext like bapi2080_nothdtxte,
          notlongtext like  bapi2080_notfulltxte occurs 0,
          notitem like bapi2080_notiteme occurs 0,
          notifcaus like bapi2080_notcause occurs 0,
          notifactv like bapi2080_notactve occurs 0,
          notiftask like bapi2080_nottaske occurs 0,
          notifpartnr like bapi2080_notpartnre occurs 0,
          return2 like bapiret2 occurs 0.
      swc_set_table container 'NotLongText' notlongtext.
      swc_set_table container 'NotItem' notitem.
      swc_set_table container 'NotifCaus' notifcaus.
      swc_set_table container 'NotifActv' notifactv.
      swc_set_table container 'NotifTask' notiftask.
      swc_set_table container 'NotifPartnr' notifpartnr.
      swc_set_table container 'Return2' return2.
    perform (p_method) in program (w_runname) tables container
    changing
    l_invoke.
    now retrieve your data back from the method.
    if you have extra parameters add extra swc_get statements.
    break-point 1.
    swc_get_table container 'NotLongText' notlongtext.
    swc_get_table container 'NotItem' notitem.
    swc_get_table container 'NotifCaus' notifcaus.
    swc_get_table container 'NotifActv' notifactv.
    swc_get_table container 'NotifTask' notiftask.
    swc_get_table container 'NotifPartnr' notifpartnr.
    swc_get_table container 'Return' return2.
    field-symbols: <g>.
    loop at notlongtext assigning <g>.
    write: / <g>.
    endloop.
    endcase.
    break-point 3.
    write: / 'done'.
    Cheers
    Jimbo

  • Conversion or transformation ?

    Hi,
    In our domain model, we have many enumerated types, or in other words, classes with a finite number of read-only instances . A good example would be a class named Country. This class has some attributes and a unique identifier.
    Since all this stuff is read-only, does such a class need to have its own database table ? A class having a one-to-one relation with a Country could store the country identifier and Toplink use it to resolve to the single in-memory instance, avoiding an access to Country table.
    I'm not sure if this is good design. And if it is, I don't know how to configure Toplink to do this. Conversion, transformation, variable one-to-one mapping ???
    Any comments would be appreciated
    Jean-Christian Gagné

    Jean-Christian,
    A little confused by your question. Do you want to have the table at all or are you just trying to avoid the read on the table each time.
    If you are trying to avoid the read then I would suggest keeping the 1:1 mapping and pre-loading all Country instances at system startup. This is common for reference data and will avoid any additional queries on the table.
    If you wish to eliminate the Country table then you have a couple of options to handle the country-code to Country instance conversion.
    1. Use an ObjectTypeMapping and populate it at startup time with the static set of Country instances
    2. Use a TypeConversionMapping and specify the database type as String/int (whatever the code is). The object type will automatically be found in the mapped class. Then extend the ConversionManager to also support you Country class conversion to and from the code type. (see http://otn.oracle.com/products/ias/toplink/technical/tips/customconversion/index.html).
    Doug

  • Batch Classification by class type 022

    Hi all,
    We are using batch management at material level and present class type 023. We are looking at changing the class type to 022 as we need some information to be retained at plant level.
    While creating class for class type 022 the system gives an error " Internal class type 022 cannot be used in class maintenance
    Message no. CL089"
    Can somebody let me know the reason and solution for this error? Is it due to the fact that we have set the batch at material level?
    Also, it would b great if someone can share his/her experience in changing batch clases, even class conversion.
    Best Regards,
    VS

    Hi VS,
    I think that you should change the customizing first. Class types 022 and 023 can not be created simultaneously. It is either 022 or 023.
    Be careful : I did it long time ago but there is one way you can do (023 to 022 or 022 to 023 I don't remember) but you cannot reverse it.
    Rgds,
    Philippe

  • Maintaining variable conversion weight by LOT-wise

    The client is in Textile business where the Cotton is purchased in KGS and stored/issued in BALES.
    Business Need: The conversion factor of a Bale of cotton cannot be fixed, since it is a natural commodity and the wieght may vary from Bale to Bale.
    Item Code:     FV-00001
    Item Desc:     Cotton Fibre
    UOM (Pri):     KGS
    UOM (Sec):     BALES
    Conversion:     Inter-class conversion factor: 1 Bale = 10 KGs
    Deviation:     +/- 10%
    Purchasing UOM:     KGS
    Issuance UOM:     BALES
    Required calculation of Balance on Hand in Pri/Sec UOM:
    + FV-00001     LOT-1 1000kg 100Bales 1000Kg 100B
    + FV-00001     LOT-2 1080kg 100Bales 2080Kg 200B
    - FV-00001     LOT-1 800kg 80Bales 1280Kg 120B
    - FV-00001     LOT-2 756kg 70Bales 524Kg 50B
    - FV-00001     LOT-1 200kg 20Bales 324Kg 30B
    - FV-00001     LOT-2 324kg 30Bales 0Kg 0B
    Whereas the Oracle is calculating as:
    + FV-00001     LOT-1 1000kg 100Bales 1000Kg 100B
    + FV-00001     LOT-2 1080kg 100Bales 2080Kg 200B
    - FV-00001     LOT-1 800kg 80Bales 1280Kg 120B
    - FV-00001     LOT-2 700kg 70Bales 580Kg 50B
    - FV-00001     LOT-1 200kg 20Bales 380Kg 30B
    - FV-00001     LOT-2 300kg 30Bales 80Kg 0B
    At the time of Issuance the system is picking the Standard Conversion rate instead of the Actual conversion factor by Lot.

    Hi,
    I could not try this thing as I do not have any 10g set up at the moment, but hope this works. I am assuming that you are using Oracle DB at the moment.
    1. Create an initialization block that initializes the variable XX_PROD_LINE.
    2. Create another variable that can store the length of this variable.
    3. Create another initialization block that fires a query like
    select length(:XX_PROD_LINE) from dual
    4. Set this initialization block to execute only after the initialization block in step1 (You can use initialization block precedence for this). This step ensures that the length of the variable is calculated only after it has been initialized.
    5. Now you can use this variable in your reports.
    Hope this helps.
    Thank you,
    Dhar

  • Problem with serial.serialize(doc) ;statement

    hi this is my code but iam having problem in the aboe statement iam using net beans and it says cannot find symbol serialize while it is still in the package import {com.sun.org.apache.xml.internal.serialize.XMLSerializer;}
    package newPack;
    import org.jdom.Document;
    import org.jdom.JDOMFactory;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    //import org.w3c.dom.Document;
    import java.sql.DriverManager;
    import javax.xml.parsers.ParserConfigurationException;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    //import org.w3c.dom.Element;
    import java.sql.ResultSetMetaData;
    import com.sun.org.apache.xml.internal.serialize.OutputFormat;
    import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
    import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
    import java.io.StringWriter;
    import java.io.IOException;
    import org.jdom.Element;
    import org.jdom.Document;
    public class Conversion {
    // public DocumentBuilderFactory dbf;
    // public DocumentBuilder dob;
    // public Document doc;
    /** Creates a new instance of Conversion */
    public static Document convert(ResultSet rs) throws ParserConfigurationException,SQLException
    // DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
    //DocumentBuilder builder=dbf.newDocumentBuilder();
    // Document doc=builder.newDocument();
    Element root=new Element("Artist");
    //doc.appendChild(root);
    ResultSetMetaData rsmd = rs.getMetaData();
    int colCount = rsmd.getColumnCount();
    while (rs.next())
    Element songo= new Element("song1");
    root.addContent(songo);
    //root.appendChild(songo);
    for (int i = 1; i <= colCount; i++)
    String columnName = rsmd.getColumnName(i);
    Object value = rs.getObject(i);
    Element node = new Element(columnName);
    node.setText(value.toString());
    songo.addContent(node);
    Document doc=new Document(root);
    return doc;
    public static String serialized(Document doc) throws IOException
    StringWriter writer = new StringWriter();
    OutputFormat format = new OutputFormat();
    format.setIndenting(true);
    XMLSerializer serial = new XMLSerializer(writer,format);
    serial.serialize(doc);
    return writer.getBuffer().toString();
    }

    VISA is the generic communication interface.
    Hyperterminal has serial comm drivers as well.  It just so happens that Hyperterminal is using the serial comm drivers that are built into Windows.  That's why you don't notice them.
    If you installed LabVIEW, then you should have installed the drivers that come with it.  It is on a separate DVD.  Obviously you haven't.

  • I need help withButtonHandler, getActionCommand

    I trying to write a GUI app. I have to convert Celsius to Fahrenheit and vice versa.
    This is what I got so far, but when I press any of the two buttons I got an error message
    import java.awt.FlowLayout;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.JFrame;
    import javax.swing.JButton;
    import javax.swing.JTextField;
    import javax.swing.JOptionPane;
    import javax.swing.JLabel;
    public class Conversion extends JFrame
    private JTextField textField1;
    private JTextField textField2;
    private JButton buttonF;
    private JButton buttonC;
    private JLabel label1;
    public Conversion()
    super("Converting Farenheit and Celcius degrees");
    setLayout( new FlowLayout() );
    label1 = new JLabel( "Enter number" );
    //label1 = setVerticalTextPosition(swingConstants.TOP);
    //label1 = setHorizontalTextPosition(swingConstants.LEFT);
    add( label1 );
    textField1 = new JTextField( 10 );
    add( textField1 );
    textField2 = new JTextField( 10 );
    add( textField2 );
    buttonC = new JButton("Celcius" );
    add( buttonC );
    buttonF = new JButton("Farenheit");
    add( buttonF );
    ButtonHandler handler = new ButtonHandler();
    buttonF.addActionListener( handler );
    buttonC.addActionListener( handler );
    } // end constructor
    private class ButtonHandler implements ActionListener
    public void actionPerformed( ActionEvent event )
    String num = "";
    double result;
    if( event.getSource() == buttonF ){
    num = event.getActionCommand();
    double c = Double.parseDouble(num);
    result = getFarenheit(c);
    textField2.setText("" + result);
    else if( event.getSource() == buttonC ){
    num = event.getActionCommand();
    double f = Double.parseDouble(num);
    result = getCelcius(f);
    textField2.setText(result + "");
    public double getFarenheit(double c)
    double result = 9 / 5.0 * c + 32;
    return result;
    public double getCelcius(double f)
    double result = 5.0/9 * (f - 32);;
    return result;
    }// end class ConversionFrame

    I was about to post it.
    This is the error I got when I try to run it
    Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "Celcius"
    at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
    at java.lang.Double.parseDouble(Double.java:482)
    at ConversionFrame$ButtonHandler.actionPerformed(ConversionFrame.java:69)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:5583)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
    at java.awt.Component.processEvent(Component.java:5348)
    at java.awt.Container.processEvent(Container.java:2010)
    at java.awt.Component.dispatchEventImpl(Component.java:4050)
    at java.awt.Container.dispatchEventImpl(Container.java:2068)
    at java.awt.Component.dispatchEvent(Component.java:3885)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3936)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
    at java.awt.Container.dispatchEventImpl(Container.java:2054)
    at java.awt.Window.dispatchEventImpl(Window.java:1791)
    at java.awt.Component.dispatchEvent(Component.java:3885)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

  • List of objects supported by iSetup on 12.0.6

    Setup Object Name => Application Short Name
    Aging Buckets =>AR
    Approval Limits =>AR
    Approval User Limits =>AR
    Auto Accounting =>AR
    Auto Cash Rule Sets =>AR
    Collectors =>AR
    Credit Management Auto Rules =>AR
    Credit Management Automation Rules =>AR
    Credit Management Check Lists =>AR
    Credit Management Scores =>AR
    Credit Management Scoring Model =>AR
    Credit Management Setup Options =>AR
    Customer Profile Classes =>AR
    Customers =>AR
    Invoice Grouping Rules =>AR
    Invoicing Rules =>AR
    Line Ordering Rules =>AR
    Memo Lines =>AR
    Receipt Classes and Methods =>AR
    Receipt Sources =>AR
    Receivables Activities =>AR
    Receivables Payment Terms =>AR
    Receivables System Options =>AR
    Receivables Tax Codes and Rates =>AR
    Receivables Territories =>AR
    Receivables Transaction Types =>AR
    Remit To Addresses =>AR
    Statement Cycles =>AR
    Tax Exemptions =>AR
    Transaction Sources =>AR
    All Profile Options =>AZ
    Convert to Multi-Org Concurrent Program =>AZ
    Personalizations =>AZ
    Profile Options =>AZ
    Profile Options Updates =>AZ
    Template Files =>AZ
    Template Translations =>AZ
    Workflow Business Event System Objects =>AZ
    XML Samples =>AZ
    XML Schemas =>AZ
    BOM Calendars =>BOM
    Cost Groups =>BOM
    Cost Sub Elements =>BOM
    Cost Types =>BOM
    Departments =>BOM
    Items =>BOM
    Workday Calendars =>BOM
    Bank Account Uses =>CE
    Bank Accounts =>CE
    Cash Management System Parameters =>CE
    Payment Documents =>CE
    System Parameters =>CE
    Transaction Codes =>CE
    Areas =>EAM
    EAM Areas =>EAM
    EAM Parameters =>EAM
    Conditions =>FEM
    Factor Table Rules =>FEM
    Mapping Rule =>FEM
    Statistics Rule =>FEM
    Compile All Flexfields =>FND
    Concurrent Programs =>FND
    Descriptive Flex Field =>FND
    Descriptive Flexfields =>FND
    Document Sequence Assignments =>FND
    Document Sequence Categories =>FND
    Document Sequences =>FND
    Key Flex Field =>FND
    Key Flexfields =>FND
    Lookups =>FND
    Menus =>FND
    Printers =>FND
    Request Groups =>FND
    Responsibilities =>FND
    Users =>FND
    Value Set =>FND
    Value Set Values =>FND
    Workflow Definitions =>FND
    Payment Process Profile =>IBY
    ABC Assignment Groups and Item Assignments =>INV
    ABC Class Assignments =>INV
    ABC Classes =>INV
    ABC Compliles =>INV
    ATP Rules =>INV
    Catalog Groups =>INV
    Category Sets =>INV
    Cycle Count Classes =>INV
    Cycle Count Items =>INV
    Cycle Countings =>INV
    Cycle Counts =>INV
    Default Category Sets =>INV
    Economic Zones =>INV
    Genealogy =>INV
    Inter-Company Relationships =>INV
    Inter-Company Transaction Flows =>INV
    Inter-Location Transit Time =>INV
    Inventory FlexFields =>INV
    Inventory FlexFields Validation =>INV
    Inventory Parameters =>INV
    Inventory Parameters Update =>INV
    Item Attribute Controls =>INV
    Item Categories =>INV
    Item Costs =>INV
    Item Cross References =>INV
    Item Locators =>INV
    Item Status Codes =>INV
    Item Statuses =>INV
    Item SubInventories =>INV
    Item Templates =>INV
    Item Valid Categories =>INV
    Material Statuses =>INV
    Movement Statistics Parameters =>INV
    Movement Statistics Validation Rules =>INV
    Organization Access =>INV
    Physical Inventories =>INV
    Picking Rules =>INV
    Planners =>INV
    Serial Numbers =>INV
    Shipping Networks =>INV
    Shortage Parameters =>INV
    Stock Locators =>INV
    Subinventories =>INV
    Transaction Reasons =>INV
    UOM Item Specific Class Conversions =>INV
    Unit of Measure, Conversions, and Classes =>INV
    Units of Measure =>INV
    Asset Book Controls =>OFA
    Asset Categories =>OFA
    Asset Depreciation Calendars =>OFA
    Asset Keywords =>OFA
    Asset Locations =>OFA
    Asset Prorate Conventions =>OFA
    Asset Quick Codes =>OFA
    Asset System Controls =>OFA
    Fiscal Years =>OFA
    Credit Check Rules =>ONT
    Credit Profiles =>ONT
    Credit Usage Rule Set =>ONT
    Credit Usage Rule Set Assignment =>ONT
    Credit Usage Rule Set Assignments =>ONT
    Credit Usage Rule Sets =>ONT
    Holds =>ONT
    Order Holds =>ONT
    Order Import Sources =>ONT
    Order Parameters =>ONT
    Order Sources =>ONT
    Transaction Types =>ONT
    Transaction Types Update =>ONT
    Absence Element =>PAY
    Accrual Formula =>PAY
    Accrual Plan =>PAY
    Balance Attributes =>PAY
    Balance Feeds =>PAY
    Balance Types =>PAY
    Carry Over Formula =>PAY
    Defined Balances =>PAY
    Element Classifications =>PAY
    Element EIT =>PAY
    Element Span Usages =>PAY
    Element Type Usages =>PAY
    Element Types =>PAY
    Fast Formula =>PAY
    Formula Result Rules =>PAY
    Frequency Rules =>PAY
    Grossup Balance Exclusions =>PAY
    Input Values =>PAY
    Iterative Rules =>PAY
    Module =>PAY
    Module Formula =>PAY
    Module Type =>PAY
    Payrolls =>PAY
    Primary Balances =>PAY
    Process =>PAY
    Process Module =>PAY
    Retro Component Usages =>PAY
    Run Types =>PAY
    Secondary Classifications =>PAY
    Status Processing Rules =>PAY
    Business Groups =>PER
    Employees =>PER
    Enable Multiple Security Groups =>PER
    Grades =>PER
    HR Locations Update =>PER
    Inventory Organizations =>PER
    Job Groups =>PER
    Jobs =>PER
    Locations =>PER
    Operating Units =>PER
    Organization Structure Elements (Hierarchies)=>PER
    Organization Structure Versions =>PER
    Organization Structures =>PER
    Organizations =>PER
    Position Structure Elements (Hierarchies) =>PER
    Position Structure Versions =>PER
    Position Structures =>PER
    Positions =>PER
    Salary Bases =>PER
    Approval Assignments =>PO
    Approval Groups =>PO
    Approval Groups, Group Assignments and Rules =>PO
    Approved Supplier Lists =>PO
    Blanket Purchase Orders =>PO
    Buyers =>PO
    Document Types =>PO
    Job Category Associations =>PO
    Line Types =>PO
    Purchasing Commodity Definitions =>PO
    Purchasing Options =>PO
    Purchasing Unique Identifiers =>PO
    Quality Inspection Codes =>PO
    Receiving Options =>PO
    Requisition Templates =>PO
    Budgetary Control Groups =>PSA
    Transaction Codes =>PSA
    Collection Elements =>QA
    Collection Plans =>QA
    Specifications =>QA
    Price Formulas =>QP
    Price Lists =>QP
    Simple Price Modifiers =>QP
    Aging Periods =>SQLAP
    Bank Accounts =>SQLAP
    Banks and Bank Accounts =>SQLAP
    Distribution Sets =>SQLAP
    Expense Templates =>SQLAP
    Financials Options =>SQLAP
    Invoice Approvals =>SQLAP
    Invoice Tolerances =>SQLAP
    Payables Options =>SQLAP
    Payables Payment Terms =>SQLAP
    Payables Tax Codes =>SQLAP
    Payment Formats =>SQLAP
    Reporting Entities =>SQLAP
    Special Calendars =>SQLAP
    Suppliers =>SQLAP
    Tax Authority Suppliers =>SQLAP
    Withholding Tax =>SQLAP
    Account Code Combinations =>SQLGL
    Accounting Calendars =>SQLGL
    Accounting Setups =>SQLGL
    Budget Organizations =>SQLGL
    Budgets =>SQLGL
    Chart Of Accounts =>SQLGL
    Code Combination =>SQLGL
    Code Combinations =>SQLGL
    Conversion Rate Types =>SQLGL
    Currencies =>SQLGL
    Daily Rates =>SQLGL
    Data Access Sets =>SQLGL
    Encumbrance Types =>SQLGL
    Journal Reversal Criteria =>SQLGL
    Ledger Sets =>SQLGL
    Set of Books =>SQLGL
    Statistical Units of Measure =>SQLGL
    Summary Templates =>SQLGL
    WIP Accounting Classes =>WIP
    Carriers,Methods,Carrier-ModeServ,Carrier-Org=>WSH
    Freight Carriers =>WSH
    Metadata =>XDO
    Legal Entities =>XLE
    Edited by: Mugunthan on May 5, 2009 11:13 AM

    Customer API is not available on 12.0.6/12.1.1. Thanks for pointing out. I will correct it. If you require customer API, please log an enhancement request through SR.

  • Output problem urgent!!

    Okay so heres the problem i have a piece of code to convert a decimal value that a user enters into a binary value. My algorithm works its just when the binary value is displayed only the last element of the binary value to be outputed is displayed. But i want all the values of the binary number to be displayed. I dont know what to do plz help.
    the code i am using is:
    import java.awt.*;
    import java.awt.event.*;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import javax.swing.*;
    public class conversion extends JPanel implements ActionListener
         JPanel board;                // Panel for buttons
         JLabel canvas;               // Text Area for displaying answer
        JButton convert, reset;  // buttons
           JTextField input;       //input text box
             public conversion()
                 super(true); // Call constructor of parent
              // Standard layout (flow)
                 setLayout(new FlowLayout());
              // Set up two panels, control board and canvas
                 board = new JPanel(true);
              canvas = new JLabel();
                 board.setPreferredSize(new Dimension(100, 100));
                 canvas.setPreferredSize(new Dimension(300, 300));
              board.setBorder(BorderFactory.createLineBorder(Color.black));
              canvas.setBorder(BorderFactory.createLineBorder(Color.blue));
              // Create buttons and attach listeners
                 convert = new JButton("Convert");
                 convert.addActionListener(this);
                 reset = new JButton("Reset");
                 reset.addActionListener(this);
              input = new JTextField(8);
                 add(canvas); add(board);
              // Add button to board panel
            board.add(convert);
              board.add(input);
              board.add(reset);
         public void actionPerformed(ActionEvent e)
              String inputInfo;
              inputInfo = input.getText();
              if (e.getSource() == convert){           //action on convert button
               //algorithm for decimal to binary conversion
              int a = Integer.parseInt(inputInfo);    //Gets decimal number inputed
              if (a > 255){
                   canvas.setText("Please enter a number below 256");
              else {
              int b[] = new int[50];
              int i = 0;
              if (a / 2!=0 || a==1)               //Checks to see if decimal number is divisible by 2
              {                                             //Or exactly equal to 1
              while(a!= 1)                            //While loop for when the decimal inputted is not equal to 1
              b= a % 2;                              
              a = a / 2;                                   //Check to see if the remainder is divisible by 2
              i++;
              b[i]= 1;
              for(int x=i;x>=0;x--)
                                                      //Displays the binary answer
                   int answer = b[x];
                   String stringAns = Integer.toString(b[x]);     
                   System.out.println(stringAns);
                   canvas.setText ("The binary for your decimal is: " + stringAns); // this is the problem here, only the last element is displayed
              if (e.getSource() == reset){           //action on reset button
                   canvas.setText("");     
                   input.setText("");
              //Graphics g = canvas.getGraphics();}
         public static void main(String[] args)
         // Create a Blob entity
         conversion b = new conversion();
              // Set up outer frame, and its exit behaviour
         JFrame frame = new JFrame("Decimal to binary");
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              // Set the main content frame to be the Blob,
              // size the frame (pack) and make it visible
         frame.setContentPane(b);
         frame.pack();
         frame.setVisible(true);

    pauze wrote:
              for(int x=i;x>=0;x--)
                                                      //Displays the binary answer
                   int answer = b[x];
                   String stringAns = Integer.toString(b[x]);     
                   System.out.println(stringAns);
                   canvas.setText ("The binary for your decimal is: " + stringAns);        // this is the problem here, only the last element is displayed
    Each element in the array b contains one digit of the binary representation. You need to convert each digit into a character and then concatenate all the characters into a String before displaying anything.

  • API/package/procedure/function for updating physical attributes in Org/Mast

    I need some kind of procedure or function for updating the weight, volume, and dimensions in the organization and master items forms. We have almost 350,000 items and I want to update them in batch. Is there an API of some kind for this? I would do a simple update but I want to make sure there's no additional logic necessary (other tables that are updated during the process of updating those fields, etc).
    Thanks!

    here is for API's you need to check...
    You can use Decimal & UOM Quantity API
    These APIs are used to handle item decimal quantities:
    Convert from one UOM to another
    Validate quantities at input time
    Validate quantities at display/output time
    Quantity Comparison
    Get UOM information
    For your convenience, I am giving you the API as below:
    /*===========================================================================+
    | Copyright (c) 1999 Oracle Corporation |
    | Redwood Shores, California, USA |
    | All rights reserved. |
    +===========================================================================*/
    /*-----------------------------------------------------------------------+
    |This package contains procedures relevent to item decimal quantity |
    |processing. This package contains routines to: |
    |(1)validate item quantities based on UOM and decimal precision rules |
    |(2)validate whether the UOM controls and decimal precision rules |
    | themselves are correct based on functionality planned. For reviewing|
    | UOM and decimal quantity functional design details, please visit the|
    | following URL: |
    | "http//apps-us.oracle.com/inv/development/designs_120/ |
    | decimal_precision/decimal_precision.html" |
    |But here are a few basics to give background context: |
    | |
    | "Item Quantity" -- The item's quantity is described by the item |
    | identifier, the unit of measure (e.g. grams, kilos, etc), and a |
    | number value to indicate the amount in that unit of measure. |
    | |
    | "Unit of Measure" -- Units of measure belong to unit of measure |
    | classes(e.g. weight, volume, length, etc). Each unit of measure class|
    | has actual units of measure that belong to that class (e.g. the |
    | weight class may have units of measures like, "grams", "kilos", etc).|
    | |
    | "UOM Conversion" --Users can set up conversion rates between UOMs in |
    | them same UOM class, by defining conversions to the base UOM. These |
    | are standard conversions. Item-level intra-class conversions may also|
    | be defined. When doing intra-class conversions, item-level |
    | intra-class conversions are used first if defined, and then standard |
    | conversions are used. |
    | Users can define inter-class conversions. Inter-class Conversions may|
    | also be defined at the lot/sublot levels. For inter-class conversions|
    | sublot, lot, and then item inter-class conversions will be used in |
    | in order. If lot-lvel conversion is not defined, then item-level |
    | conversion is used. A strict hierarchy is imposed. |
    | |
    | "TU" -- Trasactable Unit.A UOM may have a TU. This implies |
    | that when transacting in this UOM, any item's quantities will be |
    | forced to be integer multiples of this TU quantity. The TU may also |
    | be declared at the item level. The TU quantity at the item level may |
    | be different from the UOM level TU, and if defined, item level TU |
    | takes precedance. |
    | |
    | "Decimal Precision"--Users have a choice of setting decimal precision|
    | at the base UOM for each UOM class. All other UOMs in that class get |
    | get their decimal precisions derived from the base UOM decimal |
    | precision, the converison rate, and TUs, if they are |
    | being used. |
    | |
    | |
    | "Conversion Rate Tolerance" -- This is a tolerance that may be set |
    | when conversion rate cannot be not strictly fixed. Example: |
    | 1 Chicken = 2 pounds (plus or minus 0.7 pounds). This 0.7 pounds is |
    | the conversion rate tolerance. Conversion rate tolerance is only |
    | definable at inter-class UOM conversions, at item or lot/sublot level|
    | |
    | History |
    | 04/08/99 Mansoor Jafri Created Package Spec |
    | 04/26/99 Mansoor Jafri Updated with TU at 3 levels as |
    | opposed to MTU at 2 and atomic at|
    | UOM class level. |
    | 04/29/99 Mansoor Jafri Updated document with lot/sublot |
    | conversions. Also, removed |
    | "atomic" as a separate control, |
    | since this can |
    | implemented as a TU at base UOM |
    | level with an integer quantity. |
    | 05/03/99 Mansoor Jafri Updated the package with sublot |
    | level control. Also, changed name|
    | of DTU to TU, so that it fits |
    | better in the "process" market. |
    | Also, conformed to BOI API stds. |
    +-----------------------------------------------------------------------*/
    SET VERIFY OFF
    WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
    CREATE OR REPLACE PACKAGE inv_decimals_pub AS
    /* $Header: INVDECPS.pls 118.3 99/05/03 18:12:27 mjafri noship $ */
    /*--------------------------------------------------------------------------+
    |Procedure validate_compare_quantities(..)
    |Returns the quantity converted from the first UOM in the second UOM.
    |If quantities in 2 UOMs are already available, then this procedure will
    |compare and validate these quantities based on conversion rates
    |and UOM and decimal qty controls. This procedure may be used to validate
    |scenarios where quatities are entered in dual UOMs. We want to make sure
    |quantities are valid based on conversion, TUs, and conversion
    |rate tolerances.
    |
    |Procedure validate_and_compare(
    |p_api_version_number IN NUMBER, -- version # of API
    |p_init_msg_list IN VARCHAR2, -- whether to initialize list
    |p_inventory_item_id IN NUMBER, -- inventory_item_id
    |p_organization_id IN NUMBER, -- organization_id
    |p_lot_control_code IN NUMBER, -- item's lot control code
    |p_lot_number IN VARCHAR2, -- lot number
    |p_sub_lot_control_code IN NUMBER, --sub lot control code
    |p_sublot_number IN VARCHAR2, -- sublot number
    |p_from_quantity IN NUMBER, -- qty in first UOM
    |p_from_uom_code IN VARCHAR2, -- UOM of fisrt qty
    |p_to_uom_code IN VARCHAR2, -- UOM of second qty
    |p_to_quantity_to_check IN NUMBER, -- qty in second UOM
    |x_resultant_to_quantity OUT NUMBER, -- calculated qty in second UOM
    |x_comparison OUT NUMBER,--Possible values are 1,0,-1,-99
    |x_msg_count OUT NUMBER, -- number of messages
    |x_msg_data OUT VARCHAR2, -- populated,if msg count = 1
    |x_return_status OUT VARCHAR2) -- return status
    |
    |Note: The comparisons are done in base UOM
    | of the UOM class to which the first UOM belongs. x_comparison returns:
    |-1 if from_quantity is less than to_quantity (A < B)
    | 0 if from_quantity is equal to to_quantity (A = B)
    | 1 if from_quantity is greater than to_quantity (A > B)
    | -99 if the validations for the first/second quantity failed
    | If the UOMs belong to different classes, then users can specify whether
    | they want to use the effective interclass UOM conversion tolerance, say, T.
    | CASE: p_use_interclass_tolerance = 1
    | ------
    | Q1 > Q2 if (Q1 - Q2) >= T
    | Q1 = Q2 if ABS(Q1 - Q2) < T
    | Q1 < Q2 if (Q1 - Q2 ) <= -T
    |
    |The output variable x_resultant_to_quantity will contain the converted
    |quantity
    |in the second UOM, using effective conversion rates.
    |Usage: In a dual UOM scenario, this api will confirm whether quantities in
    |the two UOMs are equal or not, based on x_comparison output variable.
    +--------------------------------------------------------------------------*/
    Procedure validate_compare_quantities(
    p_api_version_number IN NUMBER,
    p_init_msg_list IN VARCHAR2,
    p_inventory_item_id IN NUMBER,
    p_organization_id IN NUMBER,
    p_lot_control_code IN NUMBER,
    p_lot_number IN VARCHAR2,
    p_sub_lot_control_code IN NUMBER,
    p_sublot_number IN VARCHAR2,
    p_from_quantity IN NUMBER,
    p_from_uom_code IN VARCHAR2,
    p_to_uom_code IN VARCHAR2,
    p_to_quantity_to_check IN NUMBER,
    x_resultant_to_quantity OUT NUMBER,
    x_valid_conversion OUT NUMBER,
    x_msg_count OUT NUMBER,
    x_msg_data OUT VARCHAR2,
    x_return_status OUT VARCHAR2);
    /*--------------------------------------------------------------------------+
    |Function convert_UOM(..) return NUMBER ;
    |Returns the quantity converted from the first unit into the second unit.
    |If conversion is not possible, return status is failure.
    |Function convert(
    |p_api_version_number IN NUMBER,
    |p_init_msg_list IN VARCHAR2, -- whether to initialize list
    |p_inventory_item_id IN NUMBER, -- inventory_item_id
    |p_organization_id IN NUMBER, -- organization_id
    |p_lot_control_code IN NUMBER, -- item's lot control code
    |p_lot_number IN VARCHAR2, -- lot number
    |p_sub_lot_control_code IN NUMBER,
    |p_sublot_number IN VARCHAR2,
    |p_from_quantity IN NUMBER, -- qty in first UOM
    |p_from_uom_code IN VARCHAR2, -- UOM of fisrt qty
    |p_to_uom_code IN VARCHAR2, -- UOM of second qty
    |x_msg_count OUT NUMBER,
    |x_msg_data OUT VARCHAR2,
    |x_return_status OUT VARCHAR2)
    | return NUMBER ;
    |If there is an error, then -99 is returned.
    |1) From_quantity must be an absolute value.
    |2) From_quantity will be truncated to decimal precision in the from UOM, then
    | converted to base UOM in the class,
    |3) Then converted to base UOM of the
    | to_UOM class,
    |4) Then converted to the quantity in to_UOM,
    |5) Then truncated to decimal precision of the to_UOM.
    +--------------------------------------------------------------------------*/
    Function convert_UOM(
    p_api_version_number IN NUMBER,
    p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
    p_inventory_item_id IN NUMBER,
    p_organization_id IN NUMBER,
    p_lot_control_code IN NUMBER,
    p_lot_number IN VARCHAR2,
    p_sub_lot_control_code IN NUMBER,
    p_sublot_number IN VARCHAR2,
    p_from_quantity IN NUMBER,
    p_from_uom_code IN VARCHAR2,
    p_to_uom_code IN VARCHAR2,
    x_msg_count OUT NUMBER,
    x_msg_data OUT VARCHAR2,
    x_return_status OUT VARCHAR2) return NUMBER ;
    /*--------------------------------------------------------------------------+
    | get_uom_properties(..)
    | This procedure is used to interrogate the UOM.
    | It returns:
    | (1) decimal precision at the UOM level
    | (2) TU, if defined, at the UOM level
    | (3) Atomicity, if defined for the class that this UOM belongs to
    | If some of the controls are not defined, null values are returned.
    | if the UOM is not found, the return status indicates this.
    | Procedure get_uom_properties(
    | p_api_version_number IN NUMBER,
    | p_init_msg_list IN VARCHAR2,
    | p_uom_code IN VARCHAR2,
    | x_decimal_precision OUT NUMBER,
    | x_uom_TU OUT NUMBER,
    | x_uom_class OUT VARCHAR2,
    | x_msg_count OUT NUMBER,
    | x_msg_data OUT VARCHAR2,
    | x_return_status OUT VARCAHR2);
    +--------------------------------------------------------------------------*/
    Procedure get_uom_properties(
    p_api_version_number IN NUMBER,
    p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
    p_uom_code IN VARCHAR2,
    x_decimal_precision OUT NUMBER,
    x_uom_TU OUT NUMBER,
    x_uom_class OUT VARCHAR2,
    x_msg_count OUT NUMBER,
    x_msg_data OUT VARCHAR2,
    x_return_status OUT VARCAHR2);
    /*-------------------------------------------------------------------------+
    | get_item_uom_properties(..)
    | This procedure returns a specific item's primary UOM, TU, and tolerance
    | Procedure get_item_uom_properties(
    | p_api_version_number IN NUMBER,
    | p_init_msg_list IN VARCHAR2,
    | p_inventory_item_id IN NUMBER,
    | p_organization_id IN NUMBER,
    | p_lot_control_code IN NUMBER, -- item's lot control code
    | p_lot_number IN VARCHAR2,
    | p_sub_lot_control_code IN NUMBER,
    | p_sublot_number IN VARCHAR2,
    | x_primary_uom_code OUT VARCHAR2,
    | x_uom_class OUT VARCHAR2,
    | x_decimal_precision OUT NUMBER,
    | x_item_TU OUT NUMBER,
    | x_uom_TU OUT NUMBER,
    | x_effective_TU OUT NUMBER,
    | x_msg_count OUT NUMBER,
    | x_msg_data OUT VARCHAR2,
    | x_return_status OUT VARCHAR2 );
    | If the item is not a valid one, then this is reflected through the
    | return status.
    +-------------------------------------------------------------------------*/
    Procedure get_item_uom_properties(
    p_api_version_number IN NUMBER,
    p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
    p_inventory_item_id IN NUMBER,
    p_organization_id IN NUMBER,
    p_lot_control_code IN NUMBER,
    p_lot_number IN VARCHAR2,
    p_sub_lot_control_code IN NUMBER,
    p_sublot_number IN VARCHAR2,
    x_primary_uom_code OUT VARCHAR2,
    x_uom_class OUT VARCHAR2,
    x_decimal_precision OUT NUMBER,
    x_item_TU OUT NUMBER,
    x_class_TU OUT NUMBER,
    x_uom_TU OUT NUMBER,
    x_effective_TU OUT NUMBER,
    x_msg_count OUT NUMBER,
    x_msg_data OUT VARCHAR2,
    x_return_status OUT VARCHAR2 );
    /*-------------------------------------------------------------------------+
    | Procedure compare_quantities(..)
    | Procedure compare_quantities(
    | p_api_version_number IN NUMBER,
    | p_init_msg_list IN VARCHAR2,
    | p_inventory_item_id IN NUMBER,
    | p_organization_id IN NUMBER,
    | p_lot_control_code IN NUMBER,
    | p_lot_number IN VARCHAR2,
    | p_sub_lot_control_code IN NUMBER,
    | p_sublot_number IN VARCHAR2,
    | p_fisrt_qauantity IN NUMBER,
    | p_first_uom IN VARCHAR2,
    | p_second_quantity IN NUMBER,
    | p_second_uom IN VARCHAR2,
    | p_use_interclass_tolerance IN VARCHAR2, -- Yes = 1, 2 = No
    | x_comaprison_result OUT NUMBER,
    | x_msg_count OUT NUMBER,
    | x_msg_data OUT VARCHAR2,
    | x_return_status OUT VARCHAR2);
    |
    | This procedure compares the quantities A and B and returns result in the
    | output variable x_comparison_result. The comparisons are done in base UOM
    | of the UOM class to which the first UOM belongs:
    |-1 if quantity A is less than quantity B (A < B)
    | 0 if quantity A is equal to quantity B (A = B)
    | 1 if quantity A is greater than quantity B (A > B)
    | If the UOMs belong to different classes, then users can specify whether
    | they want to use interclass UOM conversion tolerance, say, T.
    | CASE: p_use_interclass_tolerance = 1
    | ------
    | Q1 > Q2 if (Q1 - Q2) >= T
    | Q1 = Q2 if ABS(Q1 - Q2) < T
    | Q1 < Q2 if (Q1 - Q2 ) <= -T
    +------------------------------------------------------------------------*/
    Procedure compare_quantities(
    p_api_version_number IN NUMBER,
    p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
    p_inventory_item_id IN NUMBER,
    p_organization_id IN NUMBER,
    p_lot_control_code IN NUMBER,
    p_lot_number IN VARCAHR2,
    p_sub_lot_control_code IN NUMBER,
    p_sublot_number IN VARCHAR2,
    p_fisrt_qauantity IN NUMBER,
    p_first_uom IN VARCHAR2,
    p_second_quantity IN NUMBER,
    p_second_uom IN VARCHAR2,
    p_use_interclass_tolerance IN VARCHAR2,
    x_comaprison_result OUT NUMBER,
    x_msg_count OUT NUMBER,
    x_msg_data OUT VARCHAR2,
    x_return_status OUT VARCHAR2);
    /*-----------------------------------------------------------------------+
    | Procedure Validate_Quantity(
    | p_api_version_number IN NUMBER,
    | p_init_msg_list IN VARCHAR2,
    | p_inventory_item_id IN NUMBER,
    | p_organization_id IN NUMBER,
    | p_lot_control_code IN NUMBER,
    | p_lot_number IN VARCHAR2,
    | p_sub_lot_control_code IN NUMBER,
    | p_sublot_number IN VARCHAR2,
    | p_input_quantity IN NUMBER,
    | p_UOM_code IN VARCHAR2,
    | x_msg_count OUT NUMBER,
    | x_msg_data OUT VARCHAR2,
    | x_return_status OUT VARCHAR2);
    |
    | Validates and returns the quantity in this manner (the caller does not need
    | to adjust the result):
    | 0. Truncate to and validate decimal precision
    | 1. Validate quantity with respect to TU controls.
    +-------------------------------------------------------------------------*/
    Procedure Validate_Quantity(
    p_api_version_number IN NUMBER,
    p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
    p_inventory_item_id IN NUMBER,
    p_organization_id IN NUMBER,
    p_lot_control_code IN NUMBER,
    p_lot_number IN VARCAHR2,
    p_sub_lot_control_code IN NUMBER,
    p_sublot_number IN VARCHAR2,
    p_input_quantity IN NUMBER,
    p_UOM_code IN VARCHAR2,
    x_msg_count OUT NUMBER,
    x_msg_data OUT VARCHAR2,
    x_return_status OUT VARCHAR2);
    /*------------------------------------------------------------------------+
    | Function Truncate_Quantity(
    | p_api_version_number IN NUMBER,
    | p_init_msg_list IN VARCHAR2,
    | p_inventory_item_id IN NUMBER,
    | p_organization_id IN NUMBER,
    | p_lot_control_code IN NUMBER,
    | p_lot_number IN VARCHAR2,
    | p_sub_lot_control_code IN NUMBER,
    | p_sublot_number IN VARCHAR2,
    | p_input_quantity IN NUMBER,
    | p_UOM_code IN VARCHAR2,
    | x_msg_count OUT NUMBER,
    | x_msg_data OUT VARCHAR2,
    | x_return_status OUT VARCHAR2) return NUMBER;
    |
    | Truncates the quantity to decimal precision of the UOM.
    | In case of error conditions, -99 is returned.
    +------------------------------------------------------------------------*/
    Function Truncate_Quantity(
    p_api_version_number IN NUMBER,
    p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
    p_inventory_item_id IN NUMBER,
    p_organization_id IN NUMBER,
    p_lot_control_code IN NUMBER,
    p_lot_number IN VARCHAR2,
    p_sub_lot_control_code IN NUMBER,
    p_sublot_number IN VARCHAR2,
    p_input_quantity IN NUMBER,
    p_UOM_code IN VARCHAR2,
    x_msg_count OUT NUMBER,
    x_msg_data OUT VARCHAR2,
    x_return_status OUT VARCHAR2) return NUMBER;
    * show errors package INV_DECIMALS_PUB
    * SELECT to_date('SQLERROR') FROM user_errors
    * WHERE name = 'INV_DECIMALS_PUB'
    * AND type = 'PACKAGE';
    commit;
    exit;

  • Failed to retrieve data from the database. [Database Vendor Code: 116]

    My report is using Java Bean class as datasource and the Java Bean class calls a report-specific Java program to return a result set.
    Report fails to generate and the error message is
    Failed to retrieve data from the database. Details:  [Database Vendor Code: 116 ]
    Can anyone tell me what error code 116 means?
    Thanks.

    The problem is solved internally. Our team implemented a result set data structure that incorrectly converts a Double into a String before passing it to Crystal Report for rendering. Data Vendor Code I met yesterday was the outcome of illegal class conversion.
    I have a side question;  our development team would like to use log4j to log method calls invoked during rendering. Our problem could be solved earlier if we knew getString() was invoked instead of getDouble() during rendering.  We thought of specifying the full path of log4j jar file in CRConfig.xml but we don't know how to configure CR to write logging information into a specific file location.
    Please help.
    Thanks

Maybe you are looking for