How to handle BLOB field in receiver JDBC adapter into ABAP table

Dear Experts,
I am working in a synchronous scenario with Sender ABAP Proxy to Oracle Database as receiver via SAP PO 7.4.I will be calling a stored procedure view with fields ID, NAME,Age,*** and BLOB (Image binary).
1. The response from Oracle Database field BLOB is to be stored in ABAP table.Would I have to write any JAVA program to read the BLOB or the receiver JDBC adapter will handle it and store in a table by using ABAP proxy once it reaches ECC.
2. If yes, would the JAVA program have to deal with other 4 fields.
3. Can I use a UDF mapping to this BLOB field.
Regards
Rebecca...

Dear Praveen,
Thanks for your response...
Please correct me if I am wrong.
1. For 1-1 response mapping for BLOB field, I will use just use the below UDF code.
public static byte[] hexStringToByteArray(String s) { 
            int len = s.length(); 
            byte[] data = new byte[len / 2]; 
            for (int i = 0; i < len; i += 2) { 
                        data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) 
                                                                                     + Character.digit(s.charAt(i+1), 16)); 
            return data; 
2. ===Using the byte data, create binary attachment in mapping for abap proxy response===
Could you please share how to create the binary attachment.. I am not clear
Regards...

Similar Messages

  • Structure for Receiver Jdbc adapter for multiple tables

    Hi,
    For Receiver JDBC adapter,Standard structure
    structure as
    Statement
       Tablename(TABLE1)
            Action
            Access
    Can i make a structure like
    Statement
         Tablename(TABLE1)
            Action
            Access
                fields....
         Tablename(TABLE2)
            Action
            Access
                fields......
    As i am using tables and I want to insert or update both of them or one based on some conditions.
    Will Insert be possible in single Statement or I have to create separate statements for each table. Can you please help me on this?
    Thanks in advance
    Best Regards,
    Harleen Kaur Chadha

    Hi Harleen,
            As already said by Dharanveer, all that you need to do is replicate the Statement level, so, istead of using this structure:
    Statement
    Tablename(TABLE1)
       Action
       Access
         fields....
    Tablename(TABLE2)
       Action
       Access
         fields......
            You will construct something like this:
    Statement1
    Tablename(TABLE1)
       Action
       Access
         fields....
    Statement2
    Tablename(TABLE2)
       Action
       Access
         fields......
           And this structure will be created in a single Data Type, that will be used to create a single Message Type, that you will use in your Message Mapping, and, the 2(or more tables that you need to manipulate) will be inserted/updated without problems using this approach.
           Thank you, and best regards,
           Wilson

  • How to handle the BOLB column Using JDBC adapter

    Hi,
      I want to sending of a BOLB column from a DB2 database table to another DB2 database, and the sender and receiver both by using JDBC adapter. The two tables in each other database have the same columns.
      Here is the table's structure:
      <ID>string type</ID>
      <PDF>blob type</PDF>
      Also, i haved create two DataTypes in PI system.
      Sender DataType:
      ns:DT_PDF_Req xmlns:ns="http://XXXXX.com/sap/xi">
       <row>
         <ID>1</ID>
         <PDF></PDF>
       </row>
      </ns:DT_PDF_Req>
      Receiver DataType:
      <ns0:DT_PDF_Res xmlns:ns0="http://XXXX.com/sap/xi">
      <STMT>
      <dbtable action="INSERT">
      <table>tablename</table>
      <access>
       <ID></ID>
       <PDF></PDF>
      </access>
      </dbtable>
      </STMT>
      </ns0:DT_PDF_Res>
    When test this interface, i found the that we can get the data, but when execute the insert stms  the follow errors occured  in RWB :
    <ERROR>
    Could not execute statement for table/stored proc. "DBDPUSER.pdf" (structure "STMT") due to com.ibm.db2.jcc.b.nm: DB2 SQL Error: SQLCODE=-103, SQLSTATE=42604, SQLERRMC=255044462d312e330a25c7ec8fa20a352030206f626a0a3c3c2f4c656e677468203620, DRIVER=3.50.153
    JDBC Message processing failed, due to Error processing request in sax parser: Error when executing statement for table/stored proc. 'DBDPUSER.pdf' (structure 'STMT'): com.ibm.db2.jcc.b.nm: DB2 SQL Error: SQLCODE=-103, SQLSTATE=42604, SQLERRMC=255044462d312e330a25c7ec8fa20a352030206f626a0a3c3c2f4c656e677468203620, DRIVER=3.50.153
    </ERROR>
    Can anybody tell me how to resolve the problems?
    And tell me about how to deal BOLB column using PI.
    Best Regards
    Terry

    Hi Terry Qin,
    I understand, you are getting below XML from sender JDBC channel. But when you getting SAX parser error, in receiver JDBC.
    <ns:DT_PDF_Req xmlns:ns="http://XXXXX.com/sap/xi">
    <row>
    <ID>1</ID>
    <PDF></PDF>
    </row>
    </ns:DT_PDF_Req>
    I think it is because the XML which is going to receiver JDBC channel is not well formed (because pdf can containg < & characters).
    You can achive this sceanrio, by selecting receiver JDBC channel as Message Protocol "Native SQL Format" [Link1|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/7c24a75cf83672e10000000a114a6b/frameset.htm] you can send non XML to receiver channel.
    Before that, you have convert above input XML into SQL statement, using Java Mapping.
    Regards,
    Raghu_Vamsee

  • How to handle multiple responses in Receiver Mail adapter?

    Hello,
    I have a scenario where I get n number of responses which has to be sent as an email.
    My response looks like this -
       <Response>
          <Status/>
          <Text>TEST 1</Text>
       </Response>
       <Response>
          <Status/>
          <Text>TEST 2</Text>
       </Response>
    Please let me know if there is any way to send this response as email.
    Thanks

    Hello,
    Check below mapping and change it as per ur source (response) and target (content) fields.
    Note - In below mapping i have used return as xml functionality on Record node, u have to use the same on ur source field.
    After implementing above mapping, just execute ur E2E scenario and check how content is getting generated in ur mail?
    Thanks
    Amit Srivastava

  • How to Handle Huge record count in JDBC

    Hi,
    Can we process 20 lakhs records which would size near to 136 MB using JDBC sender channel in a single call and the same need to deliver to Target system which is JDBC too.
    Kindly mention which way this can be achieved.
    Regards

    Hi Venkata,
         Kindly go through this below link to processing the huge amount of data from the sender JDBC.
    http://scn.sap.com/people/peng.shen2/blog/2009/12/23/pi-how-to-handle-high-volume-data-per-jdbc-adapter
    https://scn.sap.com/thread/2005124
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/09/24/jdbc-receiver-scenarios-best-practices--how-to-handle-high-volume-load-stored-procedure-design-part6
    Best Regards,
    Monikandan.

  • What are the Batch mode parameters for Receiver JDBC Adapter

    Hi All,
             Could some pls tell me how to set bacth mode in receiver JDBC adapter and what are its parameters and how to configure them. i beleive there is something like max count parameters etc..
    Regards,
    Xier

    Hi,
    Check this for more info
    http://help.sap.com/saphelp_nw04s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    Regards
    Seshagiri

  • Table name in Receiver JDBC Adapter

    Hi All,
    I am using receiver JDBC adapter.
    But table name consist of " like BPC."#II" .
    After mapping table name becomes BPC.&quot;#II&quot; .
    I am getting error while pulling data from DB.
    Is the table name creating a problem.
    Please remedy of this if you have come across such scenario.
    Regards
    Piyush

    Hi Piyush,
    All that i could get from the SAP Help regarding JDBC Adapters are these links where i never found anything much regarding the table name.anyways just go through these links and see if you find anything useful.
    http://help.sap.com/bp_bpmv130/Documentation/Planning/XIUnicodeGuide030411.pdf
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm">Configuring the Receiver JDBC Adapter</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm">Mapping Lookups</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/22/b4d13b633f7748b4d34f3191529946/content.htm">JDBC Adapter</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm">Configuring the Receiver JDBC Adapter - part 2</a>
    This is all i got from the help files, anyways you can also go through those links and see if you find anything else useful.
    - Escape Symbol for Apostrophe
    The apostrophe character (‘) is a reserved character in SQL syntax and is therefore replaced by an escape character if it occurs within value strings. This replacement character can be database-specific. Typical replacement characters are \’ or ’’(default value). If a character occurs that is invalid for the database being used, the adapter triggers an error message (an SQL exception) concerning the SQL syntax that is generated by the database.
    - Column Name Delimiter
    Depending on the database being used, column names can be enclosed by a special delimiter character, for example, if the names can contain special characters (such as ”). This character can be specified at this point. The default setting is no delimiter character. If a character occurs that i
    Also check if there are notes in the service market place related to the same.
    Regards,
    abhy
    Message was edited by: Abhy Thomas

  • Exactly-Once Handling in Receiver JDBC Adapter

    Hi,
    I have doubt abt Exactly-Once Handling in Receiver JDBC Adapter.
    For Conflict Resolution as Database.
    Why there is need to define table as below ?
    In the database where the write-to tables are located you must create an additional table with two columns for this purpose. To define the table, specify the following:
    Database Table Name
    Enter the name of the table.
    Key Column Name
    Enter the name of the column in which the key is entered.
    Value Column Name
    Enter the name of the column in which the key value is entered.
    Please explain in simple language.

    Hi Abhishake,
    Thanks for your reply.
    I understant that the tables needs to be created in DB.
    But if you read the SAP Docs for conflict resolution. My undestanding is "During Database commit if AS Java is terminated then the message will be in unknown state, for this type of messgaes when the AS Java restarted the behaviour is defined by this parameters. If the message doesn't have primary key, then there is probablity when AS Java will try second time it may get the message in DB so a message can be duplicated. To avoid this condition it is mentioned that you must create additional table with three column".
    Please correct my understanding if I am wrong.
    My additional table needs to create & how it will resolve the problem.
    Thanks in advance.

  • How to put Stored Procedure in Receiver JDBC channel

    Hi all,Good Evening,Iam using a JDBC to JDBC scenario in which I have to move the data from database into XI and we all know that the Interfaces which require stored procedures on Oracle database server for publishing the data needs to be called in combination of BPM & Receiver JDBC adapter.
            In this method, a dummy interface will be created for triggering the process. This interface could be designed using any adapter which works on polling mechanism (sender JDBC/File). Dummy interface will invoke a small BPM designed for each business object. BPM will make a synchronous call to Oracle database by calling underlying stored procedure. Stored procedure will return the result set by using a cursor. BPM will send this result set to target application.
            Now my question is how to put a stored procedure in a receiver JDBC channel which need to collect the data from database when BPM makes a synchronous call.
           Because it is required in my scenario,can any one tell me how and where to put stored Procedure in JDBC receiver channel.
    Thanks in advance,
    Regards,
    Prajwal

    Your action should be EXECUTE for stored procedures in Message mapping.
    <StatementName5>
    <storedProcedureName action=u201D EXECUTEu201D>
        <table>realStoredProcedureeName</table>
    <param1 [isInput=u201Dtrueu201D] [isOutput=true] type=SQLDatatype>val1</param1>
    </storedProcedureName > 
    </StatementName5>
    action=EXECUTE
    Statements with this action result in a stored procedure being executed. The name of the element is interpreted as the name of the stored procedure in the database. If you use the optional <table> element, the value specified here is used as the stored procedure name. This enables you, for example, to define stored procedure names containing non-XML-compatible characters or characters that prevent them from being used in interface definitions in the Integration Builder/PCK.  If specified, <table> must be the first element in the block within <dbTableName>.
    The elements within the stored procedure are interpreted as parameters. They can optionally have the attribute isInput=u201C1u201C (input parameter) or isOutput=u201C1u201C (output parameter) or both (INOUT parameter). If both attributes are missing, the element is interpreted as an input parameter. The parameter names must be identical to those of the stored procedure definition.
    The attribute type=<SQL-Datatype> , which describes the valid SQL data type, is mandatory for all parameter types (IN, OUT, INOUT).
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    /people/sap.user72/blog/2005/10/15/jdbc-adapter-execution-mode-chained-or-unchained
    /people/luis.melgar/blog/2008/05/13/synchronous-soap-to-jdbc--end-to-end-walkthrough
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi

  • Database filled fields to a pdf form, how can i setup fields to receive ?

    have a database that has a pdf form filler that can send filled fields to a form designed pdf, how can i setup fields to receive the specific fields ?

    Hi housesboat,
    Welcome!
    Please try this to get you started: http://forums.adobe.com/docs/DOC-2412
    Let us know if you have other questions.
    Kind regards, Stacy

  • How to handle currency fields in BDC

    Hi All,
        Please tell me how to handle currency fields in BDC.... If possible give me some sample code...
    Thanks in advance,
    points will be given,
    praveena.

    Declared it at the Global definitions.
    in global data tab and currency/quant fields.
    Initialize some value there itself.
    Just before the text node create one program lines node,
    and that,In the import and export parameters of it give total_amount.
    refer to the following link:
    http://sap-img.com/abap/figure-to-words-for-india-but-can-be-modified-to-any-requirement.htm
    Currency Fields
    Reward if useful.

  • Receiver jdbc adapter:how to implement the insert or update action in a sql

    Hi,gurus:
    I'm using receiver jdbc adapter now.
    You know, we have to gave the action the value 'update' or 'insert',but in our case,the action is variant--update or insert.It decides whether the record exists in the outer database.
    Can stored procedure do this?If I use stored procedure,then must I create a stored procedure in the outer database?
    Or some other ways to solute my issue?
    THanks in advance.

    Hi
    Use Action UPDATE_INSERT .
    This action check if a record exist with same key value then update that record. In case no record with key value found in database then record inserted to database.
    look receiver structure
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

  • High volumes on receiver JDBC adapter

    Hi,
    We have a RFC ->JDBC scenario where the RFC pulls huge amounts of data from R/3 and sends to XI.
    XI needs to upload this data into 5 different Db tables.Each table contains 3000-8000 records with each record containing 10-15 fields.
    When we try to run this scenario, due to high volumes of data  the JBDC adapter hangs and msgs were in 'holding/delivering' status for long time.
    Please advice on possibilities of handling this within XI.

    Hi,
    We changed the design and now we have only 'INSERT' and we don't have concerns with table refresh now.
    I am splitting the records in XI mapping as bunches on 1000 each. But I found one of the tables have more that 1lakh records.
    The data volume that we received in RFC is 150000 records(45MB). It took 7.5 mins to process this msg in Integration Engine.
    But the messages delivery into Db tables (receiver JDBC adapter processing) is very slow.At maximum it can process 250 records in minute.
    Please provide your inputs on this design. Is it Ok to accept 45MB message into XI at one shot? Even though the message got processed(splitted) in IE, they are processing in AE for long time. I believe this will have impact on other interfaces that use JDBC adapter.
    Please provide your suggestions on how to improve the design/performance of this interface.
    Thanks!

  • Dml in Receiver JDBC ADAPTER

    Dear all,
    By putting action=Insert in the Receiver Structure ,I could able to insert the data.
    When I am Trying Delete or Update in the Same way I could not see the data modified in the table.
    Please Let me know how to achieve the same.
    Thanks,
    Srinivas

    Hi,
    go thru these links:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    /people/alessandro.berta/blog/2005/10/04/save-time-with-generalized-jdbc-datatypes
    http://help.sap.com/saphelp_nw2004s/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm
    Also have alook at this
    Receiver JDBC
    /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    /people/ajay.kumar/blog/2005/03/24/writing-bsp-for-sap-r3-version-46
    /people/sugree.phatanapherom/blog/2005/08/14/configuring-sld-in-sneak-preview-sap-netweaver-04-sneak
    /people/sanyam.kapur/blog/2005/04/30/custom-fields-and-bw-extractors-making-a-mixed-marriage-work-part-ii
    Regards,
    Akshay Jamgaonkar.
    Reward points if find useful.
    Message was edited by:
            Akshay Jamgaonkar

  • ABAP client proxy With Receiver JDBC Adapter

    Hello Experts,
    I am working on a scenerio ABAP client proxy With Receiver JDBC Adapter.
    The client proxy program will fetch the master data related to equipment in plant maintenance module and  will update the sql database through Receiver JDBC Adapter .
    my requirement is if the equipement is created in sap then the  scheduled job has to trigger the client proxy program and send the message with status 'created'  to sql data base.
    if the equipment is modified in sap then the scheduled job has to trigger the client proxy program and send the message with status 'modify' to sql data base.
    please let me know how can i write the logic/code for this scenerio in client proxy program.
    Tables for equipment master i am using  is EQUI and fields are   ERDAT and AEDAT which is created date and modified date.
    fields for scheduling start date is tbtcp-sdldate.
    Thanks in advance.
    Ram.

    Hello Ram,
       Here you can check if updated date field is not empty then send status as created and if this field is not blank then send status as modified record.
    Monica

Maybe you are looking for

  • My month-old MacBook Pro 13in freezes all the time

    I don't know what the deal is, every time I watch videos on websites other than YouTube, such as Hulu, or download I guess what could be considered relatively hearty software i.e. Photoshop, or end a Skype call, my computer freezes. Like entirely. I

  • Java Plug-in 1.5.0_06 Error JRE notinited

    Uninstalled all JRE versions. and downloaded the previous offline install packets from: http://java.sun.com/products/archive/ JRE 1.5.0 JRE 1.5.0_1 JRE 1.5.0_2 JRE 1.5.0_3 JRE 1.5.0_4 JRE 1.5.0_5 JRE 1.5.0_6 ,Installed them one after the other due to

  • CONVERSION_EXIT_KONPD_INPUT error "in one section there is no number"

    Hi all experts, When end user punches FI invoices they will enter the Project External Number in Assignment(ZUONR). While creating a report Iam using Assignment(text field) of FI documents to get the internal number of the project using  conversion e

  • What is port with " ++ p"

    There is a 'port' on the back of the computer that looks like an HDMI connector, but it has two plus signs (one above the other) and the letter P to the right of them. I've tried to plug an HDMI cable into it, but it doesn't quite fit. Please help me

  • Mac osx 10.6.8 causes grey screeen

    Hi Everyone, Well, this is a first--and not a good one at that. The new 10.6.8 update wont let me access my main drive and all I get is the grey screen telling me to shut the computer down. I've tried reinstalling the update from other drives on my d