SAP PI Proxy To JDBC Scenario - What Is My Ip
SAP PI Proxy To JDBC Scenario - What Is My Ip
SAP PI Proxy To JDBC Scenario - What Is My Ip
Overview:
Requirement is to insert/update SAP records in non-sap system’s Oracle Table.
In SAPEcc, one ABAP function module is required to extract data from sap-table and pass it to PI-Proxy-
structure and invoke the SAP-PI-Proxy.
1. For example JDBC query DataType would be like as below for Table ‘EmpTable’
2.
3. Based on our requirement, here can provide different action method as follows
1. INSERT
2. UPDATE
5. SELECT
2. For e.g. SI_ProxyToJdbc_AI
2. for. e.g. SI_ProxyToJdbc_AO
1. For e.g. OM_ProxyToJdbc
1. Its not required, because it’s a proxy scenario which class will be invoked from SAP-ECC.
2.
6. Where:
6. Interface Determination
5. Receiver Interfaces
2. Name =SI_ProxyToJdbc_AI
3. Namespace =urn:ProxyToJdbc
7. Sender Agreement
1. Its not required, because it’s a proxy scenario which class will be invoked from SAP-ECC.
8. Receiver Agreement
To insert records into JDBC table, below SQL query is been used
Example: if multiple employee records need to be inserted in single query, then message format should
be like below:
<?xml version="1.0" encoding="UTF-8"?> <ns0:MT_JdbcInsert xmlns:ns0="http://Test_01"> <StatementName> <dbTableName action="INSERT"> <table
[II] DELETE
To delete records from JDBC table, below SQL query is been used
Example:
Grade ‘X’
[III] UPDATE
To change records into JDBC table, below SQL query is been used
UPDATE TableName SET col1=’val’, col2=’newVal’ WHERE ((col2=’oldVal’ AND col4=’val’) OR
(col2=’oldVal’))
and JDBC requires below message format for INSERT operation
<StatementName> <dbTableName action="UPDATE"> <table>TableName</table> <access> <col1>val</col1> <col2>newVal</col2> </access> <key> <col2
In the <key> element, enter the condition that can find the data records whose column values are to be
changed.
Example:
If we want to update Department & Grade for all the records which has
Department as ‘IT’
[IV] UPDATE_INSERT
In the <key> element, enter the condition that can find the data records whose column values are to be
changed.
Example:
Check in table, if record found with respect to key details, then update same record
for e.g., if we want update Department & Grade of those records which:
ManagerId=5064
[V] SELECT
If we need to perform SELECT query with JDBC Receiver Adapter, then we need to design a Synchronous
scenario. Here, two maps are required,
1. Request-Map will help to convert Dynamic-data-query into and message format of SELECT query
supported by JDBC-Adapter.
To fetch specific column records from table based on conditions, below SQL query is been used
SELECT col1, col2, col3 FROM TableName WHERE ((col2 = ‘val’ AND col2 <> ‘val’) OR (col3 > ‘val’))
and equivalent JDBC adpater requires below request message format for SELECT operation
<StatementName> <dbTableName action="SELECT"> <table>EmpTable</table> <access> <col1/> <col2/> <col3/> </access> <Key1> <col1>val</Departmen
and JDBC returns output response in below message format
<StatementName_response> <row> <col1>val</col1> <col2>val</col2> <col3>val</col3> </row> <row> <col1>val</col1> <col2>val</col2> <col3>val</c
For Example:
Column values within a <key> element are combined with a logical AND.
Attribute ‘compareOperation’ can have values as given in following table for different comparison-
operator:
LT Less than
Like (strings). In the corresponding value, the SQL placeholders “%” or “_” can
LIKE
then also be used.
To avoid query operations without conditions, then select ‘Key Tags Mandatory’ in the adapter configuration.
Contact US