Special character "&" in JDBC receiver - length problem

Hi,
Scenario: IDOC -- - XI --- JDBC (insert) (Message Protocol: XML Sql format)
I have used JAVA mapping to replace "&" with "& amp;" in payload and sending the XML to JDBC receiver. 
However, interface fails due to additional characters "amp;" which is causing the field length (exceeded) issue. 
Please help.
Mallik
Edited by: mallik kancharla on Feb 3, 2010 7:46 PM
Edited by: mallik kancharla on Feb 3, 2010 7:47 PM

I think the JAVA mapping should be designed to pass & as it is and not convert it into &amp.....you should refer the mapping shown here: http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]
Regards,
Abhishek.

Similar Messages

  • JDBC receiver channel problem

    Hi.. 
      I am doing File to JDBC scenario, for that i am using MicrosoftSqlServer.
    Driver----com.microsoft.jdbc.sqlserver.SQLServerDriver
    Connection------jdbc:microsoft:sqlserver://172.18.133.91:1433;DatabaseName=LMS
    While executing, in the JDBC receiver channel it is showing the below error.
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error when attempting to get processing resources: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: DriverManagerException: Cannot establish connection to URL 'jdbc:microsoft:sqlserver://172.18.133.91:1433;DatabaseName=LMS': ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    Could please tell where will be the problem.
    Thanks in advance,
    Leela

    Hi ,
    Driver shoud be :
    com.microsoft.sqlserver.jdbc.SQLSeverDriver
    Connection:
    jdbd:microsoft:sqlserver://<ip address>:port;databaseName=TNS
    try with above config..make sure that they are case sensitive.
    Regards,
    Sreenivas.

  • JDBC receiver - Update problem

    Hi,
    Scenario: JDBC - RFC - JDBC scenario.
    1. JDBC to RFC part-
    A select statement from the JDBC sender, is mapped to the RFC in the ECC system)
    2. RFC response is then mapped to an Update query using a receiver JDBC adapter.
    (Please note: Only the RFC is synchronous. JDBC adpter is configured to be aynchronous here.)
    3. The scenario is working fine, with regard to XI (All chequered flags.)
    Problem: The DB does not get updated.
    The response we get from the DB has <update_count> of 0
    4. The same query, (taken from XI's audit log) and executed in the DB executes fine.
    5. We are using the same user id, to update the table through XI(in the communication channel) and while executing the query manually.
    Hence a user permission problem, could be ruled out.
    6. DB used is Oracle 8i.
    Any hints on what the problem might be?
    Thanks,
    Smitha.

    Hi,
    >>>>3. The scenario is working fine, with regard to XI (All chequered flags.)
    Problem: The DB does not get updated.
    The response we get from the DB has <update_count> of 0
    I guess the easiest way to identify this issue would be to check the DB log in this operation
    (not adapter log on XI)
    then you will know exactly what is getting executed by the adapter and why it fails
    Regards,
    michal

  • Request.getParameter(): special character handling problem

    Hello, there:
    This should be an easy question for the gurus in here.
    I use a string attached to the url as the parameter string, which includes spaces. the system automatically converts them to %20, but when I receive them in my servlet using request.getParameter, a special character, &Acirc; appears; I couldn't proceed with it.
    I suppose this is a common problem but seems that I didn't find topics about it on this forum.
    So anyone can help? Any encoder/decoder APIs to handle it?
    Thanks a lot,
    Sway

    hi,
    escape can solve ur problem
    use js function to submit form like
    function subForm()
    var any_spcl_value ="kdfhjdf$%@#$% 2FGSFG @%@#%@# V";
    mainForm.action = "index.jsp?value="+ escape(any_spcl_value);
    mainForm.submit();
    and use request.getParameter("value");
    u ll get kdfhjdf$%@#$% 2FGSFG @%@#%@# V as it is.
    AE

  • Junk character being sent by Jdbc Receiver adapter

    Hi all,
    I am using jdbc receiver adapter it s working fine .However for costumer name it is sending some junk character in last like " SMAN-Abdulrahman Osman¿ " the thing is that all other field is getting populated properly. when I am viewing the data in sxmb_monni .I am finding the data is prpoer but when it is getting posted to staging table then junk character is coming .I am coused whether it is mistake of JDBC adapter or something wrong in the staging table.
    Regards,
    Saurabh

    Hi Vijay
    But for JDBC adapter where I will use the encoding...It is IDoc to Jdbc scenario.So I haave already used the encoding option in RFC destination.Now where to define the encoding in jdbc adapter I am not sure.
    One more thing I had used the encoding in RFC to read arabic charachter now its reading arabic charchter currectly but when the name is coming in english then it is getting appended by ¿. for example SMAN Saleh Ahmed Mustafa¿
    surprisengly in other column if value is coming in english also it is coming properly. could it be a problem in staging table itself. i am pitting one row below.
    Nural.L.L.C¿                        Yerevan-Armenia                     99999                           Yerevan Community

  • Xml publisher reprot - special character problem

    I invoice report through xml publisher. I have '&' special character in vendor list. I am getting below error
    A semi colon character was expected. Error processing resource.
    Below is the code
    CREATE OR REPLACE PACKAGE BODY XML_RPT AS
        FUNCTION XML_TAG (p_tag IN VARCHAR2, p_data IN VARCHAR2) RETURN VARCHAR2 IS
        l_ret_str VARCHAR2(5000);
        BEGIN
            l_ret_str := '<'||p_tag||'>'||p_data||'</'||p_tag||'>';
            RETURN l_ret_str;
        END XML_TAG;
         PROCEDURE VENDOR(errbuf          OUT  VARCHAR2,
                         retcode         OUT  NUMBER) IS
        CURSOR inv_Cur  IS
            select pv.vendor_name          
            from po_vendors pv;        
         xmldata            varchar2(1000);
         l_sqlstr           varchar2(1000);
         l_seqnum           varchar2(3);
         l_vendor_name      varchar2(100);
        BEGIN
          xmldata := '<?xml version="1.0" encoding="UTF-8"?>';     
          xmldata :=xmldata|| '<VENDOR>';
          xmldata := xmldata||' <LIST_VENDOR>';
          fnd_file.put_line(fnd_file.output,xmldata);    
          FOR rpt_rec IN inv_Cur LOOP
              xmldata := '<VENDOR_REC>';
              l_vendor_name := replace(rpt_rec.VENDOR_NAME,'&','&amp');         
              xmldata := xmldata || XXMCG_XML_TAG('VENDOR_NAME',L_VENDOR_NAME);
              xmldata :=xmldata|| '</VENDOR_REC>';
              fnd_file.put_line(fnd_file.output,xmldata);
          END LOOP;
          xmldata := '</LIST_VENDOR>';
          xmldata := xmldata||'</VENDOR>';
         fnd_file.put_line(fnd_file.output,xmldata);
        EXCEPTION
        WHEN OTHERS THEN
             fnd_file.put_line(fnd_file.log,substr(SQLERRM,1,500));
        END VENDOR;
    END XML_RPT;can any one advice.

    Duplicate post ? xml publisher report problem
    Srini

  • Problem with special Character & in Proxy

    Hi,
    We have a File --> XI --> R/3 Scenario. In this scenario, from XI we are passing the data to R/3 by calling the Proxy. When the data in the file has special character like & (for example <Companyname>Dave&Busters</Companyname>), it is failing in R/3. But if I replace "&" with "&amp;" in the file it works fine. Is there any solution to this problem without writting custom code in XI to replace & with &amp;.
    Thanks
    Sudheer

    >But if I replace "&" with "&" in
    > the file it works fine. Is there any solution to this
    > problem without writting custom code in XI to replace
    > & with &.
    No. If the sender of the message provides an XML format with an unescaped &, then the XML is not valid and therefore cannot be processed.
    All adapters (IDOC, RFC, File with content conversion) perform the escaping and deescaping.
    Regards
    Stefan

  • Special character in receiver xml

    Dear All,
    I have a file being moved from SAP to Market end point server. The receiver side is in xml format (no FCC)
    Code page conversion is used - UTF8 TO UTF16LE
    A special character is occurring in the receiver side: [] It is actually new line character and I suupose due to incompatibility it is coming.
    How do we get rid of this character?
    Thanks

    Hi,
    What Kind of mapping do you use? I have explored this behaviour in a XSLT Mapping and i resolved it by using <xsl:strip-space element = "*" />
    Maybe this help?
    Regards,
    Björn

  • ALV Excel Download problem ( Special Character)

    Hi,
    I am unable to download completely in XLS format from ALV grid. When i tried in couple of ways there is a special character( " ) in one of the filed. Due to the same Excel download has some problem. I tested by removing those and it worked fine, 
    Please suggest me to solve the issue.
    Thanks,
    Bhanu Gattu,

    Data strings with special characters can not be downloaded into XLS format from ALV grid. In my case, I replaced the special character " with space and I could download the data into excel.

  • Problem about printing special character in bex query analyzer

    Hi,
    in bex query analyzer i have created one restricted key figure , in which i have substracted two date with the help of replacement path.
    So i got result.
    But i am facing one problem. when in both date, if one date is null or # then it is giving some big value like -734567.
    But i want some special character like X instead of this big values.
    So how can i do this?
    With the help of if and else it can be done.
    But how can we print special character in report.
    Please help me
    Thank you in advance

    hi,
    You cannot show X in a formula result. You can highlight the row using exception.
    Still if you want to show X in the result then you need to create a formula variable on a char which returns X value all the times.
    Then you can use the three formula variable to write a formula so that it shows the difference:
    date1 -- formula variable
    date2 -- formula variable
    charx -- formula variable.
    the formula will be
    Count(date1)Count(date2)(date1 - date2) + charx *(count (delta(date1) + delta(date2))).
    this would return the X value if any of the dates are empty otherwise their difference.
    regards.
    Arvind.

  • Problem in Smartform convert to PDF with special character

    Hi ABAP Guru,
    While convert smartforms to pdf.Some special character like ( - ) convert to ( # ).In development server there is no problem but the problem arise in quality.Please help

    Hi Palash,
                  Please use PDF! in print preview command field.. it will convert pdf file.
    regards,
           Thangam.P

  • Problem in dealing with special-character filename

    Hi,
    I am facing a weird problem while dealing with a file which has a special character in its name. That character is the big-hyphen, i.e. '–' (not the normal hyphen we can type from keyboard), you would have seen this character in MS Word.
    My java program is running on HP-UX OS, and its basically trying to copy this file to a Windows target system through socket. But while executing it, I am getting Broken Pipe Exception.
    I am applying UTF-8 encoding while running my program (by specifying the argument "-Dfile.encoding=UTF-8" in the java process), and I am also confirming that the file-encoding is being applied to UTF-8 properly by putting a debug in the beginning of the program. My understanding is UTF-8 supports all the characters exist in this world.
    Any suggestion / pointers would be really appreciated.
    Thanks,
    Rajiv

    Fine..... but is there any way to know which encoding has been applied on it ..
    Let's say if you create any file on unix-based system in any application, which encoding gets applied there by default ?
    This file is basically nothing but an html page created using 'Save As' from the browser.
    The person who has created the file is a non-technical .. and won't know much about this all stuff... encoding etc.

  • Problem between SOAP Sender and JDBC Receiver

    Hi,
    I have a asynchronous scenary between SOAP Sender and JDBC Receiver.
    The idea is sending an ID for updating one register.
    Table structure is:
    TABLE AS_PERSONA
        (P_RUT                         VARCHAR2(10) NOT NULL,
        P_NOMBRE                       VARCHAR2(50),
        P_APELLIDO                     VARCHAR2(50))
    The ID is the P_RUT field.
    The structure of message that I send by SOAP, is the following:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <SOAP-ENV:Body>
              <m:MT_CONS_SOAP xmlns:m="urn:prueba:voliva">
                   <CONSULTA>
                        <P_RUT>15445</P_RUT>
                   </CONSULTA>
              </m:MT_CONS_SOAP>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    The JDBC receiver structure is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_CONS_PERSONA xmlns:ns0="urn:prueba:voliva">
         <Statement>
              <AS_PERSONA action="UPDATE">
                   <table>AS_PERSONA</table>
                   <access>
                        <P_NOMBRE>DELETE_BY_XI</P_NOMBRE>
                        <P_APELLIDO>DELETE_BY_XI</P_APELLIDO>
                   </access>
                   <key>
                        <P_RUT>15445</P_RUT>
                   </key>
              </AS_PERSONA>
         </Statement>
    </ns0:MT_CONS_PERSONA>
    When I do a call to SOAP by XMLspy, it returns a message without data, that means succesfull reply.
    I see message monitor and see the succesfull flag. But in the database it doesn't update the register.
    This scenario was proved using the File Sender and same JDBC Receiver, then result was succesfull.
    I proved SOAP Sender with a File Receiver, storing information from SOAP sender in an archive, and works well.
    Then I imagine that exist some problem between SOAP and JDBC. what could be happening ?
    Thanks.

    Hi,
    Looks like the problem is with the JDBC receiver...try updating the value in the table by using a File-JDBC scenario..does it work..check the adapter monitor in RWB..
    Regards,
    Sushumna

  • Oracle 11g special character(á) length count

    Hi Experts,
    I'm facing an issue while inserting the special character (á) in Oracle 11g. The database table length for the column 'descr' declared as varchar2(30). I'm inserting a string ('Aabbccee/ddffggh Ffrán y Plaos') in column descr which is having the length 30. Please note the character 'a' in Ffrán is not letter 'a' but special character *'á'*. It gives the below error,
    java.sql.SQLException: ORA-12899: value too large for column ""DESCR" (actual: 31, maximum: 30)
    The strange is the same query works/insert in Oracle 9i without any issue. I suspect the special character *'á'* will take/count as 2 character in Oracle 11g but single character in Oracle 9i.
    Please provide the insight views and solution for this issue with out altering the column length.
    I hope the solution at the earliest, since this is an urgent requirement.
    Thanks.

    Your 9i database has character set WE8ISO8859P1 which is a single byte characterset.
    But on 11g, you're using AL32UTF8 - a multi-byte unicode characterset.
    Obviously with a multi-byte characterset, characters which took up a single byte might now need multiple bytes.
    So the default meaning of VARCHAR2(30) which is VARCHAR2(30 BYTE) may not be sufficient to hold 30 characters.
    Assuming that you want to use the different characterset - (and if not then you might as well rebuild your 11g database with the 9i characterset), then you need to do is to change your LENGTH SEMANTICS to CHAR not BYTE.
    This means two things.
    1. Changing NLS_LENGTH_SEMANTICS to CHAR via ALTER SYSTEM. I believe this needs a restart to take effect. This will affect newly created column definitions so that VARCHAR2(30) means VARCHAR2(30 CHAR) not VARCHAR2(30 BYTE) - so for changes going forward.
    2. Changing existing column definisition via ALTER TABLE xyz MODIFY colname VARCHAR2(30 CHAR) etc.

  • Escape character for apostrophe ' in JDBC receiver channel

    Hi all,
    We have Proxy to JDBC scenario in our project. This interface is working fine with unicode data but when there is an apostrophe( ' ) coming in any of the field values ( ex: DOWTHERM 'J' MODEL19QAGB1G ) , the message is failing in receiver JDBC channel.
    can anyone please tell us how to handle single quote in JDBC receiver channel.
    I have read in SAP help documentation that apostrophe is a reserved character in SQL syntax and is therefore replaced by an escape character if it occurs within value strings. There is a option to JDBC receiver communication channel under "SQL SYNTAX PARAMETER"  to specify the escape character for apostrophe.
    Can any please tell us which value needs to be maintained in the channel to avoid this error.
    Regards
    Jagruthi

    Hi Prateek,
    Thanks a lot for you inputs.
    This issue is solved now. We have replaced single quote with two single quotes and then did the hasQuote mapping as described in the blog.
    /people/prateek.srivastava3/blog/2009/04/02/unicode-handling-for-ms-sql-server
    No value needs to be maintained in channel(SQL SYNTAX PARAMETER ).
    But just want to understand  the difference between replacing the ' with '' in mapping and using SQL SYNTAX PARAMETER option in communication channel.
    Both should ideally result in same  output. But it didnu2019t work when we tried with two single quotes in SQL SYNTAX PARAMETER (Escape Symbol for Apostrophe) in communication channel without doing anything in mapping.
    Regards
    Jagruthi

Maybe you are looking for

  • How to create a group sms

    comment creer un groupe de sms avec les contacts sur ihone 6

  • Windows did not detect any networking hardware

    We have an HP Pavilion desktop, model # a6610t, using Vista OS.  We have been connected to the internet wirelessly for almost 1 year and now all of the sudden it cannot find any wireless networks.  We are able to successfully connect wirelessly to th

  • Intercompany STO - PO not showing in VL10B

    Dear all, In my company I have an intercompany STO between 2 plants A and B. However, when I try to run transaction VL10B, the PO is now showing. To solve the problem I tried to remove the dates and shipping point in VL10B without sucess. I have chec

  • Remote JMS Queue in Non-Clustered Environment

              We have two hosts, both running WLS 8.1, that are not clustered. We would like           to create a queue on the first and be able to read it from the second. Is this           possible? How does one go about setting this up?           

  • Multiple Local Product Categories for One ECC Material Group

    Hello experts, I have a question regarding Product Categories. I am using an Extended Classic Scenario and so, I retrieve Material Groups from the backend. Nevertheless, in order to have a more accurate split than ECC Material Groups in SRM, I would