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

Similar Messages

  • Structure for Receiver JDBC Adapter.............

    Hi
    Can anyone explain the receiver structure mapping of JDBC Adapter.......
    I am having Proxy to JDBC scenario
    Regards,
    Sudheer

    Hi...
    ThanQ for your quick respones....Can you please explain the Mapping to be done for the receiver structure.
    I can find so many documents for receiver structure. But I cannot find mapping documents so that I can map the
    source and destination structures.
    There is confusion for me regarding Statement,Action,Access,Table, Key fields....
    Please clarify my doubt....
    Thanks,
    Sudheer

  • Specify Keys in Data Type for receiver JDBC adapter

    Hi guys,
    I have the following issue:
    In a proxy to JDBC scenario, I want to specify somehow the key values for the SQL statement in the data type that I define for the receiver JDBC adapter. Thus, I am using the following structure in data type:
    root
        Statement
               dbTable
               action
               table
               access
                      CustomerID
                      Name
                      HouseNo
               Key
                      CustomerID
    But in the SQL statement that is produced (I can see that in RWB, CC Monitoring, Audit Log), the "Key" segment is translated into "OR". E.g. UPDATE_INSERT ("A100" "Evaggelos Gkatzios" "El Alamein 19") OR ("A100")
    Do you have any ideas ?

    Hi,
    Its clear from the statement in RWB (in CC monitoring's auditlog) you are using UPDATE_INSERT as the action.
    Please correct me if this is OK. Now the interpretation of input xml file will be like this,
    If the input XML is in the following format
    <root>
    <Statement>
    <dbTable action=UPDATE_INSERT>
    <table>EXAMPLE</table>
    <access>
      <CustomerID>ABC</CustomerID>
      <Name>xyz</Name>
      <HouseNo>123</HouseNo>
    </access>
    <key>
      <CustomerID>DEF</CustomerID>
    </key>
    </dbTable>
    </Statement>
    </root>
    Resultant SQL after parsing the XML file will be,
    1. It will first check with the condition WHERE CustomerID = DEF. If it finds the record with this condition then it will update the record with CustomerID=ABC, Name =xyz & HouseNo=123.
    2. If it doesn't find any record with that CustomerID then, it will insert a new record with the same details.
    In auditlog, you will find two SQL statements like,
    1.UPDATE EXAMPLE SET CustomerID=ABC, Name =xyz & HouseNo=123 WHERE CustomerId=DEF
    2.INSERT INTO EXAMPLE VALUES(ABC,xyz,123)
    hope this has given clear information about your query,
    Regards,
    Soorya

  • 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

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

  • Datatype structure for receiver jdbc adapter

    what is the datatype structure while using a receiver jdbc adapter

    XML Document Format for the Message Protocol XML SQL Format
    You can modify one or more database tables by means of a message. Depending on the content of the message, you can either insert (INSERT), update (UPDATE), or delete (DELETE) the data. Results from queries (SELECT) can also be included in the response in XML format for synchronous messages. The XML document must have the following schema in this case:
    <root>
      <StatementName1>
    <dbTableName action=”UPDATE” | “UPDATE_INSERT”>
              <table>realDbTableName</table>
    <access>
    <col1>val1</col1>
    <col2>val2new</col2>
    </access>
    <key1>
    <col2>val2old</col2>
    <col4>val4</col4>
    </key1>
    <key2>
    <col2>val2old2</col2>
    </key2>
    </dbTableName>
      </StatementName1>
      <StatementName2>
    <dbTableName action=”INSERT”>
    <table>realDbTableName</table>
    <access>
    <col1>val1</col1>
    <col2>val2</col2>
    </access>
    <access>
    <col1>val11</col1>
    </access>
    </dbTableName> 
      </StatementName2>
      <StatementName3>
    <dbTableName action=”DELETE”>
    <key1>
    <col2>val2old</col2>
    <col4>val4</col4>     
    </key1>
    <key2>
    <col2>val2old2</col2>
    </key2>
    </dbTableName> 
      </StatementName3>
      <StatementName4>
    <dbTableName action=”SELECT”>
              <table>realDbTableName</table>
    <access>
    <col1/>
    <col2/>
    <col3/>     
    </access>
    <key1>
    <col2>val2old</col2>
    <col4>val4</col4>
    </key1>
    <key2>
    <col2>val2old2</col2>
    </key2>
    </dbTableName> 
      </StatementName4>
      <StatementName5>
    <storedProcedureName action=” EXECUTE”>
              <table>realStoredProcedureeName</table>
    <param1 [isInput=”true”] [isOutput=true] type=SQLDatatype>val1</param1>
    </storedProcedureName > 
      </StatementName5>
      <StatementName6>
    <anyName action=” SQL_QUERY” | “SQL_DML”>
    <access>SQL-String with optional placeholder(s)</access>
    <key>
      <placeholder1>value1</placeholder1>
      <placeholder2>value2<placeholder2>          
    </key>
    </anyName > 
      </StatementName6>
    </root>
    Mudit

  • Receiver JDBC Adapter for Count of records in Table

    Hi All,
    I am talking about Client Proxy to Receiver JDBC scenario.I've a requirement where i need to count the no of records created or updated in SQL server for particular transaction date.Question is- Is it possible to execute normal sql query to get the count or I need to write a stored procedure in SQL Server to be used by JDBC adapter.Please suggest with an example if possible.
    thanks for the help

    Hi.
    Pls check this link.
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
    action= EXECUTE
    Edited by: Luis Ortiz on Aug 26, 2010 2:27 PM

  • Special Characters for Receiver JDBC Adapter

    Hi,
    Our Scenario is Proxy -PI-JDBC (SQLServer ). We have special characters in the payload and we are abel to see the special characters in PI.According to JDBC Faq we used haquot attribute and concatenated with Prefix N'<Value>'. But still when the data is posted in the database we cannot see the special characters.
    Please let me know your inputs.
    Thanks,
    Sainath

    Reference following thread, add a attribute of "hasQuot", map constant "No" to it, to see solve your problem or not:
    Re: how to use todate function in JDBC adapter
    Regards.
    Liang

  • Multiple table insert using receiver jdbc adapter

    Hi,
    I am trying to insert data in to two tables in a single structure using receiver jdbc adapter. I am not using any stored procedure to insert data instead directly inserting the data using PI. Please see the structure I am using.
    SOURCE side:
    DT_ABC_SENDER
    --IT_HEADER_TEXT
      -- EBELN
      -- LINENO
      --TDTEXT
    --IT_ITEM_TEXT
      -- EBELN
      -- LINENO
      --TDLINE
    TARGET side:
    DT_ABC_RECEIVER
    --InsertStatement
         --HEADER_TEXT
                -- action                         (insert)
                -- Table                          (Table 1)
                --access
                     -- IDS_ENQ_NO
                     -- IDS_DESC
                     -- IDS_TEXT
       --ITEM_TEXT
                -- action                         (insert)
                -- Table                          (Table 2)
                --access
                     -- IIS_ENQ_NO
                     -- IIS_DESC
                     -- IIS_TEXT
    Using the above structure I am able to successfully insert the data in Table 1 but data is not getting inserted in Table 2.
    In sxmb_moni it is saying message successfully delivered but I but there is data insertion took place in Table 2.
    Please help me urgently.
    Thanks in advance.
    Neeeraj

    Hi Neeraj,
    Add --InsertStatement statement for the second table structure in the same level of first InsertStatement.
    Target structure like this:
    DT_ABC_RECEIVER
    --InsertStatement
         --HEADER_TEXT
                -- action                         (insert)
                -- Table                          (Table 1)
                --access
                     -- IDS_ENQ_NO
                     -- IDS_DESC
                     -- IDS_TEXT
    --InsertStatement
       --ITEM_TEXT
                -- action                         (insert)
                -- Table                          (Table 2)
                --access
                     -- IIS_ENQ_NO
                     -- IIS_DESC
                     -- IIS_TEXT

  • 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

  • How to config JDBC adapter for internal database

    Hi all,
    I have configured a scenario that sends data from PROXY to JDBC adapter, JDBC adapter connects to the internal database. The Proxy adapter is OK, but the Receiver JDBC adapter I really don't have any idea about it. Please let me know.
    The version, I am doing on it, is 7.1
    Thanks in advice.
    Ken.

    Hi ,
    Check in your message mapping after execution( Target Side)  -> Test Tab -> XML structure,
    it Should be like this/ in this format
    here action/ table/access : these tagname should not be changed.
    Enter the new column values in the <access> element.
    Enter exactly one <access>element.
    <StatementName>
         <dbTableName action=u201DINSERTu201D>
         <table>TableName</table>
          <access>
                 <col1>val1</col1>
                 <col2>val2</col2>
          </access>
         </dbTableName>
    </StatementName>
    Statement would be like this :
    INSERT INTO TableName  (col1, col2) VALUES(u2018val1u2019, u2018val2u2019)
    Regards
    Prabhat Sharma.

  • Dynamic  File Name for Receiver File Adapter

    Hi All,
    How can we use dynamic name for Receiver file adapter?
    Can anyone help.
    Thanks in Advance
    Chemmanz

    Hi Chemmanz,
    The dynamic filename generation concept is as follows.
    In your filename field. just give a variable with % symbols. (eg: %file% ).
    Now, under the option Variable Name Substitution, you can give how the value has to be created.
    It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.
    For the former, your give
    message:interface_name ,etc
    and for the payload part you give,
    Payload: "your element root which u wanna acecss"
    Just check this link out,
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    And read the contents under variable substitution and it will help you understand the concepts better.
    If you have any clarifications, do get back,
    Regards,
    Bhavesh

  • Stored procedure : how to call SP in sender JDBC adapter for mysql

    HI friends ,
    we have JDBC---->XI--
    >SAP  scenario. For some business requirement, we have to call STORED PROCEDURE , please let me know how to call  SP in sender JDBC adapter for mysql .
    Thanks
    mojib

    Hi Mojib,
    Please create a sample stored procedure like this which contains select statement and in communication channel give
    wite stored procedure name only to sql query statment and in update statement write <test>.
    I am executing this stored procedure successfully.
    Create Proc GetResultX As
    Begin
    Select * From TESTX
    End
    Execute statement for stored procedure is :
    Exec GetResultX
    Regards
    Laxmi Bhushan Jha
    Rewards point if found usful
    I have given same answer to one of the same  thread

  • Error in XI Sender JDBC adapter for AS/400 DB2

    We are trying to connect to AS/400 DB2 from XI's Sender JDBC Adapter. we got the driver from DataDirect (connectjdbc.jar) and configured it within XI .The configuration according to the manual for this jar file is
    // Register the driver with the driver manager
    Class.forName("com.ddtek.jdbc.db2.DB2Driver");
    // Establish the Connection
    String url = "jdbc:datadirect:db2://corpserver1:50000;LocationName=ACCTNG";
    Connection con = DriverManager.getConnection(url, "test04", "test04");
    In XI we configured this as:
    Driver = com.ddtek.jdbc.db2.DB2Driver
    Connection = jdbc:datadirect:db2://servername;LocationName=NBHAGWAT
    and specified the user id and password
    <b>Note</b>: The Port Number is optional
    When this was done in XI, we got the below error in the Adapter Monitoring:
    Sender Adapter v2108 for Party '', Service 'JDBCtoFile':
    Configured at 2006-12-19 15:45:31 MST
    History:
    - 2006-12-19 15:45:31 MST: Retry interval started. Length: 10.000 s
    - 2006-12-19 15:45:31 MST: Error: Accessing database connection 'jdbc:datadirect:db2://AS400a;LocationName=NBHAGWAT' failed: DriverManagerException: Cannot establish connection to URL 'jdbc:datadirect:db2://AS400a;LocationName=NBHAGWAT': SAPClassNotFoundException: com.ddtek.jdbc.db2.DB2Driver
    - 2006-12-19 15:45:31 MST: Processing started
    Is this because there is something wrong because the way the connection string is specified.
    Anybody who has configured XI Sender JDBC adapter for AS/400 DB2, please send us some information on this.
    Thank you,
    Regards,
    Balaji

    > SAPClassNotFoundException:
    > com.ddtek.jdbc.db2.DB2Driver
    It looks like your JDBC driver is not found. Have you deployed the driver to XI?
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10</a>

  • How to use XML Anonymizer Module for receiver mail Adapter?

    Hi All,
             I would like to know how to use XML Anonymizer Module for receiver mail adapter so as to change the namespace to http://sap.com/xi/XI/Mail/30 from my original namespace? Thank you all in advance?

    Hi,
    This may help u:
    Replacing one namespace with another using XML Anonymizer Module
    Thanks
    Amit

Maybe you are looking for