Question reg. Types

hi,
when I am creatating type as under:
create or replace type sop_record_journal_file as object
service_request_id sop_service_request.service_request_id%TYPE
It gives me:
SQL> show err
Errors for TYPE SOP_RECORD_JOURNAL_FILE:
LINE/COL ERROR
0/0 PL/SQL: Compilation unit analysis terminated
8/24 PLS-00201: identifier 'SOP_SERVICE_REQUEST.SERVICE_REQUEST_ID'
must be declared
How can i create type to be like the one above so that whenever i change datatype of service_request_id column in sop_service_request table, My type takes it transparently and hence i dont have to go and change it in type..
Btw, my oracle version is :
SQL> select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
PL/SQL Release 9.2.0.6.0 - Production
CORE 9.2.0.6.0 Production
TNS for Linux: Version 9.2.0.6.0 - Production
NLSRTL Version 9.2.0.6.0 - Production
thx

>Object Type OR Table are static things that cannot change during their life.
Understand what you are trying to say, but the above statement is incorrect.
Object types and tables are not dynamic. Nor should one be tempted to hack this and try and treat these "definitions" as dynamic.
However, they can be modified using the ALTER TYPE and ALTER TABLE commands. For example, the ALTER TYPE can be used to add a new property to the type and this can automatically be applied also to any tables based on that type definition.

Similar Messages

  • Questions & answer type powerbuilder 12.5.2 classic tutorial

    Dear All,
    Can anybody give me any web link / tutorial / e-book regarding
    powerbuilder 12.5.2 classic where the information represented as
    questions & answer type.
    Thanks
    Avishek

    Hi Avishek,
    this one seems to be nice:
    PowerBuilder: PowerBuilder Interview Questions & Answers Section1

  • Question reg. output type

    I copied and modified sapscript MEDRUCK for three forms RFQ, Scheduling agreement and Contract (all are MM module). Now I am trying to set up output type for these forms in NACE transaction. Can you tell me what applications and output types to chose from there?
    (I know for RFQ, it is application EA and output type NEU, what about for the other two?)
    I appreciate your input.
    Thanks in advance.

    Thanks Anurag. I too think it is EV. What about the output type?
    The forms I modified for Scheduling Agreement and Contract are almost the same. I think just by assigning to a different output type, the data flow can be different for these two forms? Please correct me if I am wrong.
    Thanks a lot.

  • 2 questions about types

    First question is how can I override the default constructor (or add an exception to it). I have an object like this
    create or replace type date_object as object
         (quarter     number,
         year          number(4),
         member procedure set_date(d in date_object),
         member procedure set_date(d in date),
         member procedure set_date(v_qtr in number, v_year in number),
         constructor function date_object(d in date_object) return self as result,
         constructor function date_object(d in date) return self as result,
         --overriding constructor function date_object(v_qtr number, v_year number) return self as result,
         member function to_string return varchar2,
         member function get_quarter return number,
         member function get_year return number,
         member function get_quarter_as_string return varchar2);
    /I want to replace date_object(v_qtr number, v_year number) with a new constructor that will call an exception if the quarter number is not 1,2,3,4. Oracle will not let me declare or overide function constructor function date_object(v_qtr number, v_year number) return self as result
    Second question is, can I have an ADT as a primary key. This is what I am required to do, but it is not working for me:
    create table financial_data
         (bank_code     number(7)     references banks(bank_code),
         qdate          date_object,
         total_assets     number,
         current_liabilities     number,
         long_term_liabilities     number,
         operating_income     number,
         investment_income     number,
         expenses     number);
         constraint     fd_pk          primary key (bank_code, qdate));

    It would be much more simple having just a date (year and quarter can be easily extracted from)
    Regards
    Etbin

  • Question reg. sapscript. please help

    I am modifying a standard medruck sapscript form for the customer needs. Now on the printout, if i want the text under 'item_text' text element to come after the text under'ITEM_SCHEDULE' text element, where should I change the code? in main program ? or in form itself? Please give me an idea reg. this.
    /E           ITEM_TEXT
    IC           ,,&TTXIT-TDTEXT&
    /:           INCLUDE &T166P-TXNAM& OBJECT &T166P-TDOBJECT& ID &T166P-TDID& LANGUAGE &
    /E           ITEM_SCHEDULE
    IM           ,,,,,,&RM06P-PRMG1&,,&T006A-MSEHT&,,&RM06P-PRITX& &RM06P-LFDAT&,,,,
    =           &RM06P-PHTXT(27)&
    Thanks a lot,
    Krishen

    Yes it will, and yes you will have to copy a couple of things,  first you will need to copy the driver, program SAPFM06P into custom program SAPFZM06P.  Then copy function group MEDRUCK into ZMEDRUCK with all the function modules,  then go to the SAPFZM06P program and copy the include program  FM06PE02 into ZFM06PE02 and include this in the main program SAPFZM06P,  inside the  ZFM06PE02, change the call in the  ENTRY_NEU form to call the "Z" version of your function module in the ZMEDRUCK function group.
    form entry_neu using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_doc   type meein_purchase_doc_print.
      clear ent_retco.
      if nast-aende eq space.
        l_druvo = '1'.
      else.
        l_druvo = '2'.
      endif.
      call function 'ME_READ_PO_FOR_PRINTING'
           exporting
                ix_nast        = nast
                ix_screen      = ent_screen
           importing
                ex_retco       = ent_retco
                ex_nast        = l_nast
                doc            = l_doc
           changing
                cx_druvo       = l_druvo
                cx_from_memory = l_from_memory.
      check ent_retco eq 0.
      <b>call function 'ZME_PRINT_PO'</b>
           exporting
                ix_nast        = l_nast
                ix_druvo       = l_druvo
                doc            = l_doc
                ix_screen      = ent_screen
                ix_from_memory = l_from_memory
                ix_toa_dara    = toa_dara
                ix_arc_params  = arc_params
                ix_fonam       = tnapr-fonam          "HW 214570
           importing
                ex_retco       = ent_retco.
    endform.
    You must then change your configuration for the purchase order to tell the system to use the "Z" versions of the print program SAPFZM06P
    Regards,
    Rich Heilman

  • Question reg sample init files??

    I was looking for sample init files
    I found the following files in Windows
    initsmpl.ora under C:\Oracle10g\product\10.2.0\admin\sample\pfile
    initdw.ora under C:\Oracle10g\product\10.2.0\dbs
    and in UNIX AIX
    -rw-r----- 1 oracle dba 8385 Sep 11 1998 init.ora
    -rw-r--r-- 1 oracle dba 12920 May 03 2001 initdw.ora
    under /oracle/OraHome2/dbs
    I can see initdw.ora for datawarehouse databases
    I have following questions
    1.Are these are the only files I have mentioned are there or are there any more
    sample files i have missed?
    2. initsmpl.ora or init.ora are for which kind of databases ?General purpose or OLTP or?
    Thanx
    Gagan

    Hi,
    1 Those are the same files
    2 There are no special files are created for OLTP or DatawareHouse DataBases.
    These files are unique for different type of database you may choose. Only the parameters values will be
    adjusted based on the Environment upon which we create the database. It's parameters changes during the
    Course of Tuning of your database.
    - Pavan Kumar N

  • Questions on Type Convertion

    Hi all,
    I have a hashmap m. I want to put an object o as the key and an integer as the value. But seems that
    m.get(o)
    will return an Object, which cannot be converted into primitive type... so what can I do to get the value of integer from the map?
    At the same time, can I write something like
    if [variable type] is [integer]
    put value of variable to another integer
    else if [variable type] is [String]
    put value of variable to another String
    else if [variable type] is [something else]
    put value of variable to another variable of same type
    .... and so on ?
    Thanks in advance!

    No, Hashmaps (and in fact all Maps) only take Objects as keys or values. If you need to use a primitive, that's what the primitive wrappers are for:int i = 5;
    Object o = new Object();
    m.put(o, new Integer(i));
    int j = ((Integer) m.get(o)).intValue();so, to answer your question, try something likeint i;
    String s;
    Object o;
    Object val = m.get(key);
    if (val instanceof Integer) {
        i = ((Integer)val).intValue();
    } else if (val instanceof String) {
        s = (String) val;
    } else {
        o = val;
    }Robin

  • Question reg. modifying latest record in internal table

    Can you tell me if it is possible to modify the last appended record to the internal table?
    I just want to modify the record in the internal table which is appended at the latest. Please tell me the logic for this.
    Thanks a lot,
    Krishen

    Hi try with this:
    DATA line TYPE I.
    DATA wa_itab TYPE LINE OF it_itab.
    DESCRIBE TABLE IT_TABLE LINE line.
    READ TABLE IT_TABLE INTO wa_itab INDEX line.
    WA_TABLE-FIELD = 'new value'.
    MODIFY TABLE IT_TABLE FROM wa_itab
           TRANSPORTING field.
    Best regards.

  • Tough question :  table type problem

    CREATE OR REPLACE TYPE myObj is OBJECT(
    id number
    create or replace type myTbl is TABLE OF myObj ;
    list myTbl ;
    list := myTbl(); --I don't understand
    list.extend; --I don't understand
    list(list.last) := myTbl(22); --I don't understand                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    &gt;&gt;list := myTbl(); I don't understand <br /><br /><br /><br />For each type Oracle provides a default CONSTRUCTOR to initialize it.<br /><br /><br /><br />&gt;&gt;list.extend;        I don't understand
    EXTEND function extend the number of elements by 1.
    &gt;&gt;list(list.last) := myTbl(22); --I don't understand<br /><br />Will give you the last element.<br /><br /><br /><br />How about reading the manual first.<br /><br /><br /><br />http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/collections.htm#LNPLS005<br /><br />http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/collection_method.htm#i33024<br /><br /><br /><br />Regards,<br /><br /><br /><br /><br /><br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Question reg. selection screen

    I am writing a report. On selection screen, I have a field for Sales order (vbeln) from a custom table zsales.  Now when the user selects this field on selection screen and press F4, he/she should be able to select the salesorders from the table zsales.
    I wrote:
    SELECT-OPTIONS: s_vbeln FOR zsales-vbeln.
    But on the output, when I press F4, I am still not getting any input help. What change can you suggest?
    Appreciate your input.
    Thanks,
    Krishen

    Try something like this.
    report zrich_0001 .
    tables: zsales
    data: begin of izsales occurs 0,
           vbeln type vbak-vbeln,
          end of izsales.
    select-options s_vbeln for zsales-vbeln.
    initialization.
      select vbeln into table izsales from zsales.
      sort izsales ascending by vbeln.
      delete adjacent duplicates from izsales comparing vbeln.
    at selection-screen on value-request for s_vbeln-low.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'VBELN'
                dynprofield = 'S_VBELN'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = izsales.
    start-of-selection.
    Regards,
    Rich Heilman

  • Basic question reg. distributed installatio

    Hi everybody,
              i have a very basic question, for which i wasn`t able to find a simple
              answer/solution.
              I am planning to set up Bea in a distributed environment. the idea is
              to have a physical machine for the presentation, meaning
              webserver/jsp/servlets in the dmz1 and a machine with the application
              server holding ejbs in a different dmz.
              This results in an architecture where the presentation layer only can
              be contacted via http/https by the users and the logic layer
              communicates with the pres. layer via RMI/T3.
              Is there any documentation on such a setup ? any hints ?
              Thanks in advance, i'll keep on searching the dox.
              Berthold Krumeich
              

    [att1.html]
              

  • Question reg Forecast funtions in Oracle

    Hello Everybody,
    Is there a function(s) in Oracle that's equivalent of FORECAST function in MS Excel ?

    This is the forum for Oracle's SQL Developer tool, not for general SQL and PL/SQL questions.
    Questions like this will get a better response in the PL/SQL forum.

  • Question reg bind variable...

    hi,
    I have learnt that when we pass parameter to proc/func. those parameters are auto. treated as bind variables...
    but what if I have a simple proc. which does not accept any argumets nor it returns anything just a batch job type for e.g to send emails.. then how will the variables declared in that proc treated as bind variables or not?
    If not, how can i modify the proc to use bind variables
    thx

    Any PL/SQL variables or parameters will be automatically treated as bind variables in static SQL. There is nothing special you have to do.

  • Question reg. range

    Hi,
    I am attaching my sample code below. itab_var, r_var1 and r_var2 are all of bsis-hkont type. Even though itab_var has value '0000121000' and not in the ranges r_var1 and r_var2 and not equal to '0000720000', it is still succeeding the IF condition and going inside when I see in debugging mode. How is it possible? Can you please tell me where is the error?
    Thank you very much.
    RANGES: r_var1 FOR bsis-hkont,
            r_var2 FOR bsis-hkont.
    itab_var = '0000121000'.
              r_var1-sign = 'I'.
              r_var1-option = 'BT'.
              r_var1-low = '0000700000'.
              r_var1-high = '0000719999'.
              r_var2-sign = 'I'.
              r_var2-option = 'BT'.
              r_var2-low = '0000740000'.
              r_var2-high = '0000749999'.
              IF itab_var IN r_var1
           OR itab_var IN r_var2
           OR itab_var EQ '0000720000' .
             ENDIF.

    Hi,
    You are missing append statement.
    RANGES: r_var1 FOR bsis-hkont,
    r_var2 FOR bsis-hkont.
    itab_var = '0000121000'.
    r_var1-sign = 'I'.
    r_var1-option = 'BT'.
    r_var1-low = '0000700000'.
    r_var1-high = '0000719999'.
    <b>append r_var1.</b>
    r_var2-sign = 'I'.
    r_var2-option = 'BT'.
    r_var2-low = '0000740000'.
    r_var2-high = '0000749999'.
    <b>append r_var2.</b>
    IF itab_var IN r_var1
    OR itab_var IN r_var2
    OR itab_var EQ '0000720000' .
    ENDIF.
    Regards,
    Ferry Lianto

  • Reg : types of frame border types for templates or windows.

    Hi,
    I have a doubt. In smartforms, is there any possibility of different types of border styles for templates and windows other than the straight single line? In the sense, as we see in MS Word, I was trying for dashed or dotted pattern of frame borders to templates in my smartform, but could not find it. Can you  please clear my doubt.
    Thanks and Regards,
    Krishna.

    Hi,
    I got your problem . But see in smartform only stright line border is possible.if u want to design different borders u have to go for ADOBE FORMS .There you can find for more designs for borders.
                                                    All the drawbacks of the smartforms are overcomed in Adobeforms.In adobeforms you can get the form in PDF.
    Regards,
    Anvesh Gummadapu.

Maybe you are looking for

  • How to share 3G with other Apple devices

    Hi, I just updated my iPad to iOS 4.3 and I can't find how to share my Internet connection with other devices. Could you help me? Thanks,

  • Grouping results in Header/Footer.

    I am working on the template below, and I want the pages to break based on the Header/Footer, not on the page breaks that I have put in. I compromised and put the Group By VP before the report header, but I really want the E.NAME and Date to be in th

  • How to handle big java source files in JDEV 10.1.3

    Hi, I have some .java files that are like over 10,000 lines long. I know this is crazy but I didn't write it but I have to maintain it. I really dont feel like refactoring all these big source files right now. JDeveloper has lots of while-editing fea

  • Extracting body with header and trailer multiple times from a multirow file

    Hello Everyone, I am new to OSB and currently working on a project where I need to extract data from a flat file containing multiple rows of body and a single header and trailer in the following fashion: Original File: <Header></Header> <Details></De

  • Help with Burning Videos

    I am trying to burn music videos onto a dvd disc and I keep getting error code 4450. It has something to do with the format. Anyone know what this is?