Conversion error in JCo outbound call

hi all
     i am working on making OUTBOUND call from SAP using JCo,
     our SAP system is Unicoded and i am refering Jco example 5 from JCo2.1.8 demo.
    i am able to make connection successfully , but while running test ABAP program for testing connection, i am getting Short dump error headed :
              Conversion error "ECHOTEXT" from character set 4103 to character set 4102
A conversion error occurred during the execution of a      Remote Function
*Call. This happened either when the data was received *      or when it was
*sent. The latter case can only occur if the data is sent from * a Unicode
system to a non-Unicode system.
The current program had to be terminated because of an
error when installing the R/3 System.
my ABAP prg. is this :
  REPORT  z_jco_test.
PARAMETERS: requtext LIKE sy-lisel.
*ECHOTEXT LIKE  SY-LISEL
**"              RESPTEXT LIKE  SY-LISEL
DATA: echotext type SYLISEL,
      resptext LIKE sy-lisel,
      rfctest TYPE TABLE OF rfctest,
      wa_rfctest TYPE rfctest.
wa_rfctest-rfcdata1 = requtext.
wa_rfctest-rfcdata2 = 'Hello World'.
APPEND wa_rfctest TO rfctest.
CALL FUNCTION 'RFC_PING'
  DESTINATION 'JCO'.
*CALL FUNCTION 'STFC_CONNECTION'
*  EXPORTING
*    requtext       =
** IMPORTING
**   ECHOTEXT       =
**   RESPTEXT       =
CALL FUNCTION 'STFC_CONNECTION'
  DESTINATION 'JCO'
  EXPORTING
    requtext = requtext
  IMPORTING
    echotext = echotext
    resptext = resptext
  TABLES
    rfctest  = rfctest.
WRITE: 'Echo Text: ', echotext.
WRITE: 'Response Text: ', resptext.
LOOP AT rfctest INTO wa_rfctest.
  WRITE: / 'rfcdata1: ', wa_rfctest-rfcdata1.
  WRITE: / 'rfcdata2: ', wa_rfctest-rfcdata2.
ENDLOOP. 
i have made RFC connection unicode yes.
please guide me

Helo!
We have a similar problem here. Could you please explain your solution in a bit more detail ?
Thanks in advance,
Markus

Similar Messages

  • JCo Outbound( calling Java Function from ABAP )

    HI,
    I want to call a JAVA function from ABAP.I have installed the JCo toolkit and included the sapjco.jar file in the classpath of my system.
    When i execute the program(Example5.java,provided with sapjco.zip) from the command prompt,it is working fine,the server listens to the calls made from ABAP via RFC destination.
    But if i copy the same program in NWDS in a JAVA project,to run it from there as JAVA application,after including the sapjco.jar file in the project JAVA build path,i get the following error,marked by a red cross ,at the head of the program,even before i run it.
    <b>This compilation unit indirectly references the missing type com.sap.jdsr.writer.DsrIPassport (typically some required class file is referencing a type outside the classpath)</b>
    What changes do i need to make,to run it from NWDS?
    I tried to include the sapjcorfc.dll file along with the sapjco.jar in the java build path,but it doesn't help.
    Please tell how to solve this issue?
    Regards,
    Siddhartha

    hello sid,
    which jco version are you using?
    are you using the same jco lib when running in command
    line and in nwds?
    if you are, try checking the order of the your classpath.
    your jco lib (which you are using in command line) should
    come first in order prior to the default libraries in your project.
    regards
    jo

  • Conversion Error in JCO due to BigDecimal.toString() change in Java 1.5

    Hi folks,
    we have a problem here. A field which is set through a java.math.BigDecimal(0) gets very funny values in JCo. We had a look insight JCo und found, that JCo.Record does the following with BigDecimals:
    if ((value instanceof BigDecimal) && itype == 2)
       try
         BigDecimal bd=(BigDecimal) value;
         bd=bd.setScale(super.decimals[index], 6);
         encodeBCD(bd.toString(), index);
       catch (Exception ex)
         throw new ConversionException(ex.getMessage());
    A value of 0 (and super.decimals[index]==7) is than translatet not to "0.0000000" but to "0E-7". This is a big difference to what JDK 1.4 used to print and encodeBCD fails with "0E-7". JCo with JDK 1.5 should use "toPlainString()" now at this place (or adopt encodeBDC), but that would not be downward compatible anymore...
    OK, we solved this issu for now by transforming to a string ourself at a central point befor using "setValue" in JCo. The other way would be to use XML for all settings. But that would mean a change of the whole software.
    Does anybody of you know of a different solution we could use? Or will there be a new JCo Version solving this?
    Thanks
    PS: try this code. It will make all clear to you:
    BigDecimal bd = new BigDecimal(0);
    BigDecimal bd1 = bd.setScale(7, BigDecimal.ROUND_HALF_EVEN);
    BigDecimal bd2 = bd.setScale(6, BigDecimal.ROUND_HALF_EVEN);
    System.out.println(bd.toString()+"=="+bd.toPlainString());
    System.out.println(bd1.toString()+"!="+bd1.toPlainString());
    System.out.println(bd2.toString()+"=="+bd2.toPlainString());
    Result is:
    0==0
    0E-7!=0.0000000
    0.000000==0.000000
    Message was edited by: Daniel Becker

    user712747 wrote:
    When we are converting string to BigDecimal, in JAVA 1.5 it is post fixing with extra “0”(zero) if the string value ends with single “ ”0” (zero).That sounds very odd.
    To overcome this we can use toPlainString() method in Java 1.5. But it is not feasible to make this change all over places in our code.Aha! This sounds like conversion from BigDecimal to String; not what you described above. And I have to admit, that change mystified me too, because it goes against the grain of backwards-compatibility. It's possible that it was meant to "standardize" output for floating-point values though.
    Is there any fix available?Well, one thing might be to use toPlainString() in the places where you're having problems. The string produced by toString() is still suitable for converting back to BigIntegers (and will do so precisely; I believe the toPlainString() style could produce a BigDecimal with the same value but different scale), so unless you actually need the string for viewing you can leave it alone.
    But as EJP says, post some code.
    Winston

  • 485 Ambiguous - Outbound Calls Only

    I'm having some issues with the 485 Ambigous Error, but on Outbound calls only.  I've read several blog posts and was able to solve this issue for incoming calls, but have yet to find a solution for outbound calls.
    I have two phone numbers: XXX-XXX-5232 and XXX-XXX-3081.  All of my users are configured in Lync with +1XXXXXX5232;ext=XXXXX
    XXX-XXX-5232 is set to normalize to +1XXXXXX5232;ext=53999 which is a Lync User that is setup with Team Call to ring multiple other extensions.  I'm not aware of any AutoAttendant or Response group that is configured with just +1XXXXXX5232.
    Again, inbound calling is working just fine and outbound calls work as expected, they just report the 485 Ambiguous for each call.
    Thanks in advance for any help you can provide.

    Yes, the call is routed to the Gateway.  In fact, the call completes successfully.  Here is the trace.  Hopefully it will be readable:
    12:17:03.513 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288602   )  ---- Incoming SIP Message from 10.188.0.18:61275 to SIPInterface #0 ---- [Time: 11:17:03]
    12:17:03.543 : 10.188.0.19 : NOTICE  : INVITE sip:[email protected];user=phone SIP/2.0
    FROM: "VRRL - Kitchen"<sip:+1XXXXXX5232;[email protected];user=phone>;epid=621B6C2CF5;tag=aeb33cd2cc
    TO: <sip:[email protected];user=phone>
    CSEQ: 32959 INVITE
    CALL-ID: 14fe8790-50ef-476a-80ac-e57061c0a2af
    MAX-FORWARDS: 70
    VIA: SIP/2.0/TLS 10.188.0.18:61275;branch=z9hG4bK7f7f1664
    CONTACT: <sip:VRRL-SBA.cdol.int:5067;transport=Tls;ms-opaque=86db4f0fd1133b15>
    CONTENT-LENGTH: 552
    SUPPORTED: 100rel
    USER-AGENT: RTCC/4.0.0.0 MediationServer
    CONTENT-TYPE: application/sdp
    ALLOW: ACK
    Allow: CANCEL,BYE,INVITE,PRACK,UPDATE
    v=0
    o=- 885 1 IN IP4 10.188.0.18
    s=session
    c=IN IP4 10.188.0.18
    b=CT:1000
    t=0 0
    m=audio 53854 RTP/AVP 97 101 13 0 8
    c=IN IP4 10.188.0.18
    a=tcap:1 RTP/SAVP
    a=pcfg:1 t=1
    a=rtcp:53855
    a=label:Audio
    a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:ssoH69QQto9/wyQyDEbtGezAe4zuH4ulyHNtUfRT|2^31|1:1
    a=crypto:2 AES_CM_128_HMAC_SHA1_80 inline:Eas2Y5diRZ5HKgxFHpLLTdr8EWMmERj6ZGLjf8LO|2^31
    a=sendrecv
    a=rtpmap:97 RED/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=rtpmap:13 CN/8000
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=ptime:20
     [Time: 11:17:03]
    12:17:03.573 : 10.188.0.19 : NOTICE  : (     sip_stack)(2288604   )  new AcSIPCallAPI created - #276 [Time: 11:17:03]
    12:17:03.593 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288605   )  |       | new GetNewSIPCall created - #517 [Time: 11:17:03]
    12:17:03.603 : 10.188.0.19 : NOTICE  : (  lgr_stk_mngr)(2288606   )  Resource StackSession <#276> Allocated [Time: 11:17:03]
    12:17:03.613 : 10.188.0.19 : NOTICE  : (     sip_stack)(2288607   )  TlsTransportObject#57::CheckForConnectionPersistent - Opening persistent connection with proxy: 10.188.0.18:61275 [Time: 11:17:03]
    12:17:03.613 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288608   )  |       |(SIPTU#517)INVITE State:Idle() [Time: 11:17:03]
    12:17:03.623 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288609   )  DNSResolver::HandleARecordQuery - Host:VRRL-SBA.cdol.int resolved in external table [Time: 11:17:03]
    12:17:03.633 : 10.188.0.19 : NOTICE  : (     sip_stack)(2288610   )  (SIPTU#517) HandleResolutionSuccessEV: Domain name VRRL-SBA.cdol.int was successfully resolved to IP: 10.188.0.18 [Time: 11:17:03]
    12:17:03.643 : 10.188.0.19 : NOTICE  : (     sip_stack)(2288611   )  SIPCall(#517) changes state from Idle to Invited [Time: 11:17:03]
    12:17:03.653 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288612   )  |       |       |       #276:SIP_DNS_RESOLVED_EV(14fe8790-50ef-476a-80ac-e57061c0a2af)
    [Time: 11:17:03]
    12:17:03.663 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288613   )  |       |       |       #276:SIP_SETUP_EV(14fe8790-50ef-476a-80ac-e57061c0a2af)
    [Time: 11:17:03]
    12:17:03.673 : 10.188.0.19 : NOTICE  : (      lgr_call)(2288614   )  (#276) Call Allocated. [Time: 11:17:03]
    12:17:03.673 : 10.188.0.19 : NOTICE  : (   lgr_stk_ses)(2288615   )  SIPStackSession::HandleStackSetupEV - NEWCALL: SrcPN=0 [Time: 11:17:03]
    12:17:03.683 : 10.188.0.19 : NOTICE  : (   lgr_stk_ses)(2288616   )  <SESSION #276> SendToCall - event: NEW_CALL_EV  m_Call#276 [Time: 11:17:03]
    12:17:03.693 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288617   )  |       |       #276:NEW_CALL_EV:(14fe8790-50ef-476a-80ac-e57061c0a2af) [Time: 11:17:03]
    12:17:03.703 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288618   )  |       |       #276:Call changing states from:IdleState to:NewCallState_IP2Tel [Time:
    11:17:03]
    12:17:03.713 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288619   )  ServicesMngr::GetEndPoint PhoneNum = 402XXX0899
     [Time: 11:17:03]
    12:17:03.713 : 10.188.0.19 : NOTICE  : (   lgr_psbrdif)(2288620   )  GetTrunkGroupId- TrunkGroup:1 found DstNum:402XXX0899 DstPfx:* SrcNum:+1XXXXXX5232 SrcPfx:* SrcIp:abc0012 SrcIpPfx:10.188.0.18 [Time: 11:17:03]
    12:17:03.723 : 10.188.0.19 : NOTICE  : (   lgr_psbrdif)(2288621   )  QueryOnHookPortStatus (ChannelNum=0), status = 1 Polarity = 0 [Time: 11:17:03]
    12:17:03.733 : 10.188.0.19 : NOTICE  : (   lgr_psbrdif)(2288622   )  Current trunks status:  [Time: 11:17:03]
    12:17:03.743 : 10.188.0.19 : NOTICE  : (       lgr_num)(2288623   )  PhoneNumber::RemovePrefix - Number change from +1XXXXXX5232 to 1XXXXXX5232 [Time: 11:17:03]
    12:17:03.753 : 10.188.0.19 : NOTICE  : (      lgr_call)(2288624   )  Call::SetCoderListForCall #276 Found 2 Common Coders For Call [Time: 11:17:03]
    12:17:03.763 : 10.188.0.19 : NOTICE  : (      lgr_call)(2288625   )  <Call #276> Coder g711Ulaw64k20 : 20 [Time: 11:17:03]
    12:17:03.763 : 10.188.0.19 : NOTICE  : (      lgr_call)(2288626   )  <Call #276> Coder g711Alaw64k20 : 20 [Time: 11:17:03]
    12:17:03.773 : 10.188.0.19 : NOTICE  : ( lgr_profiling)(2288627   )  <Call 276> Profiled<Tel=0,Ip=0>: JBMinDel=10 JBOptF=10 EEarlyM=1 FaxTM=1 IPDS=46 IsFaxU=2 PI2IP=-1 SigIPDF=40 CNGMode=0 DTMFUsed=0 NSEMode=0 PlayRBTone2IP=1
    RBUdpPort=0 RTPRD=0 SCE=0 VxxTT=2 Dst2Rdrt=0 DTMFVol=20 ECE=1 ECurDis=0 EDigDel=0 ERevP=0 FHPer=700 InG=32 MWIA=0 MWID=0 VVol=32 ReorderTime=255 DIDWink=0 2StageDial=0 DiscOnBusyT=1 DiscOnBrok=1 DPInd=255 AGC=0 NLP=0 [Time: 11:17:03]
    12:17:03.783 : 10.188.0.19 : NOTICE  : (      lgr_call)(2288628   )  |       |       #276GetNextUI:GlobalUI=442334516, mACAddrLsb=3257879 [Time: 11:17:03]
    12:17:03.793 : 10.188.0.19 : NOTICE  : (      lgr_call)(2288629   )  |       |       #276GetNextUI:GlobalUI=442334517 [Time: 11:17:03]
    12:17:03.803 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288630   )  |       #0:NEW_CALL_EV   : (14fe8790-50ef-476a-80ac-e57061c0a2af) [Time: 11:17:03]
    12:17:03.813 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288631   )  EndPoint::MediaResourceList::AllocateMediaIpPortsByMediaRealmID Perform NEW allocation of Media ports for RealmIndex(0) port(6220) current allocations
    are:(1) [Time: 11:17:03]
    12:17:03.813 : 10.188.0.19 : NOTICE  : (     sip_stack)(2288632   )  SIPSDPSession#276 - Changing state from SIP_MEDIA_IDLE to SIP_MEDIA_OFFERED [Time: 11:17:03]
    12:17:03.823 : 10.188.0.19 : NOTICE  : (     sip_stack)(2288633   )  <BaseSIP SDPSESSION #276> UpdateChosenMediaByCN - CN as Remote 1 [Time: 11:17:03]
    12:17:03.833 : 10.188.0.19 : NOTICE  : (     sip_stack)(2288634   )  <BaseSIP SDPSESSION #276> UpdateChosenMediaByCN - Force silence suppression on chosen coder, because remote & local support CN [Time: 11:17:03]
    12:17:03.843 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288635   )  |       |(SIPTU#517)TRYING_REQ State:Invited(14fe8790-50ef-476a-80ac-e57061c0a2af) [Time: 11:17:03]
    12:17:03.853 : 10.188.0.19 : NOTICE  : (     sip_stack)(2288636   )  New SIPMessage created - #58 [Time: 11:17:03]
    12:17:03.863 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288637   )  ---- Outgoing SIP Message to 10.188.0.18:61275 from SIPInterface #0 ---- [Time: 11:17:03]
    12:17:03.873 : 10.188.0.19 : NOTICE  : SIP/2.0 100 Trying
    Via: SIP/2.0/TLS 10.188.0.18:61275;branch=z9hG4bK7f7f1664
    From: "VRRL - Kitchen"<sip:+1XXXXXX5232;[email protected];user=phone>;epid=621B6C2CF5;tag=aeb33cd2cc
    To: <sip:[email protected];user=phone>;tag=1c274616087
    Call-ID: 14fe8790-50ef-476a-80ac-e57061c0a2af
    CSeq: 32959 INVITE
    Supported: em,timer,replaces,path,early-session,resource-priority
    Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE
    Server: Audiocodes-Sip-Gateway-Mediant 1000 - MSBG/v.6.20A.045.006
    Content-Length: 0
     [Time: 11:17:03]
    12:17:03.883 : 10.188.0.19 : NOTICE  : (     sip_stack)(2288639   )  Resource SIPMessage deleted - #58 [Time: 11:17:03]
    12:17:03.883 : 10.188.0.19 : NOTICE  : (   lgr_stk_ses)(2288640   )  SIPStackSession::HandleStackSetupEV - SETUP: SrcPN=0 [Time: 11:17:03]
    12:17:03.893 : 10.188.0.19 : NOTICE  : (   lgr_stk_ses)(2288641   )  <SESSION #276> SendToCall - event: SETUP_EV  m_Call#276 [Time: 11:17:03]
    12:17:03.903 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288642   )  |       |       #276:SETUP (TO:402XXX0899, FROM:+1XXXXXX5232):(14fe8790-50ef-476a-80ac-e57061c0a2af)
    [Time: 11:17:03]
    12:17:03.913 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288643   )  |       |       #276:Call changing states from:NewCallState_IP2Tel to:InitiatedState_IP2Tel
    [Time: 11:17:03]
    12:17:03.923 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288644   )  |       #0:SETUP_EV   : (14fe8790-50ef-476a-80ac-e57061c0a2af) [Time: 11:17:03]
    12:17:03.933 : 10.188.0.19 : NOTICE  : (   lgr_psbrdif)(2288645   )  UpdateChannelParams, Channel 0
     [Time: 11:17:03]
    12:17:03.943 : 10.188.0.19 : NOTICE  : (   lgr_psbrdif)(2288646   )  #0:PSOSBoardInterface::ConfigureFaxModemChannelParams FAXTransportType=3 Modem configuration VxxTransportType=2 not allowed, forced to 3
     [Time: 11:17:03]
    12:17:03.953 : 10.188.0.19 : NOTICE  : (   lgr_psbrdif)(2288647   )  #0:ConfigFaxModemChannelParams NSEMode=0, CNGDetMode=0, FAXTranType=3, VxxTranType=3, VoiceVol= 0, DTMFVol=-11, InGain=0, RTPRedDepth=0, ECE=1, SCE=3, ECNlpMode=0,
    DJBufMinDelay=10, DJBufOptFac=10, Result=1) [Time: 11:17:03]
    12:17:03.963 : 10.188.0.19 : NOTICE  : (   lgr_psbrdif)(2288648   )  Turn ringer ON for channel 0 [Time: 11:17:03]
    12:17:03.973 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288649   )  |       #0:FXO Seize Line  [Time: 11:17:03]
    12:17:03.973 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288650   )  |       #0:ALERT_EV (send)  : (14fe8790-50ef-476a-80ac-e57061c0a2af) [Time: 11:17:03]
    12:17:03.983 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288651   )  |       |       #276:ALERT_EV:(14fe8790-50ef-476a-80ac-e57061c0a2af) [Time: 11:17:03]
    12:17:03.993 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288652   )  |       |       #276:Call changing states from:InitiatedState_IP2Tel to:AlertingState_IP2Tel
    [Time: 11:17:03]
    12:17:04.003 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288653   )  |       |       |       #276:ALERT_EV(14fe8790-50ef-476a-80ac-e57061c0a2af)
    [Time: 11:17:03]
    12:17:04.013 : 10.188.0.19 : NOTICE  : (     sip_stack)(2288654   )  New SIPMessage created - #93 [Time: 11:17:03]
    12:17:04.013 : 10.188.0.19 : NOTICE  : (     sip_stack)(2288655   )  SIPSDPSession#276 - Changing state from SIP_MEDIA_OFFERED to SIP_MEDIA_COMPLETED [Time: 11:17:03]
    12:17:04.023 : 10.188.0.19 : NOTICE  : (   lgr_stk_ses)(2288656   )  DtmfCapNegotiationAlgorithm :: TxDtmfMethod = DTMF_RFC2833_SUPPORTED [Time: 11:17:03]
    12:17:04.033 : 10.188.0.19 : NOTICE  : (   lgr_stk_ses)(2288657   )  DtmfCapNegotiationAlgorithm :: TxRtpRfc2833Payload = 101 [Time: 11:17:03]
    12:17:04.043 : 10.188.0.19 : NOTICE  : (   lgr_stk_ses)(2288658   )  <SESSION #276> SendToCall - event: DTMF_CONTROL_EV  m_Call#276 [Time: 11:17:03]
    12:17:04.053 : 10.188.0.19 : NOTICE  : (      lgr_flow)(2288659   )  |       |       #276:DTMF_CONTROL_EV:(14fe8790-50ef-476a-80ac-e57061c0a2af) [Time:
    11:17:03]
    12:17:04.063 : 10.188.0.19 : NOTICE  : SIP/2.0 183 Session Progress
    Via: SIP/2.0/TLS 10.188.0.18:61275;branch=z9hG4bK7f7f1664
    From: "VRRL - Kitchen"<sip:+1XXXXXX5232;[email protected];user=phone>;epid=621B6C2CF5;tag=aeb33cd2cc
    To: <sip:[email protected];user=phone>;tag=1c274616087
    Call-ID: 14fe8790-50ef-476a-80ac-e57061c0a2af
    CSeq: 32959 INVITE
    Contact: <sip:[email protected]:5067;transport=tls>
    Supported: em,timer,replaces,path,early-session,resource-priority
    Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE
    Require: 100rel
    RSeq: 1
    Server: Audiocodes-Sip-Gateway-Mediant 1000 - MSBG/v.6.20A.045.006
    Content-Type: application/sdp
    Content-Length: 254
    v=0

  • WebDynpro call Returns an exception: Type conversion error

    Hi,
    I'm trying to start some of the standard SAP web dynpro .
    most of then work fine.
    some don't and i get the following error message.
    Root Cause
    The initial exception that caused the request to fail, was:
    +com.sap.aii.proxy.framework.core.DataAccessException: Type conversion error, field TAX_PER_DIEMTAX, complex type class com.sap.xss.tra.tre.model.expenses.Ptrv_Web_General_Data_Int+
    +at com.sap.aii.proxy.framework.core.JcoBaseTypeData.propagateJcoException(JcoBaseTypeData.java:130)+
    +at com.sap.aii.proxy.framework.core.JcoBaseTypeData.setElementValue(JcoBaseTypeData.java:751)+
    +at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.setAttributeValue(DynamicRFCModelClass.java:482)+
    +at com.sap.tc.webdynpro.progmodel.context.GenericModelClassCopyHelper.setAttributeValue(GenericModelClassCopyHelper.java:69)+
    +at com.sap.tc.webdynpro.progmodel.context.CopyService.copyCorresponding(CopyService.java:55)+
    +... 66 more+
    See full exception chain for details.
    could anyone give me an hint.
    jco connetion are made and testet for:
    sap_r3_humanresources
    sap_r3_finacials
    sap_r3_selfservicegenerics
    sap_r3_travel
    analog the *_MetaData
    Thank in advance
    Maximilian

    Hello
    did you solve this problem? I have the same error
    Regards

  • Web service call on hosted env fails with hex to raw conversion error

    Hi,
    I use Enciva to run some hosted Apex applications, and I've had a call open with them for a few days re: setting up a web service call to an e-mail checker, provided by a company called Rolosoft. The e-mail checker runs fine from outside the hosted environment, but I get the following error trying to call from the Apex application:
    ORA-06502: PL/SQL: numeric or value error: hex to raw conversion error
    Has anyone hit this error before with web services, I've tried manual and RESTful but get the same error message.
    Thanks,
    Mike

    Hello,
    We encounter the same issue using manual WebService !
    Environnement Settings :
    Oracle 11g R2 - Windows W2K3 - NLS_CHARACTERSET : AL32UTF8
    Apex 4.1
    Any suggestions, helps ?
    Thanks,
    G.

  • Error messages in 2651XM GW, cause outbound call failure, reboot fix it

    Cisco 2651XM as Gateway, it keep posting these error message and after a period of time, it cause outbound call failure.
    Reboot fix it but there're still error messages...
    How to fix it? It's IOS bug or hardware issue? How to identify?
    Cisco IOS Software, C2600 Software (C2600-IPVOICE-M), Version 12.3(8)T10, RELEASE SOFTWARE (fc2)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2005 by Cisco Systems, Inc.
    Compiled Wed 03-Aug-05 20:45 by hqluong
    ROM: System Bootstrap, Version 12.2(7r) [cmong 7r], RELEASE SOFTWARE (fc1)
    cpchn1-g1 uptime is 6 hours, 56 minutes
    System returned to ROM by reload at 03:52:44 NZST Tue Apr 17 2007
    System restarted at 03:56:27 NZST Tue Apr 17 2007
    System image file is "flash:c2600-ipvoice-mz.123-8.T10.bin"
    Cisco 2651XM (MPC860P) processor (revision 0x100) with 118784K/12288K bytes of memory.
    Processor board ID JAE072000AJ (1555074759)
    M860 processor: part number 5, mask 2
    2 FastEthernet interfaces
    62 Serial interfaces
    2 Channelized E1/PRI ports
    32K bytes of NVRAM.
    32768K bytes of processor board System flash (Read/Write)
    See attach detail error messages

    Cisco 2651XM as Gateway, it keep posting these error message and after a period of time, it cause outbound call failure.
    Reboot fix it but there're still error messages...
    How to fix it? It's IOS bug or hardware issue? How to identify?
    Cisco IOS Software, C2600 Software (C2600-IPVOICE-M), Version 12.3(8)T10, RELEASE SOFTWARE (fc2)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2005 by Cisco Systems, Inc.
    Compiled Wed 03-Aug-05 20:45 by hqluong
    ROM: System Bootstrap, Version 12.2(7r) [cmong 7r], RELEASE SOFTWARE (fc1)
    cpchn1-g1 uptime is 6 hours, 56 minutes
    System returned to ROM by reload at 03:52:44 NZST Tue Apr 17 2007
    System restarted at 03:56:27 NZST Tue Apr 17 2007
    System image file is "flash:c2600-ipvoice-mz.123-8.T10.bin"
    Cisco 2651XM (MPC860P) processor (revision 0x100) with 118784K/12288K bytes of memory.
    Processor board ID JAE072000AJ (1555074759)
    M860 processor: part number 5, mask 2
    2 FastEthernet interfaces
    62 Serial interfaces
    2 Channelized E1/PRI ports
    32K bytes of NVRAM.
    32768K bytes of processor board System flash (Read/Write)
    See attach detail error messages

  • Cannot make any outbound calls "internal error"

    i can recieve calls but cannot make any outbound calls to mobile or landlines. Please help!

    International Support - Verizon Wireless
    Call them toll free from another phone. You should have got the Global Plan on your device before you went to Mexico.
    If you have a device with a Sim tray, get a local carriers Sim and use their service. It will cost money in either case.
    Good Luck

  • Conversion error, from character set 4102 to character set 4103

    Hi,
    We've developed a JCO server(in Java) with an ABAP report the function provided by the JCO server.
    MetaData:
         static {
              repository = new Repository("SMSRepository");
              fmeta = new JCO.MetaData("ZSMSSEND");
              fmeta.addInfo("TO", JCO.TYPE_CHAR, 255,   0,  0, JCO.IMPORT_PARAMETER, null);
              fmeta.addInfo("CONTENT", JCO.TYPE_CHAR, 255,   0,  0, JCO.IMPORT_PARAMETER, null);
              fmeta.addInfo("RETN", JCO.TYPE_CHAR, 255,   0,  0, JCO.EXPORT_PARAMETER, null);
              repository.addFunctionInterfaceToCache(fmeta);     
    Server parameters:
           Properties prop = new Properties();
           prop.put("jco.server.gwhost","shaw2k07");
           prop.put("jco.server.gwserv","sapgw01");
           prop.put("jco.server.progid","JCOSERVER01");
           prop.put("jco.server.unicode","1");
           srv = new SMSServer(prop,repository);
    If we run JCO server in both my client machine(from developer studio) and in the WAS machine(stand alone Java program), everything is ok. In the Abap side, the SM59 unicode test return the destination is an unicode system, and the ABAP report call the function can run smoothly.
    But we package this JCO server to a web application and deploy to WAS, problem occured. The SM59 unicode test still say the destination is an unicode system. But the ABAP report runs with an ABAP DUMP:
    Conversion error between two character set
    RFC_CONVERSION_FIELD
    Conversion error "RETN" from character set 4102 to character set 4103
    A conversion error occurred during the execution of a Remote Function
    Call. This happened either when the data was received or when it was
    sent. The latter case can only occur if the data is sent from a Unicode
    system to a non-Unicode system.
    I read the jrfc.trc log, it shows it receives data in unicode 4103(that's ok), but send data in unicode 4102(that's the problem).4102 is UTF-16 Big Endian and 4103  UTF-16 Little Endian. Our system is windows on intel 32 aritechture, so based on Note 552464, it should be 4103.
    Why it sends data (Java JCO server send output parameter to ABAP) in 4102?????
    What's the problem??? Thank you very much!!
    Best Regards,
    Xiaoming Yang
    Message was edited by:
            Xiaoming Yang

    Hello Experts,
    Any replies on this?
    I am also getting a similar kind of error.
    Do you have any idea on this?
    Thanks and Best Regards,
    Suresh

  • How to custom a conversion error in JSF page in JDeveloper

    According to the book "Core JavaServer Faces" p213 (fifth edition), if I add the following line to messages.properties file, and specifiy it in the faces-config.xml and .jsp file, then the displayed conversion error message should be my tailored one instead of the default. However, I still get the default error message. Besides, I didn't find "CONVERSION" variable in UIInput class. Is the book wrong? And what's the correct way?
    javax.faces.component.UIInput.CONVERSION=Please correct your input

    I didn't choose any special in JDeveloper IDE. I just selected "new" to create a file called "message.properties" and put the line there. I didn't specify converters excepts declaring the type in the Jave Beans. I guess the converting is done by the JSF framework automatically. It must be a JSF converter since I created the page as a JSF page.

  • Quantity conversion error in net price calculation in BAPI_PO_CREATE1

    I'm creating PO from BAPI_PO_CREATE1 .here i'm getting follwing error
    quantity conversion error in net price calculation.
    plz guide me to remove it.

    Are you using quantities directly entered by the user while calling the function to do the net price calculation? If that is the case, you should use FM CONVERSION_EXIT_ALPHA_INPUT to convert the quantity from the external format into the internal one!
    Another possibility is that some customizing is missing for converting quantities in different unit of measures (like the quantity in pieces is known, but the pricing calculation is being done on kilos.. but the convertion between these 2 unit of measures is missing).
    Good luck!

  • Sender file adapter conversion Error!!

    Hello every one....
    I am stuck with a problem...in my scenario,, there are possiblities that file may contain more than required paramters... in such case,,, paramters defined in conversion should go ahead and others should be ignored...
    for this very purpose i added the paramter:
    row.fieldSeparator                 ,
    row.fieldNames                     orderno,authcode,status
    row.endSeparator                  'nl'
    row.additionalLastFields      ignore
    the scenario works fine if the file contains thrree comma separated values but it raises an error if no of paramters increase as :
    Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting
    document line no. 1 according to structure 'row':java.lang.Exception: ERROR in configuration: more
    elements in file csv structure than field names specified!
    we are using PI 7.... does it require some more configuration in additoin to paramter row.additionalLastFields
    any help in this regard would be highly appreciated...
    thanx

    this parameter is already set, and this is the exact behavior i want from adapter engine...  but the problem
    here is different... the exception is raised at communication channel's conversion routine level,,, the retry
    interval is not the one defined in visual admin but infact the interval (polling) time defined in communication
    channel.... the system does'nt stop after 3 attempts,, but infact keep on trying to read it....
    one peice of information i  have found is in sap note:821267 , which states:
    *Q35:*
    Q: I have configured a File Sender channel with File Content
    Conversion or a custom-developed module, which may throw an
    exception. When the File Adapter encounters an invalid file, which
    triggers a conversion error or an exception in a module, the
    adapter will enter a retry interval and upon each following
    processing attempt try to process the faulty file. This basically
    prevents the File Adapter from picking up files that are located
    after the fauilty file according to the configured sort order. How
    can I change this behavior?
    o A: This is by design. When the File Adapter encounters an invalid
    file, manually remove this file from the configured source
    directory. You can configure an alerting rule to get notified each
    time this occurs.
    We are currently evaluating possible solutions that could be used
    to skip this manual interaction.
    now can there be a way around to make communication channel read the file only 3 times (value defined in adapter engine profile in visual admin)
    I have thaught of writing of module.... but the error is raised even before calling module !!
    any further clue ???

  • Error Using JCo..

    When i start the JCo Outbound server program in Java it terminates with an Exception saying Server Start Exception because of Invalid Gateway Host and Service....
    What should be done??
    The Java code of RfcDest.java is given below...
    RfcDest.java - Simple implementation of an (external RFC) server. This example is based on
    static metadata with non-unicode layout, so the calls only from non-unicode systems can be
    handled.
    Property of SAP AG, Walldorf
    (c) Copyright SAP AG, Walldorf, 2000-2003.
    All rights reserved.
    import com.sap.mw.jco.*;
    import java.util.*;
    @version 1.0
    @author  SAP AG, Walldorf
    public class RfcDest implements JCO.ServerExceptionListener, JCO.ServerStateChangedListener {
    Implementation of our own repository.
    Just dummy extend the basic repository that comes with the JCO package
      static public class Repository extends JCO.BasicRepository implements IRepository {
    Creates a new empty repository
        public Repository(String name)
          super(name);
      /** The repository we gonna be using */
      protected static IRepository repository;
      static {
        repository = new Repository("TestRepository");
        // non-unicode definition of functions. The server with this repository can
        // dispatch calls only from non-unicode systems
        //  Add function 'STFC_CONNECTION'
        JCO.MetaData fmeta = new JCO.MetaData("STFC_CONNECTION");
        fmeta.addInfo("REQUTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.IMPORT_PARAMETER, null);
        fmeta.addInfo("ECHOTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.EXPORT_PARAMETER, null);
        fmeta.addInfo("RESPTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.EXPORT_PARAMETER, null);
        repository.addFunctionInterfaceToCache(fmeta);
        //  Add function 'STFC_STRUCTURE'
        fmeta = new JCO.MetaData("STFC_STRUCTURE");
        fmeta.addInfo("IMPORTSTRUCT", JCO.TYPE_STRUCTURE, 144, 0, 0, JCO.IMPORT_PARAMETER, "RFCTEST");
        fmeta.addInfo("ECHOSTRUCT",   JCO.TYPE_STRUCTURE, 144, 0, 0, JCO.EXPORT_PARAMETER, "RFCTEST");
        fmeta.addInfo("RESPTEXT",     JCO.TYPE_CHAR,      255, 0, 0, JCO.EXPORT_PARAMETER,  null    );
        fmeta.addInfo("RFCTABLE",     JCO.TYPE_TABLE,     144, 0, 0, 0,                    "RFCTEST");
        repository.addFunctionInterfaceToCache(fmeta);
        // Add the structure RFCTEST to the structure cache
        JCO.MetaData smeta  = new JCO.MetaData("RFCTEST");
        smeta.addInfo("RFCFLOAT",  JCO.TYPE_FLOAT,  8,  0, 0);
        smeta.addInfo("RFCCHAR1",  JCO.TYPE_CHAR,   1,  8, 0);
        smeta.addInfo("RFCINT2",   JCO.TYPE_INT2,   2, 10, 0);
        smeta.addInfo("RFCINT1",   JCO.TYPE_INT1,   1, 12, 0);
        smeta.addInfo("RFCICHAR4", JCO.TYPE_CHAR,   4, 13, 0);
        smeta.addInfo("RFCINT4",   JCO.TYPE_INT,    4, 20, 0);
        smeta.addInfo("RFCHEX3",   JCO.TYPE_BYTE,   3, 24, 0);
        smeta.addInfo("RFCCHAR2",  JCO.TYPE_CHAR,   2, 27, 0);
        smeta.addInfo("RFCTIME",   JCO.TYPE_TIME,   6, 29, 0);
        smeta.addInfo("RFRDATE",   JCO.TYPE_DATE,   8, 35, 0);
        smeta.addInfo("RFCDATA1",  JCO.TYPE_CHAR,   50,43, 0);
        smeta.addInfo("RFCDATA2",  JCO.TYPE_CHAR,   50,93, 0);
        repository.addStructureDefinitionToCache(smeta);
    Implementation of my own server
      static public class Server extends JCO.Server {
    Create an instance of my own server
    @param gwhost the gateway host
    @param gwserv the gateway service number
    @param progid the program id
    @param repository the repository used by the server to lookup the definitions of an inc
        public Server(String gwhost, String gwserv, String progid, IRepository repository)
          super(gwhost,gwserv,progid,repository);
    Not really necessary to override this function but for demonstration purposes...
        protected JCO.Function getFunction(String function_name)
          JCO.Function function = super.getFunction(function_name);
          return function;
    Not really necessary to override this method but for demonstration purposes...
        protected boolean checkAuthorization(String function_name, int authorization_mode,
            String authorization_partner, byte[] authorization_key)
          /* Simply allow everyone to invoke the services */
          return true;
    Overrides the default method.
    Can handle only the two functions STFC_CONNECTION and STFC_STRUCTURE
        protected void handleRequest(JCO.Function function)
          JCO.ParameterList input  = function.getImportParameterList();
          JCO.ParameterList output = function.getExportParameterList();
          JCO.ParameterList tables = function.getTableParameterList();
          System.out.println("handleRequest(" + function.getName() + ")");
          if (function.getName().equals("STFC_CONNECTION")) {
            output.setValue(input.getString("REQUTEXT"),"ECHOTEXT");
            output.setValue("This is a response from RfcDest.java","RESPTEXT");
          else if (function.getName().equals("STFC_STRUCTURE")) {
            JCO.Structure sin  = input.getStructure("IMPORTSTRUCT");
            JCO.Structure sout = (JCO.Structure)sin.clone();
            try {
              System.out.println(sin);
            catch (Exception ex) {
              System.out.println(ex);
            output.setValue(sout,"ECHOSTRUCT");
            output.setValue("This is a response from RfcDest.java","RESPTEXT");
          }//if
      /** List of servers */
      // JCO.Server srv[] = new JCO.Server[2];   <-- Original
      JCO.Server srv[] = new JCO.Server[1];
    Constructor
      public RfcDest()
        // Yes, we're interested in server exceptions
        JCO.addServerExceptionListener(this);
        // And we also want to know when the server(s) change their states
        JCO.addServerStateChangedListener(this);
    Start the server
      public void startServers()
        // Server 1 listens for incoming requests from system 1
        // (Change gateway host, service, and program ID according to your needs)
        srv[0] = new Server("gateway","sapgw00","JCOSERVER01",repository);
        // Server 2 listens for incoming requests from system 2
        // (Change gateway host, service, and program ID according to your needs)
      /******* Next line commented out by Anand ****************/     
        //srv[1] = new Server("gwhost2","gwserv00","JCOSERVER02",repository);
        for (int i = 0; i < srv.length; i++) {
          try {
            srv<i>.setTrace(true);
            srv<i>.start();
          catch (Exception ex) {
            System.out.println("Could not start server " + srv<i>.getProgID() + ":\n" + ex);
          }//try
        }//for
    Simply prints the text of the exception and a stack trace
      public void serverExceptionOccurred(JCO.Server server, Exception ex)
        System.out.println("Exception in server " + server.getProgID() + ":\n" + ex);
        ex.printStackTrace();
    Simply prints server state changes
      public void serverStateChangeOccurred(JCO.Server server, int old_state, int new_state)
        System.out.print("Server " + server.getProgID() + " changed state from [");
        if ((old_state & JCO.STATE_STOPPED    ) != 0) System.out.print(" STOPPED ");
        if ((old_state & JCO.STATE_STARTED    ) != 0) System.out.print(" STARTED ");
        if ((old_state & JCO.STATE_LISTENING  ) != 0) System.out.print(" LISTENING ");
        if ((old_state & JCO.STATE_TRANSACTION) != 0) System.out.print(" TRANSACTION ");
        if ((old_state & JCO.STATE_BUSY       ) != 0) System.out.print(" BUSY ");
        System.out.print("] to [");
        if ((new_state & JCO.STATE_STOPPED    ) != 0) System.out.print(" STOPPED ");
        if ((new_state & JCO.STATE_STARTED    ) != 0) System.out.print(" STARTED ");
        if ((new_state & JCO.STATE_LISTENING  ) != 0) System.out.print(" LISTENING ");
        if ((new_state & JCO.STATE_TRANSACTION) != 0) System.out.print(" TRANSACTION ");
        if ((new_state & JCO.STATE_BUSY       ) != 0) System.out.print(" BUSY ");
        System.out.println("]");
      public static void main(String[] argv)
        RfcDest obj = new RfcDest();
        obj.startServers();

    Hi,
    Can u please post the exception trace..
    Regards,
    Tanveer.
    Message was edited by: Tanveer Shaikh

  • XML to ABAP Conversion Error - CX_SY_CONVERSION_DATA_LOSS

    REPORT  y_rpt_test                              .
    TYPE-POOLS sscr.
    DATA: restrict TYPE sscr_restrict,
    opt_list TYPE sscr_opt_list,
    *** TYPE sscr_***.
    DATA: options TYPE STANDARD TABLE OF rfc_db_opt ,
    fields TYPE STANDARD TABLE OF rfc_db_fld ,
    meta TYPE STANDARD TABLE OF ywas_metadata ,
    xml_out TYPE string .
    data: xml_out_x type xstring.
    DATA: wa_options LIKE LINE OF options,
    wa_fields LIKE LINE OF fields ,
    wa_meta LIKE LINE OF meta .
    FIELD-SYMBOLS: <outtab> TYPE ANY TABLE,
    <l_line> TYPE ANY,
    <l_field> TYPE ANY.
    DATA: new_table TYPE REF TO data.
    DATA: new_line TYPE REF TO data.
    DATA: xslt_error TYPE REF TO cx_xslt_exception ,
    xslt_message TYPE string .
    DATA: it_fieldcat TYPE lvc_t_fcat,
    is_fieldcat LIKE LINE OF it_fieldcat.
    TYPES: BEGIN OF s_text,
             partnum(18)     TYPE c,
             LONG_DESC(3000)    TYPE c,
           END OF s_text.
    data: lt_outtab type standard table of s_text,
          is_outtab type s_text.
    data: it_temp_text(1000)  TYPE c OCCURS 0 with header line.
    data : l_file TYPE string value 'C:xmlload.xml'.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = l_file
        FILETYPE                      = 'ASC'
      tables
        data_tab                      = it_temp_text.
    loop at it_temp_text.
        concatenate xml_out it_temp_text into xml_out.
    endloop.
        IF NOT xml_out IS INITIAL .
          TRY .
              CALL TRANSFORMATION (`ZTEST1`)
              SOURCE XML xml_out
              RESULT outtab = lt_outtab.
            CATCH cx_xslt_exception INTO xslt_error.
              xslt_message = xslt_error->get_text( ).
              WRITE:/ xslt_message .
          ENDTRY.
        ENDIF .
        break-point.
        write : / 'test'.
    ==========================================================
    I am using above code to convert input XML file into internal table I am getting conversion error. My input XML file looks is as follows. It is throwing this error in call transformation. Appreciate your help in Advance.
    <MODIFIED BY MODERATOR - RESPECT THE 2,500 CHAR LIMIT>
    Code Formatted by: Alvaro Tejada Galindo on Jan 4, 2010 3:31 PM

    Thanks for quick response.
    I think the problem is with special characters in the input XML file. If I don't have special characters in XML file then it works fine.
    Anyway here is the XSLT code. This is a generic XSLT code which I used from one of the examples
    posted on this site.
    <?xml version="1.0" encoding="iso-8859-1"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xa="urn:schemas-microsoft-com:xml-analysis:mddataset" xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <xsl:output method="xml" />
    <xsl:variable name="fieldNames" select="//asx:abap/asx:values/FIELDCAT" />
    <xsl:template match="/">
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <!--FIELDCAT>
    <xsl:apply-templates select="//YWAS_METADATA" />
    </FIELDCAT-->
    <OUTTAB>
    <xsl:apply-templates select="//item" />
    </OUTTAB>
    </asx:values>
    </asx:abap>
    </xsl:template>
    <xsl:template match="//YWAS_METADATA">
    <item>
    <xsl:for-each select="*">
    <!--column ><xsl:apply-templates/></column-->
    <xsl:copy>
    <xsl:apply-templates select="@*|*|text()"/>
    </xsl:copy>
    </xsl:for-each>
    </item>
    </xsl:template>
    <xsl:template match="//item">
    <item>
    <xsl:for-each select="*">
    <!--column ><xsl:apply-templates/></column-->
    <xsl:copy>
    <xsl:apply-templates select="@*|*|text()"/>
    </xsl:copy>
    </xsl:for-each>
    </item>
    </xsl:template>
    </xsl:stylesheet>

  • Arithmatic conversion error in query

    I have a stored procedure for a report . The underlying table has a decimal(18,2) column.
    In the Stored Procedure code, the conversion to decimal (12,2) gives an error as one of the records has a value that exceeds (12,2).
    I am running this report for a userID that does not have permission to this project (so bad row will not be included in the result).
    When running the Stored procedure from query analyser, this row with bad data is not selected based on #TblPermission and SP returns other rows without errors.
    The issue is when running the SP from the application, i am getting an arithmatic conversion error.
    It appears that the SELECT conversions are happening even before join on the temp table is satisfied.
    Shouldnt it filter data based on the join first and then do the conversions (like when run from query analyser) ?
    We will be fixing the conversion issue at a later point.
    But any ideas/suggestions on how to address this to stop it from erroring when called from the UI ?
    CREATE PROCEDURE [dbo].[Test_Report]
    @_user varchar(10)
    AS
    BEGIN
    SELECT PID INTO #TblPermission FROM dbo.tbl_permissions(nolock) WHERE userid= @_user
    SELECT A.NAME,
     CAST(A.ProjectAmount as decimal(12,2))  Amt -- giving an arithmatic conversion error
    FROM TableA A
    Join #TblPermission UP on UP.PID= A.PID
    WHERE A.ProjectType ='mapped'
    end

    It appears that the SELECT conversions are happening even before join on the temp table is satisfied.
    Shouldnt it filter data based on the join first and then do the conversions (like when run from query analyser) ?
    The answer to that question is no.  SQL is allowed to process a query in whatever order it believes will be most efficient.  So it can do the conversion, and later do the WHERE clause.  So you have to write the code so that it is safe if SQL
    does that.  One way is to use a case statement to only do the conversion when the value will fit in decimal(12,2), so you could do
    SELECT A.NAME,
    Case When A.ProjectAmount Between -9999999999.99 And 9999999999.99 Then CAST(A.ProjectAmount as decimal(12,2)) End Amt
    FROM TableA A
    Join #TblPermission UP on UP.PID= A.PID
    WHERE A.ProjectType ='mapped'
    That will work on all releases of SQL.
    If you are on SQL 2012 or later, you can use the new TRY_CONVERT function which will do conversions without causing errors.  Instead of an error when the valued being converted is invalid, you get NULL.  So that would be
    SELECT A.NAME,
    TRY_CONVERT(decimal(12,2), A.ProjectAmount) Amt
    FROM TableA A
    Join #TblPermission UP on UP.PID= A.PID
    WHERE A.ProjectType ='mapped'
    Tom

Maybe you are looking for

  • Working with nested table in uix

    Hello everybody, Im using JDeveloper 9051+adf+uix. I've to use a table in which there is a column having reference to another table(one to many relationship). So is this kind of nested table support is provided in jdeveloper 9051?? and if available t

  • UCMA 4, Lync in Office365, UserEndpoint failure

    Just started with UCMA development and going over the samples. I am using our company's Lync in Office365. In the AVCall sample in establishing UserEndpoint I am getting Microsoft.Rtc.Signaling.TlsFailureException "Unknown error (0x80131500)". In the

  • Linux-Java Classpath

    I'm not new to Java, just new to Java in Linux. I installed the 1.3.1 jdk, but any time I try to compile or run something, I always get the same error: Couldn't find or load essential class `java.lang.Object' java.lang.NoClassDefFoundError java/lang/

  • Oracle RDF Rules Semantics

    Hi, Are the semantics of the rules for Oracle RDF documented anywhere? I'm not exactly sure what I can and cannot say. thanks John

  • KDE4 firefox and thunderbird already running??

    Hi, I decided to try out the new KDE4 from extra.  Looks great.  I have a few questions; where can you change the wallpaper? Where can you specify a location for the executable for an application and have it show up in the menu system? I initially ra