BADI's Query

Hi,
I am totally new in BADI. I wanted to know how I can proceed for BADI.

This might help:
http://help.sap.com/saphelp_crm40/helpdata/en/ee/a1d548892b11d295d60000e82de14a/frameset.htm
Regards,
Kaushal

Similar Messages

  • Badi in query

    Hi,
    Is there a way to implement user exit / BADI in query.
    This we need to be implemented for some key figures / calculated key figure.
    Regards,
    Charu

    Hi,
        i need to implement BADI for queries.
    My scenario:
            To implement different logics for different variables in a query, is this possible to implement it in a single BADI definition. (BI 7.0)
    currently i had implemented with different different BADI definitions for different logics.
    please reply as soon as possible.

  • Bad DNS Query

    Hello there, I am having infinite messages on my gateway router and the connection mill totally slow down. Would you please help?
    The following are part of the messages displaying on the router.
    Nov 22 06:59:02.846: %DNSSERVER-3-BADQUERY: Bad DNS query from 42.3.151.198
    Nov 22 06:59:02.974: %DNSSERVER-3-BADQUERY: Bad DNS query from 111.193.196.204
    Nov 22 06:59:06.146: %DNSSERVER-3-BADQUERY: Bad DNS query from 219.106.240.238
    Nov 22 06:59:06.294: %DNSSERVER-3-BADQUERY: Bad DNS query from 145.255.176.101

    It looks like you have a DNS server on your router and it's being bombarded with requests from the outside world. If you have no need for the router to be a DNS server, turn it of with the "no ip dns server" configuration command. If you need internal DNS to be served by the router, but have no requirement to provide DNS to the Internet, I would deny DNS requests on the inbound ACL of your Internet-facing interfaces. If, for whatever reason, you do have such a requirement, I would set up control-plane policing to ensure that your router isn't being overloaded.

  • Bad Performing Query

    One of our important report is performing too badly today, and lot of users aks for the reson.
    we have 10g r2 database in RHEL4
    Statistics are updated properly
    Present execution path showing good cost, as like last week
    The report is related to stock, and we need to get a solution as yearly as possible
    Thanks in advance

    When your query takes too long ...
    This might be useful.
    Sidhu

  • Bad Update Query

    This query is giving me an error:
    UPDATE tmpnewAttyReq
    SET FIrmID = LawFirms.Firm_ID
    FROM LawFirms
    WHERE LawFirms.Firm_ID = tmpNewAttyReq.FIrmID;
    When I run it, I get an error that says:
    "Syntax error (missing operator) in query expression 'Lawfirms.Firm_ID FROM Lawfirms'"
    But, I have no idea what's wrong???

    Try this AFTER BACKING UP database.
    UPDATE tmpnewAttyReq
    SET FIrmID = LawFirms.Firm_ID
    FROM LawFirms INNER JOIN tmpNewAttyReq
    ON LawFirms.LawFirmName = tmpNewAttyReq.FIrmName;
    Build a little, test a little

  • BADI Usage in Query for variables

    Hi,
         How to implement BADI in query for variables instead of classes in BI 7.0?
    if anybody come across BADI usage in queries means please provide me the steps.

    Hi,
        i need to implement BADI for queries.
    My scenario:
            To implement different logics for different variables in a query, is this possible to implement it in a single BADI definition. (BI 7.0)
    currently i had implemented with different different BADI definitions for different logics.
    please reply as soon as possible.

  • Slow query running against DBA_OBJECTS in 10.1.0.4

    Running the following query takes ages to return a result (in fact I haven't even bothered waiting for it to return a result):
    SELECT a.object_type, a.object_name, b.owner, b.object_type,
    b.object_name,
    b.object_id, b.status
    FROM SYS.dba_objects a,
    SYS.dba_objects b,
    (SELECT object_id, referenced_object_id
    FROM public_dependency
    START WITH object_id =
    (SELECT object_id
    FROM SYS.dba_objects
    WHERE owner = :owner
    AND object_name = :object
    AND object_type = :type)
    CONNECT BY PRIOR referenced_object_id = object_id) c
    WHERE a.object_id = c.object_id
    AND b.object_id = c.referenced_object_id
    AND a.owner NOT IN ('SYS', 'SYSTEM')
    AND b.owner NOT IN ('SYS', 'SYSTEM')
    AND a.object_name <> 'DUAL'
    AND b.object_name <> 'DUAL';
    If I add an /*+ ALL_ROWS */ hint though I get a result almost instantly. Hints in Oracle 10g are considered to be bad form (?) so what do I do? Is this a badly written query or might it be a database configuration issue?
    Any hints (pun intended) would be greatly appreciated.
    Richard

    The data dictionary views are not really meant to be joined together, not even to themselves, although everybody does it.
    Hints, per se, are not necessarily bad. There are "good" hints that give the optimizer more information either about the tables involved, or the intent of the query, without unduly limiting its scope for generating a query plan. The ALL_ROWS hint (and its oposite FIRST_ROWS) are such hints. The ALL_ROWS hint tells the optimizer that I am willing to wait longer for the first row to come back if that means I get the last row faster. It will make the optimizer tend to use more full scans and hash joins as opposed to nested loop joins and index access. Another "good" hint would be the CARDINALITY hint when used on a GTT or a TABLE() cast.
    An index hint, or use_nl or those types of hints tend to be "bad" hints in that they tell the optimizer how to access the data. They might work today, but if something changes tomorrow, the hint is still forcing an execution plan.
    Try searching asktom for "good hints", you should get a few hits with his opinions on good and bad hints.
    HTH
    John

  • Need pointers to improve performance of a select query to table vbrk

    Hey Folks,
    I have a query , whose performance needs to be tuned , as such:
        SELECT a~vbeln
               a~fkart                    
               a~waerk
               a~fkdat                   
               b~posnr
               b~vgbel
               b~vgpos
               b~matnr
               b~arktx
               b~prctr
               b~txjcd
          INTO TABLE gi_billing_items
          FROM vbrk AS a
          INNER JOIN vbrp AS b
          ON a~vbeln = b~vbeln
          FOR ALL ENTRIES IN gi_sales_items
         WHERE b~vgbel = gi_sales_items-vbeln
           AND b~vgpos  = gi_sales_items-posnr
           AND b~matnr  = gi_sales_items-matnr
           AND b~werks  = gi_sales_items-werks.
    where
    gi_sales_items is an internal table consisting of 278 entries,.
    The result set collected in table gi_billing_items is 200 records
    The total execution time for this query for the afore given data is 72,983 ms with the average time/record being ~ 9,471 ms which is too high.
    When I try to verify the Explain Plan of the query in ST05, in the Access path I see that the performance of Query Block 1 is bad. Query Block 1 is of the QBLOCK_TYPE UNIONA. Its the very first step in the Query execution internally.
    The indexes are defined on participating tables VBRK and VBRP as:
    VBRK~0      MANDT,VBELN
    VBRK~LOC MANDT,LCNUM
    VBRP~0      MANDT,VBELN,POSNR
    VBRP~Z01   FPLNR,MANDT
    VBRP~Z02   MANDT,MATNR,WERKS
    Its clear from the ST05, STAD and SE30 traces that there is a performance issue in this query. Does anyone have any pointers as to how to resolve this issue? Is there a protocol one needs to follow when using the "FOR ALL ENTRIES IN" clause? Or is there a need for any secondary indexes to be created?
    Please let me know
    Thanks and Best Regards,
    Rashmi.

    Hi,
    Try using the VBFA...to get the Invoice number and line item..and then use that value in VBRK...
    * Declare the internal table for T_VBFA.
    IF NOT gi_sales_items[] IS INITIAL.
    SELECT VBELV
                  POSNV
                  VBELN
                  POSNN
                  VBTYP_N
                  INTO TABLE T_VBFA
                  FOR ALL ENTRIES IN gi_sales_items
                  WHERE VBELV = gi_sales_items-VBELN
                  AND       POSNV = gi_sales_items-POSNR
                  AND       VBTYP_N = 'M'.             "Invoice                       ""Added this..
    ENDIF.
    **Add two columns to GI_SALES_ITEMS..to store the VBELN POSNN the data from t_vbfa..let's assume it is VBELN_VF and POSNR_VF
    * Basically merge gi_sales_items AND t_vbfa
    ** Then use that field in
    IF NOT GI_SALES_ITEMS[] IS INITIAL.
          SELECT a~vbeln
               a~fkart                    
               a~waerk
               a~fkdat                   
               b~posnr
               b~vgbel
               b~vgpos
               b~matnr
               b~arktx
               b~prctr
               b~txjcd
          INTO TABLE gi_billing_items
          FROM vbrk AS a
          INNER JOIN vbrp AS b
          ON a~vbeln = b~vbeln
          FOR ALL ENTRIES IN gi_sales_items
          WHERE b~vbeln = gi_sales_items-vbeln_vf   " Change here
           AND b~posnr  = gi_sales_items-posnr_vf     " Change here
           AND b~matnr  = gi_sales_items-matnr
           AND b~werks  = gi_sales_items-werks.
    ENDIF.
    Thanks
    Naren
    Edited by: Narendran Muthukumaran on Oct 15, 2008 11:35 PM

  • Can we call default.lgf in BADI logic

    Hello All,
    can we call default.lgf logic script to run in the BPC in the BADI ? If yes then can someone please let me know the relevant Method or Class etc.
    For e.g. we have a BADi logic that does a data push from Profit model to Main model based on some conditions. After all this processing in the BADi and writes to Main model, there is a requirement to run the default logic which is there in Profit Model. Which I want to handle in BADI itself after processing the earlier BADI.
    If you need more details please let me know.
    Many Thanks
    Krishna

    Hi Vadim,
    *START_BADI RUNLOGIC_PH
    QUERY = OFF
    WRITE = ON
    LOGIC = DEFAULT.LGF
    APPSET = UUG
    APP = MAIN
    DEBUG = OFF
    *END_BADI
    DEFAULT.LGF has 2 logic scripts calling.
    *account.lgf
    *balance.lgf
    This only executes the first LGF and ignores the second one. I executed each one at a time and all works fine but if I give both together it executes first one in the sequence and ignores the other. Any idea why it is doing like that ??
    Try 1)
    *START_BADI TRANSPROFITTOMAIN
    QUERY = OFF
    WRITE = OFF
    *END_BADI
    *START_BADI RUNLOGIC_PH
    QUERY = OFF
    WRITE = ON
    LOGIC = FLOW_BALANCE.LGF
    APPSET = <appset name>
    APP = MAIN
    DEBUG = OFF
    *END_BADI
    *START_BADI RUNLOGIC_PH
    QUERY = OFF
    WRITE = ON
    LOGIC = CALCACCOUNT.LGF
    APPSET = <appset name>
    APP = MAIN
    DEBUG = OFF
    *END_BADI
    it runs flow_balance.lgf and I can see the log for it..In the log it says the below
    SCRIPT RUNNING TIME IN TOTAL:109.42 s.
    LOG END TIME:2014-06-26 15:17:31
    Amount of time to run script:                                         110797.19 ms
    BADI EXECUTION TIME IN TOTAL :111233.64 ms.
    [WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:DATASRC WILL QUERY ON ALL BASE MEMBERS.
    [WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:INFLATION WILL QUERY ON ALL BASE MEMBERS.
    [WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:INTORDER WILL QUERY ON ALL BASE MEMBERS.
    [WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:PROFITCENTRE WILL QUERY ON ALL BASE MEMBERS.
    [WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:PROFIT_ACCOUNT WILL QUERY ON ALL BASE MEMBERS.
    [WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:TIME WILL QUERY ON ALL BASE MEMBERS.
    EXECUTION BADI:RUNLOGIC_PH
    QUERY: OFF
    WRITE: ON
    Parameter DIMENSION not specified. ALL values used.
    Dimension ACCOUNT not specified and doesn't exist in current context.
    Error in RUNLOGIC call.
    BADI EXECUTION TIME IN TOTAL :2.07 ms.
    SCRIPT RUNNING TIME IN TOTAL:132.65 s.
    Please advise.
    individually they both work fine..meaning Try 2 and Try 3 works fine.
    Try 2)
    *START_BADI TRANSPROFITTOMAIN
    QUERY = OFF
    WRITE = OFF
    *END_BADI
    *START_BADI RUNLOGIC_PH
    QUERY = OFF
    WRITE = ON
    LOGIC = CALCACCOUNT.LGF
    APPSET = <appset name>
    APP = MAIN
    DEBUG = OFF
    *END_BADI
    Try 3)
    *START_BADI TRANSPROFITTOMAIN
    QUERY = OFF
    WRITE = OFF
    *END_BADI
    *START_BADI RUNLOGIC_PH
    QUERY = OFF
    WRITE = ON
    LOGIC = FLOW_BALANCE.LGF
    APPSET = <appset name>
    APP = MAIN
    DEBUG = OFF
    *END_BADI
    Try 4) Default.lgf contains 2 include statements
    *include FLOW_BALANCE.LGF
    *include calcaccount.LGF
    In this case it executes only the fist lgf in the sequence and ignores the other. I cant see anything in the log for the 2nd LGF.
    *START_BADI TRANSPROFITTOMAIN
    QUERY = OFF
    WRITE = OFF
    *END_BADI
    *START_BADI RUNLOGIC_PH
    QUERY = OFF
    WRITE = ON
    LOGIC = Default.LGF
    APPSET = <appset name>
    APP = MAIN
    DEBUG = OFF
    *END_BADI
    Thanks
    Krishna

  • Sort GridControl modeled with parameterized query (bug?)

    I am using JDev 3.2.3. I created a ViewObject in expert mode which contained a parameterized query:
    select emp_name, salary
    from employees
    where
    dept_no = :1
    Then, through a few workarounds, I managed to create a BC4J data form containing a GridControl linked to the ViewObject.
    Cleared the associated empsRowSetInfo.queryOnOpen(false).
    Created a button with action event:
    empsRowSetInfo.setQueryConditionParams(new Object[] {
    deptId
    empsRowSetInfo.executeQuery();
    This all works fine.
    ***The problem***
    If you press on a header to re-sort the grid, a bad sql query error is thrown and details shows the following bad query:
    select * from (
    select emp_name, salary
    from employees
    where
    dept_no = :1)
    order by asc emp_name
    ORA-00904: invalid column name
    The GridControl headers appear to be getting their own copy of the ViewObject's query, then misinterpretting it. This works fine for non-parameterized queries since the column names are explicit. However :1 is not a column name but a place holder in my parameterized query.
    Shouldn't the headers be using the same mechanism to sort the grid as used to populate the grid model originally?
    Any suggestions for a workaround? Pressing a column header fatally breaks the form. Pressing the button again to re-execute the original query continues to throw the error!
    Thanks,

    This is clearly a bug.
    DAC is in 9.0.2 + replaced by JClient.
    It might be hard to get a fix for this problem.
    As far as a workaround.
    You can provide your own SortDelegate.
    Start with diagnosing the problem by extracting the SortDelegate class out of 'dacf-src.zip'.
    Change it into a mySortDelegate.java.
    Set the sortDelegate property on the gridControl. (use an instance of mySortDelegate).
    You should be able to step into your implementation and see what the problem is.
    Hopefully you will be able to fix the problem in your sortDelegate class.

  • How to meet customer's demand in the query?

    There are a lot of record in DSO, for each plant the customer wants to display the latest record.
    e.g
    Plant Date       amount
    A1 2007/08/09 30
    A1 2007/12/05 50
    A1 2007/12/28 30
    in the query A1 2007/12/28 30 will be displayed.
    PS: Remodellierung and new DSO take into no consideration. The customer wants it only in the Query
    Thanks

    You might consider to use virtual KF. It is useful in cases when you need to report new informations query but for some reasons remodeling of infoproviders in not an option. Virtual KF is is populated via customer exit/BADI within query runtime. See following SDN how to:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60e34f63-f44c-2c10-488e-c89b04e0ca7c?quicklink=index&overridelayout=true

  • How to deal with deadlock on wwv_flow_data table when http server times out

    There are some threads about a deadlock on the wwv_flow_data table. None of them contain a real explanation for this behaviour. In my case I will try to explain what I think is happening. Maybe it helps somebody who is hitting the same matter.
    In my case with APEX 3.2.1 I am navigating from one page to another. Doing this APEX will lock the table wwv_flow_data. As soon as the other page is shown the lock will be released. But now this other page contains a bad performing query (standaard report region). After 5 minutes the http server (modplsql) will time out and present the message "No response from the application server" on the screen. In the meanwhile the query is still running on the database server and the lock stays on the wwv_flow_data table.
    Normal user behaviour will be that the user will use the back button to return to the previous page and tries it again to navigate to the other page or
    the user will try to refresh the page with the bad performing query.
    And voila now you will have a deadlock on the wwv_flow_data table since a second session is trying to do the same thing while the first hasn't finished yet.
    How to deal with it?
    First of all. Have a good look at the bad performing query. Maybe you can improve it that it will succeed before the http server will timeout.
    In my case the 11gr1 optimizer couldn't handle a subquery factoring clause in the best way. After changing it back to a classical inline query the problem was solved.
    Secondly you could increase the timeout parameter of the http server. Although this not the best way.
    Maybe it would better if APEX in a next version would release the lock on the table wwv_flow_date earlier or do a rollback just before the moment that the http server is timing out.
    regards,
    Mathieu Meeuwissen

    Hello Shmoove,
    I saw your reply here and you probably understand the problems the HTTP 100 response may cause.
    I am trying to send image that was taken by getSnapshot. The problem is that the server respond with this HTTP 100 message.
    I suspect that the reason that my server doesn't recognize the file that I'm sending from J2me is that the "server to client" response to the 100 message comes after the second message of (see what the TCPIP viewer shows down here):
    POST /up01/up02.aspx HTTP/1.1
    Content-Type: multipart/form-data; boundary=xxxxyyyyzzz
    Connection: Keep-Alive
    Content-length: 6294
    User-Agent: UNTRUSTED/1.0
    Host: szekely.dnsalias.com:80
    Transfer-Encoding: chunked
    400: Client to Server (126 bytes)
    78
    --xxxxyyyyzzz
    Content-Disposition: form-data; name="pic"; filename="david.jpg"
    Content-Type: application/octet-stream
    400: Connected to Server
    400: Server to Client (112 bytes)
    HTTP/1.1 100 Continue
    Server: Microsoft-IIS/5.1
    Date: Wed, 23 Mar 2005 00:47:02 GMT
    X-Powered-By: ASP.NET
    Any help will be appreciated,
    David

  • NO EXCEPTION IS THROWN FROM THE PERSIST

    We are using Glassfish and MySQL. When we do a persist with a bad object/query, internal DB errors are NOT being reported back to the caller in any way, but Glassfish knows that the error occurred. Here is a schematic of the situation:
         Glassfish starts a CMP transaction and calls our bean
              Inside the bean we have code like this:
                   obj = (a new object that will cause a DB error when persisted)
                   try {
                        entityManager.persist(obj)
                   } catch (Throwable t) {
                        report to the user that the throwable happened
              bean returns
         Glassfish manages CMP transaction
    What we see is the following:
         - The persist has an internal failure and generates error messages in the Glassfish system.log file.
         - NO EXCEPTION IS THROWN FROM THE PERSIST, so the application code thinks that the persist completed correctly
         - At the end of the bean operation, Glassfish (correctly) rolls back the transaction.
    At the user level the result is that the request succeeds but nothing is put into the Database!
    We are not asking about the cause of the DB error. From reading the system log we know what happened and can fix it. Our problem is that problems in our field-deployed systems cannot be detected by the application code so failures cannot be reported to the user.
    The critical question is:
         Is there a way for the application code in the bean to see that an error occurred?
    By the way, we also have a secondary question: Why is the erroneous persist tried 6 times before deciding it won't work? Is there an option somewhere that says to try 6 times?
    The Exception as reported in the system log (only one copy of it) is included below.
    [#|2008-10-22T08:32:25.992-0400|WARNING|sun-appserver9.1|oracle.toplink.essentials.session.file:/opt/localVendors/glassfish/tems-glassfish-v1/domains/domain1/applications/j2ee-apps/im-app/im-ejb_jar/-local|_ThreadID=138;_ThreadName=p: thread-pool-1; w: 156;_RequestID=509e7043-21bb-410c-b795-19e9953afeec;|
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'STATIONCODE' cannot be null
    Error Code: 1048
    Call: INSERT INTO <exact operation and table contents elided from this trace file>
         at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:311)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:654)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:703)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:492)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:452)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeCall(AbstractSession.java:690)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:214)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:346)
         at oracle.toplink.essentials.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:191)
         at oracle.toplink.essentials.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:205)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:564)
         at oracle.toplink.essentials.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:89)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(DatabaseQueryMechanism.java:750)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(DatabaseQueryMechanism.java:714)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.insertObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:602)
         at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeCommitWithChangeSet(WriteObjectQuery.java:162)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:390)
         at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:109)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:555)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:138)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:110)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2233)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:909)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:269)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:190)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:2657)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1044)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:403)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1126)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:2443)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:202)
         at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:131)
         at oracle.toplink.essentials.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:91)
         at com.sun.jts.jta.SynchronizationImpl.before_completion(SynchronizationImpl.java:99)
         at com.sun.jts.CosTransactions.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:158)
         at com.sun.jts.CosTransactions.TopCoordinator.beforeCompletion(TopCoordinator.java:2548)
         at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:278)
         at com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:249)
         at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:623)
         at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:309)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1030)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3571)
         at com.sun.ejb.containers.MessageBeanContainer.afterMessageDeliveryInternal(MessageBeanContainer.java:1226)
         at com.sun.ejb.containers.MessageBeanContainer.afterMessageDelivery(MessageBeanContainer.java:1197)
         at com.sun.ejb.containers.MessageBeanListenerImpl.afterMessageDelivery(MessageBeanListenerImpl.java:79)
         at com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:139)
         at $Proxy364.afterDelivery(Unknown Source)
         at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:324)
         at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:76)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
    Caused by: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'STATIONCODE' cannot be null
         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
         at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
         at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1604)
         at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1519)
         at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1504)
         at com.mysql.jdbc.jdbc2.optional.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:840)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:647)
         ... 53 more
    |#]

    This is because the persistent context is not synchronized with the database until the commit is being executed.
    You might 'force' this by calling entityManager.flush() right after the call to persist(...).
    Or you register a transaction synchronizer and check the transaction status on afeterCompletion().
    - Roy

  • How to get Daily Customer Balance Report?

    Hi
    I have received a requirement from the user where he has to send the Daily Customer balance report currently he is using the T.Code S_ALR_87012172 Customer Balances in Local Currency for fetching the monthly data.
    I want to know what are the ways to make the report and what is the best way out of them to do it. Can it be done through user Exit, BADI, query or we have to get the Z report made by the apaber.
    Also, if it is possible please tell me the way step by step for user exit, badi or query if that is to be used.
    Please help
    Thanks in advance
    Pankaj

    Thanks for your reply Aleksey...
    We are using the report S_ALR_87012172 - Customer Balances in Local Currency and user want the same report on daily basis like Total Debit/Credit, Balance carryforward and the Accumulated balance. I have checked but unable to find out any such output.
    Please suggest what to do whether to make chnges in report painter or have to write a query. If I write a query then plz suggest me the tables as I am trying to do that but unable to link the Balance carryforward and accumulated balance.
    Regards
    Pankaj

  • Handling of UTL_HTTP package in oracle 10.2.0.5 to 11.2.0.2

    Dear All,
    We are calling Web services using UTL_http through one of our custom package in Oracle 10.2.0.5 .. & it is giving correct result/output..
    But if we are calling web services using the same custom package from oracle 11.2.0.2 & it is giving us error..
    utl http handling in custom package as :
    soap_request :=
    '<?xml version = "1.0" encoding = "UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body>'
    || v_request_xml -- input xml that we are sending
    || '</SOAP-ENV:Body></SOAP-ENV:Envelope>';
    http_req :=
    UTL_HTTP.begin_request (fx_service_url, -- fx_service_url is URL web service which are calling
    'POST',
    'HTTP/1.1'
    UTL_HTTP.set_header (http_req,
    'Content-Type',
    'text/xml'
    UTL_HTTP.set_header (http_req,
    'Content-Length',
    LENGTH (soap_request)
    UTL_HTTP.set_header (http_req, 'SOAPAction', '');
    UTL_HTTP.write_text (http_req, soap_request);
    http_resp := UTL_HTTP.get_response (http_req);
    DBMS_OUTPUT.PUT_LINE('HTTP response status code: ' || http_resp.status_code);
    DBMS_OUTPUT.PUT_LINE('HTTP response reason phrase: ' || http_resp.reason_phrase);
    UTL_HTTP.read_text (http_resp, soap_respond);
    UTL_HTTP.end_response (http_resp);
    Output in 10g :
    HTTP response status code: 200
    HTTP response reason phrase: OK
    Output in 11g :
    HTTP response status code: 400
    HTTP response reason phrase: Bad Request
    Query :
    1. is there any difference of handling utl_http in oracle 10.2.0.5 to 11.2.0.2 ?
    2. we recently upgraded oracle database from 10.2.0.5 to 11.2.0.2.. is/are there any setting which we need to take care while passing xml from oracle database to web service ..?
    3. do we need to change any setting in we-services server also in case database upgraded from ..?
    Thanks,

    For SQL Developer, see my advices in Re: Oracle 10g - Chinese Charecter issue and Re: insert unicode data into nvarchar2 column in a non-unicode DB
    -- Sergiusz

Maybe you are looking for

  • How to transfer an Imovie project from one Mac to another?

    I don't see any way to save it onto a disc or flash drive to get it to the other computer. Thanks for the help, Charlie

  • How to restore *just one iTunes playlist* from Time Machine?

    Hi all -- I'm pretty picky about my iTunes playlists. There are several main ones ("Jazz Lite," "R&B," "Jazz Traditional," etc. etc.) and these playlists can overlap in their coverage/share certain songs. So last Sunday I realized that I had fat-fing

  • Apple TV 2.0 Upgrade - Avoid

    Apple TV 2.0 Update Do not upgrade!!!! Apple Tv 40Gb model. Downloaded upgrade, Apple TV rebooted twice , since then flashing amber light, not even an apple logo. Have they just cost me £400 You can hear hard drive clunking. Will not boot up. Cannot

  • Bootcamp - Vista - Overheating - Any Suggestions?

    I have Bootcamp running Vista Ultimate and it gets pretty darn hot. Anything I can do to help this? Thanks!

  • Vendor/Customer Sensitive Field

    HI all, Vendor/Customer master some fields already setup for Sensitive field. Business would like to BLOCK all transactions if Vendor/Customer haven't confirm (t-code : FD08/FK08) is this possible ? I just know by default it will only block for auto