State Code Mapping in SM30 (J_1ISTATECD)
What is the requirement of maintaining the "J_1ISTATECD" table in SM30 while doing configuraions of EWT (TDS).
Moreover, when I entering "J_1ISTATECD" in SM30, It gives me the following error:
"The maintenance dialog for J_1ISTATECD is incomplete or not defined"
Pls guide me in this regard.
hi
check the whether the table J_1ISTATECD - delivery/maintenance tab shows C - Customizing table, maintenance only by cust., not SAP import
check this sap note
Note 968208 - Creating tables J_1IRSNCODEM,J_1ISTATECD and J_1ISTATECDM.
Edited by: AP on Apr 8, 2009 11:51 AM
Similar Messages
-
Values not showing up for 3 digit zip code maps of states
I've been tinkering with an app that displays the US, with a query that shows how many folks we have in each state. The link takes you to a page that displays the state/zip code style map. On the map of the US, I can see the label and the value from the query for all states. But in the state map, all that shows up are the labels. I have the map set to show values, but they won't display.
I'm using APEX 4.0.1 in a 10.2.0.4 database running on Windows.
Any thoughts?Hi mjblake,
The Map Region columns (i.e. REGION_NAME, REGION_ID, etc) can vary for each Map source .amap file. So it's definitely worth referencing the AnyChart Map Reference Information when you're adding your map series query, to ensure that your query is referencing data that's actually contained in your chosen .amap file.
By default, the wizard will set the "Map Region Column" to REGION_NAME, as this the default AnyChart column. However, some maps, like the US State Zipcode maps, don't actually have a REGION_NAME column in their data, which is why you would need to update the "Map Region Column" on the Map Attributes page to your chosen column e.g. REGION_ID. In the case of the US State Zipcode maps, the available columns are REGION_ID, CENTROID_X and CENTROID_Y, as shown in this example: http://anychart.com/products/anychart/docs/users-guide/map_reference/United-States-of-America-3-digit-ZIP-Code-Maps-for-All-50-States-Alabama-Flash-Map.html?fromtree. You may not be aware of this, but when stepping through the Create Map wizard, on the 'Query' page, there's a Show/Hide region called "Map Region Information", which displays the AnyChart information associated with your selected map.
Regards,
Hilary -
Hi,
Would like to know how tax code mapping can be set with respect to the below three cases:
Case 1:Creating a PO release order manually based from the contract. I have a contract with a tax code A0 ( correct one) which is the one which I need in my PO. There is no PREQ. Tax code 30 is maintained both in Vendor master and in the info record. I create a PO ( release order) based on the contract. But the tax code available in the PO is 30. What changes should I make so that the PO always picks up the tax code from the contract and not the one from vendor master or the PIR? Any customizations or only program change?
Case 2: Automatic PO creation from a PR with a contract link. There is a contract with tax code A0. PREQ has been created by MRP. Source of supply( Fixed vendor) and contract/line is displayed in the PREQ. Now PO created by PO-PREQ auto conversion. Tax code available in the PO is 30 instead of A0. The PIR in the PO has the tax code 30. How do we ensure in this case that only tax code( A0) in the contract should only defaulted to PO and not the tax code 30.
Case 3: Automatic PO creation from a PR without contract link: There is a contract with tax code A0. PREQ has been created by MRP. Source of supply( Fixed vendor) and contract/line not displayed in the PREQ. Now PO created by PO-PREQ auto conversion. Tax code available in the PO is 30 instead of A0. The PIR in the PO has the tax code 30. How do we ensure in this case that tax code( A0) in the contract should only defaulted to PO and not the tax code 30.
ThanksThe only expense available to set is Freight which is set correctly to Shipping. We are not using the Webtools interface so no way to look at the Tax. In the Sync Manager it is set to a Default of exempt. We need to pass CA for any California orders and set this in the BP record so the tax is calculated. For shipping we have tried passing the shipping type number with no luck.
Thanks for the feedback. -
Hi Everyone
We have a vendor located in Bermuda and has no state code. This state code is not set-up as required field for vendor master but we need to have this information for our check processing file sent to the bank for payments. Can someone please guide me as to how should I add this missing information to the vendor master so that the file gets processed?
I appreciate your help.Hi
I checked in the country settings and Bermuda is there. But when I go to insert region and to New entries, I can insert the country BM but there is no region code for Bermuda. The state code HM TX is not working here as it only allows for 2 alphabets. May be we can ask the bank itself what shall be the input here as Region for the check to reach safely. Please advise.
I appreciate your help. -
Location of State code in SAP B1
Hi
where is the location of state code in SAP B1 so that i can fill the correct codes of the state coz iwant to import BP and error while importing i get is wrong state code.Administration -> System Initialization -> Company Details -> General Tab ->Local language
Click on the Dropdown box next to 'State'.
Scroll to the bottom and select 'Define New'
This will open the 'States - Setup' screen -
Revision: 3092
Author: [email protected]
Date: 2008-09-04 08:07:33 -0700 (Thu, 04 Sep 2008)
Log Message:
Removing 'RemoveItems' since it's currently not leveraged by States code-gen and nobody is using it as an override in other contexts.
QA: No
Modified Paths:
flex/sdk/trunk/frameworks/gumbo-manifest.xml
flex/sdk/trunk/frameworks/mxml-2009-manifest.xml
flex/sdk/trunk/frameworks/projects/flex4/manifest.xml
Removed Paths:
flex/sdk/trunk/frameworks/projects/flex4/src/flex/states/RemoveItems.asThanks for the reply, the more i think bout itt he more i dont doubt my overall design is bogus.
What i was attempting to do: is when the table model is called, i set some things like the column sizes (Which invokes some action listeners on a combo box for a column that i set).
This combo' boxes action listener checks to se what was selected, and sets up the other column to a combo box or a jtextfield depending upon what was created...
The more i think about it, (besides the obvious of making actionlisteners in the setcolumnsizes, i know thats bad design) the more i might not want to use action listeners at all for the left most column (which is always a jcombobox) but instead, just want override the getValueAt to check what the string value is of the cell for a particular row, and of course the left most column, then based on that i can set up the right column and row for the right celleditor (jcombo box, or jtxextfield) so i tink thats what i want to do, but currently my getValueAt I overroad was in the tablemodel i have...not in the table itself. since im new to swing im still figuring out whats called automatically and can be overridden easily/correctly....
ill check the forum post u linked, thanks. -
Bdoc state E08 , Mapping Error , BUS_TRANS_MSG
SAP CRM
trx:- SMW01
Bdoc Error
Bdoc State --> E08
Bdoc state Descriptin --> Mapping Error
Bdoc Type --> BUS_TRANS_MSG
How to resolve this errorHello Aup,
What is the BDoc Type you are talking about?
Click on Error/Receiver tab and check for the exact error message.
If you give me the details,I can help you solving this Mapping Error.
Thanks and Best Regards,
Shanthala Kudva. -
State code for Canadian Province Alberta
In the initial definition of SAP, the state code for canadian province Alberta is set to 'AL'. The proper code should be 'AB'
Hello,
Thank you for the input.
We will try to reflect this requirement in next version after v2007 which should enter ramp-up soon.
Regards,
Peter Dominik
B1 Solution Management -
State code or status code is invalid while deactivate the custom entity record
Hi,
We have migrated to CRM 2013 and facing one issue while deactivating the custom entity record
Error- State code or status code is invalid: State code is invalid or state code is valid but status code is invalid for specified state code
when downloading the log, it is giving below error.
<s:Envelope xmlns:s="<faultcode>s:Client</faultcode><faultstring">http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring
xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="en-US">-1 is not a valid state code on new_partner.</faultstring><detail><OrganizationServiceFault xmlns="<ErrorCode>-2147187704</ErrorCode><ErrorDetails">http://schemas.microsoft.com/xrm/2011/Contracts"><ErrorCode>-2147187704</ErrorCode><ErrorDetails
/><Message>-1 is not a valid state code on new_partner.</Message><Timestamp>2014-03-18T05:42:04.5523897Z</Timestamp><InnerFault><ErrorCode>-2147187704</ErrorCode><ErrorDetails /><Message>-1 is not a
valid state code on new_partner.</Message><Timestamp>2014-03-18T05:42:04.5523897Z</Timestamp><InnerFault><ErrorCode>-2147220970</ErrorCode><ErrorDetails /><Message>System.ArgumentException: -1 is not a valid
state code on new_partner.
Parameter name: stateCode</Message><Timestamp>2014-03-18T05:42:04.5523897Z</Timestamp><InnerFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:nil="true"
/><TraceText xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:nil="true" /></InnerFault><TraceText xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
i:nil="true" /></InnerFault><TraceText xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:nil="true" /></OrganizationServiceFault></detail></s:Fault></s:Body></s:Envelope>
I checked into system, we have not customized the status reason. We have only two option value "Active"(1) and Inactive(2).
Also we don't have any plugin on SetStateDynamicEntity, we have only one plugin on create for that entity.
Did anyone face this issue? any pointer why its giving this issue??
Thanks in Advance.
Arvind
Regards, Arvindposting the trace log here..
# ScaleGroup:
# ServerRole: AppServer, AsyncService, DiscoveryService, ApiServer, HelpServer, DeploymentService, SandboxServer, DeploymentManagementTools, VssWriter, EmailConnector
[2014-03-18 04:13:32.491] Process: w3wp |Organization:d133c867-097c-e011-a247-02bf9d3bc4f8 |Thread: 62 |Category: Exception |User: 7492ef42-9460-e311-940e-002dd80b0ca0 |Level: Error |ReqId: fdb76819-9781-4299-9e45-2b6f296f4fce | CrmException..ctor
ilOffset = 0x7
at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
at CrmException..ctor(String message, Exception innerException, Int32 errorCode) ilOffset = 0x5
at StatusCodeValidator.Validate(EntityMetadata entityMetadata, Int32 stateCode, Int32 statusCode) ilOffset = 0x54
at BusinessProcessObject.SetState(BusinessEntityMoniker moniker, Int32 newState, Int32 newStatusCode, BusinessEntity originalEntity, ExecutionContext context) ilOffset = 0x0
at BusinessProcessObject.SetState(BusinessEntityMoniker moniker, Int32 newState, Int32 newStatusCode, ExecutionContext context) ilOffset = 0x1A
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 = 0x89
at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
at InternalOperationPlugin.Execute(IServiceProvider serviceProvider) ilOffset = 0x57
at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) ilOffset = 0x58
at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
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, Boolean traceRequest, OrganizationContext
context, Boolean returnResponse) ilOffset = 0x16A
at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType) ilOffset = 0x3D
at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType) ilOffset = 0x24
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 ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) ilOffset = 0xC6
at MessageRpc.Process(Boolean isOperationContextSet) ilOffset = 0x62
at ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext) ilOffset = 0x256
at ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext) ilOffset = 0xF1
at ChannelHandler.AsyncMessagePump(IAsyncResult result) ilOffset = 0x39
at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) ilOffset = 0x0
at AsyncResult.Complete(Boolean completedSynchronously) ilOffset = 0xC2
at AsyncQueueReader.Set(Item item) ilOffset = 0x21
at InputQueue`1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread) ilOffset = 0xD6
at InputQueue`1.EnqueueAndDispatch(T item, Action dequeuedCallback, Boolean canDispatchOnThisThread) ilOffset = 0x0
at SingletonChannelAcceptor`3.Enqueue(QueueItemType item, Action dequeuedCallback, Boolean canDispatchOnThisThread) ilOffset = 0x3D
at EnqueueMessageAsyncResult.CompleteParseAndEnqueue(IAsyncResult result) ilOffset = 0x61
at EnqueueMessageAsyncResult.HandleParseIncomingMessage(IAsyncResult result) ilOffset = 0x13
at AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result) ilOffset = 0x52
at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) ilOffset = 0x0
at AsyncResult.Complete(Boolean completedSynchronously) ilOffset = 0xC2
at ParseMessageAsyncResult.OnRead(IAsyncResult result) ilOffset = 0x43
at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) 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 ReadWriteTask.System.Threading.Tasks.ITaskCompletionAction.Invoke(Task completingTask) ilOffset = 0x45
at Task.FinishContinuations() ilOffset = 0x67
at Task.Finish(Boolean bUserDelegateExecuted) ilOffset = 0x3C
at Task.ExecuteWithThreadLocal(Task& currentTaskSlot) ilOffset = 0xC4
at Task.ExecuteEntry(Boolean bPreventDoubleExecution) ilOffset = 0x96
at ThreadPoolWorkQueue.Dispatch() ilOffset = 0xA2
>Crm Exception: Message: -1 is not a valid state code on new_partner., ErrorCode: -2147187704, InnerException: System.ArgumentException: -1 is not a valid state code on new_partner.
Parameter name: stateCode
[2014-03-18 04:13:32.562] Process: w3wp |Organization:d133c867-097c-e011-a247-02bf9d3bc4f8 |Thread: 62 |Category: Platform.Sdk |User: 7492ef42-9460-e311-940e-002dd80b0ca0 |Level: Error |ReqId: fdb76819-9781-4299-9e45-2b6f296f4fce | VersionedPluginProxyStepBase.Execute
ilOffset = 0x65
>Web Service Plug-in failed in SdkMessageProcessingStepId: {1FE67FC9-85A6-E011-AEE1-002DD802FEB1}; EntityName: new_partner; Stage: 30; MessageName: SetStateDynamicEntity; 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: Microsoft.Crm.CrmArgumentException: -1 is not a valid state code on new_partner.
at Microsoft.Crm.BusinessEntities.StatusCodeValidator.Validate(EntityMetadata entityMetadata, Int32 stateCode, Int32 statusCode)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.SetState(BusinessEntityMoniker moniker, Int32 newState, Int32 newStatusCode, BusinessEntity originalEntity, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.SetState(BusinessEntityMoniker moniker, Int32 newState, Int32 newStatusCode, ExecutionContext context)
Inner Exception: System.ArgumentException: -1 is not a valid state code on new_partner.
Parameter name: stateCode
--- End of inner exception stack trace ---
at Microsoft.Crm.BusinessEntities.StatusCodeValidator.Validate(EntityMetadata entityMetadata, Int32 stateCode, Int32 statusCode)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.SetState(BusinessEntityMoniker moniker, Int32 newState, Int32 newStatusCode, BusinessEntity originalEntity, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.SetState(BusinessEntityMoniker moniker, Int32 newState, Int32 newStatusCode, ExecutionContext context)
[2014-03-18 04:13:32.586] Process: w3wp |Organization:d133c867-097c-e011-a247-02bf9d3bc4f8 |Thread: 62 |Category: Platform |User: 7492ef42-9460-e311-940e-002dd80b0ca0 |Level: Error |ReqId: fdb76819-9781-4299-9e45-2b6f296f4fce | MessageProcessor.Execute
ilOffset = 0x1C5
>MessageProcessor fail to process message 'SetStateDynamicEntity' for 'new_partner'.
[2014-03-18 04:13:32.586] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 62 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: fdb76819-9781-4299-9e45-2b6f296f4fce | ExceptionConverter.ConvertToFault
ilOffset = 0x69
>UNEXPECTED: no fault?
Thanks,
Arvind Singh
Regards, Arvind -
Invalid State Code updating Business Partner
Hello.
I found (i do not know if there are more than this one) a business partner which, when I try to update any field, I get the message "Invalid State Code" Message [173 133].
I tried to change State field in every related address (and many other, in principle, not related) but I still get the same error.
Of couse, I am selecting the state from the list
I am talking about an imported data base from SBO2005 to SBO2007 and, after that, SBO8.8 SP00 PL05.
Looking for strange data in OCRD, CRDx, ... I could not find anything significative.
Does anyone knows some data control in SB08.8 that was no so estrict in other SBO versions about state?
Thank you very much.Thank you, Jitin.
The reason in the note (strange characters in bank data) was not exactly the point but it was near.
I checked every data in Payment Terms and there was no incorrect characters but code on OCRB.state field where '6' when in OCST table the key was '06', something about upgrade process, I suposse.
Thank you very much. -
Hi friends,
kindly guide me the creation of ITD State Code for TDS return. Is it Local Tax Office or District Tax Office under Section Code of South Korea ? What is the exact creation procedure of ITD State Code as mandatory field in TDS Retrun screen(J1INEFILE - Version ECC 5) .
Regards,
SamratHi,
This question is still pending and the two tables J1ISTATECD and J1ISTATECDM which is required to be maintained is not available in SAP. Here version is ECC 5. If there is any SAP note or any alternative suggestions need your suggestions.
Regards,
Samrat -
Withholding tax maintain ITD state codes
Hi,
I need to configure in withholding tax 1). Maintain ITD state codes, 2). Assign ITD State Codes to Regions. Can you tell where i will get these two steps. please give path in ECC6.
Regards,
Venkat.HI Venkat,
Please refer the note no 968208 for complete steps.
Regards
Madhu M
http://wiki.sdn.sap.com/wiki/x/UgTpCw (RUPEE WORD FORMAT)
http://wiki.sdn.sap.com/wiki/x/8oMEDg (J1INEMIS )
http://wiki.sdn.sap.com/wiki/x/2BAMDg (J1INACKN )
http://wiki.sdn.sap.com/wiki/x/3xAMDg (J1INCCREP)
http://wiki.sdn.sap.com/wiki/x/6xYODg (J1INREV ) -
[svn:bz-trunk] 21951: Remove application state code...
Revision: 21951
Revision: 21951
Author: [email protected]
Date: 2011-08-12 05:47:46 -0700 (Fri, 12 Aug 2011)
Log Message:
Remove application state code...
Check-in Tests: Pass
QA: Yes
Doc: No
Modified Paths:
blazeds/trunk/modules/common/src/flex/messaging/log/LogCategories.java
blazeds/trunk/modules/core/src/flex/messaging/messages/CommandMessage.java
blazeds/trunk/modules/core/src/flex/messaging/services/MessageService.java
blazeds/trunk/modules/core/src/flex/messaging/services/ServiceAdapter.javaHello xhpx,
In your media queries your changing the .gridContainer but the #LayoutDiv1 is the same. The reason the color goes away is the media query for mobile sizes doesn't have the background color. Though I would remove #LayoutDiv1 from any media query since it doesn't need to change.
http://jsfiddle.net/gCka7/
hope this helps.
Chad Smith - BCGurus.com
also, creating a jsfiddle or just a link to the site could make it easier for debuging. -
Our FI Dept is electronically submitting 1099 to the IRS. The electronic file is missing several State Codes. For example, some of the CA state codes are missing. Most of the CA vendors' codes are showing up on the efile, but some are not. Can someone please tell me how to address this issue. I have looked in the IMG under jurisdiction codes, but have not been able to find a solution.
Thank you in advance for your assistance.Try the FI forum, I think your chances of getting an answer are bigger there than here.
Regards,
Martin -
The new "foreach" statement and maps
The new "foreach" statement requires an object that implements the java.lang.Iterable<T> interface.
But why do not extend "for" for accepting objects that implements the Map interface?
Map<String,String> m = new TreeMap<String,String>();
for (String key, String value : m) {
System.out.println (key + "=" + value);
}The current alternative
Map<String,String> m = new TreeMap<String,String>();
for (Map.Entry<String,String> e : m.entrySet()) {
System.out.println (e.getKey() + "=" + e.getValue());
}is not so clean.The new "foreach" statement requires an object that
implements the java.lang.Iterable<T> interface.Incidentally, I believe "foreach" also allows an object that is an array.
But why do not extend "for" for accepting objects that
implements the Map interface?I think that the use of "Iterable" is a very good idea. The interface contains just one method (iterator) and that method is inherently linked to the concept of "foreach". This means anyone can write their own class that implements Iterable, and their class can then be used with "foreach".
If we specified that "foreach" also worked with Map (with its umpteen methods, only one of which (entrySet) is relevant to "foreach"), this would prevent people writing their own classes which iterate through pairs of values (unless those classes happened to implement Map).
Ideally, there would be a new interface Pair<A,B> in java.lang (with getFirst() and getSecond() methods), and then if the compiler came across something like this:
for (String str, Widget widget : items) { ... }where items is an instance of Iterable<Pair<String,Widget>>, then for each iteration, the "Pair" would be split into its component parts and stored in the variables "str" and "widget".
Unfortunately, it would be difficult to retrofit this concept to java.util.Map, since it would require Map to introduce a new method:
interface Map<K,V> extends Iterable<Pair<K,V>> {
Iterator<Pair<K,V>> iterator();
}and Map.Entry would need to extend Pair, and therefore introduce two new methods:
interface Entry<K,V> extends Pair<K,V> {
K getFirst();
V getSecond();
}Both of these changes would break huge amounts of existing code that uses Map or Map.Entry.
Maybe one for Java 3 :)
Geoff
Maybe you are looking for
-
OnMouseClicked event with overlapping custom nodes
I'm having a bit of an issue with overlapping nodes. Essentially what I have are rectangular shaped custom nodes which, when an onMouseEntered event occurs, has an extended set of icons that fade in that are located on the above top right portion of
-
Derived PC vs dummy PC vs partner PC in new GL
Hi friends, I am confused about the use of derived PC vs dummy PC vs partner PC in new GL. I have activated document splitting and activated pc zero bal to draw B/S. But I dont know, should we use any derived PC or dummy PC. what is partner PC? how c
-
Why mi ipod don´t sync my recently played
hi y have problems with my ipod don´t sync my recently played
-
OS 10.4.8 and MDD
With all the recent discussion on Macintouch about problems with OS 10.4.8, it seems most of the problems were with the Intel Macs. Has anyone experienced problems with Power Mac G4 MDD or FW800 and 10.4.8? I have not upgraded, yet and have been wait
-
Migrating informix row type to Oracle 8i
I have ascii files of an informix database and was using the SQL Loader to import these files into Oracle8i. Everything works fine except for tables with row types. In the Informix ascii files, I have columns containing a set of values. eg {x,y,z}. H