cancel
Showing results for 
Search instead for 
Did you mean: 

How to update Oracle DB accroding to message returned from SAP RFC ?

Former Member
0 Kudos

Hi,all:

     My question is can update statement use message returned from SAP RFC:

    

     please help me,thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos

Hi Jhon,

No, there is not the way to work with sender jdbc. Sender JDBC do a poll, in this way the sender jdbc do a select based in a flag field/s and later in the next step do an update (in UPDATE SQL STATEMENT) in that flag fields.

Kindly, you can tell us your entire scenario and we can help you better. You can do a RFC -JDBC scenario (SAPTechnical.COM - A Step-by-Step Guide on Asynchronous RFC - to – JDBC Scenario Using SAP PI 7.0) or proxy abap, inside abap do the RFC call and later call the PI and to update in JDBC.

Regards.

Former Member
0 Kudos

     Thanks very much!    

     The thing is like this:there is a interface user adapter JDBC->RFC .SAP access/select data stored in Oracle DB ,and update flag of the line of data the same time,like the picture above.it means SAP have readed this data,so is there any way to update flags according data what sap read !

     Can this interface become Synchronize ?


     Please,Thanks!

iaki_vila
Active Contributor
0 Kudos

Hi John,

I think you would need three states for your flag, N "Not selected",  S " Selected", U " Treated by SAP". Therefore you can udpate to S in the poll (in this way you can avoid to select always the same register in a issue case), later you can have these options:

1. Do a RFC lookup in a jdbc-jdbc scenario (Defining RFC Lookups Graphically - Enterprise Services Repository - SAP Library). At mapping level you can call to SAP.

2. To do async/sync bridge without ccBPM. You can a JDBC-RFC-JDBC scenario in one shoot, check this similar example: File RFC File using request response beans without BPM - Netweaver Technology - SCN Wiki. You can notice in the sender channel using module beans you can send the request to a sync RFC interface.

Hope this helps.

Regards.

Former Member
0 Kudos

Thanks!

     Yes,Sure,we have two states for flag,0-'Not Selected',2-'selected'. And we also update to 2 after selected, but there is one issue case: WMS also insert  data into DB when SAP select data from DB!  The result is what SAP updated data is more than SAP selected !

     Because of this, We want to know is there any way to avoid this situation ! Or,is there any way to know what data are we selected,and then update this data!

Regards!

iaki_vila
Active Contributor
0 Kudos

Hi John,


the result is what SAP updated data is more than SAP selected !

I think you have to select the DB table key values to do the after right update. If this key values are not unique, may be you should talk with the DB team to create an auto-count field in order to have a unique key field.

Regards.

Former Member
0 Kudos

Thanks!

    

     Yes!!! we selected the DB table key,but how to do the right update with the table key?

    

    

          Can update statement  use the table key ? and how?

Regards!

iaki_vila
Active Contributor
0 Kudos

Hi Jhon,

You are right. In one scenario mine the better solution that i found in Oracle was to use the ROWNUM standard Oracle column and later to do a stored procedure to do the UPDATE. Check my example in this thread

Pay attention to use the same select in the stored procedure.

Regards,

Former Member
0 Kudos

Thanks very much anyway!!!

Regards!