on 08-15-2006 12:19 PM
Hi All,
I have designed a File-JDBC(insert) scenario based on the blog 1772. It is working as expected. But I have some doubts regarding the JDBC receiver data type. I had a look into SAP help, page http://help.sap.com/saphelp_nw2004s/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm.
But still I am not clear. I have designed my data type
<STATMENTNAME>
<TEST action="insert">
<TABLE>jai_tab</TABLE>
<access>
<Emp_Id />
<Emp_Name />
<Department />
<Status />
</access>
</TEST>
</STATMENTNAME>
How can I do an update in the same table based on Emp_Id and delete a row based on Emp_Id. How should my data type look for update and delete?
Any help is greatly appreciated.
Thanks & Regards,
Jai Shankar.
Hi Jai,
plz have a look to Document Formats for the Receiver JDBC Adapter .
You have to put value "UPDATE" or "DELETE" to attribute "action".
<StatementName1>
<dbTableName action=UPDATE>
<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>
action=UPDATE
Statements with this action cause existing table values to be updated. Therefore, the statement corresponds to an SQL UPDATE statement.
The element but it is empty, then no condition is specified and the entire table is to be updated. This may not be permitted by the configuration of the JDBC adapter for security reasons and will therefore result in an error during message processing and an appropriate error message.
<StatementName3>
<dbTableName action=DELETE>
<key1>
<col2>val2old</col2>
<col4>val4</col4>
</key1>
<key2>
<col2>val2old2</col2>
</key2>
</dbTableName>
</StatementName3>
action=DELETE
Statements with this action cause existing table values to be deleted. One or more element but it is empty, then no condition is specified and the entire table is to be deleted. This may not be permitted by the configuration of the JDBC adapter for security reasons and will therefore result in an error during message processing and an appropriate error message.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shankar,
you can use the same datatype for update and delete.
The only difference is in the action-tag.
<TEST action="update">
<TEST action="delete">
You can do this by assigning a constant in your message mapping!
Regards Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.