cancel
Showing results for 
Search instead for 
Did you mean: 

Which is the best solution to this scenario?

Former Member
0 Kudos

Hi gurus!!

I have the followin scenario:

SAP Z table ---> PI -


> SQL table and

SQL table -


> PI -


>SAP Z table

I have planned to make the following scenario, RFC to JDBC.

Create an RFC in R3, select data from Z table, import this funcion like RFC in PI, and update SQL via JDBC.

The same way to send data from SQL, select through JDBC from SQL and send via RFC to R/3.

Is this the best and easy solution, or there is any better? I've never used RFC lookup, I don't know if it is possible to use for example.

I would appreciate your suggestions!!!

Regards,

Pablo.-

Edited by: Pablete on Feb 14, 2012 8:41 PM

Accepted Solutions (1)

Accepted Solutions (1)

former_member181962
Active Contributor
0 Kudos

Hi ,

You solution is good. As suggested, you may replace RFC with ABAP proxy.

Just one question, are the two scenarios two independent ones? or related ones?

If both are related ones, then you can design a Synchronous Proxy to JDBC.

Best regards,

Ravikanth Talagana

Former Member
0 Kudos

There are related, with data from SQL, it creates a work order in SAP, and then, this info returns to SQL.

rajasekhar_reddy14
Active Contributor
0 Kudos

There are related, with data from SQL, it creates a work order in SAP, and then, this info returns to SQL.

Then go with Proxy->Pi-->JDBC sync scenario, anyway JDBC Receiver adapter/proxy supports sync calls.

Former Member
0 Kudos

There are related, with data from SQL, it creates a work order in SAP, and then, this info returns to SQL.

proxy/rfc <-> jdbc because rfc and jdbc both are support synchromous and

if you use proxy , you will get more advantages like send data morethan 5 MB and attachments but you need to write report.

if you use RFC , you will import RFc in ESR only and no need to write any reports .

example of scenario sap -> JDBC :

http://www.saptotal.com/SAP-XI-PI-JDBC-Synchronous-Scenario-Synchronous-Scenarios-in-XI-PI.html

Former Member
0 Kudos

Thanks a lot, surely I will choose RFC's way.

Another doubt, if conection between PI and SQL falls, and JDBC adapter fails, is there any standard contingency plan in PI to solve this problem? PI saves an error message anyway?

Scheduled in brackground error messages in PI is a solution for this issue?

former_member181962
Active Contributor
0 Kudos

Hi Pablete,

I have a doubt. What is the trigger point in your scenario?

Does the action start on the JDBC side and then SAP receives it?

or the other way round?

Best Regards,

Ravikanth Talagana

Former Member
0 Kudos

Right now SAP->PI->SQL but I think it will be in two-way. Two synchronous interfaces.

former_member181962
Active Contributor
0 Kudos

Hi Pablete,

If your requirement is just SAP ->PI ->JDBC, then you have to write a ABAP report whether you use RFC or Proxy.

The steps for development are as follows.

Pi development
ESR
Create a data type, message type and service interface for source side.
Create a data type, message type and service interface for target side.
Create message mapping between message types.
Create operation mapping between service interfaces.
ID
Import business system for SAP. 
Create communication component for your JDBC receiver.
create a receiver JDBC communication channel.
create a receiver determimation, interface determination and receiver agreement.

ABAP development
Generate a proxy for the outbound service interface.
Create an ABAP program which can call this proxy.

If your requirement is to trigger a request from SAP, then call JDBC to get a response and feed this response back to SAP, then it means that you have to design a synchronous interface.

the steps are as follows.

Pi development
ESR
Create a data type, message type for source side request message.
Create a data type, message type for source side response message.
create a synchronous service interface using message types for request and response.
Create a data type, message type for target side request message.
Create a data type, message type for target side response message.
Create a synchronous service interface using message types for request and response.

Create message mapping between request message types.
Create message mapping between response message types.
Create operation mapping between service interfaces.
ID
Import business system for SAP. 
Create communication component for your JDBC receiver.
create a receiver JDBC communication channel.
create a receiver determimation, interface determination and receiver agreement.

ABAP development
Generate a proxy for the outbound service interface.
Create an ABAP program which can call this proxy.
The proxy will return the response in an internal table.
You can update any SAP tables using the returned internal tables.

In any case, if there are any failures of connections between either SAP to PI or PI to JDBC, you would get a error message in Adapter engine message monitoring.

Best Regards,

Ravi

Former Member
0 Kudos

OK, thanks for data, but if there is a failure between SQL (JDBC) and PI (broken conection) I would get an error in message monitoring?? This is my doubt!

former_member181962
Active Contributor
0 Kudos

Hi Pablete,

Yes. There would be an error in Adapter level message monitoring.

Best Regards,

Ravikanth Talagana

Former Member
0 Kudos

Perfect!

Another question, JDBC is only for external databases correct? For Z table solutions are only RFC or Proxy ?

Trigger is in SAP R3, data is loaded in z table.

former_member181962
Active Contributor
0 Kudos

Yes. you are correct.

But technically all SAP tables are also some kind of database tables, so still there is a possibility of using JDBC. But not recommended.

Best Regards,

Ravikanth Talagana

Former Member
0 Kudos

Another question, JDBC is only for external databases correct? For Z table solutions are only RFC or Proxy ?

Trigger is in SAP R3, data is loaded in z table.

yes correct and you can use both RFc/proxy/idoc for data loded in Z table (better to use PRoxy only)

Former Member
0 Kudos

Now a question about JDBC adapter. I've created a CC JDBC receiver to check the connection between SAP PI and SQL. In Message Monitoring, CC status is green but I'd like to known if JDBC adapter is correct, if exists connection, Is there a way to known this?

In pi 7.1 you can import sql metadata with an external definition an CC only, but how can I test this in PI 7.0??

Regards!

Answers (3)

Answers (3)

Former Member
0 Kudos

HI

suppose your going to work on this RFC to JDBC scenario.....

In general, RFC always response to ur request... when rfc receive request from the PI ...

but in ur case, RFC is sender then where its going to get request form pi.

RFC itself give request and response to itself means does not replicated to pi or JDBC.

so better way go to proxy to JDBC scenario

1.create ESR for sender and receiver ....

2.goto ecc...T.Code :SPROXY

3.goto message interface(outbound)->Right click ->create give pkg and prefix...

4.create integration directory

5.write report in se38 for corresponding proxy class.

6.execute ur report by clicking f8

baskar_gopalakrishnan2
Active Contributor
0 Kudos

To access SAP Tables, you can use proxy or RFC on the sap side. Using JDBC to access database SQL table is right. JDBC lookup can be used during mapping time. To validate data or doing lookup for a field or doing SQL Query.

You can do RFC to JDBC or Proxy to JDBC.

Former Member
0 Kudos

Hi pablete,

Your solution is verymuch fine.

At the max you can think of using PROXY instead of RFC.

else, you solution is correct.