Problem with Business Partner List - State

I'm using SAP B1 2007A. We recently added several International countries and their regions (states). We are having a problem with the state that appears on the Business Partner List (list that appears when you search using part of a company name or *). The query that gets the data does not take into consideration the Country where the state is located. The result is that the query returns the first state it finds based on the state code not the state associated with the country.
Is there a fix for this query or is there a way I can adjust the query to get the correct state results in the Business Partner List.
Thanks,
Mark

No. Different state name but same state code.
Ex:
GA - Georgia in USA
GA - Galapagos Islands in Galapagos Islands
When searching for the Business Partner the city is Atlanta the Country is USA but the State is Galapagos Islands not Georgia.

Similar Messages

  • Problem with Business partner flow from R/3  to CRM

    Hi,
    We are setting up a process to flow of Business Partners from R/3 to CRM. 
    We have configured PIDE correctly but the problem is when I am creating any customer in R/3 we are getting DUMP.  
    Kindly help me in this regards.
    Thanks

    Hi,
    Check out the following Middleware Configuration :
         <b>CRM Middleware configurations</b>     
    1.     Source client for Client copy
         Using t-code SCC3 in both CRM and ISU to get the source client used for client copy.      Get source client for profile SAP_ALL.
    2.     RFC Destinations
         Use t-code SM59 and check if the following RFC destinations have been created:
    •     CRM
    o     R/3 Destination for CRM e.g. CRTCLNT240
    o     R/3 Destination for ISU e.g. ISTCLNT240
    o     Logical Destination for Middleware R&R queues – one for current client and one for client 000.                                                                            e.g. SAPCRM_MW_RR_240, SAPCRM_MW_RR_000     
    o     TCP/IP Destination for IPC dispatcher e.g. IPC_RFC_DISPATCHER
    o     TCP/IP Destination for IPC server e.g. IPC_RFC_SERVER
    •     ISU
    o     R/3 Destination for CRM e.g. CRTCLNT240
    o     R/3 Destination for ISU e.g. ISTCLNT240
    3.     Logical Systems
         Using t-code SALE check if the following logical systems have been created:
    •     CRM
    o     Own logical system – e.g. CRTCLNT240
    o     Logical system for ISU – e.g. ISTCLNT240
    o     Logical system for source client used in client copy – e.g. CRTCLNT200
    •     ISU
    o     Own logical system – e.g. ISTCLNT240
    o     Logical system for CRM – e.g. CRTCLNT240
    o     Logical system for source client used in client copy – e.g. ISTCLNT200
         Check if own logical system is assigned to the client.
         Path: Sending and Receiving systems -> Logical Systems -> Assign Client to Logical      System.
         Convert Logical System name in application tables
         Use t-code BDLS to convert logical system names in the application system.     
    1.     Enter old logical system name retrieved in step 1. e.g. CRTCLNT200
    2.     Enter new logical system name e.g. CRTCLNT240.
    3.     Select radio button Conversion of Client-Dependent Tables and execute the transaction.
    This process needs to be carried out 4 times: twice in CRM and twice in ISU.
    •     CRM
    o     Old CRM logical system -> New CRM logical system. e.g. CRTCLNT200 -> CRTCLNT240.
    o     Old ISU logical system -> New ISU logical system. e.g. ISTCLNT200 -> ISTCLNT240.
    •     ISU
    o     Old CRM logical system -> New CRM logical system. e.g. CRTCLNT200 -> CRTCLNT240.
    o     Old ISU logical system -> New ISU logical system. e.g. ISTCLNT200 -> ISTCLNT240.
    4.     Middleware Parameter tables
         Use t-code SM30 to maintain middleware parameters in following tables
    •     CRM
    o     Table SMOFPARSFA:
         Change value for following parameter entry:
         Key - R3A_COMMON
         Para name - CRM_DEFAULT_DESTINATION
         Value - Old ISU logical system -> new ISU logical system
              E.g. ISTCLNT200 -> ISTCLNT240     
    •     ISU
    o     Table CRMRFCPAR:
         Delete the previous entry for the following key:
         User - CRM
         Object name - *
         RFC Destination - Old RFC destination for CRM e.g. CRTCLNT200.
         Load types - All Load Types
         Create new entry with following data:
         User - CRM
         Object name - *
         RFC Destination - New RFC destination for CRM e.g. CRTCLNT240.
         Load types - All Load Types
         In Queue flag - X
         Send XML – No XML
    o     Table CRMPAROLTP:
         Change value for following parameter entry:
         Para name - CRM_DEFAULT_DESTINATION
         User - CRM
         Value - Old CRM logical system -> new CRM logical system
              E.g. CRTCLNT200 -> CRTCLNT240
    5.     Admin Console (Sites and subscriptions)
         Using t-code SMOEAC in CRM change attributes for the following sites.
    •     CRM site
    o     Name: Change name from old CRM logical system -> new CRM logical system e.g. CRTCLNT200 -> CRTCLNT240
    o     Description: Change description from old CRM logical system -> new CRM logical system e.g. CRTCLNT200 -> CRTCLNT240
    o     Site attributes: Change RFC destination from old CRM RFC destination to new CRM RFC destination e.g. CRTCLNT200 -> CRTCLNT240
    o     Click on get values button to refresh logical system details.
    •     ISU site
    o     Name: Change name from old ISU logical system -> new ISU logical system e.g. ISTCLNT200 -> ISTCLNT240
    o     Description: Change description from old ISU logical system -> new ISU logical system e.g. ISTCLNT200 -> ISTCLNT240
    o     Site attributes: Change RFC destination from old ISU RFC destination to new ISU RFC destination e.g. ISTCLNT200 -> ISTCLNT240
    o     Click on get values button to refresh logical system details.
         Check if ISU site is assigned to following subscriptions.          
    •     All Business Agreements (MESG)
    •     All Business Partner Relationship (MESG)
    •     All Business Partners (MESG)
    •     All Business Transactions
    •     IS-U Connection Objects (MESG)
    •     IS-U Contracts (MESG)
    •     IS-U Points of Delivery (MESG)
    •     Product Materials (MESG)
    6.     CRM Middleware Queues
         Inbound Queues:
    I.     Execute transaction SMQR.
    II.     Change AS group from ‘DEFAULT’ to ‘parallel generators’.                Path: Edit -> Change AS Group
    III.     Register following queues:
    •     CRM     
    o     CSA*
    o     R3A*
    •     ISU
    o     R3A*     
    Outbound Queues:
    I.     Execute transaction SMQS.
    II.     Change AS group from ‘DEFAULT’ to ‘parallel generators’.                Path: Edit -> Change AS Group
    III.     Register following queues:
    •     CRM     
    o     CSA*
    o     R3A*
    •     ISU
    o     R3A*     
    R&R Queues:
    I.     Execute transaction SMOHQUEUE in CRM.
    II.     Check if all queues have status ‘Released’.
    III.     Start Queue Demon by clicking on ‘Start Queue Demon’.
    <b>Please reward points if it helps.</b>
    Regards,
    Amit Mishra

  • Problem with business partner activation

    Hello experts!
    I try to archive business partner but face with one issue.
    My steps:
    1) set the indicator Archiving flag in the Business Partner dialog on the tab page Status
    2) in the initial screen of the archive administration (transaction SARA), enter the object name CA_BUPA
    3) create a variant (add BP number)
    But log is empty
    This BP isn’t assign to any document.
    Did I make mistake?
    Thank you!
    Best regard,
    Yuliya

    No. Different state name but same state code.
    Ex:
    GA - Georgia in USA
    GA - Galapagos Islands in Galapagos Islands
    When searching for the Business Partner the city is Atlanta the Country is USA but the State is Galapagos Islands not Georgia.

  • Problem with Business Partner setup

    Dear Experts
    I am setting up master data for business partner and would like to build relationship for customers that within the same group.
    E.g. Company A, B and C are in the same group of customer, Company A is the parent company while B and C are its subsidiaries.
    My requirement is: to set up a relationship between these three companies which could let me to run a Receivable Aging Report to show the receivable for each of these companies and the total receivable for this group of company as a whole.
    Can this requirement be met?
    What would be the bset approach to meet this requirement?

    Dear All
    I have decided to change the field 'Remark' in the BP Master Data to 'BP Group' to store the information for customer groups.
    However, it is a 'text' field by default which implies users can type anything they want. Manual typing errors in this case, would affect the reporting.
    Would it be possible to make the field as a drop down list? (which similar to the default BP group field) and
    What will be a good query to retrieve data from this field in order to show the aging in the manner I have requested above?
    Thanks all
    Regards
    Elton

  • Problem with business partner

    Hello everyone,
    I have this problem:
    ive been using extractor 0crm_sales_act_1 for crm, but i just realized that there is no business partner for my activities. I do have a business partner associated to my service order, but not to my activity that belongs to my service order in the extractor.
    I checked on the configuration for crm, and they do have a business partner for every activity, how do i get that?
    I want to link the same business partner that i have for my service order to my activity in the extractor 0crm_sales_act_1.
    please help me

    hi, im checking that field but it comes blank to all activities that are associated to a service  order, im only getting the bp for all my service orders but not my activities

  • Problem with business partner cumulative balance

    Hi
    I used to used the business partner balance enqury to quickly tell customers what they were due to pay up to the start of the month. I just looked at the cumulative balance of the last transaction of the previous month and that was it. I know I could run an aged credit report but this was quicker and easier. However since upgrade to 2007A the cumulative balance does not give the amount due for a part paid invoice so this does not work any more.
    Question is has anyone writen a fast query or other report that calculates the cumulative balance based on outstanding amount?
    Thanks in advance
    Derek

    Hi!
    Run this in SAP B1 Query Manager
    SELECT     T0.CARDCODE, MIN(T0.CARDNAME) 'Customer Name', SUM(T0.DOCTOTAL - T0.PAIDTODATE) 'Last Balance'
    FROM        DBO.OINV T0
    WHERE     DOCSTATUS = 'O' AND T0.DOCTOTAL - T0.PAIDTODATE > 1 AND T0.CANCELED = 'N' AND DATEPART(month,T0.DOCDUEDATE) < DATEPART(month,getdate()) AND T0.CARDCODE = '[%1]'
    Group By T0.CARDCODE
    UNION ALL
    SELECT     T0.CARDCODE, MIN(T0.CARDNAME) 'Customer Name', -SUM(T0.DOCTOTAL - T0.PAIDTODATE) 'Last Balance'
    FROM        DBO.ORIN T0
    WHERE     DOCSTATUS = 'O' AND T0.DOCTOTAL - T0.PAIDTODATE > 1 AND T0.CANCELED = 'N' AND DATEPART(month,T0.DOCDUEDATE) < DATEPART(month,getdate())  AND T0.CARDCODE = '[%1]'
    Group By T0.CARDCODE
    ORDER BY T0.CARDCODE

  • Unable to generate Sales Report of Business Partner  by State-XL Reporter

    We are not able to generate Sales Report of Business Partner  by State using XL Reporter.
    The issue is that we can not access the Bill to State for BPs, or for that matter the Ship-to State.  We can access Bill T street, block, city, country u2013 everything except state.
    There is a CRD State, but for sales reports this is useless.  Can someone advise on this?
    Thanks in advance,
    Srini

    You can get around this by creating a UDF and formatted search to populate it.
    The XL Report can then be created, but, watch out on upgrade - XL Reports with UDF's are not easy on upgrade, especially where the UDF will be a run parameter. I often have to re-write after upgrade, so store a base one without the parameter setting

  • Problem with printing ALV lists

    Hey Guys,
    I have a problem with printing ALV lists ,
    I created a report with several ALV lists (not grids) on the same screen but when i attempt to print the report
    it prints each alv list on a different page..so if i have 3 alv lists in the same report it will print the report on 3 pages
    How can i print  them all in one page?
    Thanks in advance
    Noha Salah.

    Hey Max,
    I tried setting the Layout-list_append  before my block_list_append function call
    And setting the is_print-NO_NEW_PAGE , it printed the 3 lists on one page the only problem i have
    is that the lists are truncated and the list formats has totally been messed up..how can i restore them back
    to their original format?

  • URGENT :   EP 7.0 /ECC 5.0  -   Problem with Business Package : ESS/MSS

    Dear Portal Gurus,
    We are facing a problem with business package for ESS/MSS
    Our system Info is as under :
    Portal:- NW 2004s
    ERP2004: - (R3 ECC 5.0)
    ESS:- BP for Employee Self-Service (mySAP ERP 2004) 60.2
    MSS:- BP for Manager Self-Service (mySAP ERP 2004) 60.1.1
    SAP XSS  à (SAP ESS 100, SAP MSS 100 and SAP PCUI_GP 100 , all upto SP 12)
    After the Business Packages were installed,found that some  ess apps where not deployed...so manually deployed it.
    The JCO connections are OK.
    Do we need to set up the backend Homepage Framework for the same......even for preview.....was thinking not.
    Also, here is the error and exception that we get when we preview any ESS iview.
    A critical error has occured. Processing of the service had to be terminated. Unsaved data has been lost.
    Please contact your system administrator.
    You dont have the authorization to start service sap.com/pcui_gp~xssutils/XssMenuArea.
    com.sap.pcuigp.xssfpm.java.FPMRuntimeException: You dont have the authorization to start service sap.com/pcui_gp~xssutils/XssMenuArea.
    at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:111)
    at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:121)
    at com.sap.pcuigp.xssfpm.wd.BackendConnections.initBackend(BackendConnections.java:234)
    at com.sap.pcuigp.xssfpm.wd.BackendConnections.connectModel(BackendConnections.java:159)
    at com.sap.pcuigp.xssfpm.wd.wdp.InternalBackendConnections.connectModel(InternalBackendConnections.java:183)
    Thanks.
    Message was edited by: Ashutosh Rana

    I got the same problem :/
    not the authorization, but the fields in working time is displaying wrong.. (too big)
    Any solution to this?
    Best Regards
    Kristoffer Engh

  • Apex 4.1 - problem with navigation component LIST after upgrade

    There seems to be problem with Tags in LIST component, after upgrade from 4.0 to 4.1 release

    Right, we verified a problem for migrated lists.
    We have lists of links, that are not based on a specific template. After upgrade to 4.1, they stopped from rendering in their region. Found out that the tag <TABLE> was not included in the HTML Source, hence the list body was not built to render.
    The only way we found to include it was to create a template for Lists (there is not one by default in Apex in certain themes), edit it and include the tag (in the section "Before List Entry" > "List Template Before Rows" - the tag itself is not present in the newly created template, too). Then, you need to assign the template to the existing Lists to make the list body re-appear: it doesn't seem to be a good practice to create a list without a template, but Apex should at least provide 1 by default.
    Edited by: Kleber M on Oct 28, 2011 9:03 AM

  • Customer Integration with Business Partner in Student Accounting

    Dear Experts,
    We are having an issue regarding Customer Integration with Business Partner in Student Accounting.
    How and where it will be done please provide us steps.
    Thanks in Advance.
    Radhey

    Hello Radhey,
    I’m sorry that I bring up an old question, but how did you realized in system integration of the BP, the customer with the student?
    Best Regards
    Anastasia

  • Problem in passing Journal Entry with Business partner

    I intend to pass journal entry for a particular Business partner but business partner is a control account how should I pass journal entry for that particular BP.
    Need for this entry is for adjusting some G/L accounts with BP accounts.

    Hi Monica,
    Here's a short example of how to use a business partner in a journal entry.
            Dim oJnl As SAPbobsCOM.JournalEntries
            oJnl = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
            oJnl.DueDate = Now
            oJnl.Lines.ShortName = "C1000"
            oJnl.Lines.Debit = 100
            oJnl.Lines.Add()
            oJnl.Lines.AccountCode = "100000"
            oJnl.Lines.Credit = 100
            If oJnl.Add <> 0 Then
                oApplication.MessageBox(oCompany.GetLastErrorDescription)
            Else
                oApplication.MessageBox("Success")
            End If
    Hope it helps,
    Adele

  • Customer creation with Business Partner Error

    Hello Experts,
    I am a Functional consultant and trying to create Customer which has to create a Business Partner in one of the test system. All the config to create Business Partner is completed.
    When trying to create customer it throws a RFC connection error. I have pasted the dump details below. Please help me to solve the issue.
    Category          
    ABAP Programming Error
    Runtime Errors    
    CALL_FUNCTION_OPEN_ERROR
    ABAP Program      
    CL_RPM_FES_BUFFER_MANAGEMENT==CP
    Application Component  PPM-PFM
    Date and Time     
    22.09.2014 19:43:45
    Short text
        Error when opening an RFC connection ("CPIC-CALL: 'ThSAPOCMINIT' : cmRc=20
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "CL_RPM_FES_BUFFER_MANAGEMENT==CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An error occurred when executing a Remote Function Call.
        "CPIC-CALL: 'ThSAPOCMINIT' : cmRc=20 thRc=236#SAP gateway connection failed. Is
         SAP gateway started? "
        Status of connection.... "CODE=CM_PRODUCT_SPECIFIC_ERROR -1 -1 SAPCODE=236
         CONV= "
        Internal error code.... "RFC_IO5"
        There is an error in the communication system. To clarify
    and resolve the error, contact your system administrator.
    Last error logged in SAP kernel
    Component............ "NI (network interface)"
    Place................ "SAP-Gateway on host KNACKS06 / sapgw01"
    Version.............. 40
    Error code........... "-10"
    Error text........... "partner 'knacks06:sapgw01' not reached"
    Description.......... "NiPConnect2: 54.201.94.167:3301"
    System call.......... "connect"
    Module............... "nixxi.cpp"
    Line................. 3286
    The error reported by the operating system is:
    Error number..... 10060
    Error text....... "WSAETIMEDOUT: Connection timed out"
    Check the host name and service that define the remote program. Are
    these parameters correct? You can use the "ping" command to check
    whether the specified host is reachable. If the remote program is an
    application server, check whether it is running and whether the local
    gateway of this server is listening for the specified service. If the
    service is sapgw<nn>, the remote server must run with SAPSYSTEM number
    <nn>.
    Trigger Location of Runtime Error
        Program                                 CL_RPM_FES_BUFFER_MANAGEMENT==CP
        Include                                 CL_RPM_FES_BUFFER_MANAGEMENT==CM00J
        Row                                     2
        Module type                             (METHOD)
        Module Name                             CHANGES_BY_ORG
    Source Code Extract
    Line  SourceCde
        1 METHOD changes_by_org.
    >>>>>   CALL FUNCTION 'RPM_FES_RECALCULATE_BY_ORG' STARTING NEW TASK 'RPM_FES_RECALCULATE_BY_ORG'
        3     EXPORTING
        4       old_image         = old_image
        5       new_image         = new_image
        6       plog_tab          = plog_tab
        7       tb_plog_tab       = tb_plog_tab
        8 *   IMPORTING
        9 *     ET_MSG            =
       10 *     EV_RC             =
       11             .
      12
      13 ENDMETHOD.
    Active Calls/Events
    No.   Ty.          Program                             Include                             Line
          Name
       13 METHOD       CL_RPM_FES_BUFFER_MANAGEMENT==CP    CL_RPM_FES_BUFFER_MANAGEMENT==CM00J     2
          CL_RPM_FES_BUFFER_MANAGEMENT=>CHANGES_BY_ORG
       12 METHOD       CL_IM_RPM_FES_ORG_CHANGES=====CP    CL_IM_RPM_FES_ORG_CHANGES=====CM004     4
          CL_IM_RPM_FES_ORG_CHANGES=>IF_EX_HRBAS00INFTY~IN_UPDATE
       11 METHOD       CL_EX_HRBAS00INFTY============CP    CL_EX_HRBAS00INFTY============CM004    35
          CL_EX_HRBAS00INFTY=>IF_EX_HRBAS00INFTY~IN_UPDATE
       10 FORM         SAPLRHAP                            LRHAPF1R                              110
          UPDATE_DATABASE
        9 FUNCTION     SAPLRHAP                            LRHAPU08                               19
          RH_BASE_UPDATE_DB_DIALOG
        8 FORM         SAPLRHAP                            LRHAPF30                              248
          UPDATE_PLOG
        7 FUNCTION     SAPLRHAP                            LRHAPU40                               31
          RH_UPDATE_DATABASE
        6 FORM         SAPLBUBA_4                          LBUBA_4F31                             14
          HR_DATA_SAVE
        5 FORM         SAPMSSY0                            SAPMSSY0                              504
          %_PROCESS_P_O_C
        4 FORM         SAPMSSY0                            SAPMSSY0                              249
          %_COMMIT
        3 FORM         SAPMF02D                            MF02DFS0                              511
    SCHLUSS_BEARBEITUNG
    2 FORM    
    SAPMF02D                       
    MF02DFO0                        
    2335
    OKCODE_BEARBEITEN
    1 MODULE (PAI) SAPMF02D                       
    MF02DI00                        
    5632
    OKCODE_BEARBEITEN
    Regards,
    BV PATIL

    Hi,
    It would make more sense to speak to a technical resource who is familiar with your system.  Based on the error, it looks like you have connection issues in your landscape - I'm assuming you have CRM & ERP systems communicating and it looks like there is a problem with their connectivity. Best get some basis resource to help you out.
    cheers,
    G.

  • Problems with explain plan and statement

    Hi community,
    I have migrated a j2ee application from DB2 to Oracle.
    First some facts of our application and database instance:
    We are using oracle version 10.2.0.3 and driver version 10.2.0.3. It runs with charset Unicode 3.0 UTF-8.
    Our application is using Tomcat as web container and jboss as application server. We are only using prepared statements. So if I talk about statements I always mean prepared statements. Also our application is setting the defaultNChar property to true because every char and varchar field has been created as an nchar and nvarchar.
    We have some jsp sites that contains lists with search forms. Everytime I enter a value to the form that returns a filled resultset, the lists are performing great. But everytime I enter a value that returns an empty resultset, the lists are 100 times slower. The jsp sites are running in the tomcat environment and submitting their statements directly to the database. The connections are pooled by dbcp. So what can cause this behaviour??
    To anaylze this problem I started logging all statements and filled-in search field values and combinations that are executed by the lists described above. I also developed a standalone helper tool that reads the logged statements, executes them to the database and generates an explain plan for every statement. But now there appears a strange situation. Every statement, that performs really fast within our application, is now executed by the helper tool extremely slow. So I edited some jsp pages within our application to force an explain plan from there (tomcat env). So when I'm executing the same statement I'm getting with the exactly same code two completely different explain plans.
    First the statement itself:
    select LINVIN.BBASE , INVINNUM , INVINNUMALT , LINVIN.LSUPPLIERNUM , LSUPPLIERNUMEXT , LINVIN.COMPANYCODE , ACCOUNT , INVINTXT , INVINSTS , INVINTYP , INVINDAT , RECEIPTDAT , POSTED , POSTINGDATE , CHECKCOSTCENTER , WORKFLOWIDEXT , INVINREFERENCE , RESPONSIBLEPERS , INVINSUM_V , INVINSUMGROSS_V , VOUCHERNUM , HASPOSITIONS , PROCESSINSTANCEID , FCURISO_V , LSUPPLIER.AADDRLINE1 from LINVIN, LSUPPLIER where LINVIN.BBASE = LSUPPLIER.BBASE and LINVIN.LSUPPLIERNUM = LSUPPLIER.LSUPPLIERNUM and LINVIN.BBASE = ? order by LINVIN.BBASE, INVINDAT DESC
    Now the explain plan from our application:
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 101 | 28583 | 55 (0)| 00:00:01 |
    | 1 | NESTED LOOPS | | 101 | 28583 | 55 (0)| 00:00:01 |
    | 2 | TABLE ACCESS BY INDEX ROWID| LINVIN | 93709 | 12M| 25 (0)| 00:00:01 |
    |* 3 | INDEX RANGE SCAN | LINV_INVDAT | 101 | | 1 (0)| 00:00:01 |
    | 4 | TABLE ACCESS BY INDEX ROWID| LSUPPLIER | 1 | 148 | 1 (0)| 00:00:01 |
    |* 5 | INDEX UNIQUE SCAN | PK_177597 | 1 | | 1 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    3 - access("LINVIN"."BBASE"=:1)
    filter("LINVIN"."BBASE"=:1)
    5 - access("LSUPPLIER"."BBASE"=:1 AND "LINVIN"."LSUPPLIERNUM"="LSUPPLIER"."LSUPPLIERNUM")
    Now the one from the standalone tool:
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 93773 | 25M| | 12898 (1)| 00:02:35 |
    | 1 | SORT ORDER BY | | 93773 | 25M| 61M| 12898 (1)| 00:02:35 |
    |* 2 | HASH JOIN | | 93773 | 25M| 2592K| 7185 (1)| 00:01:27 |
    | 3 | TABLE ACCESS BY INDEX ROWID| LSUPPLIER | 16540 | 2390K| | 332 (0)| 00:00:04 |
    |* 4 | INDEX RANGE SCAN | LSUPPLIER_HAS_BASE_FK | 16540 | | | 11 (0)| 00:00:01 |
    | 5 | TABLE ACCESS BY INDEX ROWID| LINVIN | 93709 | 12M| | 6073 (1)| 00:01:13 |
    |* 6 | INDEX RANGE SCAN | LINVOICE_BMDT_FK | 93709 | | | 84 (2)| 00:00:02 |
    Predicate Information (identified by operation id):
    2 - access("LINVIN"."BBASE"="LSUPPLIER"."BBASE" AND "LINVIN"."LSUPPLIERNUM"="LSUPPLIER"."LSUPPLIERNUM")
    4 - access("LSUPPLIER"."BBASE"=:1)
    6 - access("LINVIN"."BBASE"=:1)
    The size of the tables are: LINVIN - 383.692 Rows, LSUPPLIER - 115.782 Rows
    As you can see the one executed from our application is much faster than the one from the helper tool. So why picks oracle a completely different explain plan for the same statement? An why is a hash join much slower than a nested loop? Because If I'm right a nested loop should only be used when the tables are pretty small..
    I also tried to play with some parameters:
    I set optimizer_index_caching to 100 and optimizer_index_cost_adj to 30. I also changed optimizer_mode to FIRST_ROWS_100.
    I would really appreciated, if somebody can help me with this issue, because I'm really getting more and more distressed...
    Thanks in advance,
    Tobias
    Edited by: tobiwan on Sep 3, 2008 11:49 PM
    Edited by: tobiwan on Sep 3, 2008 11:50 PM
    Edited by: tobiwan on Sep 4, 2008 12:01 AM
    Edited by: tobiwan on Sep 4, 2008 12:02 AM
    Edited by: tobiwan on Sep 4, 2008 12:04 AM
    Edited by: tobiwan on Sep 4, 2008 12:06 AM
    Edited by: tobiwan on Sep 4, 2008 12:06 AM
    Edited by: tobiwan on Sep 4, 2008 12:07 AM

    tobiwan wrote:
    Hi again,
    Here ist the answer:
    The problem, because I got two different explain plans, was that the external tool uses the NLS sesssion parameters coming from the OS which are in my case "de/DE".
    Within our application these parameters are changed to "en/US"!! So if I'm calling in my external tool the java function Locale.setDefault(new Locale("en","US")) before connecting to the database the explain plans are finally equal.That might explain why you got two different execution plan, because one plan was obviously able to avoid a SORT ORDER BY operation, whereas the second plan required to run SORT ORDER BY operation, obviously because of the different NLS_SORT settings. An index by default uses the NLS_SORT = 'binary' order whereas ORDER BY obeys the NLS_SORT setting, which probably was set to 'GERMAN' in your "external tool" case. You can check the "NLS_SESSION_PARAMETERS" view to check your current NLS_SORT setting.
    For more information regarding this issue, see my blog note I've written about this some time ago:
    http://oracle-randolf.blogspot.com/2008/09/getting-first-rows-of-large-sorted.html
    Now let me make a guess why you observe the behaviour that it takes so long if your result set is empty:
    The plan avoiding the SORT ORDER BY is able to return the first rows of the result set very quickly, but could take quite a while until all rows are processed, since it requires potentially a lot of iterations of the loop until everything has been processed. Your front end probably by default only display the first n rows of the result set and therefore works fine with this execution plan.
    Now if the result set is empty, depending on your data, indexes and search criteria, Oracle has to work through all the data using the inefficient NESTED LOOP approach only to find out that no data has been found, and since your application attempts to fetch the first n records, but no records will be found, it has to wait until all data has been processed.
    You can try to reproduce this by deliberately fetching all records of a query that returns data and that uses the NESTED LOOP approach... It probably takes as long as in the case when no records are found.
    Note that you seem to use bind variables and 10g, therefore you might be interested that due to the "bind variable peeking" functionality you might potentially end up with "unstable" plans depending on the values "peeked" when the statement is parsed.
    For more information, see this comprehensive description of the issue:
    http://www.pythian.com/blogs/867/stabilize-oracle-10gs-bind-peeking-behaviour-by-cutting-histograms
    Note that this changes in 11g with the introduction of the "Adaptive Cursor Sharing".
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Problem with busy cursor

    IHey there,
    i have a popping up window in my Flex app. This window needs a little time to get created. In this time I want to set the Cursor to busy. But instead of the busy cursor Flex displays no cursor, also the arrow cursor disappears.
    I tried the hack with callLater but it doesn't help. Had anyone a similar problem and knows how to fix it?
    By the way: What is the best way to set the busy cursor? Static, with the parentApplication.cursoManager property or in the component with this.cursoManager? All of these ways have the same result on my problem: no cursor!
    click on a item (own component, extended Canvas, buttonMode = true)
    call function by MouseListener
    function {
        this.cursorManager.setBusyCursor();
        this.callLater(doPopUpWork);
    callLater function
    doPopUpWork() {
        // DO WORK AND ADD POPUP
        this.cursorManager.removeBusyCursor;
    I checked the right timing with trace statements [ trace("setBusy") ... ] and the also cursor comes Back when work is done and popup was added. All right and in right time. But the cursor disappears in that time instead of showing the busy cursor.
    Can anybody help me???

    I see there are problems with reading the code, try again:
    click on a item (own component, extended Canvas, buttonMode = true)
    call function by MouseListener
    function {
        this.cursorManager.setBusyCursor();
        this.callLater(doPopUpWork);
    callLater function
    doPopUpWork {
        // DO WORK AND ADD POPUP
        this.cursoManager.removeBusyCursor();

Maybe you are looking for