Generate Table API

Is it possible to modify/customize the code generated by the 'Generate Table API' menu path, so as to add additional functionality etc.
Thanks
Paul

There are no any reserved words in the table definition.
The complete TYPE declaration:
TYPE sqlInd_type IS RECORD ( OPE_MACHTIGING INTEGER := 0 OPE_STATUS INTEGER := 0 OPE_WIJZE_VAN_BETALING INTEGER := 0 OPE_STATUS_BETALING INTEGER := 0 );
Thank you in advance.
Moussa

Similar Messages

  • Merge API stub for 'Generate Table API...'?

    Hi,
    Has there been a request for a stub in the menu option 'Generate Table API...' that creates a merge procedure? If it generated the MERGE command for a given table that would be great and even better than trying to call the UPD procedure, trap the does not exist error and then call the INS procedure.
    The key to making this work is by passing the parameters for the actual match to the MERGE statement via the DUAL table in the source definition of USING clause. By doing this via the primary key of the table drives the cost for this procedure to unique scan via the PK which is 1 (one) logical I/O for the lookup and the decision to do an insert or update. The overall cost should be around 4.
    Thanks,
    ScottK
    The general pattern could be:
    PROCEDURE mrg (
    p_pk_col_1 IN table_name.pk_col1%type
    ,p_pk_col_n IN table_name.pk_coln%type
    ,p_non_pk_col1 IN table_name.non_pk_col1%type
    ,p_non_pk_coln IN table_name.non_pk_coln%type
    ) IS
    BEGIN
    MERGE INTO table_name target
    USING (SELECT
    p_pk_col1 alias_pk_col1
    ,p_pk_coln alias_pk_coln
    FROM dual) source
    ON ( source.alias_pk_col1 = target.pk_col1
    and source.alias_pk_coln = target.pk_coln)
    WHEN MATCHED THEN UPDATE
    SET target.non_pk_col1 = p_non_pk_col1
    ,target.non_pk_coln = p_non_pk_coln
    WHEN NOT MATCHED THEN INSERT
    column list
    VALUES
    parameter list
    END;
    Edited by: ScottK on Aug 11, 2011 3:17 PM
    Edited by: ScottK on Aug 11, 2011 3:48 PM
    Edited by: ScottK on Aug 11, 2011 3:49 PM

    You can always request this at the SQL Developer Exchange, so other users can vote and add weight for possible future implementation.
    Regards,
    K.

  • Designer 6i: Generate table API

    During compilation of the package created, I got de following melding:
    "Creating API Package Body for Table 'Table_name' Warning: Package Body created with compilation errors."
    In the package body the table API generates "TYPE sqlInd_type IS RECORD"
    without comma's between de columns.
    Please help.
    M. Moussa

    There are no any reserved words in the table definition.
    The complete TYPE declaration:
    TYPE sqlInd_type IS RECORD ( OPE_MACHTIGING INTEGER := 0 OPE_STATUS INTEGER := 0 OPE_WIJZE_VAN_BETALING INTEGER := 0 OPE_STATUS_BETALING INTEGER := 0 );
    Thank you in advance.
    Moussa

  • Settings for generating table APIs

    HI i was wondering if there are settings for Designer for generating the table APIs, that determine which error messages are handled by cg$errors and which are not.
    For 2 of my tables in Designer the messages for the foreign key constraints are omitted when I generate the table API.
    I am talking about the procedure err_msg, some of the foreign keys are checked but some are not, code that looks like this is generated:
    ELSIF (con_name = 'AGR_ICO_CPY_FK') THEN
    cg$errors.push(nvl(AGR_ICO_CPY_FK
    ,cg$errors.MsgGetText(cg$errors.API_FK_CON_VIOLATED
                             ,cg$errors.APIMSG_FK_VIOLAT
    ,'AGR_ICO_CPY_FK'
    ,'INTERNATIONAL_COLL_PARTIES')),
    'E',
    'API',
    cg$errors.API_FK_CON_VIOLATED,
    loc);
    but code that should look like this is not:
    ELSIF (con_name = 'AGR_AGT_CPS_FK' AND type = cg$errors.ERR_DELETE_RESTRICT) THEN
    cg$errors.push(cg$errors.MsgGetText(cg$errors.API_DEL_RESTRICT, cg$errors.ERR_DEL_RESTRICT, 'INTERNATIONAL_COLL_PARTIES', 'AGREEMENTS'),
    'E',
    'API',
    cg$errors.API_DEL_RESTRICT,
    loc);
    I am not very familiar with table APIS so I don't know which type of foreign key would lead to the first bit of code and which type would lead to the second bit. In Designer I see no difference.....
    Can anyone help me?

    Hi Wendy,
    "The code for the foreign keys that point to me is not generated".
    That code must be visible in the TAPI of the other table.
    Just checking: Do you see in Designer some foreign keys in your table for which there is no code generated in the TAPI (part err_msg)?
    What packages do you see where "the code for those foreign keys that point to me" is visible? I suppose that is TAPI of the other table, isn't it?
    Anyway: in Designer there are not that much options for TAPI generation. I do not know whether this has been changed in the last Designer versions.
    Good luck,
    Lennart

  • Table API Extension for Oracle SQL Developer

    I just created small project [Table API Generator for Oracle|http://code.google.com/p/tapig/].
    Idea is to only maintain tables and generate table API (TAPI) packages for data manipulation.
    Generated:
    - insert, update, delete, querying procedures
    - documentation based on table columns comments
    Do you think it will be useful to have custom Table API Generator as extension for Oracle SQL Developer?

    Never used them myself and quite legacy, but I'm sure there's still a lot of people using them and the basic idea is quite nice.
    This would also qualify perfectly as a User Defined XML Extension for sqldev; little work but big results. Even if you were the only one using it, it would still pay off.
    Have fun,
    K.

  • TABLE APIs in Jdeveloper

    Jdeveloper 10g on Windows XP
    Very new to this tool and exploring it for DB model/db design functionality. Coming from designer background, is there a way to generate Table APIS for the generated entities in Jdeveloeper? I searched this forum, but one solution was where the author talked about redoing the plsql api package in Java. Thats not what I am looking for. I would prefer to have the plsql api package generated via Jdeveloper?
    (As much little that I know about this, I think Jdeveloeper does support plsql)
    If so, how can we do this..If not, whats the alternative? Would appreciate some pointers where I can read/dig this further.
    Thanks
    SR

    SR,
    No, there is not really any function in JDev to generate PL/SQL table API's. I did see a paper presented at the UKOUG earlier this year where someone had used ADF Business Components with table API's, but they had done that by writing a code generator that generated all of the java code (much like what you've already found).
    John

  • Table api generation

    I like "Generate Table API" functionality.
    However your code is not sorted by column_id it looks you forgot order by. It's very important to have all sorted by definition of columns in table.
    I suggest to add extra new "sel" API which returns record by PK and stores it in rec type.
    Regards
      Tomasz

    Hi
    If you are testing billing holds which were created by billing extension, I suggest you start with removing those extensions. Run GDi and release the invoice.
    Now go to Expenditure inquiry and select unbilled EI, put it on one time hold.
    Run GDI again, and release the draft invoice. Check to verify that the EI is not on hold any more.
    After that go back to your extension and verify it has the code to put EI on one time billing hold. assign the ext to the GDI and run GDI again. Release the draft invoice and look to verify that the EI is not on hold.
    Dina

  • Table API and Generated forms

    I have been told that Oracle Designer Table API (Application
    Programmer Interface) disables default functionality of querying
    records in a Headstart generated form, due to limitations with
    Designer. I am unable to find a bug number for this fault and was
    wondering if you could please point me in the right direction.
    Thank you
    Afe Ogun
    null

    Afe,
    The Oracle Designer Table API can be used as both the data target
    (INS, UPD, DEL) and data source (QRY). You do this by setting
    the data target and data source to 'Procedure' (instead of
    table). When it is used as the data source, you cannot enter
    query criteria in your form. You might want to use 'Procedure'
    as your data target, but continue to use 'Table' or 'View' as
    your data source. This is not a bug, but is just how the various
    options work together. It also has nothing to do with
    Headstart.
    You might want to look into the Oracle Designer online help or
    contact the Designer discussion group on Metalink.
    Regards,
    Lauri
    Afe Ogun (guest) wrote:
    : I have been told that Oracle Designer Table API (Application
    : Programmer Interface) disables default functionality of
    querying
    : records in a Headstart generated form, due to limitations with
    : Designer. I am unable to find a bug number for this fault and
    was
    : wondering if you could please point me in the right direction.
    : Thank you
    : Afe Ogun
    null

  • Ever used the Designer Table API (TAPI) with object type in the DB?

    Hi all,
    We are trying to generate the Oracle Designer table API of a table that has a column defined by an object type. It works without problems if that column always has a value (is instantiated in object term). The problem is when we update a row where the column is null (all attributes of the object are null thus the object is not instantiated).
    The "before update row" trigger of the Table API fails with error "ora-30625-method dispath on NULL SELF argument is disallowed".
    The code that fails is the following:
    cg$ind.TFO_DESCRIPTION :=(:new.TFO_DESCRIPTION IS NULL AND :old.TFO_DESCRIPTION IS NOT NULL )
    OR (:new.TFO_DESCRIPTION IS NOT NULL AND :old.TFO_DESCRIPTION IS NULL)
    OR NOT(:new.TFO_DESCRIPTION = :old.TFO_DESCRIPTION) ;
    In this example, cg$ind.TFO_DESCRIPTION is a boolean and the TFO_DESCRIPTION column is based on an object type.
    Thanks for any feedback or suggestions

    For a solution to this problem: I set down to write a relatively simple and small piece of code that we can use as post compiler or post generator. After we generated one or more TAPIs, we can run this post compiler to remedy the problem the TAPI has with Merge operations. The post compiler will fix the PL/SQL inside the database. It reads the TAPI objects using dbms_metadata, makes the simple change by manipulating the PL/SQL source and then recreates the objects using execute immediate. Using this post compiler, it takes but a few seconds to fix the merge flaw in all TAPIs in your application.
    http://technology.amis.nl/blog/index.php?p=842

  • Ever used the Table API (TAPI) with object type in the DB?

    Hi all,
    We are trying to generate the table API of a table that has a column defined by an object type. It works without problems if that column always has a value (is instantiated in object term). The problem is when we update a row where the column is null (all attributes of the object are null thus the object is not instantiated).
    The "before update row" trigger of the Table API fails with error "ora-30625-method dispath on NULL SELF argument is disallowed".
    Any of you guys made it work? If so, how?
    Thanks

    user8879206 wrote:
    Hi friends,
    I have a procedure with object type IN OUT parameters which is used for fetching status. We are calling this from Java. But I want to call it from oracle for testing purpose. I am trying from my end but not able to do it as of now. This is the first time I am dealing with object type.We need more information. What is wrong? Your code looked okay and you did not mention any Oracle errors. What is happening that should not be or not happening that should be?
    You can call the procedure with a simple call in PL/SQL but will not be able to use it in SQL because 1) it is a procedure and 2) it has an OUT argument. A sample call should look something like (untested)
    declare
       x rec2;
       y rec3;
    begin
      --use the arguments rru was defined with as the arguments in the same order: types rec2 (x), rec3 (y)
      rru(x,y);
    end;>
    Any help would be appreciated.
    Details are given below.
    CREATE OR REPLACE TYPE REC1 AS OBJECT
    (RELAY_USAGE VARCHAR2(30)
    ,STATE VARCHAR2(1)
    TYPE REC AS TABLE OF REC1;
    CREATE OR REPLACE TYPE REC2 AS OBJECT
    (GSRN VARCHAR2(18)
    ,METERING_POINT_NAME VARCHAR2(80)
    ,RELAYS REC)
    CREATE OR REPLACE TYPE REC3 AS OBJECT
    (INFO VARCHAR2(2000)
    ,STATUS NUMBER
    PROCEDURE RRU(
    rcRelayControl IN OUT REC2
    , rcResp IN OUT REC3)
    IS
    BEGIN
    APKG.GetDetails(rcRelayControl, rcResp);
    IF rcResp.Status = BPKG.iStatusFailure THEN
    rcResp.Info := BPKG.Get_Message('20889', rcResp.Info);
    END IF;
    END RRU;
    How to call this procedure in oracle?
    Thanks.

  • Capture customizations to a trigger or table API in designer

    Have a table with a column value (inv.inv_id) that is produced by a sequence. I would like to be able to know the inv_id of the recently added record to the table without re-querying the table. As an initial hack of the AIR trigger on the table (produced by Designer), I am capturing the new inv_id as records are added to the inv table by calling my own package interface that I plan to use in the application:
    -- Application_logic Post-After-Insert-row <<Start>>
    gid_inv.SET_ID (cg$rec.INV_ID) ;
    -- Application_logic Post-After-Insert-row << End >>
    I cannot figure out where to capture this customization in Designer so that I can automate the generation of this trigger. I would be happy to move the customization to the table API, again, if I could find a logical place to place and capture the customization. I have briefly looked at capturing database objects in Designer via the declaration, OS file method, free format method, and declarative method, but they do not appear to be the choice for Designer-generated objects like the table API or table triggers.
    Any ideas? Thank-you in advance!
    null

    I think it might not be efficient,Try it, it will be as efficient as any trigger. There are also workspace features built in to Oracle that do this kind of thing.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14253/long_intro.htm#ADWSM010

  • Can I use Reports Server Queue PL/SQL Table API to retrieve past jobs ?

    Hi all,
    Can I use Reports Server Queue PL/SQL Table API to retrieve past jobs using WEB.SHOW_DOCUMENT from Forms ?
    I have reviewed note 72531.1 about using this feature and wonder if i can use this metadata to retrieve past jobs submitted by a user.
    The idea would be to have a form module that can filter data from the rw_server_queue table, say, base on user running the form, and be able to retrieve past jobs from Report Server Queue. For this, one would query this table and use WEB.SHOW_DOCUMENT.
    Is this possible ...?
    Regards, Luis ...!

    Based on that metalink note and the code in the script rw_server.sql, I am pretty sure that by querying the table you would be able accomplish what you want... I have not tested it myself... but it looks that it will work... you have the jobid available from the queue, so you can use web.show_document to retrieve the output previously generated...
    ref:
    -- Constants for p_status_code and status_code in rw_server_queue table (same as zrcct_jstype)
    UNKNOWN CONSTANT NUMBER(2) := 0; -- no such job
    ENQUEUED CONSTANT NUMBER(2) := 1; -- job is waiting in queue
    OPENING CONSTANT NUMBER(2) := 2; -- opening report
    RUNNING CONSTANT NUMBER(2) := 3; -- running report
    FINISHED          CONSTANT NUMBER(2) := 4; -- job has finished
    TERMINATED_W_ERR CONSTANT NUMBER(2) := 5; -- job has terminated with

  • Create a Navigational Hierarchy for filtering with the Table API

    Hello,
    I've built a WAD report acourding to the how to document: "Create a Navigational Hierarchy for filtering with the Table API".
    It works great but i dont know How to make the hirarchey to show the key and the text.
    Please Advice.
    David

    Hi Kenneth,
    please have a look in the source of the executed Web Application. What is inside of the <div> with the id filter?
    You should also find a td tag with id hier_xyz with xyz the filter inside of the <div>-Tag with id filter.
    Also check whether you have a javascript error.
    Have a look on the Javascript function set_style. Perhaps you can paste it here, than I can have a look.
    Heike

  • Generated Table not visible in tree

    hi,
    I have registered a Schema and
    select object_name,
    object_type,
    status
    from user_objects
    order by object_name,
    object_type;
    Results of the statement:
    OBJECT_NAME OBJECT_TYPE STATUS
    EXTRADATA177_L LOB VALID
    NAMESPACES178_L LOB VALID
    PLAYER TABLE VALID
    PLAYER$xd TRIGGER VALID
    PLAYER_T TYPE VALID
    SYS_C004803 INDEX VALID
    SYS_XDBPD$176_L LOB VALID
    I am wondering why the PLAYER Table doesn't appear in the connections tree on the left side (Tables node).
    Is this a bug or doesn't show SQL Developer these generated tables? Via DB Search I can find the table but I can't edit it.
    Thanks

    Yes, it is a bug since 2 years now!
    As (temporal) workarounds, you could:
    1. log on as "SYS" (or ask your DBA) and go change the "generated" flags for the tables you need (subtract 4 from sys.obj$.flags - would leave it at 0 normally).
    2. delete the AND O.GENERATED='N' line from the SELECT in +\sqldeveloper\extensions\oracle.sqldeveloper.jar\oracle\dbtools\raptor\navigator\table.xml+
    3. create a user defined XML extension, starting from the xml obtained above.
    Have fun,
    K.

  • Extraction from R/3 generated Table

    Hi,
    I have a situation that i have to extract from a table in ECC R/3 and that table name changes and changes mainly during transports as it is a SAP generated table containing the Fund and Fund Center.
    but i need to extract the data  but not able to use it as the table name changes.
    Anyone please can throw some light  on this how to use the extractor in this situation and how to work around with this table ????
    Thanks,
    GG

    It is generated when it goes to the target system, right?
    This table name would be stored somewhere, trace the R/3 programs associated with the table to figure out how it finds the table name.
    Have an FM based extractor which will follow the same logic to dynamically select from the table (by finding the table name in the same way as SAP programs do).

Maybe you are looking for

  • Win 8.1 forcing switch to online account

    Just installed 8.1.  I'm using local accounts.  I'm not a fan of my business files being uploaded to some SkyDrive location out of my control.  I went to the Windows Store just to look around.  I went to install the first app I saw, Movie Moments or

  • What is the max size (length) that an http post can handle?

    I have an application that builds a SOAP document and makes use of Apache SOAP API to do XML messaging. To build the SOAP message, I have to query the database for a batch of data to be posted to another "web service" application using SOAP. The prob

  • My eprint center is asking for a pairing code. do i really need one

    I am experiencing problems with connecting to the printer and I don't know what else to do

  • How to open A Windows Form from Crystal Reports

    Hello All We are using crystal Repors 10 with Visual studio .Net 2005. Our requirement is to open the Windows Form when a user click on the respective Hyperlink. Simillarly popping up the MessageBox when clicking hyperlink. How this is possible, I wi

  • Link aspnet user table

    I need to link aspnet_user table to three tables. I am developing a asp.net application using Oracle. The three tables are Student, tutor and admin. I have created three roles in database for permission on database. table detail as as follow. student