Syntax error when adding parameter to Subroutine

Hi .
  i have added one parameter to perform statement like below.
PERFORM VBAP-POSNR_PRUEFEN(SAPFV45P). (this is previous statement)
PERFORM VBAP-POSNR_PRUEFEN(SAPFV45P) USING SPACE.(thsi is new                                                                               
statement which i added)
(this is form)
FORM VBAP-POSNR_PRUEFEN USING US_BAPI.
  DATA: DA_HIGH_POS LIKE VBAP-POSNR VALUE '900000',
        VP_MINPOSNR LIKE VBAP-POSNR VALUE '999999',
        VP_MAXPOSNR LIKE VBAP-POSNR.
ENDFORM..
when I trying to activate the fallowing error is giving. Please advise me how to do it.
Function Module Z_SD_SALES_ITEM_MAINTAIN_CRS_1
Parameter error with PERFORM VBAP-POSNR_PRUEFEN(SAPFV45P). The number
of parameters (1) is not the same as the number of parameters in the
first use of this form (0).

Hi,
The Perform statement syntax:
PERFORM    <subr>
        |  <subr>(<prog>) [IF FOUND]
        |(<fsubr>)[IN PROGRAM (<fprog>)][IF FOUND]
        [USING  ... <pi>... ]
        [CHANGING... <pi>... ]
        [ON COMMIT].
Calls an internal or external subroutine <subr> or the subroutine whose name occurs in the <fsubr> field. The external program is <prog> or the name contained in <fprog>. The IF FOUND addition prevents a runtime error from occurring if the subroutine does not exist. The USING and CHANGING additions fill the subroutine’s parameter interface. The ON COMMIT addition delays the execution of the subroutine until the next COMMIT WORK statement.
Ex:
PROGRAM DEMO.
TABLES SBOOK.
SBOOK-FLDATE = SY-DATUM.
PERFORM FORM1(MYFORMS1).
and two other programs:
PROGRAM MYFORMS1.
FORM FORM1.
PERFORM FORM2(MYFORMS2).
ENDFORM.
and
PROGRAM MYFORMS2.
FORM FORM2.
DATA NAME(20) VALUE 'SBOOK-FLDATE'.
FIELD-SYMBOLS <FS>.
ASSIGN (NAME) TO <FS>.
IF SY-SUBRC EQ 0.
WRITE / <FS>.
ENDIF.
ENDFORM.
The output is:
02.06.1998
Regards,
Bhaskar

Similar Messages

  • Syntax error when adding variables in recordset (query)

    MySql,PHP,Dreamweaver,WindowsVista
    Hi I am receiving a syntax error: invalid quantifier ++ $orderNum;s*?> when adding two variables in the recordset (query) dialog box. I get the error when clicking OK.
    Here is what is entered:
    name: fieldname
    type: text
    default: -1
    runtime value: $_GET['Field']
    name: searchvalue
    type:text
    default: -1
    runtime value: $_GET['Search']
    Can anyone help with this?

    That's a completely separate issue. The error message is telling you that you have not defined the testing server correctly in the Site Definition dialog box.
    The Host directory field and URL prefix should both point to the same place, in other words, the root of your website. Host directory is the physical path, while URL prefix is the address you would put in a browser address bar.
    Select Site > Manage Sites. Select the name of the site, and click the Edit button. In the Site Definition dialog box, select the Advanced tab, and then choose Testing server from the Category list on the left.
    Depending on how your remote login works, Host directory should probably be public_html or just /. Use the same value as in the Remote server part of the Site Definition dialog box. The URL prefix should be http://gaylehansen.aisites.com/.

  • Syntax Error after creating enhancements for subroutine

    Problem:
    Creating enhancement sections gives a syntax error when creating enhancement options and implementations for a subroutine and then ceating enhancement options and implementations for the call to that same subroutine.
    <p>
    Syntax Error:
    "Different number of parameters in FORM and PERFORM (routine: SET_LAYOUT, number of formal parameters: 2, number of actual parameters: 1)
    </p>
    <p>
    Here's the following scenario:
    </p>
    <p>
    A subroutine is defined in a program.
    The subroutine is called within the same program.
    </p>
    <p>
    I then executed these steps:
    <br>     1. Defined an enhancement section around the subroutine definition
    <br>     2. Defined an enhancement section around the subroutine call.
    <br>     3. Implemented the enhancement section around the subroutine definition and add an additional parameter.
    </p>
    <p>
         Currently, this gives a syntax error as expected, since the call to the subroutine needs 1 more parameter.
    </p>
    <p>
         4. Implemented the enhancement section for the subroutine call.  I change the call in the implementation so it passes the new parameter.
    </p>
    <p>
    A syntax check to this gives an error.  The syntax checker is not only checking the new implementation, but also the original subroutine that should have been overwritten.
    </p>
    <p>
    The enhancement sections use the same enhancement spot, and the enhancement implementations use the same implementation.
    </p>
    <p>
    I tried various combinations of using different enhancement spots and/or implementations, but all give the same syntax error.  I tried separating the subroutine in a different include and  retried my testing, but it still gave the same syntax error.
    </p>
    <p>
    Here's the sample code I first created to try troubleshooting the problem:
    </p>
    <p>
    <pre>
    ENHANCEMENT-SECTION ZEP_Z_MICHAEL_02 SPOTS ZES_Z_MICHAEL .
         PERFORM set_layout
              CHANGING
              wa_layout.
    END-ENHANCEMENT-SECTION.
    $$-Start: ZEP_Z_MICHAEL_02----
    $$
    ENHANCEMENT 2  ZEI_TEST_SECTIONS.
         "inactive version
         PERFORM set_layout
         using 'X'
              CHANGING
              wa_layout.
    ENDENHANCEMENT.
    $$-End:   ZEP_Z_MICHAEL_02----
    $$
    ENHANCEMENT-SECTION ZEP_Z_MICHAEL_01 SPOTS ZES_Z_MICHAEL STATIC .
    FORM set_layout
    CHANGING p_wa_layout TYPE slis_layout_alv.
    p_wa_layout-zebra = 'X'.
    wa_layout-no_colhead = 'X'..
    p_wa_layout-colwidth_optimize ='X'.
    wa_layout-window_titlebar = 'Woot'.
    ENDFORM. "set_layout
    END-ENHANCEMENT-SECTION.
    $$-Start: ZEP_Z_MICHAEL_01----
    $$
    ENHANCEMENT 1  ZEI_TEST_SECTIONS.
         "inactive version
    FORM set_layout
    using p_test type boolean
    CHANGING p_wa_layout TYPE slis_layout_alv.
    p_wa_layout-zebra = 'X'.
    wa_layout-no_colhead = 'X'..
    p_wa_layout-colwidth_optimize ='X'.
    wa_layout-window_titlebar = 'Woot'.
    ENDFORM. "set_layout
    ENDENHANCEMENT.
    $$-End:   ZEP_Z_MICHAEL_01----
    $$
    </pre>
    </p>
    <p>
    Please let me know if you think I am doing something wrong. 
    </p>
    <p>
    Thanks, <br>
    Mike
    </p>
    Edited by: Michael Herman on Mar 8, 2010 8:11 PM

    Yes, Sandra.  That is what did and it worked with no syntax errors!
    I'm not sure if this is getting off topic or not, but the SAP documentation(taken from the SAP help after pressing F1 on the keyword static in ERP6) seems misleading:
    "The STATIC addition is intended for the enhancement of data declarations, while the statement ENHANCEMENT-POINT without the STATIC addition is designed for the enhancement of executable coding."
    I would think the enhancement section ZEP_Z_MICHAEL_02 would fall under the category of executable code, while the enhancement section ZEP_Z_MICHAEL_01 would fall under the category of declarative code.
    Unfortunately, all the SAP enhancement sections I come accross are dynamic.  The SAP help explains the reasoning for this:
    "In contrast to the statement ENHANCEMENT-POINT, the addition STATIC of the statement ENHANCEMENT-SECTION can only be used with maximum caution for changes of data declarations, because a replacement and no completion is carried out. Especially application development within SAP should not use the addition STATIC at all with ENHANCEMENT-SECTION as the change will be active in the entire customer system. "
    I do not know what the word "completion" means in the previous quote, so I can't determine why it would matter.  Regardless, if a developer wanted to change a standard subroutine declaration, they would also have to mod an enhancement section to change it to static.  This seems to defeat the purpose of using enhancements, but maybe this scenario is not what enhancements were intended for.

  • Library error when adding contact or when logging in

    The messenger server has a replica of the partition holding the users.
    It's an OES 2 sp2 server, and the GW Messenger is 2.04.
    Sometimes we see an error that says 'Library error' when adding a contact, or it doesn't show all users that exists with the search parameter given.
    We also sporadically see a 'Library error' when some users log in to it.
    Looking in the log I see an error that says 0xAE16 when users log in fails.
    I can find the 0xAE11 error in the TID's but not the 0xAE16, I did find an article on the forums, mentioning this problem http://forums.novell.com/novell-prod...or-server.html, they mention memory problems, so it seems to me there is a bug that needs fixing.

    I've disabled the '/diruseralias-"Internet EMail Address"' setting that was set up in the strtup.ma and strtup.aa scripts.
    I've also, for now at least, chosen another replica.
    I haven't seen the errors yet, so here's hoping...

  • Error when adding a partition to a materlialized view

    Hi,
    I am getting this error when adding a partition to a materialized view.
    ALTER MATERIALIZED VIEW mvedw.MV_CLM_CAPITN_F ADD PARTITION MAR2013 VALUES LESS THAN ('201304')
    ERROR at line 1:
    ORA-14074: partition bound must collate higher than that of the last partition
    Please advise.
    Regards,
    Narayan

    SQL> select TABLE_OWNER,TABLE_NAME,PARTITION_NAME,HIGH_VALUE from dba_tab_partitions where table_name =
    'MV_CLM_CAPITN_F' order by PARTITION_NAME 2
    3 ;
    TABLE_OWNER TABLE_NAME PARTITION_NAME HIGH_VALUE
    MVEDW MV_CLM_CAPITN_F APR2009 '200905'
    MVEDW MV_CLM_CAPITN_F APR2010 '201005'
    MVEDW MV_CLM_CAPITN_F APR2011 '201105'
    MVEDW MV_CLM_CAPITN_F APR2012 '201205'
    MVEDW MV_CLM_CAPITN_F AUG2009 '200909'
    MVEDW MV_CLM_CAPITN_F AUG2010 '201009'
    MVEDW MV_CLM_CAPITN_F AUG2011 '201109'
    MVEDW MV_CLM_CAPITN_F AUG2012 '201209'
    MVEDW MV_CLM_CAPITN_F DEC2008 '200901'
    MVEDW MV_CLM_CAPITN_F DEC2009 '201001'
    MVEDW MV_CLM_CAPITN_F DEC2010 '201101'
    TABLE_OWNER TABLE_NAME PARTITION_NAME HIGH_VALUE
    MVEDW MV_CLM_CAPITN_F DEC2012 '201301'
    MVEDW MV_CLM_CAPITN_F FEB2009 '200903'
    MVEDW MV_CLM_CAPITN_F FEB2010 '201003'
    MVEDW MV_CLM_CAPITN_F FEB2011 '201103'
    MVEDW MV_CLM_CAPITN_F FEB2012 '201203'
    MVEDW MV_CLM_CAPITN_F FEB2013 '201303'
    MVEDW MV_CLM_CAPITN_F JAN2009 '200902'
    MVEDW MV_CLM_CAPITN_F JAN2010 '201002'
    MVEDW MV_CLM_CAPITN_F JAN2011 '201102'
    MVEDW MV_CLM_CAPITN_F JAN2012 '201202'
    MVEDW MV_CLM_CAPITN_F JAN2013 '201302'
    TABLE_OWNER TABLE_NAME PARTITION_NAME HIGH_VALUE
    MVEDW MV_CLM_CAPITN_F JUL2009 '200908'
    MVEDW MV_CLM_CAPITN_F JUL2010 '201008'
    MVEDW MV_CLM_CAPITN_F JUL2011 '201108'
    MVEDW MV_CLM_CAPITN_F JUL2012 '201208'
    MVEDW MV_CLM_CAPITN_F JUN2009 '200907'
    MVEDW MV_CLM_CAPITN_F JUN2010 '201007'
    MVEDW MV_CLM_CAPITN_F JUN2011 '201107'
    MVEDW MV_CLM_CAPITN_F JUN2012 '201207'
    MVEDW MV_CLM_CAPITN_F MAR2009 '200904'
    MVEDW MV_CLM_CAPITN_F MAR2010 '201004'
    MVEDW MV_CLM_CAPITN_F MAR2011 '201104'
    TABLE_OWNER TABLE_NAME PARTITION_NAME HIGH_VALUE
    MVEDW MV_CLM_CAPITN_F MAR2012 '201204'
    MVEDW MV_CLM_CAPITN_F MAR2013 '201304'
    MVEDW MV_CLM_CAPITN_F MAY2009 '200906'
    MVEDW MV_CLM_CAPITN_F MAY2010 '201006'
    MVEDW MV_CLM_CAPITN_F MAY2011 '201106'
    MVEDW MV_CLM_CAPITN_F NOV2009 '200912'
    MVEDW MV_CLM_CAPITN_F NOV2010 '201012'
    MVEDW MV_CLM_CAPITN_F NOV2012 '201212'
    MVEDW MV_CLM_CAPITN_F OCT2009 '200911'
    MVEDW MV_CLM_CAPITN_F OCT2010 '201011'
    MVEDW MV_CLM_CAPITN_F OCT2011 '201111'
    TABLE_OWNER TABLE_NAME PARTITION_NAME HIGH_VALUE
    MVEDW MV_CLM_CAPITN_F OCT2012 '201211'
    MVEDW MV_CLM_CAPITN_F SEP2009 '200910'
    MVEDW MV_CLM_CAPITN_F SEP2010 '201010'
    MVEDW MV_CLM_CAPITN_F SEP2011 '201110'
    MVEDW MV_CLM_CAPITN_F SEP2012 '201210'
    These are the list of partitions available.
    Regards,
    Narayan

  • Syntax error when creating a user-defined table type in SQL Server 2012

    Why am I getting a syntax error when creating a user-defined table type in SQL Server 2014?
    CREATE TYPE ReportsTableType AS TABLE 
    ( reportId INT
    , questionId INT
    , questionOrder INT );
    Results:
    Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'AS'.

    Hope these posts could help, 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/37a45a9a-ed8c-4655-be93-f6e6d5ef44be/getting-incorrect-syntax-while-creating-a-table-type-in-sql-server-2008-r2?forum=transactsql
    Regards, Dineshkumar,
    Please Mark as Answer if my post answers your question and
    Vote as Helpful if it helps you

  • Error when adding Essbase server...

    Hi,
    I installed Hyperion System 9.3.1 in my development machine and encounter the following error when adding a Essbase server in AAS for the first time.
    Error: 1042017: Network error: The client or server timed out waiting to receive data using TCP/IP. Check network connections. Increase the NetRetryCount and/or NetDelay values in the ESSBASE.CFG file. Update this file on both client and server. Restart the client and try again.
    I used the default user "admin" and password "password". I used my servername:10080 as the server name. I hope I am right.
    Why is this happening? I tried changing netdelay settings but still get the same. Is this something else? Does this have anything to do with my TCP/IP settings? I am installing this on a virtual PC.
    I couldn't find an answer in previous posts.
    regards
    h

    The things that come to mind:
    The server name you use should be the name of the virtual PC, not the machine it's running on. Also, depending on the settings for the Virtual PC environment, you may have to change the network options to allow it to be visible to the network, be in the right domain, etc...
    The above may or may not get you any closer, the error message itself is just saying it can't receive a response from the server, which means the server never got the request or can't send a response back.
    Good Luck,

  • Error when adding any menu - FRM-40735: ON-INSERT trigger raised unhandled

    When I try to add any new menu in my newly cloned instance I get this error:
    Error when adding any menu - FRM-40735: ON-INSERT trigger raised unhandled excpetion. ORA-04031.
    Using Oracle EBS version 12.1.3.
    Details:
    Menu JOB_STRUCTURE_MENU
    User Menu Name Job Strucure Menu
    Menu Type Standard
    Description Menu to add job, grade, and incentives
    Seq = 1
    Prompt = Enter and Maintain
    Function = Combined Person & Assignment Form WF="US SHRMS TSKFLW
    When I click save I get the error.
    Any assistance would be greatly appreciated.
    Thanks!

    Please post the details of the application release, database version and OS.
    When I try to add any new menu in my newly cloned instance I get this error:
    Error when adding any menu - FRM-40735: ON-INSERT trigger raised unhandled excpetion. ORA-04031.Is the issue with all menus or specific ones only?
    Did AutoConfig complete successfully?
    When I click save I get the error.
    Any assistance would be greatly appreciated.Do you have any invalid objects in the database?
    Any errors in the database log file?
    Please obtain FRD log file for details about the error -- https://forums.oracle.com/forums/search.jspa?threadID=&q=FRD+AND+R12&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • System error: Error when copying parameter function group CR01

    Dear friends
    I am getting the above error while doing the Backflushing in REM.
    It occurs when backflushed quantity is issued ,and while confirming the
    ACTUAL ACTIVITES above error occurs..........
    We have upgrade the system from SAP 4.7 to ECC6.0.
    It is giving some error in CRM system but we don't have CRM system.......
    Message displayed is as below..................
    System error: Error when copying parameter function group CR01
         Message no. CR085
    Diagnosis
         Internal error.
    Procedure
         Repeat the transaction.
         If the error occurs and you have a CRM System connected to your ERP
         System, the document may have been archived in the CRM System.
         If the error occurs again, inform your system administrator. If the
         error cannot be corrected, call the SAP Hotline directly. Describe which
         steps preceeded the error.
    Thanks& Regards
    Sandeep
    Message was edited by:
            Sandeep Bhowmick

    Hi Sandeep
    Standard R/3 does not allow backflush without any operation. You need to have an operation to do a backflush.Error message CR 085 is issued because there is no operation in the routing of the material backflushed. System should issue an error when no operations are found in routing. Although, error message CR 085 is not correct, more appropriate message RM 824 for this a program correction is requried check note (691161).
    Regards
    Prasad
    Reward if useful

  • Syntax error when running ActionFileToXML.jsx or trying to install xtools

    I have an action set (actually a few) that I would REALLY love to rename but the actions are calling "sub" actions within the action set which means that the action set name is hard-coded into the actions in many places.
    Originally, I tried to edit my actions with a hex editor to try and change the name and references but realised I was limited to renaming with the same number of characters unless I parsed the file first... so I gave up on that. Then I came across Xbytor's awesome ActionFileToXML script, but I get a syntax error when running both the To and From XML scripts at root.@date = Stdlib.toISODateString();
    I then figured I would go straight for the latest xtools instead but when running the install (in CS2) I get a rather long syntax error and so the install fails. The script mentioned that there is a log file that I should email to Xbytor, but I figured I would post here instead of bothering him directly so he has more of a choice about whether he wants to be bothered by me Or maybe someone else can answer if it is a stupid newbie problem.
    Thanks heaps!
    Gab
    ETA: I'm running CS2 on XP if that makes any difference. If so, I may be able to use a friend's Mac with CS3.

    Thanks for the quick (and very useful) response!
    I made the changes to the mentioned files and the scripts were able to
    progress further, but only until the next E4X syntax (node.@key=key;).
    Rather than continue to hack at your code, I figured I should downgrade to a
    previous version (as you also suggested).  I initially tried v1.5 and the
    ActionFileToXML worked perfectly but ActionFileFromXML failed with an
    illegal argument error.
    Before looking too deeply into the error, I figured I would try v1.6 and
    found that both the scripts were able to complete successfully. The
    resulting atn file has a couple of bugs in it (such as "Set current layer"
    having a knockout setting of  which causes the action to crash),
    but nothing that I can't just copy back from my original script.
    Thanks HEAPS for your assistance and for the awesome scripts in the first
    place! Extremely greatly appreciated!

  • Syntax Error with Table Parameter (type: ANY) when Creating Function Module

    Hello experts,
    I want to create a function module with a table parameter and table type is ANY. But when I check (Ctrl+F7) this function module, syntax error occurs - "In this statement, the internal table "MSG_TABLE_ITEM" must have the type "STANDARD TABLE"."
    Could anyone tell me what the wrong is? And how can I fix it?
    Thanks,
    Shelwin

    Hi,
    For table parameters, you can only pass
    MSG_TABLE_ITM   TYPE STANDARD TABLE
    or
    MSG_TABLE_ITM  ( don't fill other columns TYPING ASSOCIATED TYPE  ).
    For reference check FM 'GUI_UPLOAD' - Table parameters
    Regards,
    DPM

  • CRM 2013 error when adding a new appointment in Outlook.

    When added
    NEW DEADLINE The outlook on the calendar, I received an
    error in CRM.
    /////ERROR//////////////////////////////////////////////////////////////////////////////////////////
    [2015-03-05 09:20:34.403] Process: w3wp |Organization:b5eb04f5-c174-e411-8f8d-0019990163cf |Thread:   28 |Category: Exception |User: 04b7d2dc-0428-e211-8585-000c29667e7c |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | CrmException..ctor 
    ilOffset = 0x7
     at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException)  ilOffset = 0x7
     at CrmException..ctor(String message, Int32 errorCode)  ilOffset = 0x5
     at SecurityLibrary.RetrievePrivilegeForUser(IUser user, Guid privilege, ExecutionContext context)  ilOffset = 0x14B
     at SecurityLibrary.TryCheckPrivilege(Guid user, Guid privilege, ExecutionContext context)  ilOffset = 0x3D
     at SecurityLibrary.TryCheckPrivilege(SecurityPrincipal principal, Guid privilege, ExecutionContext context)  ilOffset = 0x42
     at SecurityLibrary.CheckPrivilege(SecurityPrincipal principal, Guid privilege, ExecutionContext context)  ilOffset = 0x0
     at AddressManager.GetOwnerCandidate(AddressEntry addressEntry)  ilOffset = 0x50
     at AddressResolver.BuildResolvedAddressEntry(AddressCategory category, BusinessEntity businessEntity, Guid& objectId, Boolean active, String emailAddressMatched)  ilOffset = 0x58
     at AddressResolver.GetPrunedList(BusinessEntityCollection responseCollection, AddressCategory category, Hashtable removeDuplicateFilter)  ilOffset = 0x6B
     at AddressResolver.DoResolve(AddressEntry[] addressEntriesToResolve, Int32[] objectTypes, Boolean matchPartialEmailAddresses)  ilOffset = 0x70
     at AddressManager.ResolveEmailAddressInternalHelper(String emailAddresses, Int32[] objectTypeCodes)  ilOffset = 0x1F
     at CommunicationActivityServiceBase.ResolveUnresolvedParties(BusinessEntityCollection parties, Int32[] objectTypes, ExecutionContext context)  ilOffset = 0x5C
     at AppointmentService.Book(BusinessEntity entity, ExecutionContext context)  ilOffset = 0x3D
     at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)  ilOffset = 0xFFFFFFFF
     at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)  ilOffset = 0x25
     at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)  ilOffset = 0xCF
     at LogicalMethodInfo.Invoke(Object target, Object[] values)  ilOffset = 0x4F
     at InternalOperationPlugin.Execute(IServiceProvider serviceProvider)  ilOffset = 0x57
     at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)  ilOffset = 0x200
     at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)  ilOffset = 0x65
     at Pipeline.Execute(PipelineExecutionContext context)  ilOffset = 0x6C
     at MessageProcessor.Execute(PipelineExecutionContext context)  ilOffset = 0x1C5
     at InternalMessageDispatcher.Execute(PipelineExecutionContext context)  ilOffset = 0xE4
     at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode,
    ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)  ilOffset = 0x16E
     at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean
    returnResponse, Boolean checkAdminMode)  ilOffset = 0x1F1
     at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)  ilOffset = 0x2D
     at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)  ilOffset = 0x26
     at OrganizationSdkService.Execute(OrganizationRequest request)  ilOffset = 0xD
     at   ilOffset = 0xFFFFFFFF
     at SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)  ilOffset = 0x241
     at DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)  ilOffset = 0x100
     at ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)  ilOffset = 0x48
     at MessageRpc.Process(Boolean isOperationContextSet)  ilOffset = 0x62
     at Wrapper.Resume(Boolean& alreadyResumedNoLock)  ilOffset = 0x1B
     at ThreadBehavior.SynchronizationContextStartCallback(Object state)  ilOffset = 0x0
     at ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x70
     at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x4
     at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()  ilOffset = 0x0
     at ThreadPoolWorkQueue.Dispatch()  ilOffset = 0xA3
    >Crm Exception: Message: SecLib::RetrievePrivilegeForUser failed - no roles are assigned to user. Returned hr = -2147209463, User: ed2ef8c8-69db-e311-9816-0019990163cf, ErrorCode: -2147209463
    [2015-03-05 09:20:34.572] Process: w3wp |Organization:b5eb04f5-c174-e411-8f8d-0019990163cf |Thread:   28 |Category: Platform.Sdk |User: 04b7d2dc-0428-e211-8585-000c29667e7c |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | VersionedPluginProxyStepBase.Execute 
    ilOffset = 0x65
    >Web Service Plug-in failed in SdkMessageProcessingStepId: {E4C9BB1B-EA3E-DB11-86A7-000A3A5473E8}; EntityName: appointment; Stage: 30; MessageName: Book; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=6.0.0.0,
    Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
       at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
       at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
       at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    Inner Exception: System.Globalization.CultureNotFoundException: Culture is not supported.
    Parameter name: culture
    0 (0x0000) is an invalid culture identifier.
       at System.Globalization.CultureInfo.InitializeFromCultureId(Int32 culture, Boolean useUserOverride)
       at System.Globalization.CultureInfo..ctor(Int32 culture)
       at Microsoft.Crm.Common.BusinessEntities.AppointmentConflictNotificationGenerator.AddNotifications(NotificationAdder notifications, ErrorInfo[] errorInfoArray, CrmResourceManager crmResourceManager, IOrganizationContext context)
       at Microsoft.Crm.Common.ObjectModel.AppointmentService.Book(BusinessEntity entity, ExecutionContext context)
    [2015-03-05 09:20:34.579] Process: w3wp |Organization:b5eb04f5-c174-e411-8f8d-0019990163cf |Thread:   28 |Category: Exception |User: 04b7d2dc-0428-e211-8585-000c29667e7c |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | CrmException..ctor 
    ilOffset = 0x7
     at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException)  ilOffset = 0x7
     at CrmException..ctor(Exception innerException, Int32 errorCode, Object[] arguments)  ilOffset = 0xB
     at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)  ilOffset = 0x65
     at Pipeline.Execute(PipelineExecutionContext context)  ilOffset = 0x6C
     at MessageProcessor.Execute(PipelineExecutionContext context)  ilOffset = 0x1C5
     at InternalMessageDispatcher.Execute(PipelineExecutionContext context)  ilOffset = 0xE4
     at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode,
    ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)  ilOffset = 0x16E
     at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean
    returnResponse, Boolean checkAdminMode)  ilOffset = 0x1F1
     at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)  ilOffset = 0x2D
     at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)  ilOffset = 0x26
     at OrganizationSdkService.Execute(OrganizationRequest request)  ilOffset = 0xD
     at   ilOffset = 0xFFFFFFFF
     at SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)  ilOffset = 0x241
     at DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)  ilOffset = 0x100
     at ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)  ilOffset = 0x48
     at MessageRpc.Process(Boolean isOperationContextSet)  ilOffset = 0x62
     at Wrapper.Resume(Boolean& alreadyResumedNoLock)  ilOffset = 0x1B
     at ThreadBehavior.SynchronizationContextStartCallback(Object state)  ilOffset = 0x0
     at ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x70
     at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x4
     at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()  ilOffset = 0x0
     at ThreadPoolWorkQueue.Dispatch()  ilOffset = 0xA3
    >Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970, InnerException: System.Globalization.CultureNotFoundException: Culture is not supported.
    Parameter name: culture
    0 (0x0000) is an invalid culture identifier.
       at System.Globalization.CultureInfo.InitializeFromCultureId(Int32 culture, Boolean useUserOverride)
       at System.Globalization.CultureInfo..ctor(Int32 culture)
       at Microsoft.Crm.Common.BusinessEntities.AppointmentConflictNotificationGenerator.AddNotifications(NotificationAdder notifications, ErrorInfo[] errorInfoArray, CrmResourceManager crmResourceManager, IOrganizationContext context)
       at Microsoft.Crm.Common.ObjectModel.AppointmentService.Book(BusinessEntity entity, ExecutionContext context)
    [2015-03-05 09:20:34.580] Process: w3wp |Organization:b5eb04f5-c174-e411-8f8d-0019990163cf |Thread:   28 |Category: Platform |User: 04b7d2dc-0428-e211-8585-000c29667e7c |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | MessageProcessor.Execute 
    ilOffset = 0x1C5
    >MessageProcessor fail to process message 'Book' for 'appointment'.
    [2015-03-05 09:20:34.581] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   28 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | ExceptionConverter.ConvertToFault 
    ilOffset = 0x69
    >UNEXPECTED: no fault?
    [2015-03-05 09:20:34.582] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   28 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | ExceptionConverter.ConvertMessageAndErrorCode 
    ilOffset = 0x23B
    >System.Globalization.CultureNotFoundException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #895E889A: System.Globalization.CultureNotFoundException: Culture is not supported.
    >Parameter name: culture
    >0 (0x0000) is an invalid culture identifier.
    >   at System.Globalization.CultureInfo.InitializeFromCultureId(Int32 culture, Boolean useUserOverride)
    >   at System.Globalization.CultureInfo..ctor(Int32 culture)
    >   at Microsoft.Crm.Common.BusinessEntities.AppointmentConflictNotificationGenerator.AddNotifications(NotificationAdder notifications, ErrorInfo[] errorInfoArray, CrmResourceManager crmResourceManager, IOrganizationContext context)
    >   at Microsoft.Crm.Common.ObjectModel.AppointmentService.Book(BusinessEntity entity, ExecutionContext context)
    /////END  ERROR//////////////////////////////////////////////////////////////////////////////////////////
    And then the
    date of the duplicates in the calendar
    in Outlook and CRM.
    My version CRM 2013 -
    6.1.2.112
    Crm2013wasthemigratedfromthe
    2011 version.  
    Does anyone have any idea how to
    solve it.

    I checked it, these errors
    occur on all users. Below
    the main errors that occur.
    Crm Exception: Message: SecLib::RetrievePrivilegeForUser failed - no roles are assigned to user. Returned hr = -2147209463, User: ed2ef8c8-69db-e311-9816-0019990163cf, ErrorCode: -2147209463
    Web Service Plug-in failed in SdkMessageProcessingStepId: {E4C9BB1B-EA3E-DB11-86A7-000A3A5473E8}; EntityName: appointment; Stage: 30; MessageName: Book; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=6.0.0.0,
    Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
    Inner Exception: System.Globalization.CultureNotFoundException: Culture is not supported.
    Parameter name: culture
    0 (0x0000) is an invalid culture identifier.
    Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970, InnerException: System.Globalization.CultureNotFoundException: Culture is not supported.
    Parameter name: culture
    0 (0x0000) is an invalid culture identifier.
    MessageProcessor fail to process message 'Book' for 'appointment'.
    System.Globalization.CultureNotFoundException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #895E889A: System.Globalization.CultureNotFoundException: Culture is not supported.
    >Parameter name: culture
    >0 (0x0000) is an invalid culture identifier.

  • TableSorter errors when adding new data

    so here is the deal:
    I am using the TableSorter.java helper class with DefaultTableModel
    from: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    It works great when the data is static and I get it for the first time. however, occationally, when adding new data I get a NullPointerException error.
    in use:
    DefaultTableModel.addRow()
    DefaultTableModel.removeRow() and
    DefaultTableModel.insertRow() methods.
    Error:
    java.lang.ArrayIndexOutOfBoundsException: 5
         at com.shared.model.TableSorter.modelIndex(TableSorter.java:294)
         at com.shared.model.TableSorter.getValueAt(TableSorter.java:340)
         at javax.swing.JTable.getValueAt(Unknown Source)
         at javax.swing.JTable.prepareRenderer(Unknown Source)...
    code problem I:
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        }code problem II:
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        }TableSroter class:
    package com.shared.model;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.List;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    * TableSorter is a decorator for TableModels; adding sorting
    * functionality to a supplied TableModel. TableSorter does
    * not store or copy the data in its TableModel; instead it maintains
    * a map from the row indexes of the view to the row indexes of the
    * model. As requests are made of the sorter (like getValueAt(row, col))
    * they are passed to the underlying model after the row numbers
    * have been translated via the internal mapping array. This way,
    * the TableSorter appears to hold another copy of the table
    * with the rows in a different order.
    * <p/>
    * TableSorter registers itself as a listener to the underlying model,
    * just as the JTable itself would. Events recieved from the model
    * are examined, sometimes manipulated (typically widened), and then
    * passed on to the TableSorter's listeners (typically the JTable).
    * If a change to the model has invalidated the order of TableSorter's
    * rows, a note of this is made and the sorter will resort the
    * rows the next time a value is requested.
    * <p/>
    * When the tableHeader property is set, either by using the
    * setTableHeader() method or the two argument constructor, the
    * table header may be used as a complete UI for TableSorter.
    * The default renderer of the tableHeader is decorated with a renderer
    * that indicates the sorting status of each column. In addition,
    * a mouse listener is installed with the following behavior:
    * <ul>
    * <li>
    * Mouse-click: Clears the sorting status of all other columns
    * and advances the sorting status of that column through three
    * values: {NOT_SORTED, ASCENDING, DESCENDING} (then back to
    * NOT_SORTED again).
    * <li>
    * SHIFT-mouse-click: Clears the sorting status of all other columns
    * and cycles the sorting status of the column through the same
    * three values, in the opposite order: {NOT_SORTED, DESCENDING, ASCENDING}.
    * <li>
    * CONTROL-mouse-click and CONTROL-SHIFT-mouse-click: as above except
    * that the changes to the column do not cancel the statuses of columns
    * that are already sorting - giving a way to initiate a compound
    * sort.
    * </ul>
    * <p/>
    * This is a long overdue rewrite of a class of the same name that
    * first appeared in the swing table demos in 1997.
    * @author Philip Milne
    * @author Brendon McLean
    * @author Dan van Enckevort
    * @author Parwinder Sekhon
    * @version 2.0 02/27/04
    public class TableSorter extends AbstractTableModel
        protected TableModel tableModel;
        public static final int DESCENDING = -1;
        public static final int NOT_SORTED = 0;
        public static final int ASCENDING = 1;
        private static Directive EMPTY_DIRECTIVE = new Directive(-1, NOT_SORTED);
        public static final Comparator COMPARABLE_COMAPRATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return ((Comparable) o1).compareTo(o2);
        public static final Comparator LEXICAL_COMPARATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return o1.toString().compareTo(o2.toString());
        private Row[] viewToModel;
        private int[] modelToView;
        private JTableHeader tableHeader;
        private MouseListener mouseListener;
        private TableModelListener tableModelListener;
        private Map columnComparators = new HashMap();
        private List sortingColumns = new ArrayList();
        public TableSorter()
            this.mouseListener = new MouseHandler();
            this.tableModelListener = new TableModelHandler();
        public TableSorter(TableModel tableModel)
            this();
            setTableModel(tableModel);
        public TableSorter(TableModel tableModel, JTableHeader tableHeader)
            this();
            setTableHeader(tableHeader);
            setTableModel(tableModel);
        private void clearSortingState()
            viewToModel = null;
            modelToView = null;
        public TableModel getTableModel()
            return tableModel;
        public void setTableModel(TableModel tableModel)
            if (this.tableModel != null)
                this.tableModel.removeTableModelListener(tableModelListener);
            this.tableModel = tableModel;
            if (this.tableModel != null)
                this.tableModel.addTableModelListener(tableModelListener);
            clearSortingState();
            fireTableStructureChanged();
        public JTableHeader getTableHeader()
            return tableHeader;
        public void setTableHeader(JTableHeader tableHeader)
            if (this.tableHeader != null)
                this.tableHeader.removeMouseListener(mouseListener);
                TableCellRenderer defaultRenderer = this.tableHeader.getDefaultRenderer();
                if (defaultRenderer instanceof SortableHeaderRenderer)
                    this.tableHeader.setDefaultRenderer(((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
            this.tableHeader = tableHeader;
            if (this.tableHeader != null)
                this.tableHeader.addMouseListener(mouseListener);
                this.tableHeader.setDefaultRenderer
                        new SortableHeaderRenderer(this.tableHeader.getDefaultRenderer())
        public boolean isSorting()
            return sortingColumns.size() != 0;
        private Directive getDirective(int column)
            for (int i = 0; i < sortingColumns.size(); i++)
                Directive directive = (Directive)sortingColumns.get(i);
                if (directive.column == column)
                    return directive;
            return EMPTY_DIRECTIVE;
        public int getSortingStatus(int column)
            return getDirective(column).direction;
        private void sortingStatusChanged()
            clearSortingState();
            fireTableDataChanged();
            if (tableHeader != null)
                tableHeader.repaint();
        public void setSortingStatus(int column, int status)
            Directive directive = getDirective(column);
            if (directive != EMPTY_DIRECTIVE)
                sortingColumns.remove(directive);
            if (status != NOT_SORTED)
                sortingColumns.add(new Directive(column, status));
            sortingStatusChanged();
        protected Icon getHeaderRendererIcon(int column, int size)
            Directive directive = getDirective(column);
            if (directive == EMPTY_DIRECTIVE)
                return null;
            return new Arrow(directive.direction == DESCENDING, size, sortingColumns.indexOf(directive));
        private void cancelSorting()
            sortingColumns.clear();
            sortingStatusChanged();
        public void setColumnComparator(Class type, Comparator comparator)
            if (comparator == null)
                columnComparators.remove(type);
            else
                columnComparators.put(type, comparator);
        protected Comparator getComparator(int column)
            Class columnType = tableModel.getColumnClass(column);
            Comparator comparator = (Comparator) columnComparators.get(columnType);
            if (comparator != null)
                return comparator;
            if (Comparable.class.isAssignableFrom(columnType))
                return COMPARABLE_COMAPRATOR;
            return LEXICAL_COMPARATOR;
        private Row[] getViewToModel()
            if (viewToModel == null)
                int tableModelRowCount = tableModel.getRowCount();
                viewToModel = new Row[tableModelRowCount];
                for (int row = 0; row < tableModelRowCount; row++)
                    viewToModel[row] = new Row(row);
                if (isSorting())
                    Arrays.sort(viewToModel);
            return viewToModel;
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        private int[] getModelToView()
            if (modelToView == null)
                int n = getViewToModel().length;
                modelToView = new int[n];
                for (int i = 0; i < n; i++)
                    modelToView[modelIndex(i)] = i;
            return modelToView;
        // TableModel interface methods
        public int getRowCount()
            return (tableModel == null) ? 0 : tableModel.getRowCount();
        public int getColumnCount()
            return (tableModel == null) ? 0 : tableModel.getColumnCount();
        public String getColumnName(int column)
            return tableModel.getColumnName(column);
        public Class getColumnClass(int column)
            return tableModel.getColumnClass(column);
        public boolean isCellEditable(int row, int column)
            return tableModel.isCellEditable(modelIndex(row), column);
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        public void setValueAt(Object aValue, int row, int column)
            tableModel.setValueAt(aValue, modelIndex(row), column);
        // Helper classes
        private class Row implements Comparable
            private int modelIndex;
            public Row(int index)
                this.modelIndex = index;
            public int compareTo(Object o)
                int row1 = modelIndex;
                int row2 = ((Row) o).modelIndex;
                for (Iterator it = sortingColumns.iterator(); it.hasNext();)
                    Directive directive = (Directive) it.next();
                    int column = directive.column;
                    Object o1 = tableModel.getValueAt(row1, column);
                    Object o2 = tableModel.getValueAt(row2, column);
                    int comparison = 0;
                    // Define null less than everything, except null.
                    if (o1 == null && o2 == null)
                        comparison = 0;
                    } else if (o1 == null)
                        comparison = -1;
                    } else if (o2 == null)
                        comparison = 1;
                    } else {
                        comparison = getComparator(column).compare(o1, o2);
                    if (comparison != 0)
                        return directive.direction == DESCENDING ? -comparison : comparison;
                return 0;
        private class TableModelHandler implements TableModelListener
            public void tableChanged(TableModelEvent e)
                // If we're not sorting by anything, just pass the event along.            
                if (!isSorting())
                    clearSortingState();
                    fireTableChanged(e);
                    return;
                // If the table structure has changed, cancel the sorting; the            
                // sorting columns may have been either moved or deleted from            
                // the model.
                if (e.getFirstRow() == TableModelEvent.HEADER_ROW)
                    cancelSorting();
                    fireTableChanged(e);
                    return;
                // We can map a cell event through to the view without widening            
                // when the following conditions apply:
                // a) all the changes are on one row (e.getFirstRow() == e.getLastRow()) and,
                // b) all the changes are in one column (column != TableModelEvent.ALL_COLUMNS) and,
                // c) we are not sorting on that column (getSortingStatus(column) == NOT_SORTED) and,
                // d) a reverse lookup will not trigger a sort (modelToView != null)
                // Note: INSERT and DELETE events fail this test as they have column == ALL_COLUMNS.
                // The last check, for (modelToView != null) is to see if modelToView
                // is already allocated. If we don't do this check; sorting can become
                // a performance bottleneck for applications where cells 
                // change rapidly in different parts of the table. If cells
                // change alternately in the sorting column and then outside of            
                // it this class can end up re-sorting on alternate cell updates -
                // which can be a performance problem for large tables. The last
                // clause avoids this problem.
                int column = e.getColumn();
                if (e.getFirstRow() == e.getLastRow()
                        && column != TableModelEvent.ALL_COLUMNS
                        && getSortingStatus(column) == NOT_SORTED
                        && modelToView != null)
                    int viewIndex = getModelToView()[e.getFirstRow()];
                    fireTableChanged(new TableModelEvent(TableSorter.this,
                                                         viewIndex, viewIndex,
                                                         column, e.getType()));
                    return;
                // Something has happened to the data that may have invalidated the row order.
                clearSortingState();
                fireTableDataChanged();
                return;
        private class MouseHandler extends MouseAdapter
            public void mouseClicked(MouseEvent e)
                JTableHeader h = (JTableHeader) e.getSource();
                TableColumnModel columnModel = h.getColumnModel();
                int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                int column = columnModel.getColumn(viewColumn).getModelIndex();
                if (column != -1)
                    int status = getSortingStatus(column);
                    if (!e.isControlDown())
                        cancelSorting();
                    // Cycle the sorting states through {NOT_SORTED, ASCENDING, DESCENDING} or
                    // {NOT_SORTED, DESCENDING, ASCENDING} depending on whether shift is pressed.
                    status = status + (e.isShiftDown() ? -1 : 1);
                    status = (status + 4) % 3 - 1; // signed mod, returning {-1, 0, 1}
                    setSortingStatus(column, status);
        private static class Arrow implements Icon
            private boolean descending;
            private int size;
            private int priority;
            public Arrow(boolean descending, int size, int priority)
                this.descending = descending;
                this.size = size;
                this.priority = priority;
            public void paintIcon(Component c, Graphics g, int x, int y)
                Color color = c == null ? Color.GRAY : c.getBackground();            
                // In a compound sort, make each succesive triangle 20%
                // smaller than the previous one.
                int dx = (int)(size/2*Math.pow(0.8, priority));
                int dy = descending ? dx : -dx;
                // Align icon (roughly) with font baseline.
                y = y + 5*size/6 + (descending ? -dy : 0);
                int shift = descending ? 1 : -1;
                g.translate(x, y);
                // Right diagonal.
                g.setColor(color.darker());
                g.drawLine(dx / 2, dy, 0, 0);
                g.drawLine(dx / 2, dy + shift, 0, shift);
                // Left diagonal.
                g.setColor(color.brighter());
                g.drawLine(dx / 2, dy, dx, 0);
                g.drawLine(dx / 2, dy + shift, dx, shift);
                // Horizontal line.
                if (descending) {
                    g.setColor(color.darker().darker());
                } else {
                    g.setColor(color.brighter().brighter());
                g.drawLine(dx, 0, 0, 0);
                g.setColor(color);
                g.translate(-x, -y);
            public int getIconWidth()
                return size;
            public int getIconHeight()
                return size;
        private class SortableHeaderRenderer implements TableCellRenderer
            private TableCellRenderer tableCellRenderer;
            public SortableHeaderRenderer(TableCellRenderer tableCellRenderer)
                this.tableCellRenderer = tableCellRenderer;
            public Component getTableCellRendererComponent(JTable table,
                                                           Object value,
                                                           boolean isSelected,
                                                           boolean hasFocus,
                                                           int row,
                                                           int column)
                Component c = tableCellRenderer.getTableCellRendererComponent(table,
                        value, isSelected, hasFocus, row, column);
                if (c instanceof JLabel) {
                    JLabel l = (JLabel) c;
                    l.setHorizontalTextPosition(JLabel.LEFT);
                    int modelColumn = table.convertColumnIndexToModel(column);
                    l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
                return c;
        private static class Directive
            private int column;
            private int direction;
            public Directive(int column, int direction)
                this.column = column;
                this.direction = direction;
    }any input will be appreciated.
    thanks
    Peter

    The code you posted doesn't help us at all. Its just a duplicate of the code from the tutorial. The custom code is what you have written. For example do you update the TableModel from the Event Thread? Do you update the SortModel or the DefaultTableModel? If you actually provide your test code and somebody has already downloaded the sort classes, then maybe they will test your code against the classes. But I doubt if people will download the sort classes and create a test program just to see if they can duplicate your results (at least I know I'm not about to).

  • TableAdapter Configuration Wizard gives error when adding new TableAdapter

    Hi,
    I recently downloaded and installed the ODT for visual studio on my computer. I am running VS2008 on Windows 7 64-bit. I am able to create an ODP.NET connection to the Oracle XE 10.2g instance that is running on my computer with no problems and use that connection to browse the database. When I add a DataSet to my project, and start adding TableAdapters to the DataSet, I am getting errors. In an attempt to figure out what the problem is, I have followed various scenarios. I will describe each scenario, and what the end result is, and then after I have described them all, I will explain what I think the problem might be. Here are the different scenarios I have used:
    Scenario 1:
    From the Server Explorer, highlight ALL of the tables in my schema and drag them to the designer (all table adapters are added with no issues). I can add additional queries to each of the TableAdapters and then change the additional queries by right clicking and choosing "Configure". This all works with no issues. However, on certain TableAdapters, if I try to modify the primary query (Fill,GetData()), I can open the query editor just fine, change various settings, etc, but when I click on "Finish" I get the following error:
    Configure TableAdapter TABLENAME failed.
    Index was outside the bounds of the array.
    Scenario 2:
    From the Server Explorer, drag tables from my schema onto the designer one at a time. Some tables get added just fine, but for the rest of them, I get the following error:
    Failed to merge object(s).
    Index was outside the bounds of the array.
    Scenario 3:
    On the Dataset Designer, add tables one at a time by right clicking and choosing "Add -> TableAdapter" and then using SQL to define the query for each table. Some tables get added just fine, but for the rest of them, I get the following error:
    Failed to add TableAdapter.
    Index was outside the bounds of the array.
    Ok... now that I have described all of the different scenarios, I will explain what I think the problem is, and why. Based on my research, I believe the underlying problem has to do with Foreign Key Constraints on the various tables. While working on Scenarios 2 & 3, the same exact tables worked just fine in both scenarios. When I started looking at the definitions for the tables in my schema, it turns out that all of the tables that failed had foreign key constraints defined. When I remove the FK constraints from a table, I am then able to add it to my dataset and change the default query with no problems. My original application used the System.Data.OracleClient provided by Microsoft. When adding my tableadapters using the microsoft data provider, the FK relations are automatically generated for me in the designer, but not with the Oracle Data Provider
    I would be happy to provide you with the DDL that I used for creating my schema (it is not very big) if needed.
    Thanks,
    Jim

    Sorry let me clarify some of the config a little more.
    MAIL101 - Exch 2013
    MAIL102 - Exch 2013
    AP104 - Witness (strictly a witness nothing else on this machine)
    EDGE01 - Exch 2007 Edge
    CAS01 - Exch 2007 Hub/CAS load balancer for CAS02/03
    CAS02 - Exch 2007 Hub/CAS
    CAS03 - Exch 2007 Hub/CAS
    MBOX01 - Exch 2007 Mail cluster
    MBOX02 - Exch 2007 Mail cluster node
    MBOX03 - Exch 2007 Mail cluster node
    RDC01, RDC02, RDC03 - all 2008 R2 root domain controllers for rootdomain.rootdomain
    DC01, DC02, DC03, DC04 - all 2008 R2 domain controllers for us.rootdomain.rootdomain
    All DCs are Global Catalogs.
    I can ping all DCs and root DCs fromboth MAIL101 and 102
    The Exchange Replication service is running on both MAIL101 and 102.
    DC03 is in the same site as the MAIL101/102 servers so I'll run all replication tests from here.
    DCDIAG comes back with all tests passed.
    repadmin /replsum comes back with 0 fails and no errors largest delta for any intersite communication is 13min.
    When I run Test-ReplicationHealth -Identity MAIL101 and also 102 they both come back as everything passed.  No errors.

  • Syntax error when executing a process chain.

    Hi gurus,
    This is a weird problem that we have been facing since yesterday. In the transaction RSPC, we had created a process chain in Feb 09. It ran smoothly till yesterday. However when I try to schedule the process chain now, it gives me a dump stating  Syntax error in program "CL_RSDMD_IOBJ_U_TPL===========CP ".
    This same dump is generated whenever I try to display variant of one of the nodes of Process Chain.
    I tried checking the corresponding programs but in vain. I have no Idea why am I receiving the error.
    If anyone has faced this problem please post the same.
    The following is brief overview of the dump.
    Information on where terminated Termination occurred in the ABAP program
    "CL_RSBK_DTP_DATABASE==========CP" - in "COPY_FROM_DB". The main program was
    "RSPC_MAINTAIN ". 
    In the source code you have the termination point in line 166
    of the (Include) program "CL_RSBK_DTP_DATABASE==========CM003".
    Any help would be appreciated.
    Regards,
    Sree.

    Hi Rayapa,
    There is no Long text as such, however, there is a short text which I have mentioned in my question itself.
    And there is a What Happened
    which is as follows
    Error in the ABAP Application Program
    The current ABAP program "CL_RSBK_DTP_DATABASE==========CP" had to be
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    The following syntax error occurred in program
    "CL_RSDMD_IOBJ_U_TPL===========CP " in include
    "CL_RSDMD_IOBJ_U_TPL===========CM00E " in
    line 4:
    "Field "P_BOOKMODE" is unknown. It is neither in one of the specified t"
    "ables nor defined by a "DATA" statement. "DATA" statement."
    The include has been created and last changed by:
    Created by: "SAP"
    Last changed by: "<My SAP user>"
    Error in the ABAP Application Program
    The current ABAP program "CL_RSBK_DTP_DATABASE==========CP" had to be
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    thnkz n regards,
    Sree.
    Edited by: Sree Nair on Apr 3, 2009 12:10 PM

Maybe you are looking for

  • Please help. My audiobooks have disappeared from my itunes library and there is no option to redownload them.

    I went to listen to one of my audiobooks on a run to see that they have all disappeared. I checked to see if they were in the cloud and could be redownloaded, but they can't. My account history clearly shows the purchase but that's it. Does anyone ha

  • Taken Aback- touchscreen issue

    I have enjoyed and supported this company's products and services for some time. So, today when I inquired with tech support about my touchscreen issue (non working band of the screen ..the 456 area on the dialpad)...I was taken aback at the very lea

  • Go url in obiee 11.1.6.0

    Hi All, I am trying to use the following go url in obiee 11.1.6.0 for drill down report.Someone it is able to pass only one parameter till P3. The P4 value shows till Rev. I tried to switch the value in the parameter it only pass one parameter either

  • Software restriction policy not working correctly

    Ladies and Gents, we run a windows server 2008r2 environment. we have a software restriction policy in place for quite some time now and it's been working fine until about a week ago. here's how we have it setup: Enforce = All Software files except l

  • General question for LabVIEW+iMAQ application productivity

    We have received new biotech robotic system with LabVIEW control software. One of the software task is image recognition (robotic vision system). During images processing tasks memory is not used hard, but the CPU is always at 100 % utilization. Now