Int4 to String conversion in DS ABAP Stage

Hi Gurus,
I need help how to convert int4 field to String in ABAP Stage in DataStage. we are joining IMPH table Coumn SubId with other string column. Code is generated  automatically in ABAP Stage. If any one can give me idea ,like how to approach.
Writing a routine or FM? That how I am thinking to convert and put in a ZIMPH table and join the two tables in ABAP Stage.What I am thinking is there must be easier way,what I am missing here.
                             Any help would be appreciated.
Mili c

As you mention a csv file I'm wondering if your encoding is wrong: I.e. when you create your instance of cl_abap_conv_in_ce you don't specify the encoding of your source hex string, so that means the default encoding is used, which should be UTF-8 in your case. So if your csv file is not encoded in UTF-8, specify the correct encoding in the create method and see if that helps.
Depending on how you get the file contents you might actually be able to combine the file retrieval with the conversion in one step. E.g. if the file is read from the application server you could specify the used code page via [open dataset ... in legacy text mode ... code page|http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET_MODE.htm#&ABAP_ALTERNATIVE_4@4@]. Similarly method gui_upload of class cl_gui_frontend_services also allows you to specify a code page.
If all of this doesn't help, post some further details on your file (e.g. sample content & encoding) and possibly add some further details from the exception you're getting. As you mention a Unicode system it basically means that we should be able to convert all characters without any problem as long as we specify the correct source code page.
Cheers, harald

Similar Messages

  • Implicit character or charactered structure -- to String  Conversion

    Hi everybody,
    that sounds trivial but i am struggeling.... which is the most elegant way to do a implicit "To-String" Conversion in ABAP Objects...
    I have e.g.
        data lok_string type string.
        lok_string = wa.
        m_object->addline( lok_string ).
    which is working fine but is not elegant comaring with java.
    i want
        m_object->addline( wa ).
    but this don't go when "wa" is a structured workarea with many "type c"s in it (and only these).
    but since the explicit assignment "lok_string = wa." is working well, there could be a elegant  implicit  one?
    (m_object->addline expects a string variable.)
    Thank is aprreciated.
    Regards
    Hartmut

    Hi Sandra,
    this is the right direction.... but i would like to have it as an nested expression... (since implicit conversion seams to be impossible)
    like...
    m_object->addline( lcl_xxx=>tostring( wa_head ) )
    but this line above is not an valid abap objects syntax, unfortunatelly
    ... having:
    class lcl_xxx definition.
      public section.
        class-methods tostring importing charlike type clike returning value(string) type string.
    endclass.                   
    class lcl_xxx implementation.
      method tostring.
        string = charlike.
      endmethod.                   
    endclass.                   
    Best regards
    Hartmut

  • BINDING.JCA-11804 Unimplemented string conversion. in OSB

    Hi,
    Can any body tell me why the following exception is coming or give me the solution. When running procedure from business service in oracle service bus.
    <Error> <JCA_FRAMEWORK_AND_ADAPTER> <BEA-000000> <servicebus:/WSDL/IBPORTALDOMAPP/adapters/OSB/CustomerCreditCardsServiceCTLDB/CustomerCreditCardsService [ CustomerCreditCardsService_ptt::CustomerCreditCardsService(InputParameters,OutputParameters) ] - Could not invoke operation 'CustomerCreditCardsService' due to:
    BINDING.JCA-11804
    Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    Use a data type with a supported JDBC type.
            at oracle.tip.adapter.db.sp.oracle.TypeConverter.toString(TypeConverter.java:292)
            at oracle.tip.adapter.db.sp.oracle.XMLBuilder.XML(XMLBuilder.java:302)
            at oracle.tip.adapter.db.sp.AbstractXMLBuilder.weakRowSet(AbstractXMLBuilder.java:218)
            at oracle.tip.adapter.db.sp.AbstractXMLBuilder.DOMRowSet(AbstractXMLBuilder.java:160)
            at oracle.tip.adapter.db.sp.oracle.XMLBuilder.DOM(XMLBuilder.java:191)
            at oracle.tip.adapter.db.sp.AbstractXMLBuilder.buildDOM(AbstractXMLBuilder.java:274)
            at oracle.tip.adapter.db.sp.SPInteraction.executeStoredProcedure(SPInteraction.java:148)
            at oracle.tip.adapter.db.DBInteraction.executeStoredProcedure(DBInteraction.java:1148)
            at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:252)
            at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:498)
            at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeOperation(WSIFOperation_JCA.java:365)
            at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:324)
            at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.invokeWsifProvider(JCABindingReferenceImpl.java:344)
            at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.request(JCABindingReferenceImpl.java:256)
            at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:150)
            at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendRequestResponse(JCATransportEndpoint.java:209)
            at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:170)
            at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:574)
            at sun.reflect.GeneratedMethodAccessor1473.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
            at $Proxy132.sendMessageAsync(Unknown Source)
            at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
            at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:603)
            at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:538)
            at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:566)
            at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:434)
            at com.bea.wli.sb.pipeline.PipelineContextImpl.doDispatch(PipelineContextImpl.java:670)
            at com.bea.wli.sb.pipeline.PipelineContextImpl.dispatch(PipelineContextImpl.java:585)
            at stages.routing.runtime.RouteRuntimeStep.processMessage(RouteRuntimeStep.java:128)
            at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
            at com.bea.wli.sb.pipeline.RouteNode.doRequest(RouteNode.java:106)
            at com.bea.wli.sb.pipeline.Node.processMessage(Node.java:67)
            at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
            at com.bea.wli.sb.pipeline.Router.processMessage(Router.java:214)
            at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:96)
            at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:593)
            at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:591)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
            at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:590)
            at com.bea.wli.sb.transports.TransportManagerImpl.receiveMessage(TransportManagerImpl.java:383)
            at com.bea.wli.sb.transports.local.LocalMessageContext$1.run(LocalMessageContext.java:179)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at weblogic.security.Security.runAs(Security.java:61)
            at com.bea.wli.sb.transports.local.LocalMessageContext.send(LocalMessageContext.java:174)
            at com.bea.wli.sb.transports.local.LocalTransportProvider.sendMessageAsync(LocalTransportProvider.java:322)
            at sun.reflect.GeneratedMethodAccessor1473.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
            at $Proxy116.sendMessageAsync(Unknown Source)
            at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
            at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:603)
            at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:538)
            at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:566)
            at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:434)
            at com.bea.wli.sb.pipeline.PipelineContextImpl.doDispatch(PipelineContextImpl.java:670)
            at com.bea.wli.sb.pipeline.PipelineContextImpl.dispatch(PipelineContextImpl.java:585)
            at stages.routing.runtime.RouteRuntimeStep.processMessage(RouteRuntimeStep.java:128)
            at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
            at stages.routing.runtime.RouteTableRuntimeStep.processMessage(RouteTableRuntimeStep.java:129)
            at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
            at com.bea.wli.sb.pipeline.RouteNode.doRequest(RouteNode.java:106)
            at com.bea.wli.sb.pipeline.Node.processMessage(Node.java:67)
            at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
            at com.bea.wli.sb.pipeline.Router.processMessage(Router.java:214)
            at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:96)
            at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:593)
            at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:591)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
            at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:590)
            at com.bea.wli.sb.test.service.ServiceMessageSender.send0(ServiceMessageSender.java:332)
            at com.bea.wli.sb.test.service.ServiceMessageSender.access$000(ServiceMessageSender.java:79)
            at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:137)
            at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:135)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
            at com.bea.wli.sb.test.service.ServiceMessageSender.send(ServiceMessageSender.java:140)
            at com.bea.wli.sb.test.service.ServiceProcessor.invoke(ServiceProcessor.java:454)
            at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
            at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
            at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.__WL_invoke(Unknown Source)
            at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
            at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(Unknown Source)
            at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
            at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
            at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
            at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
            at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    >
    <Feb 25, 2015 6:58:23 PM GMT+05:00> <Error> <JCA_FRAMEWORK_AND_ADAPTER> <BEA-000000> <servicebus:/WSDL/IBPORTALDOMAPP/adapters/OSB/CustomerCreditCardsServiceCTLDB/CustomerCreditCardsService [ CustomerCreditCardsService_ptt::CustomerCreditCardsService(InputParameters,OutputParameters) ] - Rolling back JCA LocalTransaction>
    <Feb 25, 2015 6:58:23 PM GMT+05:00> <Error> <JCATransport> <BEA-381967> <Invoke JCA outbound service failed with application error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/IBPORTALDOMAPP/adapters/OSB/CustomerCreditCardsServiceCTLDB/CustomerCreditCardsService [ CustomerCreditCardsService_ptt::CustomerCreditCardsService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'CustomerCreditCardsService' failed due to: Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    ; nested exception is:
            BINDING.JCA-11804
    Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    Use a data type with a supported JDBC type.
    com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/IBPORTALDOMAPP/adapters/OSB/CustomerCreditCardsServiceCTLDB/CustomerCreditCardsService [ CustomerCreditCardsService_ptt::CustomerCreditCardsService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'CustomerCreditCardsService' failed due to: Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    ; nested exception is:
            BINDING.JCA-11804
    Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    Use a data type with a supported JDBC type.
            at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:155)
            at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendRequestResponse(JCATransportEndpoint.java:209)
            at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:170)
            at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:574)
            at sun.reflect.GeneratedMethodAccessor1473.invoke(Unknown Source)
            Truncated. see log file for complete stacktrace
    Caused By: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/IBPORTALDOMAPP/adapters/OSB/CustomerCreditCardsServiceCTLDB/CustomerCreditCardsService [ CustomerCreditCardsService_ptt::CustomerCreditCardsService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'CustomerCreditCardsService' failed due to: Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    ; nested exception is:
            BINDING.JCA-11804
    Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    Use a data type with a supported JDBC type.
            at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.request(JCABindingReferenceImpl.java:258)
            at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:150)
            at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendRequestResponse(JCATransportEndpoint.java:209)
            at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:170)
            at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:574)
            Truncated. see log file for complete stacktrace
    Caused By: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/IBPORTALDOMAPP/adapters/OSB/CustomerCreditCardsServiceCTLDB/CustomerCreditCardsService [ CustomerCreditCardsService_ptt::CustomerCreditCardsService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'CustomerCreditCardsService' failed due to: Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    ; nested exception is:
            BINDING.JCA-11804
    Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    Use a data type with a supported JDBC type.
            at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:603)
            at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeOperation(WSIFOperation_JCA.java:365)
            at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:324)
            at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.invokeWsifProvider(JCABindingReferenceImpl.java:344)
            at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.request(JCABindingReferenceImpl.java:256)
            Truncated. see log file for complete stacktrace
    Caused By: BINDING.JCA-11804
    Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    Use a data type with a supported JDBC type.
            at oracle.tip.adapter.db.sp.oracle.TypeConverter.toString(TypeConverter.java:292)
            at oracle.tip.adapter.db.sp.oracle.XMLBuilder.XML(XMLBuilder.java:302)
            at oracle.tip.adapter.db.sp.AbstractXMLBuilder.weakRowSet(AbstractXMLBuilder.java:218)
            at oracle.tip.adapter.db.sp.AbstractXMLBuilder.DOMRowSet(AbstractXMLBuilder.java:160)
            at oracle.tip.adapter.db.sp.oracle.XMLBuilder.DOM(XMLBuilder.java:191)
            Truncated. see log file for complete stacktrace
    >
    <Feb 25, 2015 6:58:23 PM GMT+05:00> <Warning> <ALSB Logging> <BEA-000000> < [CustomerCreditCards_RN, _onErrorHandler-2229530737635136699-5d7bbea6.14955308f67.-7ccb, errStage1, ERROR] [IBPORTALDOMAPP][12431234123413241][Invoke JCA outbound service failed with application error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/IBPORTALDOMAPP/adapters/OSB/CustomerCreditCardsServiceCTLDB/CustomerCreditCardsService [ CustomerCreditCardsService_ptt::CustomerCreditCardsService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'CustomerCreditCardsService' failed due to: Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    ; nested exception is:
            BINDING.JCA-11804
    Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    Use a data type with a supported JDBC type.
    com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/IBPORTALDOMAPP/adapters/OSB/CustomerCreditCardsServiceCTLDB/CustomerCreditCardsService [ CustomerCreditCardsService_ptt::CustomerCreditCardsService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'CustomerCreditCardsService' failed due to: Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    ; nested exception is:
            BINDING.JCA-11804
    Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    Use a data type with a supported JDBC type.
            at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:155)
            at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendRequestResponse(JCATransportEndpoint.java:209)
            at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:170)
            at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:574)
            at sun.reflect.GeneratedMethodAccessor1473.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
            at $Proxy132.sendMessageAsync(Unknown Source)
            at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
            at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:603)
            at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:538)
            at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:566)
            at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:434)
            at com.bea.wli.sb.pipeline.PipelineContextImpl.doDispatch(PipelineContextImpl.java:670)
            at com.bea.wli.sb.pipeline.PipelineContextImpl.dispatch(PipelineContextImpl.java:585)
            at stages.routing.runtime.RouteRuntimeStep.processMessage(RouteRuntimeStep.java:128)
            at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
            at com.bea.wli.sb.pipeline.RouteNode.doRequest(RouteNode.java:106)
            at com.bea.wli.sb.pipeline.Node.processMessage(Node.java:67)
            at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
            at com.bea.wli.sb.pipeline.Router.processMessage(Router.java:214)
            at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:96)
            at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:593)
            at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:591)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
            at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:590)
            at com.bea.wli.sb.transports.TransportManagerImpl.receiveMessage(TransportManagerImpl.java:383)
            at com.bea.wli.sb.transports.local.LocalMessageContext$1.run(LocalMessageContext.java:179)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at weblogic.security.Security.runAs(Security.java:61)
            at com.bea.wli.sb.transports.local.LocalMessageContext.send(LocalMessageContext.java:174)
            at com.bea.wli.sb.transports.local.LocalTransportProvider.sendMessageAsync(LocalTransportProvider.java:322)
            at sun.reflect.GeneratedMethodAccessor1473.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
            at $Proxy116.sendMessageAsync(Unknown Source)
            at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
            at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:603)
            at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:538)
            at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:566)
            at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:434)
            at com.bea.wli.sb.pipeline.PipelineContextImpl.doDispatch(PipelineContextImpl.java:670)
            at com.bea.wli.sb.pipeline.PipelineContextImpl.dispatch(PipelineContextImpl.java:585)
            at stages.routing.runtime.RouteRuntimeStep.processMessage(RouteRuntimeStep.java:128)
            at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
            at stages.routing.runtime.RouteTableRuntimeStep.processMessage(RouteTableRuntimeStep.java:129)
            at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
            at com.bea.wli.sb.pipeline.RouteNode.doRequest(RouteNode.java:106)
            at com.bea.wli.sb.pipeline.Node.processMessage(Node.java:67)
            at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
            at com.bea.wli.sb.pipeline.Router.processMessage(Router.java:214)
            at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:96)
            at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:593)
            at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:591)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
            at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:590)
            at com.bea.wli.sb.test.service.ServiceMessageSender.send0(ServiceMessageSender.java:332)
            at com.bea.wli.sb.test.service.ServiceMessageSender.access$000(ServiceMessageSender.java:79)
            at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:137)
            at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:135)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
            at com.bea.wli.sb.test.service.ServiceMessageSender.send(ServiceMessageSender.java:140)
            at com.bea.wli.sb.test.service.ServiceProcessor.invoke(ServiceProcessor.java:454)
            at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
            at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
            at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.__WL_invoke(Unknown Source)
            at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
            at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(Unknown Source)
            at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
            at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
            at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
            at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
            at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Caused by: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/IBPORTALDOMAPP/adapters/OSB/CustomerCreditCardsServiceCTLDB/CustomerCreditCardsService [ CustomerCreditCardsService_ptt::CustomerCreditCardsService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'CustomerCreditCardsService' failed due to: Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    ; nested exception is:
            BINDING.JCA-11804
    Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    Use a data type with a supported JDBC type.
            at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.request(JCABindingReferenceImpl.java:258)
            at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:150)
            ... 86 more
    Caused by: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/IBPORTALDOMAPP/adapters/OSB/CustomerCreditCardsServiceCTLDB/CustomerCreditCardsService [ CustomerCreditCardsService_ptt::CustomerCreditCardsService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'CustomerCreditCardsService' failed due to: Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    ; nested exception is:
            BINDING.JCA-11804
    Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    Use a data type with a supported JDBC type.
            at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:603)
            at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeOperation(WSIFOperation_JCA.java:365)
            at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:324)
            at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.invokeWsifProvider(JCABindingReferenceImpl.java:344)
            at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.request(JCABindingReferenceImpl.java:256)
    Caused by: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/IBPORTALDOMAPP/adapters/OSB/CustomerCreditCardsServiceCTLDB/CustomerCreditCardsService [ CustomerCreditCardsService_ptt::CustomerCreditCardsService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'CustomerCreditCardsService' failed due to: Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    ; nested exception is:
            BINDING.JCA-11804
    Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    Use a data type with a supported JDBC type.
            at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:603)
            at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeOperation(WSIFOperation_JCA.java:365)
            at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:324)
            at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.invokeWsifProvider(JCABindingReferenceImpl.java:344)
            at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.request(JCABindingReferenceImpl.java:256)
            ... 87 more
    Caused by: BINDING.JCA-11804
    Unimplemented string conversion.
    Conversion of JDBC type  to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    Use a data type with a supported JDBC type.
            at oracle.tip.adapter.db.sp.oracle.TypeConverter.toString(TypeConverter.java:292)
            at oracle.tip.adapter.db.sp.oracle.XMLBuilder.XML(XMLBuilder.java:302)
            at oracle.tip.adapter.db.sp.AbstractXMLBuilder.weakRowSet(AbstractXMLBuilder.java:218)
            at oracle.tip.adapter.db.sp.AbstractXMLBuilder.DOMRowSet(AbstractXMLBuilder.java:160)
            at oracle.tip.adapter.db.sp.oracle.XMLBuilder.DOM(XMLBuilder.java:191)
            at oracle.tip.adapter.db.sp.AbstractXMLBuilder.buildDOM(AbstractXMLBuilder.java:274)
            at oracle.tip.adapter.db.sp.SPInteraction.executeStoredProcedure(SPInteraction.java:148)
            at oracle.tip.adapter.db.DBInteraction.executeStoredProcedure(DBInteraction.java:1148)
            at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:252)
            at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:498)
            ... 91 more
    ] :: Transaction has been timed out as no response was received from host.>
    <Feb 25, 2015 6:58:24 PM GMT+05:00> <Warning> <ALSB Statistics Manager> <BEA-473007> <Aggregator did not receive statistics from [osb_server2] for the aggregation performed for tick 39553080.>

    Maybe this can help - http://www.javamonamour.org/2011/11/osb-and-rejectedmessagehandlers-in-jca.html

  • What is use of  Conversion Routine in  Abap dictionary

    Hi,
    Can any body please tell me the proper use of <b>Conversion Routine in  Abap dictionary.</b>
    Please give me a practical example where it has been used.
    Thanks
    prabhudutta

    hi,
    here is help for conversion routine
    Conversion takes place when converting the contents of a screen field from display format to SAP-internal format and vice versa and when outputting with the ABAP statement WRITE, depending on the data type of the field.
    If standard conversion is not suitable, it can be overridden by specifying a conversion routine in the underlying domain.
    A conversion routine is identified by its five-place name and is stored as a group of two function modules. The function modules have a fixed naming convention. The following function modules are assigned to conversion routine xxxxx:
    CONVERSION_EXIT_xxxxx_INPUT
    CONVERSION_EXIT_xxxxx_OUTPUT
    The INPUT module performs the conversion from display format to internal format. The OUTPUT module performs the conversion from internal format to display format.
    If a screen field refers to a domain with a conversion routine, this conversion routine is executed automatically each time an entry is made in this screen field or when values are displayed with this screen field.
    regards,
    Raghavendra

  • How to retrieve the Conversation ID in ABAP

    Does anyone know how to retrieve a conversation ID in ABAP?
    You can retrieve the reference ID from SXMSPMAST but how do you retrieve the conversation ID?
    Table names? FM?
    ABAP not Java or UDF
    All suggestions welcome.
    Regards,
    Nay

    As I said in my question, I am not asking for how to retrieve the conversation ID in a UDF. Please read my question....
    I am asking, given a specific message ID, how can I retrieve the conversation id for that message ID on the ABAP stack - e.g. with a function module, what table names etc.
    thanks, Nay

  • Extraction of Data from ECC using ABAP Stage in Datastage

    Hi
    We are required to extract the customer master data from GFIMS SAP ECC5.0 system. This extraction involves fetching of data from 5 different tables. To attain this we are using ABAP stage in DATASTAGE.
    For every run the ABAP stage of DataStage generates the ABAP program in DataStage, will place it in the SAP system and extract the data by executing the ABAP program.
    To be able to use this ABAP stage we need to integrate the DataStage with SAP system. We have to send the cofiles and data files to SAP, these files will install a RFC enabled function module and user profile components in SAP.
    They say, there is a security flaw in the function module component and this will lead to exposing of complete SAP system to outside members.
    Please advise me to do alternative Ways.
    Thanks in Advance.

    Hi
    You dont see the data source in R3? When you created the data source using Tcode RSO2 you would have put the data source under some application like SD, MM etc.
    Please check in the respective application for your data source. If still the data source is still not seen, then check whether the data source is active or not.
    Hope it helps.
    Regards
    Sadeesh

  • \0D and \0A after array to spreadsheet string conversion

    Hi guys, i currently have a VI that manipulates a couple of arrays and writes them to a config file through the config VI.
    Now, i notice 1 problem whereby after my array is comma delimited and converted into a spreadsheet string, a tab and carriage return automatically appears at the end of the string. This causes my resulting config file to have \0D and \0A to appear with my keys in the config file.
    I know it's got to be the array to spreadsheet string conversion that's causing the problem because i don't have such \0D and \0A problem with keys without the conversion.
    How do i solve this?

    The OD and OA are the carriage return and line feed and yes the functona always appends these characters at the end of each line. Probably because this function is normally used to create files that a spreadsheet can read. There are several ways to remove the extra characters. Shown below is the string reversed and the String Subset function uses an offset of two. The output of that is reversed to get a string without the CR and LF. Also shown is getting the string length, subtracting 2 and wiring that to the length input of the String Subset function.
    Message Edited by Dennis Knutson on 07-26-2007 10:57 PM
    Attachments:
    Strip Last Two Characters.PNG ‏6 KB

  • String Conversion

    In Word if I run "StrConv(FeeMemo.Addr.Text, 3)" on a test of "this is a test of string conversion" this function will convert this text to "This Is A Test Of String Conversion".
    I wonder if such functionality exist on JaveScript for PDF? and if there is where would you put it?
    Thanks in advance for your help...
    Regards
    Jeff

    You can write a JavaScript function and place it in the document level JavaScript or as a folder level script.
    You will have to split the text sting by the space character and then go through each element of the array and then force the first character of each element to an upper case value. You can then reassemble the elements with the spaces between them.

  • String Conversion into Quantity field ----------Sales Orders

    Hi Experts,
    Can any of you give an standard function module or conversion routine for String conversion to Quantity field.
    The problem is I pass on 5 value as a string and while the system creates any sales orders, now in the quantity filed
    it shows me as 0.005 and for value 7 it gives me as 0.007.
    So, Now I want a conversion in such a way that if I pass 5 then the system should 5.000 and if I pass 10 it should show
    as 10.00 likewise for 100 or above also.
    Thank you,
    KishoreJ.

    Hi,
    You have check , what is user format configure in each user then reply the forum.
    Thanks
    With Regards
    I.Muthukumar

  • German Special Characters in XSTRING to STRING conversion

    Hi Experts,
    I have a CSV file (created from a Windows Excel file) with German Special Characters (e.g. 'ä', 'Ä') and I am trying to read this into ABAP internal tables. By using the THTMLB tag 'thtmlb:fileUpload' I get an XSTRING and I am trying to convert this into STRING. However, wheny trying to do this I get an exception 'CX_SY_CONVERSION_CODEPAGE'.
    This is my coding:
      data: conv   type ref to cl_abap_conv_in_ce.
      conv = cl_abap_conv_in_ce=>create( input = lr_upload->file_content ).
      conv->read( importing data = lv_content ).
    Note: lr_upload is my XSTRING object from the file upload, lv_content is a STRING.
    In the CSV file the German special characters look fine and the SAP system is a Unicode system, but it seems like there are some problems with the conversions somehow. Any ideas from the experts?
    Thanks a lot and Regards,
    Jens

    As you mention a csv file I'm wondering if your encoding is wrong: I.e. when you create your instance of cl_abap_conv_in_ce you don't specify the encoding of your source hex string, so that means the default encoding is used, which should be UTF-8 in your case. So if your csv file is not encoded in UTF-8, specify the correct encoding in the create method and see if that helps.
    Depending on how you get the file contents you might actually be able to combine the file retrieval with the conversion in one step. E.g. if the file is read from the application server you could specify the used code page via [open dataset ... in legacy text mode ... code page|http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET_MODE.htm#&ABAP_ALTERNATIVE_4@4@]. Similarly method gui_upload of class cl_gui_frontend_services also allows you to specify a code page.
    If all of this doesn't help, post some further details on your file (e.g. sample content & encoding) and possibly add some further details from the exception you're getting. As you mention a Unicode system it basically means that we should be able to convert all characters without any problem as long as we specify the correct source code page.
    Cheers, harald

  • Conversion XML to ABAP

    Hello,
    From a provider we get the following XSD from a response message:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://xxx" targetNamespace="http://yyy">
       <xsd:element name="loginResponse" type="loginResponse" />
       <xsd:complexType name="loginResponse">
          <xsd:sequence>
             <xsd:element name="result" type="xsd:string" />
          </xsd:sequence>
       </xsd:complexType>
    </xsd:schema>
    His actual response looks like this:
    <SOAP-ENV:loginResponse
    xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
    xmlns:SOAPENC='http://schemas.xmlsoap.org/soap/encoding/'
    xmlns:xsd='http://www.w3.org/2001/XMLSchema'
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-Instance'>
    <Result xsi:type='xsd:string'>artv8uv38gvqu05gjohv26g8l5</Result>
    </SOAP-ENV:loginResponse>
    PI accepts this well, but during the conversion from XML to ABAP we get the following error:
    PARSE_APPLICATION_DATA Error during XML => ABAP conversion (Response Message; error ID: CX_ST_MATCH_ELEMENT; (/1SAI/TXS3656E9BD8
    Error during XML => ABAP conversion (Response Message; error ID: CX_ST_MATCH_ELEMENT; (/1SAI/TXS3656E9BD8A34AE8B7F16 XML Bytepos
    Element 'loginResponse' verwacht
    I have the impression that there is a problem with the namespace and wonder how I can solve this. I do not know enough about XML to judge if the returned XML is valid according to the definition. Maybe the problem lies there.
    Thanks for any help.
    Kris

    You are right. The error is the root node:
    SOAP-ENV:loginResponse
    This prefix is not allowed.
    It should be something like this:
    <loginResponse  xmlns="http://xxx"
    Edited by: Stefan Grube on Aug 23, 2010 4:35 PM

  • Help required on Datetime string conversion

    Hello Experts,
    I have a string with value '2010-07-16T07:30:00+03:00' which came from a webservice string data.Please advice how to declare variable in abap to get the correct date and time from this string?
    From my previous exp, if I had the xml structure with this field as xsddatetime and in abap proxy, if I assign it to a char/string variable it used to do the calculation based on the timezone and give me the value as 20100716043000.
    Please advice.
    (I'm not sure if I had to post this in the ABAP forum, but thought the PI experts might have faced and solved this problem before)
    Mat

    Thanks Sandeep for your time and effort, but the problem here is this wont consider the +3 timezone in below example.
    Generally if you have a date time field in xml structure, while generating proxy ..it creates the field in abap with XSDDATETIME_Z dataelement and automatically converts to the correct  date time.(below ex date = '2010-07-16'  time = 04:30:00'
    If I offset and do the math myself, I have to handle various cases like different time zones as well as time closer to midnights( then the date has to be changed too ).
    I was hoping for a straight forward way of declaring it and getting the values.
    Thanks again.
    Mat

  • Encoded double byte characters string conversion

    I have double byte encoded strings stored in a properties file. A sample of such string below (I think it is japanese):
    \u30fc\u30af\u306e\u30a2
    I am supposed to read it from file, convert it to actual string and use them on UI. I am not able to figure how to do the conversion -- the string contains text as is, char backslash, char u, and so on. How to convert it to correct text (either using ai::UnicodeString or otherwise)?
    Thanks.

    Where did this file come from? Some kind of Java or Ruby export? I don't think AI has anything in its SDK that would natively read that. You could just parse the string, looking for \u[4 characters]. I believe if you created a QChar and initialized it with the integer value of the four-character hex string, it would properly create the character.

  • Unicode to String Conversion

    Dear all,
    I'm trying to get the String from unicode, previously i'm converting the String to Unicode like below,
    String s = "\\u"+Integer.toHexString(s.charAt(0));
    Which is giving me the same what i appended above even after Conversion using UTF-8.
    If i do String s ="\u30f3"
    It is giving me correct character. But my problem is i'm getting the latter part i.e hexString latter in the run time...through Integer.toHexString..
    i can't add this as a character.. so it is taking as a two different strings..
    How to handle this situation..
    Hope i can find the answer,
    Thanks in advance,
    Srinivas N

    Below is my IOUtils class. In particular, see the loadTextFile method for an example of how to read a UTF file, and the isUTF method to detect if a file is Unicode
    You will not be able to compile this class unless you have my InfoFetcher class. You should be able to find a reference to this class by searching google for "InfoFetcher tjacobs01"
    You are welcome to use and modify this class, but please don't change the package or take credit for it as your own work
    package tjacobs.io;
    import java.awt.Component;
    import java.io.*;
    import java.net.URL;
    import java.net.URLConnection;
    import java.text.MessageFormat;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    import javax.swing.JOptionPane;
    import javax.swing.JTable;
    import javax.swing.table.TableModel;
    import tjacobs.io.InfoFetcher.FetcherListener;
    * IOUtils class
    * This is an important class that I use a lot.<p>
    * has a lot of static utilities. Most should be fairly self-explanatory
    public class IOUtils {
         public static final int DEFAULT_BUFFER_SIZE = (int) Math.pow(2, 20); //1 MByte
         public static final int DEFAULT_WAIT_TIME = 30000;
         public static final boolean ALWAYS_BACKUP = false;
         public static String loadTextFile(File f) throws IOException {
              return loadTextFile(f, isUTF16(f));
         public static String loadTextFile(File f, boolean UTF16) throws IOException {
              BufferedReader br = !UTF16 ?
                        new BufferedReader(new FileReader(f)) :
                        new BufferedReader(
                             new InputStreamReader(new FileInputStream(f),
                                                   "UTF-16"));
              int length = (int) f.length();
              char data[] = new char[!UTF16?(int)length : ((int)length) / 2 - 1];
              int got = 0;
              do {
                   got += br.read(data, got, data.length - got);
              while (got < data.length);
              return new String(data);
         public static InfoFetcher loadData(InputStream in) {
              byte buf[] = new byte[DEFAULT_BUFFER_SIZE]; // 1 MByte
              return loadData(in, buf);
         public static InfoFetcher loadData(InputStream in, byte buf[]) {
              return loadData(in, buf, TimeOut.DEFAULT_WAIT_TIME);
         public static InfoFetcher loadData(InputStream in, byte buf[], int waitTime) {
              return new InfoFetcher(in, buf, waitTime);
         public static InfoFetcher loadData(InputStream in, int initBufLength, int waitTime) {
              return loadData(in, new byte[initBufLength], waitTime);
         public static InfoFetcher loadData(File f) throws FileNotFoundException{
              //if (!f.exists()) throw new FileNotFoundException(f.getAbsolutePath());
              //create the inputstream first so that we can generate the FileNotFoundException right away
              InputStream in = new BufferedInputStream(new FileInputStream(f));
              long len = f.length();
              if (len > Integer.MAX_VALUE) {
                   throw new RuntimeException("File size exceeds maximum size for a byte buffer");
              return loadData(in, (int) len, TimeOut.NO_TIMEOUT);
         public static InfoFetcher loadData(URL url) throws IOException{
              return loadData(url.openConnection());
         public static InfoFetcher loadData(URLConnection conn) throws IOException {
              int size = conn.getContentLength();
              if (size < 0) return loadData(conn.getInputStream(), 2000, DEFAULT_WAIT_TIME);
              return loadData(conn.getInputStream(), size, DEFAULT_WAIT_TIME);
          * Note: There is no guarentee that this method will
          * ever return. For instance, if you call loadAll on
          * an open socket connection it won't return until the
          * socket has closed
         public static String loadAllString(InputStream in) {
              InfoFetcher fetcher = loadData(in);
              fetcher.run();
              return new String(fetcher.buf, 0, fetcher.got);
          * Note: There is no guarentee that this method will
          * ever return. For instance, if you call loadAll on
          * an open socket connection it won't return until the
          * socket has closed
         public static byte[] loadAll(InputStream in) {
              InfoFetcher fetcher = loadData(in);
              return fetcher.readCompletely();
         public static void copyBufs(byte src[], byte target[]) {
              int length = Math.min(src.length, target.length);
              for (int i = 0; i < length; i++) {
                   target[i] = src;
         * Not threaded by default. If you need this to run
         * in a separate, create a new thread or runnable class
         * @param in
         * @param out
         public static void pipe (InputStream in, OutputStream out) {
              pipe (in, out, TimeOut.NO_TIMEOUT);
         * Not threaded by default. If you need this to run
         * in a separate, create a new thread or runnable class
         * @param in
         * @param out
         public static void pipe (InputStream in, final OutputStream out, int timeout) {
              pipe (in, out, timeout, false);
         private static class PipeFetcher implements FetcherListener {
              OutputStream out;
              InputStream in;
              public IOException ex;
              boolean closeWhenDone;
              public PipeFetcher (InputStream in, OutputStream out, boolean closeWhenDone) {
                   this.out = out;
                   this.closeWhenDone = closeWhenDone;
              public void fetchedMore(byte[] buf, int start, int end) {
                   try {
                        out.write(buf, start, end - start);
                   catch (IOException iox) {
                        ex = iox;
                        try {
                             in.close();
                             out.close();
                        catch (IOException iox2) {
                             iox2.printStackTrace();
              public void fetchedAll(byte[] buf) {
                   if (closeWhenDone) {
                        try {
                             out.close();
                        catch (IOException iox) {
                             iox.printStackTrace();
         * Not threaded by default. If you need this to run
         * in a separate, create a new thread or runnable class
         * @param in
         * @param out
         public static IOException pipe (final InputStream in, final OutputStream out, int timeout, final boolean closeWhenDone) {
              InfoFetcher info = new InfoFetcher (in, new byte[DEFAULT_BUFFER_SIZE], timeout);
              PipeFetcher pf = new PipeFetcher(in, out, closeWhenDone);
              info.addFetcherListener(pf);
              info.run();
              return pf.ex;
              info.addInputStreamListener(new InputStreamListener() {
                   public void gotMore(InputStreamEvent ev) {
                        try {
                             out.write(ev.getBytes(), ev.getStart(), ev.getBytesRetrieved() - ev.getStart());
                        catch (IOException iox) {
                             System.err.println ("Pipe closing");
                   public void gotAll(InputStreamEvent ev) {}
              Thread t= new Thread (info);
              t.start();
         public static byte[] expandBuf(byte array[]) {
              return expandBuf(array, array.length * 2);
         public static byte[] expandBuf(byte array[], int newlength) {
              byte newbuf[] = new byte[newlength];
              copyBufs(array, newbuf);
              return newbuf;
         public static byte[] trimBuf(byte[] array, int size) {
              byte[] newbuf = new byte[size];
              for (int i = 0; i < size; i++) {
                   newbuf[i] = array[i];
              return newbuf;
         * @see getFileOutputStream(File, boolean)
         public static OutputStream getFileOutputStream(File file) throws IOException {
              return getFileOutputStream(file, true);
         * Convienience method for opening a FileOutputStream w/wo a buffer
         * makes sure that the file directory exists so this should always succeed.
         public static OutputStream getFileOutputStream(File file, boolean buffered) throws IOException {
              if (!file.exists() && !file.isDirectory()) {
                   confirmDirectoryExists(file.getParentFile());
              if (file.exists()) {
                   if (ALWAYS_BACKUP) {
                        file.renameTo(new File(file.getAbsolutePath() + "~"));
                   } else {
                        file.delete();
              file.createNewFile();
              OutputStream out = new FileOutputStream(file);
              if (buffered) {
                   out = new BufferedOutputStream(out);
              return out;
         * Confirms that a directory exists and makes it if it doesn't
         public static void confirmDirectoryExists(File dir) {
              if (!dir.exists()) {
                   confirmDirectoryExists(dir.getParentFile());
                   dir.mkdir();
              if (!dir.isDirectory()) {
                   confirmDirectoryExists(dir.getParentFile());
         public static OutputStream getFileOutputStream(String name) throws IOException {
              return getFileOutputStream(name, true);
         public static PrintStream getFilePrintStream(String file) throws IOException {
              return new PrintStream(getFileOutputStream(file));
         public static PrintStream getFilePrintStream(File file) throws IOException {
              return new PrintStream(getFileOutputStream(file));
         public static OutputStream getFileOutputStream(String name, boolean buffered) throws IOException {
              return getFileOutputStream(new File(name), buffered);
         * @param f if f is a directory it returns the absolue path to f otherwise it returns the absolute path to the directory f is in
         public static String getDirectory(File f) {
              if (f.isDirectory()) {
                   return f.getAbsolutePath();
              else {
                   return f.getParentFile().getAbsolutePath();
         * Get the file without the extension.
         * @see getFileNoExtension(String);
         public static String getFilenameNoExtension(File f) {
              return getFilenameNoExtension(f.getName());
         * Gets the file name without the extension
         * returns the whole file name if no '.' is found<br>
         * otherwise returns whatever's before the last .
         public static String getFilenameNoExtension(String s) {
              int idx = s.indexOf('.');
              if (idx == -1) {
                   return s;
              else {
                   return s.substring(0, idx);
         * gets the file extension
         * if a '.' character is found it returns what's after the last .
         * if not, it returns the empty string
         public static String getFileExtension(String s) {
              int idx = s.lastIndexOf('.');
              if (idx == -1) {
                   return "";
              else {
                   return s.substring(idx + 1);
         * @see getFileExtension(String)
         public static String getFileExtension(File f) {
              return getFileExtension(f.getName());
         * Delete everything in a directory. Recursively deletes all sub-directories
         public static void deleteDirectory (File f, Component parent) {
              if (!f.isDirectory()) {
                   throw new RuntimeException("File " + f.getAbsolutePath() + " is not a directory!");
              int val = JOptionPane.showConfirmDialog(parent, "Confirm Delete " + f.getAbsolutePath(), "Confirm Delete " + f.getAbsolutePath(), JOptionPane.OK_CANCEL_OPTION);
              if (val == JOptionPane.OK_OPTION) {
                   deleteAllFiles(f);
         private static void deleteAllFiles (File f) {
              //recursively delete all its contents
              if (!f.isDirectory()) {
                   //throw new RuntimeException("File " + f.getAbsolutePath() + " is not a directory!");
                   f.delete();
              else {
                   File[] files = f.listFiles();
                   for (int i = 0; i < files.length; i++) {
                        if (files[i].equals(f) || files[i].equals(f.getParent())) {
                             continue;
                        deleteAllFiles(files[i]);
                   f.delete();
         * static utility method for copying a file to another location
         public static void copyFile (File src, File newParent) throws FileNotFoundException {
              if (!src.exists()) {
                   return;
              if (!newParent.exists()) {
                   newParent.mkdirs();
                   //throw new RuntimeException("Parent folder must exist");
              if (newParent.isDirectory()) {
                   File newFile = new File(newParent, src.getName());
                   if (src.isDirectory()) {
                        newFile.mkdir();
                        File children[] = src.listFiles();
                        for (int i = 0; i < children.length; i++) {
                             copyFile(children[i], newFile);
                   else {
                        //loadFile
                        InfoFetcher info = loadData(new FileInputStream(src));
                        final BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(newFile));
                        info.addInputStreamListener(new InputStreamListener() {
                             int lastbytes = 0;
                             public void gotMore(InputStreamEvent ev1) {
                                  try {
                                       out.write(ev1.getBytes(), lastbytes, ev1.getBytesRetrieved() - lastbytes);
                                       lastbytes = ev1.getBytesRetrieved();
                                  catch (IOException iox) {
                                       iox.printStackTrace();
                             public void gotAll(InputStreamEvent ev2) {
         * @deprecated use the Find class
         public static File find(Pattern p, File start) {
              return recursiveFind(start, null, p, true);
         * @deprecated use the Find class
         public static File find(Pattern p) {
              return find(p, new File("."));
         * @deprecated use the Find class
         private static File recursiveFind(File current, File cameFrom, Pattern p, boolean startDescending) {
              Matcher m = p.matcher(current.getName());
              if (m.matches()) {
                   return current;
              File[] files = current.listFiles();
              if (startDescending) {
                   File value = descend(current, cameFrom, p, startDescending);
                   if (value != null) return value;
                   return ascend(current, cameFrom, p, startDescending);
              else {
                   File value = ascend(current, cameFrom, p, startDescending);
                   if (value != null) return value;
                   return descend(current, cameFrom, p, startDescending);               
         * @deprecated use the Find class
         private static File ascend(File current, File cameFrom, Pattern p, boolean startDescending) {
              File par = current.getParentFile();
              if (par == null) {
                   return null;
              par = par.getAbsoluteFile();
              if (par.equals(cameFrom)) {
                   return null;
              return recursiveFind(par, current, p, false);
         * @deprecated use the Find class
         private static File descend(File current, File cameFrom, Pattern p, boolean startDescending) {
              File files[] = current.listFiles();
              if (files == null) {
                   return null;
              for (int i = 0; i < files.length; i++) {
                   File child = files[i];
                   if (child.equals(cameFrom)) {
                        continue;
                   File f = recursiveFind(child, current, p, true);
                   if (f != null) {
                        return f;
              return null;
         * Utility for saving a string to a file. Rather than have to set
         * up all the writers etc and trap exceptions, just returns a boolean
         * if it worked
         * <p>
         * @see saveData(File, byte[])
         public static boolean saveData(File f, String s) {
              return saveData(f, s.getBytes());
         * Utility for saving a string to a file. Rather than have to set
         * up all the writers etc and trap exceptions, just returns a boolean
         * if it worked
         public static boolean saveData(File f, byte[] data) {
              try {
                   OutputStream out = new BufferedOutputStream(new FileOutputStream(f));
                   out.write(data);
                   out.close();
              catch(IOException iox) {
                   iox.printStackTrace();
                   return false;
              return true;
         * Way to save a stream to a file. Not multithreaded.
         * Will block until the save is done
         * @param f
         * @param in
         * @return
         public static boolean saveData(File f, InputStream in) throws FileNotFoundException {
              return pipe(in, new FileOutputStream(f), TimeOut.NO_TIMEOUT, true) == null;
              //InfoFetcher fetcher = loadData(in);
    //          try {
    //               FileOutputStream out = new FileOutputStream(f);
    //               fetcher.addFetcherListener(new FetcherListener() {
    //                    public void fetchedMore(byte[] buf, int start, int end) {
    //                    public void fetchedAll(byte[] buf) {
    //          } catch (IOException iox) {
    //               iox.printStackTrace();
    //               return false;
    //          return true;
         * @deprecated use Find
         public static List<File> findAllFiles(Pattern p) {
              ArrayList<File> l = new ArrayList<File>();
              //File start = File.listRoots()[0];
              File start = new File("C:\\");
              return recursiveFindAll(start, null, p, true, l, 0);
              //l;
         * @deprecated use Find
         private static List recursiveFindAll(File current, File cameFrom, Pattern p, boolean startDescending, ArrayList<File> list, int level) {
              //System.out.println("" + level + " Scanning: " + current + "par: " + cameFrom);
              System.out.println("Scanning: " + current);
              Matcher m = p.matcher(current.getName());
              if (current.getName().equals("C:\\")) {
                   System.out.println("root");
                   try {
                        System.in.read();
                   catch (IOException iox) {}
              if (m.matches()) {
                   //return current;
                   list.add(current);
                   System.out.println("Adding " + current);
              File[] files = current.listFiles();
              if (startDescending) {
                   //File value = descend(current, cameFrom, p, startDescending);
                   descendAll(current, cameFrom, p, startDescending, list, level + 1);
                   //ascendAll(current, cameFrom, p, startDescending, list, level + 1);
                   //if (value != null) return value;
                   //return ascend(current, cameFrom, p, startDescending);
              else {
                   //ascendAll(current, cameFrom, p, startDescending, list, level + 1);
                   descendAll(current, cameFrom, p, startDescending, list, level + 1);
                   //File value = ascend(current, cameFrom, p, startDescending);
                   //if (value != null) return value;
                   //return descend(current, cameFrom, p, startDescending);               
              return list;
         * @deprecated use Find
         private static List ascendAll(File current, File cameFrom, Pattern p, boolean startDescending, ArrayList<File> list, int level) {
              File par = current.getParentFile();
              if (par == null) {
                   return list;
              par = par.getAbsoluteFile();
              if (par.equals(cameFrom)) {
                   return list;
              recursiveFindAll(par, current, p, false, list, level);
              return list;
         * @deprecated use Find
         private static File descendAll(File current, File cameFrom, Pattern p, boolean startDescending, ArrayList<File> list, int level) {
              File files[] = current.listFiles();
              if (files == null) {
                   return null;
              for (int i = 0; i < files.length; i++) {
                   File child = files[i];
                   if (child.equals(cameFrom)) {
                        continue;
                   recursiveFindAll(child, current, p, true, list, level);
              return null;
         public File getUniqueName(File f) {
              return getUniqueName (f, new MessageFormat("~{0,number,integer}"));
         public String getNameWOExtension(File f, boolean useAbsolute) {
              int idx = f.getName().indexOf(".");
              return (idx == -1) ? (useAbsolute ? f.getAbsolutePath() : f.getName()) : (useAbsolute ? f.getAbsolutePath() : f.getName()).substring(0, (useAbsolute ? f.getAbsolutePath().lastIndexOf(".") : f.getName().lastIndexOf(".")));
         public String getFileType (File f, boolean includeDot) {
              int idx = f.getName().lastIndexOf(".");
              return idx == -1 ? "" : f.getName().substring(idx + (includeDot ? 0 : 1));
         public File getUniqueName(File f, MessageFormat format) {
              String base = getNameWOExtension(f, true);
              String extension = getFileType(f, true);
              int count = 0;
              while (f.exists()) {
                   count++;
                   f = new File (base + format.format(new Object[] {Integer.valueOf(count)}) + extension);
              return f;
         public static boolean isUTF16 (File f) throws IOException {
              FileInputStream in = null;
              try {
                   if (!f.exists() || f.length() < 2) return false;
                   in = new FileInputStream(f);
                   byte b = (byte)in.read();
                   if (!(b == -1)) return false;
                   b = (byte) in.read();
                   return b == -2;
              finally {
                   if (in != null) in.close();
         public static boolean isUTF16(PushbackInputStream in) {
              boolean got1 = false, got2 = false;
              byte b = 0, b2 = 0;
              try {
                   b = (byte)in.read();
                   got1 = true;
                   if (!(b == -1 || b== -2)) {
                        return false;
                   b2 = (byte) in.read();
                   got2 = true;
                   return b == -1 ? b2 == -2 : b2 == -1;
              catch (IOException iox) {
                   iox.printStackTrace();
              finally {
                   try {
                        if (got1) {
                             in.unread(b);
                        if (got2) {
                             in.unread(b2);
                   } catch (IOException iox) {
                        iox.printStackTrace();
              return false;
         public void saveJTableToCSV(JTable table, File f) throws IOException {
              if (table == null || f == null) return;
              TableModel model = table.getModel();
              if (model == null) return;
              int rows = model.getRowCount();
              int columns = model.getColumnCount();
              PrintWriter pw = new PrintWriter(new FileWriter(f));
              for (int i = 0; i < rows; i++) {
                   for (int j = 0; j < columns; j++) {
                        Object o = model.getValueAt(i, j);
                        pw.print(o.toString());
                        if (j != columns - 1) {
                             pw.print(",");
                   pw.println();
         public static String getPathRelativeTo(File path, File relativeTo) {
              return getPathRelativeTo(path.getAbsolutePath(), relativeTo.getAbsolutePath());
         public static String getPathRelativeTo(String path, String relativeTo) {
              if (!path.startsWith(relativeTo)) return null;
              path = path.substring(relativeTo.length());
              if (path.startsWith(File.separator)) path = path.substring(File.separator.length());
              return path;

  • Numeric to string conversion

    I simply wish to take several numbers (controls) multiply them together but then I need the answer to be converted into the form of a string (ascii).
    Is there a VI available to do this ??

    Hi sammy,
          Right-click on the diagram and have a look around the String functions palette - specifically the String/Numeric conversion functions.
    Cheers.
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

Maybe you are looking for