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.

Similar Messages

  • \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

  • 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

  • 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

  • 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

  • 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)

  • Float to string conversion

    import java.lang.String;
    import java.lang.Integer;
    import java.lang.Float;
    import java.util.Hashtable;
    import java.util.Enumeration;
    public class VenkatCart {
    protected Hashtable items = new Hashtable();
    public VenkatCart() {
    public void addItem(String idk,int ic,int size,float rate,int qty) {
    String item[]={idk,Integer.toString(ic),Integer.toString(size),Float.toString(rate),Integer.toString(qty)};
    if (items.containsKey(idk)) {
         String tmpItem[] = (String[])items.get(idk);
         int tmpQuant = Integer.parseInt(tmpItem[4]);
         qty += tmpQuant;
         tmpItem[4] = Integer.toString(qty);
    else {
         items.put(idk,item);
    // get an Enumeration to the list of items in the shopping cart
    public Enumeration getEnumeration() {
    return items.elements();
    // get the total cost of all of the items currently in the shopping cart
    public float getCost() {
    Enumeration enum = items.elements();
    String tmpItem[];
    float totalCost = 0.0f;
    while (enum.hasMoreElements()) {
         tmpItem = (String[])enum.nextElement();
         totalCost += (Integer.parseInt(tmpItem[4]) * Float.parseFloat(tmpItem[3]));
    return totalCost;
    // get the total number of items currently in the shopping cart
    public int getNumOfItems() {
    Enumeration enum = items.elements();
    String tmpItem[];
    int numOfItems =0;
    while (enum.hasMoreElements()) {
         tmpItem = (String[])enum.nextElement();
         numOfItems += Integer.parseInt(tmpItem[4]);
    return numOfItems;
    When I call the method "getCost()" from a jsp program, I get the error message
    Error: java.lang.Float: method parseFloat(Ljava/lang/String;)F not found has been reported.
    I think the mistake is in conversion.
    Please help me.
    My thanks in advance.

    Why don't you try the following:
    Float tmpFloat=new Float(tmpItem[3]);
    totalCost += (Integer.parseInt(tmpItem[4]) * tmpFloat.floatValue();
    Justyna

  • DEC to STRING conversion

    I can't seem to convert a DEC to a string.  This is a field defined in the dictionary by type TZNTSTMPS (DEC 15).  I tried the following to do the conversions:
    d_string = d_dec.
    write d_dec to d_string.
    CALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT'
      EXPORTING
        betrg                         = d_dec
    *   WAERS                         = ' '
    *   NEW_DECIMAL_SEPARATOR         =
    *   NEW_THOUSANDS_SEPARATOR       =
    IMPORTING
       STRING                        = d_string.
    They all give me the same result which is an 8 character result with * being the first charcter.  Ultimately, what I need is to grab the first 8 characters as that is a date.
    Regards,
    Aaron

    Thanks for the idea.  ABI_TIMESTAMP_CONVERT_FROM works.
    Sorry, I thought it did.  It throws a run-time error telling me:
    Error analysis
        At the statment
             "WRITE src TO dest"
        only character-type data objects are supported at the argument position
        "dest", but no strings are supported (data types STRING and XSTRING).
        In this particular case, the operand "dest" has the
        type "g".
    It sounds like it doesn't like the DEC data type as an input but that is all I have to work with.
    Any ideas?
    Aaron
    Edited by: Aaron Shover on May 12, 2008 10:54 PM
    Sorry, it looks like LXHME_TIMESTAMP_CONVERT_FROM will work for me.
    Regards,
    Aaron
    Edited by: Aaron Shover on May 12, 2008 10:58 PM

  • PMString to String conversion

    Hi there,
    How can I convert PMString value in to String?
    I have
    PMString str = "Hi, How are you?";
    I would like to do some Regular expression on that.
    So I want to convert in to String.
    Thanks in advance.
    Saravanan.K

    Hi Praveen,
    Can you please show a sample code showing the above conversion. And also use of string operation/function on the same.
    Actually, I have two strings:       PMString currentValue  and      PMString newValuePureText
    I need to mark the difference between the two strings.
    So I want to convert the above PMSTRINGS to strings and apply basic string functions on them. Can I do that?
    Regards,
    Yogesh Walke

  • Incorrect timestamp to string conversions?

    Why does this code give different times when the UTC format? input changes?  The FieldPoint controller
    timezone is set to UTC and compensate for DST is disabled.  I would expect the two conversions to give the
    same result in this case but they don't.  RT 8.5.1.  The timestamps of readings in MAX are correct and the
    string formatted with UTC format? True is correct.
    Thanks.
    Matt
    Attachments:
    utc_time.vi ‏8 KB

    We're still seeing this in LabVIEW 2012.
    But it only appears to affect dates in BST, as soon as you get back into GMT this '-1' day error goes away
    Attachments:
    test - BST - UTC format bug.vi ‏16 KB

  • Array(n elements) to string conversion

    i got some questions about data conversion:
    i have an array with n elements, witch i need to extract and convert to string in order to send data over udp vi. the problem is
    that the vi is getting pretty big and i'm starting to wonder about memory&cpu usage. So can anyone check
    this vi out and see if there is place for improvements.
    Attachments:
    array-string(6ch).vi ‏85 KB

    I've done some more changes and hidden most of the code in a sub-vi. I've also shown how to make the code scalable, in case you suddenly need to accomodate 7 or 10 inputs.
    In the new VI's, I've shown 2 different approaches to your code, but both are functionally equivalent.
    As far as performance, you can always gain a little boost by going to File --> VI Properties --> "Execution" and deselect "Allow Debuging".
    There might be other ways to optimize your code, but the thing you need to ask yourself is if this is really necessary.
    If you go to File --> VI Properties --> Memory
    you will see some "stats" for your current VI.
    The one you posted originally, has a memory footprint of ~117.5k... as for cpu-usage, unless you are working with a significantly bigger project, you do not need to worry about performance at all, unless you are on a very very old computer.
    That said, optimizing code is always important, and it is a very good way to learn, but sometimes one must be able to see when "enough is enough" and something is "good enough".
    For comparision, the new VI I made for you, which includes 2 examples/different ways of doing it, takes only ~56.7k... though I'm not sure if you need to add the sub_vi to this or if it is already added.. the sub-vi is ~23.7k total..
    Hope this helps you, and if someone else can take a look to see if there is any other obvious ways to optimize the code, then both me and the thread-owner will learn something more here.
    Project Engineer
    LabVIEW 2009
    Run LabVIEW on WinXP and Vista system.
    Used LabVIEW since May 2005
    Certifications: CLD and CPI certified
    Currently employed.
    Attachments:
    array-string(6ch) modified 2.vi ‏45 KB
    dbl_to_string_sub_vi.vi ‏19 KB

Maybe you are looking for

  • Creating target field based on input node

    Hi all,   I'm facing a problem in creating the target node based on input node. See if the input node value is repeated I don't want to create the target field for the second occurrence. <?xml version="1.0" encoding="UTF-8"?> <ns0:MT_temp xmlns:ns0="

  • VEFU - Manual add entries for INTRASTATE declaration

    Hello Is it possible in transaction VEFU, during manual adding new entries: 1. Add also document number? On system 6.0 I have this field not for edit. 2. Add returns? I'm adding document category Return or Credit Memo, but those values  are not subst

  • Photoshop won't open or create new documents, works breifly after full windows restart.

    Hi everyone, I am having an issues with photoshop becoming unresponsive. After about 10 minutes Photoshop will not open or create a document. I've spent hours trying to fix this with no results. I've spent time on Nvidia's forums and tried downgradin

  • Fiori - Generic Approval App

    Hi everybody, today my boss asked me if there is a generic approval app in Fiori. I replied that there are several apps available to approve different requests: Approve Leave Requests Approve Travel Requests Approve Travel Expenses Approve Timesheets

  • Need assistance on 5800Xm internet

    Hi alll, Just yesterday i have purchased the Nokia 5800XM. I am using Vodafone sim from india. I have Vodafone live and idont have the WWW service. Can i use maps using that? Can i use the push mails? as i am new to this kinda mobile pls help me Adva