cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC to RFC synchronous scenario

former_member460664
Participant
0 Kudos

Dear All,

I am working on JDBC to RFC scenario. We are using ZBAPI_xxxxxxx_xxxxxxx. Scenario is working fine for taking data from SQL server table and give the same data to R|3 to create a sales order number. SO number has been created in R|3. I have to give the same SO number to SQL server. But SO number has not come to Response mapping. It is giving the below error.........

BAPI response is a structure of type BAPIRETURN1

TYPE='', Message (ID:, NUMBER:000): "", LOG_NO:, LOG_MSG_NO:000000

I have mapped Bapi response field ( SALESDOCUMENT) to SQL server table field. Response should be under BAPIRETURN1  field?? Plz explain about BAPI export parameters. How can we see Response XML message in PI?

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member200386
Active Participant
0 Kudos

Hi Ashok ,

JDBC adapter won't work for synchronus scenarios. you have to go with asynch/synch bridge BPM or use request responce bean in you comm channel.

i worked on same scenario 7.3 . initially we thought to go with synch but it wont worked. then we changed it to asynch.

Regards,

Pavan

former_member460664
Participant
0 Kudos

Thanks Pavan. cant we use JDBC receiver as synchronous??  I have received BAPI response to MONI. But RFC CC of AE is showing still error that BAPI response is a structure of type BAPIRETURN1..

Please let me know how to do RequestResponse Bean in CC.

former_member460664
Participant
0 Kudos

Hi Pavan,

I want to use RequestResponse Bean for this requirement. You please share your experience how to configure RequestResponse Bean and provide some links for the same.

Former Member
0 Kudos

Have you tried executing your ZBAPI... function manually with the same data to see what the response is? Could it be a coding issue in your z function? You error is suggesting that its coming back null. So maybe you need to add a success message to the bapireturn?

I personally try to avoid using RFCs because of limitations and just overall being a pain to work with. I would suggest setting up a JDBC to ABAP Proxy, inside the ABAP proxy you can return back to PI the information you want via a different proxy or same, just depends if you need it to be synchronous or asynchronous. Just my two cents

former_member460664
Participant
0 Kudos

ZBAPI is working fine ( ABAP guy said). In R|3 SO has been created and we are able to see the SO number in Export parameter of ZBAPI. As per customer requirement we should use RFC only. We dont have any other option. Should not we use JDBC sender for Synchronous purpose? If so, why it is?

Former Member
0 Kudos

So when the ZBAPI function is executed and successfully creates. Does it add a success message to the BAPIRETURN? Does your interface work when there is a failure and a value in the BAPIRETURN?

Using JDBC is in synchronous connect should be fine. I just always try to stay away from RFCs due to issues like you are experiencing. So its just a personal thing .

If I were to take a stab at this, I would guess that the BAPI is working fine, but on a success its not writing this to the BAPIRETURN and you are expecting something to be passed back. Hence the error. Could be wrong, but this is my guess at this point. This is why I suggested executing the BAPI manually to see what was the values of BAPIRETURN were.

former_member460664
Participant
0 Kudos

BAPI export parameters are RETURN, SALESDOCUMENT, SHIP_TO_PARTY,SOLD_TO_PARTY.  I have to pass the SALESDOCUMENT parameter value to database as response. As per ABAP consultant, whenever there is a error then RETURN parameter shows the samething. If successful then SALESDOCUMENT parameter will be passed. we are not able to understand where is the error? Please suggest

former_member460664
Participant
0 Kudos

I am able to see BAPI response in MONI. But I cant send the same data to SQL table as response. Still CC monitoring of RFC showing error that BAPI response is structure of type BAPIRETURN1.

To send response data to SQL as response is not possible, what is the 2nd method? We should use JDBC adapter as sender and BAPI as receiver (synchronous). We have no way other than that. Please explain other ways...

Thanks,

Ashok.

udo_martens
Active Contributor
0 Kudos

Hi,

if you ve download the BAPI to ESR you can dispay Request or Response message type.

Of course you can monitor the BAPI response in PI - if synchr messages are logged. The way how to monitor is dependend from PI version.

JDBC sender is actually asynchronous, if you want to to setup a synchronous scenario using a synchronous BAPI you need BPM or use of RequestResponseBean.

Regards,

Udo

former_member460664
Participant
0 Kudos

I am using PI 7.31. I am able to see Request and Response message types. How to monitor BAPI response in PI? Should not we use JDBC sender for synchronous? Why?

udo_martens
Active Contributor
0 Kudos

Hi,

jdbc sender is not expecting a response -> asynchronous. Which quality of service did you put in the sender channel?

I think that is the reason you will not see any response in the monitoring. What did plan to do with the response of the bapi?

Regards,

Udo

former_member460664
Participant
0 Kudos

Initially unfortunately I used Exactly Once Qos in sender jdbc CC. After I changed to Best Effort. I have not tested the scenario after changing to Best Effort. By using BAPI Response I have to pass the Sales Order number to SQL server database table which is created in SAP R3. If we will not use sender JDBC as synchronous, what is the other way to send the response back to SQL server and explain indetail?

former_member460664
Participant
0 Kudos

After changing to Best Effort I am able to see response payload in MONI. PI have received the SO number but I cant send the same SO number to SQLserver. If not possible by using the sender jdbc synchronous, Please explain about how to do Request Response Bean in CC Module tab.

former_member460664
Participant
0 Kudos

Dear Udo,

I have selected Commit Handling for Single BAPI calls option in Recv RFC CC for all interfaces. For Asynchronous interfaces BAPI data directly executed in R|3 tables. But I have a doubt for synchronous interfaces. Shall I select that option? or ABAPer has to call the BAPI_TRANSACTION_COMMIT in his function module?

udo_martens
Active Contributor
udo_martens
Active Contributor
0 Kudos

Hi,

if the rfc is chaning data in db, then select Commit Handling.

Regards,

Udo

former_member460664
Participant
0 Kudos

Hi Udo,

I have used RequestResponseBean in sender jdbc adapter. For this I created one more jdbc communication channel (Receiver) and maintain the same in sender JDBC module tab. Even Response has not gone to SQL server DB. Which QoS service do I have to use in Sender JDBC adapter? Are there any more configurations required?

Regards,

Ashok.