Query in Tabke Maintanance Generator

Hi,
My requirement is : I am creating table maintanance generator for a table. In this table i have space id is the primary key other few fiedls are non primary keys. Now my requirement is when user enters non primary key fields in SM30 transaction i have to check aganinst these non primary keys any entry exists or not? if entry not exists then i have create number for this record and i have to update z table. When i click SAVE button i should not allow duplicate entries. Can you please suggest which events ui have to use.
I refered so many threads but i didnt find suitable answers.
Can you please suggest.
Regards,
Maheedhar

Maheedhar,
You will have to modify the program/code that was generated from the table maintenance generator to fit your requirements. 
You can accomplish this by digging through the transport that you created, or by debugging through SM30 when you add a new entry or hit the save button.  You should be able to find a place to add your custom logic.
Note:  If you modify this code, anytime in the future if someone re-generates this table maintenance, your custom code will be over-written.
Thanks,
David

Similar Messages

  • Query in Table Maintanance Generator

    Hi,
    I have a query in table maintanance generator. In tables Extract and Total we have all the entries. Is it possible to get the entry which we made in the record. I mean i need the record in this i made the changes. I cant use above tqo tables because special characters are coming. Any body can suggest.
    Regards,
    Maheedhar

    Maheedhar,
    You will have to modify the program/code that was generated from the table maintenance generator to fit your requirements. 
    You can accomplish this by digging through the transport that you created, or by debugging through SM30 when you add a new entry or hit the save button.  You should be able to find a place to add your custom logic.
    Note:  If you modify this code, anytime in the future if someone re-generates this table maintenance, your custom code will be over-written.
    Thanks,
    David

  • When using TODATE function MDX query is not correctly generated

    Essbase 9.3.1.2 and OBIEE 10.1.3.4.1.
    When using TODATE function MDX query is not correctly generated.
    This leads to unexpected values not only on cumulative columns in report (generated with TODATE), but also other columns (calculated with AGO function or directly read from cube) have incorrect values.
    The problem occurs when you filter on a column that is not in the select list. If you filter on just one level of dimension, results are fine. You can filter on multiple dimensions as long as you filter on just one level of each dimension.
    If you filter on two or more levels of one dimension, than results are not correct. In some cases results for TODATE column are all zeros, in some cases it is a random value returned by Essbase (same random value for all rows of that column), and in some cases BI Server returns an error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. Essbase Error: Network error [10054]: Cannot Send Data (HY000).
    Here is generated MDX code:
    With
    set [Grupe proizvoda2] as '{[Grupe proizvoda].[N4]}'
    set [Grupe proizvoda4] as 'Generate([Grupe proizvoda2], Descendants([Grupe proizvoda].currentmember, [Grupe proizvoda].Generations(4), leaves))'
    set [Segmentacija2] as '{[Segmentacija].[RETAIL]}'
    set [Segmentacija4] as 'Filter(Generate({[Segmentacija2]}, Descendants([Segmentacija].currentmember, [Segmentacija].Generations(4),SELF), ALL), ([Segmentacija].CurrentMember IS [Segmentacija].[AFFLUENT]))'
    set [Vrijeme3] as '{[Vrijeme].[MJESEC_4_2009]}'
    member [Segmentacija].[SegmentacijaCustomGroup]as 'Sum([Segmentacija4])', SOLVE_ORDER = AGGREGATION_SOLVEORDER
    member [Accounts].[MS1] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],2,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
    member [Accounts].[MS2] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],1,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
    member [Accounts].[MS3] as 'AGGREGATE({PeriodsToDate([Vrijeme].[Gen2,Vrijeme],[Vrijeme].currentmember)}, [Accounts].[Trosak kapitala])'
    select
    { [Accounts].[Trosak kapitala],
    [Accounts].[MS1],
    [Accounts].[MS2],
    [Accounts].[MS3]
    } on columns,
    NON EMPTY {crossjoin ({[Grupe proizvoda4]},{[Vrijeme3]})} properties ANCESTOR_NAMES, GEN_NUMBER on rows
    from [NISE.NISE]
    where ([Segmentacija].[SegmentacijaCustomGroup])
    If you remove part with TODATE function, the results are fine. If you leave TODATE function, OBIEE returns an error mentioned above. If you manually modify variable SOLVE_ORDER and set value to, for example, 100 instead of AGGREGATION_SOLVEORDER, results are OK.
    In all cases when this variable was modified in generated MDX, and query manually executed on Essabse, results were OK. This variable seems to be the possible problem.

    Hi,
    Version is
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    Sorry, in my last post i forgot to mention that i already created a function based index but still it is not using because, there is a UNIQUE constraint on that column.
    Thanks

  • How to make use of Table Maintanance Generator?

    PLs sany one can explain me how to maek use of Table maintanance Generator?
    Regards and cheers,
    Giri

    Hi,
        table maintainence Generator is used to manually
        input values using transaction sm30
        follow below steps
       1) go to se11 check table maintanance check box under
          attributes tab
       2) utilities-table maintanance Generator->
          create function group and assign it under
          function group input box.
          also assign authorization group default &NC& .
       3)
        select standard recording routine radio in table
        table mainitainence generator to move table
        contents to quality and production by assigning
        it to request.
       4) select maintaience type as single step.
       5) maintainence screen as system generated numbers
          this dialog box appears when you click on create
         button
        6) save and activate table
       using sm30 you can create entries manually.
    also check below thread to assign transaction code to
    table generator
    /message/240993#240993 [original link is broken]
    0#2409930  
    Regards
    amole

  • Table maintanance generator.........

    Hi,
    I heard that client will be able to access ztable through tablemaintanance generator(tmg).so What operations the client  can be done in tmg for the ztable purpose.
    Plz provide me any exact answers.
    i ma posting this questn after completn of search from sdn fourm.
    Regards
    pavan

    Hi,
    He can enter the new values or he can change the Existing values.
    For the details:
    table maintanance Generator is used to manually
    input values using transaction sm30
    follow below steps
    1) go to se11 check table maintanance check box under
    attributes tab
    2) utilities-table maintanance Generator->
    create function group and assign it under
    function group input box.
    also assign authorization group default &NC& .
    3)
    select standard recording routine radio in table
    table mainitainence generator to move table
    contents to quality and production by assigning
    it to request.
    4) select maintaience type as single step.
    5) maintainence screen as system generated numbers
    this dialog box appears when you click on create
    button
    6) save and activate table
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_46c/helpdata/en/a7/5133ac407a11d1893b0000e8323c4f/frameset.htm
    /message/2831202#2831202 [original link is broken]
    One step, two step in Table Maintenance Generator
    Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.
    Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.
    EVENTS:
    http://help.sap.com/saphelp_nw70/helpdata/EN/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
    Regards,
    Shiva Kumar

  • Regarding Changing data in Table Maintanance Generator

    hi all,
        I Created one Z Table for Five fields Sales District( BZIRK) , Sales District Description (BZTXT) , Vendor No , Vendor Name and Person Incharge. I Created Table Maintanance Generator for five fields.
        In my ZTable after giving Vendor No when i enter Vendor Name is coming automatically and record is Created.For these i used Event No 5.
    When i am going again and When I change Vendor No When I Press enter Vendor No is not coming automatically. 
    Which Event Should i use.
    How can i achieve this . Plz send detailed process.
    Please suggest.
    Regards
    Rami

    Hi,
    Please eloberate u r question. and give some code.
    Regards,
    Nandha

  • Events in Table maintanance generator

    Hi All,
        Iam creating the events in the table mainatanance generator.
       My requiremnt is : I need to validate the non-key field. If i give an erro message the field is going to dispaly mode.so i tried to give an warning message dispaly like error. But after user re enters the value , i couldn't handle the value in that field.
    i could not find the event which will trigger after  the entering the value.
    Please help me.
    Thanks in advance.
    Kiran Kumar.

    Hi Kiran,
    The following is a very useful PDF link about IMPLEMENTING EVENTS IN TABLE MAINTENANCE which should solve your problem
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc
    table maintanance Generator is used to manually
    input values using transaction sm30
    follow below steps
    1) go to se11 check table maintanance check box under
    attributes tab
    2) utilities-table maintanance Generator->
    again from the MENU
    ENVIRONMENT->MODIFICATION->EVENTS
    you can find different events for this Table mainteance
    create function group and assign it under
    function group input box.
    also assign authorization group default &NC& .
    3)
    select standard recording routine radio in table
    table mainitainence generator to move table
    contents to quality and production by assigning
    it to request.
    4) select maintaience type as single step.
    5) maintainence screen as system generated numbers
    this dialog box appears when you click on create
    button
    6) save and activate table
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_46c/helpdata/en/a7/5133ac407a11d1893b0000e8323c4f/frameset.htm
    /message/2831202#2831202 [original link is broken]
    One step, two step in Table Maintenance Generator
    Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.
    Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.
    chk this link
    http://help.sap.com//saphelp_470/helpdata/EN/a7/5133ac407a11d1893b0000e8323c4f/frameset.htm
    Reward if it helps..
    Regards,
    Omkar.

  • What is authorisation object  in table maintanance generator

    Hi,
    what is authorisation object and authorisation group in table maintanance generator
    can u pls let me know what are these??  and y do we need these?
    Thanks in advance
    Rama

    hi,
    Access to the transactions SM30 and SE16 is often regarded as a security risk on productive system. But with the right use of the authorization object S_TABU_DIS and the rarely used S_TABU_LIN, this isn’t so.
    With S_TABU_DIS you have the option to control access to groups of tables, and you have the option to distinguish between Update and Display access. If you don’t want to give access to an entire table group, it’s quite easy in transaction SE54 to create a new authorization group and to reassign one or more tables/view to this group, thus achieving control of access to these specific tables.
    If you’re anxious about giving access to an entire table group, due to the fact that some tables have an open interface which allows table maintenance even in transaction SE16, the check this report – developed and posted to the SAP Fans security forum by John A. Jarboe.
    With the authorization object S_TABU_LIN you can even go a step further and control access to a table on record level, based on the key fields of the table. You can find an overall presentation of the object here.
    The How-To guide below will demonstrate how to set up and use this authorization object.
    The example is based on a small table ZMYTABLE. I have created a maintenance view and parameter transaction based on SM30 around this table.
    Please notice that the parameter transaction is calling SM3o in update mode.
    If the object is to be used with SE16 you’ll need to implement OSS note 763269.
    S_TABU_LIN Customizing
    We can find the customizing entries in the IMG under SAP NetWeaver à Application Server àSystem Administration àUsers and Administration à Line-oriented Authorizations.
    First we need to define the organizational criteria’s. 
    In here create new criteria by pushing the “New entries” button.
    In this example we will like to control access based on the key field Country, in order to do so create a criteria called Z_Country_Grp, with the name Country Grp. If we flag the table-ind flag the criteria will affect maintenance of all tables whose key fields are related to the domains specified in the attribute later.
    In this example we only want to control the access to the specific table ZMYTABLE – so we will leave it blank
    Save the entry and assign it to a transport request.
    Now mark the created line and switch to attributes
    Create a new entry with the data shown below.
    Save it and assign it to the transport request.
    Notice that you can have up to 8 organizational criterion attributes.
    Now we need to assign a table and a field to our attribute
    In order to do so mark the attribute and switch to Table Fields
    In here create a new entry and assign, in this example, the table ZMYTABLE, and the field name country to the attribute.
    Please notice that only Key fields can be used !
    Save and assign to transport request
    Now we are ready for activating our organizational criteria – this is the second bullet in the IMG
    Just check the active flag and the check is activated.
    Incorporate the authorization object in a role
    We have now implemented the authorization check; next step is to implement it in the required roles.
    In this example I have created a parameter transaction – ZMYTRANSACTION - using SM30 around the table ZMYTABLE. I have create a small test role ICC_TEST, including only the transaction ZMYTRANSACTION, and a few “support” transactions.
    In the authorization part – I have inserted the object S_TABU_LIN manually – (best practice is of course to assign it in SU24), but a manual insert will also do the trick J
    Now when we change one the authorization fields by pushing the pencil – the profile generator will ask us for the criteria.
    Here we chose the Z_COUNTRY_GRP criteria that we have created.
    We’ll now get the following popup, in this case we will grant change access, so we choose 02 – Change for activity
    In the list below we’ll see the Organizational Attributes that we have created – we have the option to use up to 8 attributes – in the example we had only defined one attribute – “Country Grp”  - we assign the value DK – thus only granting access to records with DK in the key field country.
    To transfer the selection back to the profile generator press th transfer button  or press F5.
    Now we just need to generate the profile and assign it to a test user.
    Now when this test user signs on to and executes the transaction only entries for Cty DK is displayed.
    If the transaction is executed by a user with SAP_ALL all records are displayed,
    Important Links For u:[http://www.sapsecurity.co.uk/sap-authorisation-objects.html]
    Thanks And if helpful please reward points

  • Regarding Table maintanance generator

    Hi friends,
    I have the problem with Table maintanance generator. I have created table maintanace generator for Ztable and moved it to the Quality, Production.
    But in Quality and Production It is not allowing to create the entries. It is saying non modfiable.
    Please reply.
    Thanks & Regards,
    K. Kishore

    Hi again,
    1. But when i am saving it asking for request.
    Yes, u are right. It will ask for a request.
    2. Create a request.
    3. Also do not forget to re-generate the table maintenance.
      (At that time also it will ask for request)
    4. Transport the request to QA and PRD. It will work fine then.
    regards,
    amit m.

  • How to find the TCODE that is created for the table maintanance generator

    Hi ,
    How to find the TCODE that is created for the table maintanance generator of particular table,if we only know the table name.
    Regards
    Ramakrishna L

    Hello,
    I try it this way
    1. Goto SE16 --> enter table TSTCP.
    2. In the selection-screen displayed, enter
    PARAM = *<ZTABNAME>*
    You will get the t-code for the TMG.
    BR,
    Suhas
    PS: Are you sure a t-code has been created for this TMG ?

  • InfoSet Query: Syntax Error while generating the program.

    Dear All,
    I have a Query in CRM system which contains an Infoset based on LDB.
    The InfoSet Query throws up a Syntax error while generating the program.
    So, we are not able to change the Infoset using the Infoset Query through SQ01.
    The error is as follows:-
    Syntax error in program "AQZZ==/SAPQUERY/CRM_ACTMON1 ".
    Error in the ABAP Application Program
    The current ABAP program "CL_QUERY_OUTPUT_DEFINITION====CP" had to be
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    The following syntax error occurred in program "AQZZ==/SAPQUERY/CRM_ACTMON1 "
    in include "AQZZ==/SAPQUERY/CRM_ACTMON1 " in
    line 28:
    ""CRMT_REPORT_LOCATORLIST" must be a flat structure. You cannot use int"
    "ernal tables, strings, references, or structures as components. -"
    Please help me arrive at an solution, so that we are able to change the Infoset through the InfoSet Query.
    Awaiting your reply as soon as possible.
    Thanks and Regards,
    Pankaj.

    There is an error in your query, specifically in the definition of CRMT_REPORT_LOCATORLIST. In the short dump (transaction ST22) you will see more details and the exact location of an error if you just scroll down.
    I can't tell more because this problem is specific to your system, to which I have no access. Read the whole dump and look at all the objects mentioned there.

  • How to query in bpm to generate next seq key

    Hi,
    I am working in 5.7 and DB2, I am able to insert a record in a table using Fuego.Sql.SqlObject.store() provided i assign the primary key value
    prmary key needs to be generated using 'SELECT NEXT VALUE FOR BPMPR.BPM_KEY_SEQ FROM SYSIBM.SYSDUMMY1'
    This query returns the next seq number outside bpm. but when i use it with in bpm, it complains : Unexpected value
    Suggest me how to get the sequence key which is returned by 'SELECT NEXT VALUE FOR BPMPR.BPM_KEY_SEQ FROM SYSIBM.SYSDUMMY1' query.
    I cannot use 'SELECT max(rqstKey) as nxtrqstKey FROM BPMPR.TABLE' to get the primary key value
    Thanks!

    Hi
    The first thing you might want to try is to change your logic in ALBPM to use Dynamic SQL to run your query.
    Here's the syntax that might work. The logic below assumes you named your database External Resouce "DbWithTheMostest".
    nextId as String[]
    query as String = "SELECT NEXT VALUE as nxtRqstKey FOR BPMPR.BPM_KEY_SEQ FROM SYSIBM.SYSDUMMY1"
    externalResourceName as String = "DbWithTheMostest"
    for each row in executeQuery(DynamicSQL, sentence : query, implname : externalResourceName) do
    // keep adding customer names to the array until all the customers have been added
    nextId[] = " " + row["nxtRqstKey "]
    end
    The second thing you might want to try is to catalog an SQL Query (vs. SQL). During the introspection, you'll be prompted to enter your sql.
    Hope this helps,
    Dan

  • Query: Missing tablename in generated SQL for vertical mapped classes

    Hi,
    I am playing with Kodo 3.1.4 / Postgres 7.4 and could not find any
    solution for this problem:
    I have one class calles "Clipfragment" which represents video clips and
    has a long - field named "lengthInMinutes". It extends a baseclass
    called "Categorizablefragment", which has a field "id" and some others.
    I use vertical mapping, thus having one table per class. The identity
    type is 'application'. The table for the class "Categorizablefragment"
    contains fields for jdoclass and jdoversion and IMHO correct entries.
    Everything works really fine except for Querys against subclass fields
    with aggregate functions. E.g. counting all clips works:
    KodoQuery q = (KodoQuery) getJdoPm().newQuery(ClipFragment.class);
    q.setResult ("count(id)");
    Number count = (Number) q.execute ();
    But: Querying for the sum of the field 'lengthInMinutes' fails:
    KodoQuery q = (KodoQuery) getJdoPm().newQuery(ClipFragment.class);
    q.setResult ("sum(lengthInMinutes)");
    Number count = (Number) q.execute ();
    The exception is:
    kodo.util.UserException: com.solarmetric.jdbc.ReportingSQLException:
    ERROR: syntax error at or near "WHERE"
    {prepstmnt 16398807 SELECT AVG(t0.lengthinminutes) FROM  WHERE
    t1.jdoclass = ? [reused=0]} [code=0, state=42601]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: ERROR: syntax error at or
    near "WHERE"
    {prepstmnt 16398807 SELECT AVG(t0.lengthinminutes) FROM  WHERE
    t1.jdoclass = ? [reused=0]} [code=0, state=42601]
    at kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:865)
    at kodo.query.AbstractQuery.execute(AbstractQuery.java:728)
    atde.jk.buvas.model.impl.DefaultClipManager.getTotalTime(DefaultClipManager.java:43)
    And the SQL - Trace:
    5766 TRACE [main] kodo.jdbc.SQL - <t 17089909, conn 31908613 (1
    errors)> [0 ms] executing prepstmnt 17226426 SELECT
    SUM(t0.lengthinminutes) FROM WHERE t1.jdoclass = ? [params=(String)
    de.jk.buvas.model.fragments.ClipFragment] [reused=0]
    I tried both 'base-tables' and 'per-subclass' for the property
    kodo.jdbc.VerticalQueryMode, without any results.
    Any ideas?
    Thanks,
    Jochen

    Hi Stephen,
    here are the excerpts from the .jdo and the .mapping files. The .jdo
    file was generated by XDoclet.
    ..jdo
    <class name="ClipFragment"
    identity-type="application"
    objectid-class="CategorizableFragment$Id"
    persistence-capable-superclass="CategorizableFragment"
    > <!-- end class tag -->
    <extension vendor-name="kodo"
    key="jdbc-class-map-name"
    value="vertical">
    <extension vendor-name="kodo" key="table" value="Clip"/>
    </extension>
    <field name="title"
    > <!-- end field tag -->
    <extension vendor-name="kodo"
    key="jdbc-size"
    value="100">
    </extension>
    </field>
    <field name="lengthInMinutes"
    > <!-- end field tag -->
    </field>
    <field name="description"
    > <!-- end field tag -->
    <extension vendor-name="kodo"
    key="jdbc-size"
    value="3000">
    </extension>
    </field>
    <field name="recordingDate"
    > <!-- end field tag -->
    </field>
    <field name="actors"
    > <!-- end field tag -->
    <collection
    element-type="de.jk.buvas.model.fragments.ActorFragment"
    > <!-- end collection tag -->
    </collection>
    <extension vendor-name="kodo"
    key="jdbc-element-delete-action"
    value="exception-deferred">
    </extension>
    <extension vendor-name="kodo"
    key="inverse-owner"
    value="clips">
    </extension>
    </field>
    <field name="media"
    > <!-- end field tag -->
    <collection
    element-type="de.jk.buvas.model.fragments.MediumFragment"
    > <!-- end collection tag -->
    </collection>
    <extension vendor-name="kodo"
    key="jdbc-element-delete-action"
    value="exception-deferred">
    </extension>
    </field>
    </class>
    <class name="CategorizableFragment"
    identity-type="application"
    objectid-class="CategorizableFragment$Id"
    > <!-- end class tag -->
    <extension vendor-name="kodo"
    key="jdbc-class-map-name"
    value="base">
    <extension vendor-name="kodo" key="table" value="Categorizable"/>
    </extension>
    <field name="id"
    primary-key="true"
    > <!-- end field tag -->
    </field>
    <field name="category"
    > <!-- end field tag -->
    <extension vendor-name="kodo"
    key="jdbc-delete-action"
    value="exception-deferred">
    </extension>
    </field>
    </class>
    ..mapping
    <class name="ClipFragment">
    <jdbc-class-map type="vertical" ref-column.ID="ID" table="CLIPFRAGMENT"/>
    <field name="actors">
    <jdbc-field-map type="many-many" element-column.ID="ID"
    ref-column.ID="CLIPS_ID" table="ACTOR_CLIPS"/>
    </field>
    <field name="description">
    <jdbc-field-map type="value" column="DESCRIPTION"/>
    </field>
    <field name="lengthInMinutes">
    <jdbc-field-map type="value" column="LENGTHINMINUTES"/>
    </field>
    <field name="media">
    <jdbc-field-map type="many-many" element-column.ID="MEDIA_ID"
    order-column="MEDIA_ORDER" ref-column.ID="ID" table="CLIPF_MEDIA"/>
    </field>
    <field name="recordingDate">
    <jdbc-field-map type="value" column="RECORDINGDATE"/>
    </field>
    <field name="title">
    <jdbc-field-map type="value" column="TITLE"/>
    </field>
    </class>
    <class name="CategorizableFragment">
    <jdbc-class-map type="base" table="CATEGORIZABLEFRAGMENT"/>
    <jdbc-version-ind type="version-number" column="JDOVERSION"/>
    <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
    <field name="category">
    <jdbc-field-map type="one-one" column.ID="CATEGORY_ID"/>
    </field>
    <field name="id">
    <jdbc-field-map type="value" column="ID"/>
    </field>
    </class>
    Thanks,
    Jochen
    Stephen Kim wrote:
    Can you post the mapping/metadata files for the two classes?
    Jochen Kressin wrote:
    Hi,
    I am playing with Kodo 3.1.4 / Postgres 7.4 and could not find any
    solution for this problem:
    I have one class calles "Clipfragment" which represents video clips
    and has a long - field named "lengthInMinutes". It extends a baseclass
    called "Categorizablefragment", which has a field "id" and some
    others. I use vertical mapping, thus having one table per class. The
    identity type is 'application'. The table for the class
    "Categorizablefragment" contains fields for jdoclass and jdoversion
    and IMHO correct entries.
    Everything works really fine except for Querys against subclass fields
    with aggregate functions. E.g. counting all clips works:
    KodoQuery q = (KodoQuery) getJdoPm().newQuery(ClipFragment.class);
    q.setResult ("count(id)");
    Number count = (Number) q.execute ();
    But: Querying for the sum of the field 'lengthInMinutes' fails:
    KodoQuery q = (KodoQuery) getJdoPm().newQuery(ClipFragment.class);
    q.setResult ("sum(lengthInMinutes)");
    Number count = (Number) q.execute ();
    The exception is:
    kodo.util.UserException: com.solarmetric.jdbc.ReportingSQLException:
    ERROR: syntax error at or near "WHERE"
    {prepstmnt 16398807 SELECT AVG(t0.lengthinminutes) FROM  WHERE
    t1.jdoclass = ? [reused=0]} [code=0, state=42601]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: ERROR: syntax error at or
    near "WHERE"
    {prepstmnt 16398807 SELECT AVG(t0.lengthinminutes) FROM  WHERE
    t1.jdoclass = ? [reused=0]} [code=0, state=42601]
    at kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:865)
    at kodo.query.AbstractQuery.execute(AbstractQuery.java:728)
    atde.jk.buvas.model.impl.DefaultClipManager.getTotalTime(DefaultClipManager.java:43)
    And the SQL - Trace:
    5766 TRACE [main] kodo.jdbc.SQL - <t 17089909, conn 31908613 (1
    errors)> [0 ms] executing prepstmnt 17226426 SELECT
    SUM(t0.lengthinminutes) FROM WHERE t1.jdoclass = ? [params=(String)
    de.jk.buvas.model.fragments.ClipFragment] [reused=0]
    I tried both 'base-tables' and 'per-subclass' for the property
    kodo.jdbc.VerticalQueryMode, without any results.
    Any ideas?
    Thanks,
    Jochen

  • Query WLI Timer Event Generator's status

    Hi guys,
    I am using WLI 10.3. Does anyone know how to query the status of Timer Event Generator programatically?
    I am able to create and start the timer programatically through JMX and WebLogicDeploymentManager but not getting the status
    of timer. It doesn't even look like this is possible through TimerEventGenRuntimeMBean or am I missing something?
    Thanks
    Sam

    Ok, you can basically leave the messageType as XML
    and for the Timer EG configuration, for the optional message you can add <dummy/> this will fire the request and start a workflow or whatever is bound to the channel.

  • How to create Transaction code for Table Maintanance generator.?

    Hi,
    I have created a Z Table. and I maintained the Table maintenance generator for the same. Now, my requirement is.. I have to create Transaction code for maintain and Display of this Z table.
    Can someone help me how to create the transaction code for Maintain and Display of the table. I know that we have to create a Transaction code for 'SM30'. Can someone tell me the steps to do the same. When I goto SE93 and say CREATE transaction, I get 5 options, Which one to select and what are the details should I provide in the subsequent screens.
    Thanks in advance.
    Best Regards,
    Paddu,

    Hi,
         Check the below steps......
    1. Go to Tcode u2018se93u2019.
    2. Select ' Transaction with parameters'.
    3. Then Transaction 'SM30' with click on skip initial screen
          VIEWNAME : XXX9tABLE NAME)
          UPDATE   : X
    4. Maintain the  Table maintenance generator
      Authorization group : &NC&
      Authorization object :
      Function group : name(xxx)
    Maintenance Screens :
    Maintenance type : One step
    Maint Screen No : Overview screen (2)
    If still u have problem I will send u steps with Screen shot ...send me Yr id.
    Regards,
    Biswanath

Maybe you are looking for