Jdbc structure
Hi
we use a structure in sender comm channel only ie
< mesage name>
<statement name>
<db tablename action= >
<table realtable name>
<access>
col1--
</access>
while we dont use it in recieverside,what is the the reason for it.
Hi Raghu,
The structure which u mentioned is for Receiver ....
In Receiver JDBC adapter we dont have the provision to mention the things like create or insert...Table name
In sender adapter we have that facility to use
This structures are ment like that
JDBC Receiver
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
Regards
Seshagiri
Similar Messages
-
Hi all,
I have a scenario involving SOAP and JDBC with synchronous calls.
I have created the source structures with request and response and have no doubt about it.
The doubt is on the target side (JDBC),
Have a structure as,
Name, EmpID and location. Usually the structure for async JDBC goes as,
Project
-> Statementname
-->Storedprocedurename
-->Action
-->Table
-->Name
-->isInput
-->type
-->EmpID
-->isInput
-->type
-->Location
-->isInput
-->type
The response required for this structure would be the Emp ID field. Actually, the source data will send data for Name and Location fields leaving the Emp ID field empty. After it reaches the DB, an Emp ID is generated by the Stored procedure and all the 3 fields is given back as the response with data.
Do i have to create 2 different JDBC structures, one for request and one for response and to enter isOutput attribute in the response structure or is one structure enough and i create the isInput attributes and the isOutput attributes in the same structure.
Help me out guys !Do i have to create 2 different JDBC structures, one for request and one for response and to enter isOutput attribute in the response structure or is one structure enough and i create the isInput attributes and the isOutput attributes in the same structure.
You need seperate structure for response.
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures -
Receiver JDBC structure and Mapping
Hello everyone,
Scenario - WS (async) -> PI 7.1 -> JDBC (sync) -> PI 7.1 -> WS (async)
My question is - In my request structure (from WS), I have a field "Transaction ID". This field is not present in the target DB, but when I get the response back from DB, I need to insert this transaction id in the response back to WS.
I am aware that there is an option in the request query (passing parameter and getting back the same value) and this can be achieved through XSL mapping. Can this same functionality be achieved through Graphical Mapping?
In other words, if I pass Transaction Id in my request query, can I get it back in the response? Just to remind, Transaction Id is not available in DB.
Any help / suggestion will be highly appreciated.
Thanks,
AbhiAbhi,
Although your post is an old one, but since it is not yet closed, i assume that you are still working on this.
I believe you have a view from where you are doing the select. You can give it a try with the following query -
SELECT V1.<your other fields that you want to select>, V2.TRANSACTIONID,
FROM <ViewName> V1,
(SELECT "TRANSACTIONID" AS TRANSACTIONID FROM DUAL) V2
WHERE <Condition>
This will simply create a temporary view V2 for holding the transaction id, and it will pick the value that you are passing with each message and in the response to the SELECT, it will always bring back the Transaction Id that you passed.
I would recommend that you use an XSL Mapping for this. Hope this helps.
Regards,
Neetesh -
Regarding source jdbc structure creation
Hi,
I am doing jdbc sender scenario the source structure I am getting form xsd.
in jdbc sender data type root node should be created "row" and message type . is compulsory?
if i am getting xsd how can i deal that one.
Thanks & Regards
venkat.I am doing jdbc sender scenario the source structure I am getting form xsd.
in jdbc sender data type root node should be created "row" and message type . is compulsory?
--> Yes..
if i am getting xsd how can i deal that one.
---> We can make the changes at IR ..
Regards, -
IDOC TO JDBC structure ampping
Hi,
All
i hvae a ZIDOC having following Structure fields.
ZBRIDOC_I01
IDOC
BEGINHi
Raj
i hvae a ZIDOC having following Structure fields.
ZBRIDOC_I01
IDOC
BEGIN
EDIDC_40
SEGMENT
FIELD1
FIELD2 (Etc)
1. ZNOMI (Zsegment)
SEGMENT
FIELD1
FIELD2
FIELD3
FIELD4
FIELD5
2. ZPREEXP(Zsegment)
SEGMENT
FIELD1
FIELD2
FIELD3
FIELD4
FIELD5
3. ZVARDET (Zsegment)
SEGMENT
FIELD1
FIELD2
FIELD3
FIELD4
FIELD5
4. ZFIXDET (Zsegment)
SEGMENT
FIELD1
FIELD2
FIELD3
FIELD4
FIELD5
5. ZLANGUE (Zsegment)
SEGMENT
FIELD1
FIELD2
FIELD3
FIELD4
FIELD5
6. ZFAMILY (Zsegment)
SEGMENT
FIELD1
FIELD2
FIELD3
FIELD4
FIELD5
7. ZEDUCATION (Zsegment)
SEGMENT
FIELD1
FIELD2
FIELD3
FIELD4
FIELD5
8. ZADDRESS (Zsegment)
SEGMENT
FIELD1
FIELD2
FIELD3
FIELD4
FIELD5
i need to map these structure to 8 tables in oracle how can i map these tables in oracle
regards
kumar -
Structure to be maintained in proxy to jdbc scenario
Hi all ,
There is a field Flag ,which receives the value from the database table.if the flag value is 0 then nothing should be done ,if the flag value is 'S' then the correspong record must be removed from the JDBC data base table.
I am already using the action UPDATE_INSERT for over writing the existing record.
In the ztable ,I am maintaing a zield Flag(change indicator).If this change indicator is S then, record must be deleted from jbdc.
How to maintain jdbc structure .
Thanks,
SrinivasaCan I use structure as this one?
Target->Statement->Attachments-
action=UPDATE_INSERT
table=Mytable
->access-
Field1
Field2
Field3
Field4 ->
<Statement>
<Mytable action=u201DDELETEu201D>
<key1>
<Field1>S</Field1>
</key1>
</Statement>
Here I am using both Update_insert and Delete operations on same table.
Thanks,
Srinivasa -
Not able to insert the data in JDBC receiver
hi Team,
Please help me i am working on IDOC - JDBC interface i am not able to insert data into the table.
error says that table doesn't exists, but if i check in the database the table exists..
below is the error getting triggered.
could not execute statement for table/stored proc."A_PORDER_REG"(structure " STATEMENT") due to
java.sql.SQLException: ORA - 00942 table does not exist
Thanks & Regards,
Vishnu vardhan.Might be u have given table name is diffarent, table name must be match in table field of jdbc receiver structure and table name of data base tables.both places u must give the same table names . this is one reason another one u might be given jdbc structure is wrong. u must specify jdbc structure like this.
STATEMENT
TEST
action(attribute) (action u specify as INSERT)
TABLE( here u give the table name )
access ( below u write the fields)
and one more is u check the receiver communication channel in that u check properly u have given jdbc drivers, connections , user name and pass word.
check all those things definatly u wil find the error. -
Hi
the receiver JDBC structure
occurence
<statement1> -----------------------------> 1..unbound or 1..1 (1)
<Table> -----------------------------> 1..1 per statement always (2)
<access> -----------------------------> 1..1 per statement always (3)
<fld1></fld1>
<fld2></fld2>
</access>
<key> ---------------------------------------> 1..unbound or 1..1 (4)
<val1>
</key>
</statement1>
<statement_response> ---------------> should be 1..unbound <b>if</b> statement request is 1..unbound (here statement1)
should be 1..1 <b>if</b> statement request is 1..1 (here statement1) (5)
<row>
<row>
</statement_response>
-> In which case we go for occurrence of statement (here statement1) = 1..unbound ??
-> if i need to select from one table do i need to use this as 1..unbound ?? Yes/No
-->each statement response (means all rows of that query) will come under row node with multiple occurrence Yes/No??
-->if i want to delete the rows from table where col= (value array) in this case i have to give key occurence as 1..unbound??Yes/NO
-->if i want to select all the data from one table..i no need any key..but as per sap help doc..if we dont specify the key the adapter will not accept and shows some error message...so i should some dummy key value..and need to compare with NEQ to NULL or space???
--> If i want to select the data from JDBC using the receiver structure...can i declare all the field types as string in request and response structure..or it should match the data types of fields in data base..?? if so how it should be in select request and response structure??
(1) (2) (3) (4) (5) are right or wrong..if wrong correct me..
Thanks
krish
Edited by: murali krishna on Mar 24, 2010 5:30 PMKrish,
Please see the below response
Answer-1
If you are selecting data from Different tables then you need to define Statement as 1.. Unbounded
Answer- 2
No. Since you are selecting data from one table - you can define it as 1..1
Answer -3
There will be only one Statement_Response per Statement. In other words if you have Multiple Statement in the Request , then you will have Multiple Statement(x)_Response
So Under Statement_Response you will have Multiple Rows(for each record in the database) . YES - Row has to be 0.. Unbounded
Answer- 4
YES - You are correct
Answer-5
YES - you can define them all as a STRING. It shouldn't be a problem
Hope it helps!
Thanks! -
SAP R/3 -- PI -- Oracle DB SYNC (JDBC)
What is the best approach to handle the following request:
We need to develop a synchonous call that will pass information from SAP R/3 through PI to an Oracle database can return the data.
For instance, we want to pass a material number from SAP R./3, and have all the related information stored in the Oracle DB returned immediately.
The data stored in Oracle will be retrieved via a JDBC connection. If possible can you provide an example....thx>> Just a simple query, no updating is required.
>>> select f1 f2 f3....from ms_tbl where part = inbound-part
Then you dont need sql stored procedure . We can easily handle at pi side.
Step 1) create data type for proxy as per your need
Step 2) Create the data type for jdbc request side as similar below ...
<stmt>
<Customers action="SQL_QUERY">
<access> SELECT f1,f2,f3 from ms_tbl WHERE PART ='$KEYFIELD$';</access>
<key>
<KEYFIELD>inbound-part</KEYFIELD>
</key>
</Customers>
</stmt>
Note: use constant to populate values for action and access field in mapping area.
Step 3)
create data type for the jdbc response side as below
<stmt_response>
<row>
<f1>
<f2>
<f3>
</row>
</stmt_response>
Step 4)
Then create Proxy response data type
Step 5) create message types and Service Interface.(outbound synchronous and inbound synchronous)
step 6)first map: Map step 1 messg type with step2 mesg type
step 7) second map: Map step 3 mesg type to step 4 mesg type
Integration Directory: configure Jdbc reciever. Rest are all same.
That's it.
Please follow this link ...
Jdbc structure :
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Jdbc configure (comm channel)
http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm -
Sender ABAP Synchronous proxy -- PI -- JDBC sync scenario pls!!
Hi Guys,
Can any one help to find one sample scenario like ABAP Proxy --> PI --> JDBC Sync call ? Sync ABAP proxy sample code any 2 or more filelds going from ABAP proxy and maps on JDBC sync request, up date target side SQL server database tables, in case if any error happens error/success message must go back to SAP one Z table with response.
Any help would be really great!!
Many thanks in advance
Sanup date target side SQL server database tables, in case if any error happens error/success message must go back to SAP
one Z table with response.
When you do an update you can get back the number of rows updated in the JDBC response....you can find this in the help page showing JDBC structure. If you are looking for any other response then probably the message needs to be genarated by PI itself after checking the response from JDBC.
Regards,
Abhishek. -
Stored procedure in Sender JDBC Adapter
Hi All,
My Scenrio goes like this ...
Stored Procedure(SQL Server) --- PI -
File
I need to write the results of stored procedure to File.Here I don't need any mapping.So how many DT , MT and MI need to be created?
The interface need to run by 6AM from Monday to Thrusday, how can i achieve this ?
Stored Procedure has only select statement and no Update statement , but it takes Date as Input parameter , so what i need to provide in sender JDBC adapter.
Thanks,
MonishHi Monish,
As per your requirement it is JDBC to File. Please be careful with the structure to be created for sender JDBC. I am unable to understand why you donot require a mapping for this. How XI will send the data to a file then.As per my knowledge if it's file to file and just pick and drop then we can neglect IR and go for ID.But here you are working with JDBC and File so you will be in need of it.
IR:
DT: 2
JDBC_Sender_DT
File_Output_DT(Optional)
You can use the JDBC sender data type structure for File output also.
MT as per your DT
MI:2
Outbound MI: JDBC structure
Inbound MI : File structure
MM: 1
IM: 1
ID as similar to other scenarios.All 1 objects for RD,ID,Sender Agreement and Receiver Agreement.
Sender JDBC channel:
Query: Select * from table where date
But I have a query how are you providing date in input paramerter.It will be dynamically entered into the query right.
You can mention the Avalibility planning for your interface to work in RWB.
Go to RWB>Component Monitoring>Adapter Engine->Communication Channel Monitoring>Avaliablity Planning
Please explain.
Regards,
Nutan -
Hello all,
I have been playing around with the JDBC adapter on my XI sandbox to figure it out. I read through a few guides and I almost have a good handle on it, but there is still a big question lingering. I have configured an example scenario in which I would like to pull data out of the USR01 table from the XI database and transform some user data and place it back in the same table. I was able to get my connections correct and have the communication channel successfully execute SQL statements to alter the data. For example, my <b>Query SQL Statement</b> in the sender communication channel is as follows:
SELECT * FROM USR01 WHERE BNAME='ZTEST2'
And the <b>Update SQL Statement</b> in the sender communication channel is:
UPDATE USR01 SET BNAME='ZTEST' WHERE BNAME='ZTEST2'
This works fine and when I go to transaction se16 and pull up that table I see that the username gets modified when the interface is activated. However, I haven't really figured out exactly how to configure the communication channel / data types so that I can run a SQL statement that will populate my data type that I created for mapping. In other words, lets say I created a data type that looks as follows:
mt_sender
row
MANDT
BNAME
STCOD
And I want to populate that data type with data from the USR01 table (in the corresponding fields), what would my SQL statement look like in the sender communication channel? I read a few weblogs on how to do scenarios like this, so I built my receiving Data Type to look like this:
mt_receiver
STATEMENT
ROW
action
TABLE
access
MANDT
BNAME
STCOD
But I still don't understand how exactly XI correlates the data types / mapping and transformations to the SQL statements....
I'm having a hard time putting this into words, but basically I'm asking a rather high level question I think. How does XI relate the data types to the data it pulls from the SQL statements? How do I actually get the SQL statement to populate my data types so I can do mapping and then repopulate the database table again? Does this make sense?Hi Harrison,
Also check out these JDBC structure links related to your question:
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm</a>
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm</a>
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm</a>
Regards,
Subhasha Ranjan -
No response message in Proxy to JDBC synchronous scenario
Dear Team,
I am working on synchronous scenario Sender ABAP proxy <===> SAP PI 7.31 <===> Oracle Database.All the necessary proxy configuration has been successfully tested.
Business Scenario:
ABAP proxy will send a single Vendor Id to Oracle DB as request and in return , it has to retrieve all the columns related to Vendor as response.Oracle Database stores all the Vendor information.There are 11 columns including the vendor Id in the view for the Vendor records.
Design :
For Request structure:
a-->Created MT for Sender ABAP Proxy with only 1 field for Vendor Id.
b-->Created MT for Receiver JDBC with Action as SELECT , Table with "View Name" , Access with Constant Blank for all 11 column and Key as Vendor Id.
I have been following the link and Bhavesh Kantilal document.
http://help.sap.com/saphelp_nw73/helpdata/en/44/7b7171fde93673e10000000a114a6b/content.htm?frameset=/en/44/7b7855fde93673e10000000a114a6b/f
rameset.htm¤t_toc=/en/ca/b977f1c7814201954f20bb87ad7aab/plain.htm&node_id=71
For Response structure:
Created MT for Receiver JDBC with All the column names.
Created MT for target ABAP ECC with the same 11 column name of JDBC response.
Note :
1.Database team shared a excel file as a sample payload which has all the column names of a vendor and I created my DT with the same naming conventions as they are maintaining in their database i.e. Column names are in CAPs, in the same order and even the special characters in the column name.
2. The PING test connection for Cc works fine to database.
Please read out my queries as the I am not receiving any response from Oracle DB and gives error as timeout exception:
1.Since I am trying to retrieve all the column of the view , am I doing the correct procedure of putting all the column name in the JDBC request structure and making a Select statement. Can I add < * > to fetch all the column name and if so where can I add it.
2. Whats the difference between SELECT and SQL_QUERY and on what circumstances I can add it?
3. How can I test ICO in ID?
4. Can I use any SOAP tool to test the messages? Is there any functionality in NWA to test the messages directly to JDBC .
Hope all your inputs can improve my design part.
Regards
RebeccaHi Rebecca,
Did you go through all of these links below?
PROXY to JDBC- SYNC
Proxy to JDBC Sync, with Idoc Receiver
JDBC to PROXY Sync Scenario | SCN
JBDC Receiver Insert Statement Response
Re: Synchronous JDBC select
receiver JDBC structure
Regards,
Jannus Botha -
Hi All,
I am trying to post a xml a simple XML file to JDBC...
I have created a JDBC structure as ( my receiver is Oracle)
OUTPUT_MT
STATEMENT
EMPLOYEE --- my table name
action ( Value INSERT)
TABLE (value EMPLOYEE my table name)
access
ID
Name
Age
I have tested the mapping ad also tested the same in ID ( tools-> test configration)
When I am trying to update the table with below XML
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Input_MT xmlns:ns0="http://SAP/TEST/xi">
<ID>1</ID>
<Name>Dileep</Name>
<Age>10</Age>
</ns0:Input_MT>
I am getting error as
" Error: TransformException error in xml processor class: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)"
Can any one please let me know best way to update the table
- DileepHI
Are you sending Action as a field or attribute. it should go as an attribute
<StatementName2>
<dbTableName action=u201DINSERTu201D>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2</col2>
</access>
<access>
<col1>val11</col1>
</access>
</dbTableName>
</StatementName2>
Check all possible formats
http://help.sap.com/saphelp_nw70/helpdata/EN/2e/96fd3f2d14e869e10000000a155106/content.htm
Thanks
Gaurav -
ABOUT MAPPING IN FILE TO JDBC?
can any one give me how the mapping takes place between file structure and jdbc structure ,
from where we will get receiver side structure(JDBC SIDE) and
How the data in file is mapped and
Where we store stored procedure and data.
How stored procedure is executed. and data is transfered to the database.
I am expecting answer in full detail.Hi,
Please see below links
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
/people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response
How to check JDBC SQL Query Syntax and verify the query results inside a User Defined Function of the Lookup API -
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
/people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api
http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
/people/swaroopa.vishwanath/blog/2006/12/28/send-rfc-to-sap-xi-150-asynchronous
Regards
Chilla..
Maybe you are looking for
-
Verifying BAPI posting in SAP R/3
Hi experts, I am using async RFC (BAPI) in my scenario. The message has left XI sucessfully, but I do not know whether my BAPI has been posted in SAP. Is there any way to find out whether a RFC call has been made in SAP R/3. Thanks i
-
what is process pattern in BPM? How many Process Patterns are there namely? Please REPLY urgently?
-
Migrating User Settings from one local user to another
I have an iMac running 10.5.4 with some issues (Parallels hanging at random moments). One of the tests I did to troubleshoot it was create a new user profile, and run the same (shared) Parallels machine as that new user, which seemed to fix the probl
-
Does Siri only work when connected to WiFi
Does Siri only work when you are connected to a Wifi? Mine does not seem to work through the 4G cell network.
-
HT1386 iPad syncing and getting all of iPhones contacts, bookmarks, etc.?
I have an iPhone, my daughter has an iPad and we only have one desktop computer. How does she sync the iPad without getting all of my contacts, bookmarks, etc. We have only one iTunes acccount and prefer not to have more than one. Please advise.