Update table ( Receiver JDBC)
Hi,
I want to update the table jai_tab2 and set thee values for Emp_Id,Emp_name,Department,Status with the values 1001, jaishankar, xi, 1234 resp.. Earlier the values were 1000, jai, xi, 1. I have designed the data type like
<?xml version="1.0" encoding="UTF-8"?>
<STATMENTNAME>
<TEST action="update">
<TABLE>jai_tab2</TABLE>
<access>
<Emp_Id>1001</Emp_Id>
<Emp_Name>jaishankar</Emp_Name>
<Department>xi</Department>
<Status>1234</Status>
</access>
<key>
<Emp_Id>1000</Emp_Id>
</key>
</TEST>
</STATMENTNAME>
But I am getting a mapping exception for this. I have checked the mapping with inbound payload, mapping seems to be fine. What am I missing in this scenario?
Thanks & Regards,
Jai Shankar.
Hi jai,
There are two formats for this datatype:
Format 1:
Statement...........Element...........Occurence-1
....jai_tab2........Element(sub)......Occurence-1
....action..........Attribute.........Required
....access..........Element...........Occurence-1
......Emp_Id........Element(sub)......Occurence-1
......Emp_Name......Element(sub)......Occurence-1
......Department....Element(sub)......Occurence-1
......Status........Element(sub)......Occurence-1
....key.............Element...........Occurence-1
....Emp_Id..........Element(sub)......Occurence-1
Format 2:
Statement...........Element...........Occurence-1
....Test............Element(sub)......Occurence-1
....action..........Attribute.........Required
....table...........Element...........Occurence-1
....access..........Element...........Occurence-1
......Emp_Id........Element(sub)......Occurence-1
......Emp_Name......Element(sub)......Occurence-1
......Department....Element(sub)......Occurence-1
......Status........Element(sub)......Occurence-1
....key.............Element...........Occurence-1
....Emp_Id..........Element(sub)......Occurence-1
In the second format the table tag should contain the exact name of the table with proper case.
Regards
Neetu
Message was edited by: neetu gupta
Similar Messages
-
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! -
Inserting RFC Response to Tracking table using JDBC as a receiver
Hi All
I want to update my tracking table with the RFC response but the problem is I cant figure out he Target structure on my JDBC.
Every time when testing on my http://xxxxxx:50000/mdt/channelmonitorservlet I get nothing on the "Processing Details"
I've configured my RFC Response as a sender (ASYN) and JDBC as a receiver, I do have RFC destination and it working fine.
My is like this:
<?xml version="1.0" encoding="UTF-8"?>
<ns1:RFC_JDBC_MT xmlns:ns1="http://yonela.com">
<StatementName_response>
<PI_JDBC_TBL ACTION="UPDATE">
<TABLE>PI_JDBC_TBL</TABLE>
<access>
<TYPE></TYPE>
</access>
<key>
<key><CARRID>AA</CARRID></key>
</key>
</PI_JDBC_TBL>
</StatementName_response>
</ns1:RFC_JDBC_MT>
Any suggestionHi,
Use Insert in the action field instead of Update and try again.
-Supriya. -
UPDATE statement in Receiver JDBC adapter
Hi all,
I would like to use UPDATE statement in my receiver JDBC adapter and would like to know how this UPDATE statement works in following case.
1) If i have 10 records to be updated in database, whether Commit happens at the end of all 10 records updation OR it will be for every record update?
RegardsHi,
Then let me construct my query this way...
i have 10 records that needs to be updated to database, say For Ex: 7 records are updated successfully and 8th record has issue in updating the table.
In this case i would like to ROLLBACK entire 10 records with out committing any thing.
So if i use your 2nd option, it should perform as i expected right?
Regards -
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 ChadhaHi 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 -
Getting the un updated records from receiver JDBC
Hi Friends,
I am doing the Proxy - jdbc integration. Consider my proxy sends 10 records to JDBC to update. Consider bcoz of some reason the jdbc updates only 8 records i need to get the 2 records back to Proxy which is not updated in the DB.
Should i need to use the Proxy and JDBC channel as syn or seperate integration should be built. I have seen some documents, that we can get the count of the updated records from jdbc receiver, but i dont need the count i need the record which is not been updated.
How can i do it. please give ur inputs.
thanks
PremUnless you are using SP on JDBC side and explicitly build a record set to send back the data it might not be possible. I am not sure if a custom record set could be returned in JDBC sync receive adapter. You can realize this by updating some other table on JDBC side and then polling that table to update ecc back.
VJ -
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."#II" .
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
PiyushHi 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 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... -
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 -
Inserting into two tables using JDBC Receiver Adapter
I've defined following type for Receiver JDBC to save data in two different tables
Name Category Type Occurrence
ReceiverDB_DT Complex Type
STATEMENT Element 1..unbounded
TABLE_NAME Element 1
ACTION Attribute xsd:string required
TABLE Element xsd:string 1
ACCESS Element Table1_DT 1
STATEMENT2 Element 1..unbounded
TABLE_NAME Element 1
ACTION Attribute xsd:string required
TABLE Element xsd:string 1
ACCESS Element Table2_DT 1
When I send data of two tables, it is showing data for both the two tables in MONI of PI System, but ultimately it shows only one table's data in message monitoring payload.
what could be the problem?
Thanks,
-HareshIt solved!!!
by just changing Occurrence only as rightly pointed by Ankesh
Name Category Type Occurrence
ReceiverDB_DT Complex Type
STATEMENT Element 1..unbounded
TABLE_NAME Element 1
ACTION Attribute xsd:string required
TABLE Element xsd:string 1
ACCESS Element Table1_DT 1
STATEMENT2 Element 1..unbounded
TABLE_NAME Element 1
ACTION Attribute xsd:string required
TABLE Element xsd:string 1
ACCESS Element Table2_DT 1
Name Category Type Occurrence
ReceiverDB_DT Complex Type
STATEMENT Element 1
TABLE_NAME Element 1
ACTION Attribute xsd:string required
TABLE Element xsd:string 1
ACCESS Element Table1_DT 1..unbounded
STATEMENT2 Element 1
TABLE_NAME Element 1
ACTION Attribute xsd:string required
TABLE Element xsd:string 1
ACCESS Element Table2_DT 1..unbounded
Thanks a lot ankesh -
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.
NeeerajHi 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 -
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 helpHi.
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 -
Populating SAP Database table using JDBC adapter
Hi Folks,
I have a requirement to populate a SAP database table say ZTABLE using XI. The Model is the table has to be populated through a file which will be processed by SAP XI. Basically this is a File to JDBC scenario. The database used is ORACLE. Kindly provide me some idea to go ahead.I tried to place the MS access table in the shared folder of the Application server system but still it seems the table is not being populated.
did you check the log in your receiver channel? (/people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn)
The requirement is to update the tables directly as those are the custom tables.
i would still say that do not update SAP tables directly from XI/ PI.....this is not a standard architecture/ solution.... -
How to use SQL Functions (eg : GETDATE()) in Receiver JDBC XML message
Hi,
I am using receiver JDBC adapter.
When record is updated in table, "Timestamp" field should be updated with Database timestamp.Hi Dipak,
Check out below helpful links,
MySQL :: MySQL 5.6 Reference Manual :: 11.3.5 Automatic Initialization and Updating for TIMESTAMP and DATETIME
MySQL :: MySQL 5.0 Reference Manual :: 11.3.5 Automatic Initialization and Updating for TIMESTAMP
Regards,
Krupa -
When would you write a stored procedure in sender/receiver jdbc adapter
Hi Everybody
Can you tell any situation where you would need to write a stored procedure in the query sql statement of sender/ receiver jdbc adapter instead of writing SELECT statement there
why do we need to write stored procedures
thanks and regards,
AnithaHi Anitha,
why do we need to write stored procedures
Some times a single SQL statement will not suffice for ur transactions....
Say u want to access from 2 tables and update based on some condition..
or nested select statement...
or u want to update a 2 nd table based on the values from 1st table... etc..
In those places it's preferable for going for a Stored Procedure.
The Stored Procedure can be used in both Sender and Receiver JDBC Adapter.
Still nt clarified do post..
Babu
Maybe you are looking for
-
Recently my iTunes has stop opening however i hear my music just find. Was wondering why i cannot see my iTunes when i click on it to open from my dock? It never was an issue before - it just stopped opening all of a sudden.
-
Is it possible to view a Report for Resource Usage for last 60 days for instance?
-
LMS 3.2 Installation - Solaris 10/09 Patch Conflict:
Hello all, We are running Sun Solaris 10/09,working on installing LMS 3.2.As per documentation,attempted to install the two recommended patches,127127-11 and 122032-05. The 127127-11 patch is already contained in this OS packaging.The second recommen
-
HT1451 how to eliminate multiple album covers and consolidate back to one album
how to eliminate multiple album covers and consolidate back to one album cover
-
Unknown Error -208 when syncing ipod
Hey Folks having some massive problems with my new ipod. A couple days ago the ipod froze when i was on the bus, after that every time i hooked my ipod into my mac i got the error -208 can not sync ipod. The thing is the ipod was updating. While tryi