Creating object type no attributes... how???

Hi I need to creating any object type has no attribute, its possibily?
I need that only send to java class.
example:
create type t1 as object();
Oracle exception!!!! please help me, thanks

No attributes and no methods? You're talking about "incomplete types" in that case (at least in 10g).
A quote:
"An incomplete type is a type created by a forward type definition. It is called "incomplete" because it has a name but no attributes or methods. It can be referenced by other types, and so can be used to define types that refer to each other. However, you must fully specify the type before you can use it to create a table or an object column or a column of a nested table type."
If it fits your requirement, look here:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_8001.htm#SQLRF01506
Boa sorte.
PS: It talks there about "SQLJ object type" but I never used them so I cannot comment. Check that out too.

Similar Messages

  • Dynamically create document type Item Attribute using WF_ENGINE.AddItem API

    Hi
    Is WF_ENGINE.AddItem API , supported to create document type Item attributes dynamically ? If yes how do we set the display name of the attribute. If no then is there is any other method to dynamically create document tyoe item attribute?
    Thanks

    Hi,
    If the document is stored on a file system, then I would replace the message body with a PL/SQL document which includes links to the files as straightforward URLs. There would be no need to include them in the Workflow in any way. For example, I recently worked with a client where all the (file) attachments made within eBusiness Suite were then migrated into Oracle Universal Content Management and the attachment was replaced with a URL to the new document. Any notifications now just reference the URL link to the document within the document management system in an HTML notification. While the processing is going on, the user is given the list of files that exist as attachments, but no links because the document is being processed by the management system.
    If the attachments are going to be stored in Workflow as documents, you won't be able to change the display name though - display name is set for the attribute on the message, not for each specific notification. Changing the value of the display name for the message would impact all notifications that use that message, which isn't what you want.
    What you need is to dynamically build the notification (either using PL/SQL or OA Framework) and include a list of attachments in the notification. This may be a direct link to the document (either in a document management system or on a file system somewhere) that you can render as a URL, or a link to code that can retrieve the document from the database and serve that to the user. This is not a straightforward piece of work.
    If this is purely internal, you might be better off having a custom form / screen which displays the different documents, and link to that from the notification. Or you could link to a standard form for the transaction and have the users pick up the attachments directly from the transaction.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://www.workflowfaq.com/blog ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • Exception '1250' is not defined for method 'CREATE' object type 'MESSAGE'

    Dear experts,
    I set up the document distribution (SWU3, backgroundjob SMTP, activated the workflows, flagged the linkages, etc). Now, I have still a error:
    Exception '1250' is not defined for method 'CREATE' object type 'MESSAGE'
    Does anyone know what the cause of exception 1250 could be?
    Thanks in advance and kind regards,
    Samuel

    hi,
    SAP ITS is SAP Internet Transaction Server which provides connection between SAP ERP system and html client.
    Check with bassis, i think TCP/IP or work station application not configured yet. i guess?
    Benakaraja
    ??P

  • Creating object type u0093no objectu0094

    We have created No objcet table SBO will create only code and name fields but create document table SBO will create DocEntry and also the Extra fields that will help  to link to other documents.
    Above things  that  we have clear idea
    Could u tell me  creating object type “no object”  can we insert the data……..??
    Or its compulsory  to using  UDO?

    using  .srf   is it possible  ???   i have sending u code 
    error form bad datasource.. form Unique id 'MPPeriod',item unique id ' cmbppt'
    but we check  all unique id   that is correct
    Public Class payperiod
        Private WithEvents SBO_Application As SAPbouiCOM.Application
        Dim AddStarted As Boolean
        Dim RedFlag As Boolean
        Private oform As SAPbouiCOM.Form
        Private oCodetext As SAPbouiCOM.EditText
        Private noteedittext As SAPbouiCOM.EditText
        Private daystext As SAPbouiCOM.EditText
        Private worktext As SAPbouiCOM.EditText
        Private starD As SAPbouiCOM.EditText
        Private endD As SAPbouiCOM.EditText
        Private Sub SetApplication()
            AddStarted = False
            RedFlag = False
            '// Use an SboGuiApi object to establish connection
            '// with the SAP Business One application and return an
            '// initialized application object
            Dim SboGuiApi As SAPbouiCOM.SboGuiApi
            Dim sConnectionString As String
            SboGuiApi = New SAPbouiCOM.SboGuiApi
            '// by following the steps specified above, the following
            '// statement should be sufficient for either development or run mode
            sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
            '// connect to a running SBO Application
            SboGuiApi.Connect(sConnectionString)
            '// get an initialized application object
            SBO_Application = SboGuiApi.GetApplication()
        End Sub
        Public Sub New()
            MyBase.New()
            SetApplication()
            addmenuitems()
        End Sub
        Private Sub DrawForm()
            Dim oitem As SAPbouiCOM.Item
            Dim oCombopptype As SAPbouiCOM.ComboBox
            Try
                LoadFromXML("PayPeriodMaster.srf")
            Catch ex As Exception
                MessageBox.Show(ex.Message)
            End Try
            oform = SBO_Application.Forms.Item("MPPeriod")
                       '''''''''combo for pay type
            oitem = oform.Items.Item("cmbppt")
            oCombopptype = oitem.Specific
            oCombopptype.ValidValues.Add(CStr(3), "Employee")
            ' oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Labour")
            oCombopptype.ValidValues.Add(CStr(4), "Labour")
            ''''''' combo for code
            oitem = oform.Items.Item("txtcode")
            oCodetext = oitem.Specific
            '''''''' startdate
            oitem = oform.Items.Item("txtSDate")
            starD = oitem.Specific
            ''''''''''end date
            oitem = oform.Items.Item("txtEDate")
            endD = oitem.Specific
            ''''''''''days in period
            oitem = oform.Items.Item("txtDPrd")
            daystext = oitem.Specific
            '''''''''''' working days
            oitem = oform.Items.Item("txtWDays")
            worktext = oitem.Specific
            ''''''' notes''''''''''''
            oitem = oform.Items.Item("txtNotes")
            noteedittext = oitem.Specific
        End Sub
        Private Sub addmenuitems()
            Dim oMenus As SAPbouiCOM.Menus    ' the menus collection
            Dim oMenuitem As SAPbouiCOM.MenuItem ' the new item
            'get the  menus collection from the application
            oMenus = SBO_Application.Menus
            Dim ocreationPackage As SAPbouiCOM.MenuCreationParams
            ocreationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)
            oMenuitem = SBO_Application.Menus.Item("2048") 'sales menu id
            oMenus = oMenuitem.SubMenus
            ocreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
            ocreationPackage.UniqueID = "mnu1"
            ocreationPackage.String = "Payperiod"
            ocreationPackage.Enabled = True
            ocreationPackage.Position = 15
            Try
                ' if the menu already exist thus code will fail
                oMenus.AddEx(ocreationPackage)
            Catch ex As Exception ' menu already exist
                MessageBox.Show("menu already exist")
            End Try
        End Sub
        Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
            If (pVal.MenuUID = "mnu1") And (pVal.BeforeAction = False) Then
                Try
                    Dim f As SAPbouiCOM.Form
                    f = SBO_Application.Forms.Item("MPPeriod")
                    f.Select()
                Catch ex As Exception
                    DrawForm()
                End Try
            End If
        End Sub
        Private Sub SBO_Application_StatusBarEvent(ByVal Text As String, ByVal MessageType As SAPbouiCOM.BoStatusBarMessageType) Handles SBO_Application.StatusBarEvent
            If MessageType = SAPbouiCOM.BoStatusBarMessageType.smt_Error And AddStarted = True Then
                RedFlag = True
            End If
        End Sub
        Private Sub LoadFromXML(ByRef FileName As String)
            Dim oXmlDoc As Xml.XmlDocument
            oXmlDoc = New Xml.XmlDocument
            '// load the content of the XML File
            Dim sPath As String
            sPath = IO.Directory.GetParent(Application.StartupPath).ToString
            oXmlDoc.Load(sPath & "\" & FileName)
            '// load the form to the SBO application in one batch
            SBO_Application.LoadBatchActions(oXmlDoc.InnerXml)
        End Sub
        Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            Dim oDocRec As SAPbobsCOM.Recordset
            Dim f As SAPbouiCOM.Form
            Dim s As String
            ' Events of the Blanket Agreement form
            If (FormUID = "MPPeriod") Then
                If (pVal.Before_Action = True) Then
                    If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.ItemUID = "1" Then
                        Dim objRecser As SAPbobsCOM.Recordset
                        objRecser = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                        ' SBO_Application.MessageBox("hi")
                        ' objRecser.DoQuery("INSERT INTO [@MastPayPeriod]( Code,Name,U_PayPeriodTypeCode, U_PayPeriodCode, U_StartDate, U_EndDate, U_DaysInPeriod, U_WorkingDays, U_Notes) VALUES (1,1,'" & oform.Items.Item("cmbppt").Specific.Value & "','" & oform.Items.Item("txtCode").Specific.Value & "',& '"oform.Items.Item("cmbSDate").Specific.Value & "','"& oform.Items.Item("cmbEDate").Specific.Value & "','" & oform.Items.Item("txtDPrd").Specific.Value & "','" & oform.Items.Item("txtWDays").Specific.Value & "','" & oform.Items.Item("txtNotes").Specific.Value & "')")
                        objRecser.DoQuery("INSERT INTO [@MastPayPeriod](Code,Name,U_PayPeriodTypeCode, U_PayPeriodCode, U_StartDate, U_EndDate, U_DaysInPeriod, U_WorkingDays, U_Notes) VALUES (1,1,'" & oform.Items.Item("cmbppt").Specific.Value & "','" & oform.Items.Item("cmbCode").Specific.Value & "','" & oform.Items.Item("txtSDate").Specific.Value & "','" & oform.Items.Item("txtEDate").Specific.Value & "','" & oform.Items.Item("txtDPrd").Specific.Value & "','" & oform.Items.Item("txtWDays").Specific.Value & "','" & oform.Items.Item("txtNotes").Specific.Value & "')")
                    End If
                End If
                If (pVal.Before_Action = False) Then
                    If (pVal.ItemUID = "2") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) Then
                    End If
                End If
            End If
        End Sub
        'Private Sub SaveAsXML(ByRef Form As SAPbouiCOM.Form)
        '    Dim oXmlDoc As Xml.XmlDocument
        '    Dim sXmlString As String
        '    oXmlDoc = New Xml.XmlDocument
        '    // get the form as an XML string
        '    sXmlString = Form.GetAsXML
        '    // load the form's XML string to the XML document object
        '    oXmlDoc.LoadXml(sXmlString)
        '    Dim sPath As String
        '    sPath = IO.Directory.GetParent(Application.StartupPath).ToString
        '    // save the XML Document
        '    oXmlDoc.Save((sPath & "\PayPeriodMaster.xml"))
        'End Sub
    End Class

  • How to Create Object Type

    Hi.
    I am Creating Task i found options ... Object Type and  method .. i think we can use user define/Created .. my question is what T Code is to create New Object type and method ...  and further help or suggestion about its development
    Regards
    Amamd

    Hi,
    You should try to use Standard BO. Go to tcode SWO1 and you can do a search related to your requirements. If it exists a BO but it doesn't fullfill your requirements you can create a subtype of this BO by menu Settings > Delegate. In this way, you can inherit all of the BO and create your owns.
    Regards,

  • Can't create object types in forms 10

    Hello,
    I am trying to use object types in forms 10.
    I have already created successfully two object types and also corresponding object views.
    With one object type A everything works fine in form. But with the other object type B it doesn't.
    I am calling the constructor of object B and after the constructor finshed, forms says that there is a numeric or value error.
    Well, by nbow I have reduced attributes from object B so that they are identical to object A (which works). But still get the same error or if I use a different constructor I get NULL as a return value. I tested the constructors with test script in the database directly and viola - the constructor are working fine.
    Only if I use the constructors in forms environment they fail.
    Any ideas why this might happen?
    Thank you
    Matthias
    Well, I fear to use the object types in my next project cause if I run into trouble if the object types are so easy with less code, what else might happen if they are filled up with much more code?

    Hello again,
    I have tried again and still get the exception.
    Now I provide the code. Perhaps someone can see, why this exceptioon occurs.
    In the database I coded the following:
    create or replace type GenericObject as object
    -- Attributes
    iVersion VARCHAR2(8),
    -- Member functions and procedures
    MEMBER FUNCTION toString(SELF IN OUT NOCOPY GenericObject) RETURN VARCHAR2,
    FINAL MEMBER FUNCTION toString001(SELF IN OUT NOCOPY GenericObject) RETURN VARCHAR2,
    NOT INSTANTIABLE MEMBER PROCEDURE log(pLogger IN OUT MyLogger)
    ) NOT INSTANTIABLE NOT FINAL
    create or replace type body GenericObject is
    -- Member procedures and functions
    MEMBER FUNCTION toString(SELF IN OUT NOCOPY GenericObject) RETURN VARCHAR2 IS
    BEGIN
    RETURN SELF.toString001();
    END;
    FINAL MEMBER FUNCTION toString001(SELF IN OUT NOCOPY GenericObject) RETURN VARCHAR2 IS
    BEGIN
    RETURN 'GenericObject(' || SELF.iVersion || ')';
    END;
    end;
    create or replace type MyTestA UNDER GenericObject
    -- Attributes
    iPk VARCHAR2(16),
    iName VARCHAR2(100),
    iDCN NUMBER,
    -- constructor
    CONSTRUCTOR FUNCTION MyTestA(pName VARCHAR2, pDummy INTEGER) RETURN SELF AS RESULT,
    CONSTRUCTOR FUNCTION MyTestA(pPk VARCHAR2) RETURN SELF AS RESULT,
    STATIC FUNCTION mycreate(pName VARCHAR2) RETURN MyTestA,
    -- Member functions and procedures
    OVERRIDING MEMBER FUNCTION toString(SELF IN OUT NOCOPY MyTestA) RETURN VARCHAR2,
    FINAL MEMBER FUNCTION toString002(SELF IN OUT NOCOPY MyTestA) RETURN VARCHAR2,
    OVERRIDING MEMBER PROCEDURE log(SELF IN OUT NOCOPY MyTestA, pLogger IN OUT MyLogger)
    ) NOT FINAL
    create or replace type body MyTestA is
    -- constructors
    CONSTRUCTOR FUNCTION MyTestA(pName VARCHAR2, pDummy INTEGER) RETURN SELF AS RESULT IS
    BEGIN
    SELF.iVersion := '1.1';
    SELF.iPk := 1;
    SELF.iName := pName;
    SELF.iDCN := 1;
    RETURN;
    END;
    CONSTRUCTOR FUNCTION MyTestA(pPk VARCHAR2) RETURN SELF AS RESULT IS
    BEGIN
    SELECT VALUE(o) INTO SELF FROM v_testa o WHERE o.ipk = pPk;
    RETURN;
    END;
    STATIC FUNCTION mycreate(pName VARCHAR2) RETURN MyTestA IS
    BEGIN
    RETURN MyTestA(pName, 1);
    END;
    -- Member procedures and functions
    OVERRIDING MEMBER FUNCTION toString(SELF IN OUT NOCOPY MyTestA) RETURN VARCHAR2 IS
    BEGIN
    RETURN toString002();
    END;
    FINAL MEMBER FUNCTION toString002(SELF IN OUT NOCOPY MyTestA) RETURN VARCHAR2 IS
    lvText VARCHAR2(1000);
    BEGIN
    lvText := SELF.toString001();
    RETURN 'MyTestA(' || iPk || ', ' || iName || ', ' || 'lvHersteller.toString()' || ', ' || lvText || ')';
    END;
    OVERRIDING MEMBER PROCEDURE log(SELF IN OUT NOCOPY MyTestA, pLogger IN OUT MyLogger) IS
    BEGIN
    pLogger.log(toString());
    END;
    end;
    CREATE OR REPLACE VIEW v_testa OF MyTesta
    WITH OBJECT IDENTIFIER (iPk) AS
    SELECT
    '1.0' iVersion
    ,g.pk iPk, g.NAME iName, g.ora_rowscn iDCN FROM o_geraete g
    DROP TABLE o_geraete;
    CREATE TABLE
    o_geraete
    pk VARCHAR2(16)
    , name VARCHAR2(100)
    , hersteller_FK VARCHAR2(16)
    , zaehlernummer VARCHAR2(20)
    , dummy VARCHAR2(10)
    INSERT INTO o_geraete
    VALUES(
    '100', 'Stromzähler', '1', 'AB-56', 'dumb'
    INSERT INTO o_geraete
    VALUES(
    '200', 'Wasserzähler', '2', 'WS-09', 'dumb'
    In forms I created a form from the view and coded into the on-insert-trigger:
    declare
         lvtest mytesta;
    begin
         message('1');
         lvtest := new mytesta(:blk_testa.iname, 1);
         message('2');
         message('3' || lvtest.tostring());
    exception
         when others then
              message('Exception: ' || sqlerrm);
    end;
    And in that forms block I got the exception.
    Perhaps someone has ANY idea...
    Thanx a lot
    Matthias
    Message was edited by:
    user522343
    Message was edited by:
    user522343

  • Need help on defining object-type dependent attributes for documents

    Hi everyone,
    I'm trying to define different attributes for documents (attachments), depending on document type.
    I performed customizing activities as specified in IMG notes (define structure and table for the attributes, attribute model, register attribute model with table and structure, map model to object type, map object type to document type)
    But I didn't find any new BOL in CM GenIL component with my attributes...
    I already have type-independent attributes defined, and I see them in the CMDocument BOL.
    I don't know how to use my attributes, nor in code niether in UI.
    Did I miss something?
    Thanks,
    Yulia

    return self.amount+self.depositamount;I counld not find any amount field in your type definitions
    if self.status='OPEN' thenIs it w_accountt.status ?? since there is no status field in accountmanager_t type
    return self.currentamount-self.withdrawalamount;same comments for currentamount
    member function deposit(d_accountt account_t,d_transno number default 1) return account_t asWhere as your return expression is a number??

  • Is there a switch for 'FORCE' when creating object type?

    Where is the property to indicate whether or not to include the keyword FORCE when creating an object type?

    Thanks, the support that SDDM provides for Object Types is much better than Oracle Designer. I am looking forward to the release where we can flag a method's parameter as 'DEFAULT NULL' and especially the ability to include an inherited or included attribute as part of the primary key or the primary key. With the last release where the method body is stubbed out with 'BEGIN NULL; END;' really provided the basic ability for rapid prototyping. Once the key 'FORCE' is in place, the ability to rapid prototype will become even more functional.

  • Create object type from multiple tables for select statement

    Hi there,
    I have 3 tables as given below and I wish to create an object type to group selected columns as 'attribute' from multiple tables. 
    I need to create 2 input parameters to pass in - 'attribute' and 'attribute value'  in PL/SQL and these 2 parameters will be
    passing in with 'column name' and 'column value'.  e.g. 'configuration' - the column name, 'eval' - the column value.
    Then, the PL/SQL will execute the select statement with the column and column value provided to output the record. 
    Pls advise and thank you.
    table ccitemnumber
    name                           null     type                                                                                                   
    ccitemnumber                   not null varchar2(20)                                                                                                                                                                                    
    configuration                           varchar2(20)
    item_type                               varchar2(30)
    table productmodel
    productmodelnumber             not null varchar2(6)                                                                                            
    description                             varchar2(60)  
    accesstimems                            number                                                                                                 
    numberofheads                           varchar2(2)
    generation                              varchar2(10)
    numberofdiscs                           varchar2(2)
    factoryapplication                      varchar2(150)
    table topmodel
    stmodelnumber                  not null varchar2(30)                                                                                           
    productfamily                           varchar2(60
    formfactor                              varchar2(10)                                                                                           
    modelheight                             varchar2(10)                                                                                           
    formattedcapacity                       number                                                                                                 
    formattedcapacity_uom                   varchar2(20)
    object type in database
    configuration                           varchar2(20)
    item_type                               varchar2(30)
    numberofheads                           varchar2(2)
    generation                              varchar2(10)
    numberofdiscs                           varchar2(2)
    factoryapplication                      varchar2(150)
    modelheight                             varchar2(10)
    formattedcapacity                       number                                                                                                 
    formattedcapac

    user12043838 wrote:
    Reason to do this as these fields are required to be grouped together as they are created in different tables. They are treated as 'attribute' (consists of many columns) of the part number. So, the PL/SQL is requested to design in a way able for user to pass in the column name and column value or part number, then the select statement should be able to query for the records. Another reason is a new column can be added easily without keep modifying those effected programs. Reuseable too.This basically equates to ... hard to code, hard to maintain, and poor performance.
    Are you really sure you want to do this? This isn't going to be easy-street as you seem to think it is, but it's a one way street to a poorly performing system with security vulnerabilities (google SQL Injection).
    I would highly recommend you reconsider your design decision here.

  • Create "Object" Type based on columns of a table

    Hi Experts
    is it possible to create an Object Type based on columns of a table?
    for example the syntax for creation of type is
    CREATE OR REPLACE TYPE temp_t
    AS OBJECT (ID number, code number)
    can we create a type that is based on columns of an existing table? so that we donot have to write down all the column names in each type as i have to create types based on 100 and above tables :-s
    Please help me out here!
    Best Regards

    You cannot do that Zia, check below code:
    SQL> create or replace type temp_t as object(object_name all_objects.object_name%TYPE);
      2  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE TEMP_T:
    LINE/COL ERROR
    0/0      PL/SQL: Compilation unit analysis terminated
    1/35     PLS-00201: identifier 'ALL_OBJECTS.OBJECT_NAME' must be declared

  • Use TYPE RECORD or Create Object TYPE to build Collection?

    Hi All,
    I need to pull in data from our ERP system via a DB Link to keep some of our Web Data up to date. I wasn't sure if I should pull the data into my collection by creating a TYPE RECORD or Creating an Object Type and fillng it that way. Is there a preferrable method?
    Record:
    TYPE ItemInventory IS RECORD (
    ProductID Products.ProductID%TYPE,
    Qty Products.QTY%TYPE);
    Object:
    Create Type ProdObj as Object(
    ProductID Products.ProductID%TYPE,
    QTY Products.QTY%TYPE);
    Maybe both are suitable....wasn't sure.
    Any suggestions/info is greatly apprecaited.
    S
    Edited by: ScarpacciOne on Feb 21, 2010 7:54 PM

    ScarpacciOne wrote:
    We have a complex view we use from our ERP system that allows us to pull all of our available inventory and update our website with that information. What I was thinking I would do is refactor the current procedures that are in place to update this information and pull that views information into a collection so that I could speed up the update process.The basic difference between the two is that one is a dumb record structure (similar to a C struct), whereas the other is an intelligent class (similar to a class definition in Java/C++). It can have methods and constructors.
    The next major difference is that one can only be use in the PL language and not in SQL. The record struct is a PL data type definition. PL cannot provide SQL engine support for it.
    On the other hand, the SQL type definition is supported by both the PL and SQL languages. This allows the type to be transparently used in both languages.
    I usually prefer the SQL type definition approach in general, as it allows for more flexibility.
    However, for pure collection processing in PL/SQL, there's very little to choose between the two approaches as they serve the exact same purpose - increasing performance by decreasing context switching between the PL and SQL engines.
    So you need to look beyond mere bulk collection and bulk processing to decide on which approach to use. For example, a SQL type definition allows for a standard SQL projection from cursors, enabling PL/SQL code to be cursor agnostic (as each cursor, irrespective of the table(s) queried, returns the same object type). However, if the aim is simply to bulk collect from that specific cursor, then it is a lot simpler to use a PL record struct.

  • FM to create Object Type(ET) - LSO

    Hi all,
    Can you please suggest me the function module which is used to create an object type "ET"  which involves infotypes namely 1000, 1001, 1026. There's one LSO function module which is used typically when a student is booked into a new static Web Based Training Course Type (D), which automatically creates the ET.
    Suggestions will be appreciated and suitable points will be rewarded.
    Thanks in advance,
    Vaishnavi.

    Hi Vaishnavi,
    If you have implementation knowledge on LSO,  please can you help me?
    plz mail me at   [email protected]
    Thanks in advance.
    sadana.
    Edited by: sadana saphr on May 21, 2008 9:22 AM

  • Creating object type conflict dump

    Hi All,
    I have an interface zintf_1. I getting the list of classes that implemented the zintf_1.
    There are some cases where the class wont have implemented the interface.
    ZDEMO_AA class has not implemented the interface zintf_1.
    data: lr_intf_1 type ref to zintf_1,
            lv_clsname type SEOCLSNAME.
    lv_clsname = 'ZDEMO_AAA'.
    try.
    create object lr_intf_1 type (lv_clsname).
    catch cx_sy_create_object_error.
    endtry.
    In that case i m getting the dump "Type conflict with allocation of References".
    Please help me to resolve the issue.
    thanks
    Vimalraj

    I'm assuming that you're trying to trap the case the class lv_clsname doesn't actually implement the interface.
    Well, the interface not being there is NOT a catchable error.  So you have to find out whether the interface is implemented first.
    DATA: lr_intf_1  TYPE REF TO zintf_1,
          lv_clsname TYPE seoclsname,
          lr_object  TYPE REF TO cl_oo_class,
          lt_intf    TYPE seo_relkeys.
    lv_clsname = 'ZDEMO_AAA'.
    lr_object ?= cl_oo_object=>get_instance( lv_clsname ).
    lt_intf = lr_object->get_implemented_interfaces( ).
    READ TABLE lt_intf TRANSPORTING NO FIELDS WITH KEY refclsname = 'ZINTF_1'.
    IF sy-subrc IS INITIAL.
      CREATE OBJECT lr_intf_1
        TYPE
          (lv_clsname).
      WRITE: 'it worked'.
    ELSE.
      WRITE / 'it failed'.
    ENDIF.
    matt

  • XML attributes and object types

    I want to create an XML Document of the following form
    <family>
    <parent attr1="val1">
    <child attr2="val2" attr3="val3"/>
    </parent>
    </family>
    Using object table and object type (for the child element), I am able to produce the following XML Document (with a "select * from family" query)
    <family> <!-- rowset -->
    <parent> <!-- row -->
    <attr1>val1</attr1>
    <child>
    <attr2>val2</attr2>
    <attr3>val3</attr3>
    </child>
    </parent>
    </family>
    The question is: how am I going to query these data so that the "attr" elements are mapped to attributes (using XSU only, without XSLT)?
    I have already tried the following:
    1. Using
    SELECT attr1 as "@attr1",
    f.child.attr2 "@attr2",
    f.child.attr3 "@attr3"
    FROM family f
    all the attributes are obviously appended to the "parent" element.
    2. Using nested table for "child" and the following query
    SELECT attr1 as "@attr1",
    CURSOR (
    SELECT n.child.attr2 as "@attr2", n.child.attr3 as "@attr3"
    FROM TABLE(f.child n)
    ) AS "child"
    FROM family f
    I am getting the following document
    <family>
    <parent attr1="val1">
    <child>
    <child_ROW attr2="val2" attr3="val3"/>
    </child>
    </parent>
    </family>
    Is there a smart SQL query to produce the desired document? What data types
    is it recommended to use to define my db schema (object types, nested tables...)?
    Thank you in advance
    null

    Finally, I got the desired XML format output from relational tablse using schema based XMLType views.
    Wherein I created Object Types from relational table, generated the schema for the Object type, registered the schema and finally created XMLType Views for populating the XML data from Relational Tables.
    I guess, you all might aware of my problem, where I got struck. Instead of printing the data in XML format I am successful in generating the XML format data Using the Query Select from BLABLA_Type_view* . I am able to print the number of rows, that I require which is in the fallowing format.
    Column Name
    1. SYS.XMLTYPE ----- As a row
    The view I am querying for is printing the data in a string format, where in I got to do the fallowing query
    SELECT SYS.XMLTYPE.getStringVal(OBJECT_VALUE) FROM BLABLA_Type_view. Which ultimately gave me the required data in XML format with tags.
    Thanks for every one who tried to give a try to solve, especially "mdrake"

  • Passing Values to Object Type Attributes

    Hi Experts,
    I need to pass values to object type attributes amount,channel and company code from zprogram.
    I have got FM 'SWO_INVOKE'.But in this FM how will I pass values to 3 attributes.
    I have created object type through SWO1 .Is it necessary to call FM SWO_CREATE before FM 'SWO_INVOKE'.
    Please suggest.
    Regards,
    Kaustubh.

    Hi,
    I guess you will have to Initialize business object first by using the function module "SWO_CREATE' and then call the other function module to pass the attributes. I am not sure, but please check by passing the attribute name and value to the tables parameter 'CONTAINER'.
    CONTAINER-ELEMENT = <Attribute name>.
    CONTAINER-VALUE = <value from the Zprogram>.
    Hope this will help.
    Thanks,
    Samson

Maybe you are looking for