cancel
Showing results for 
Search instead for 
Did you mean: 

Create BAPI call and bapi_transaction_commit

Former Member
0 Kudos
351

Hello,

I am working on a scenario in which I connect the IDES system with XI 3.0.

Therefore I take the RFC-adapter sender adapter, that calls the BAPI bapi_salesorder_createfromdat2. So far there is no problem, the call is successful, but unfortunately it is not possible to commit this work with another call BAPI_TRANSACTION_COMMIT. Why?

How is is possible to make this szenario via XI and a BAPI? So far as I have understood the concept of the rfc-adapter, there exists no logical unit of work, so it is actually correct that the second commit call doesn't work, but how can I still make an update via XI?

I hope somebody can help me here,

kind regards

Markus Semrau

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

What we are talking about here is synchronous postings.

The concept is fundamentally flawed for most customer requirements as it offers no guarantee delivery.

What that means is you have to accept:

1. The Sales order is not created at all.

or

2. The possibility of the message being posted more than once.

If the message fails, XI makes no attempt to retry. If on the other hand it succeeds then the "Z" wrapper with a commit only confuses the situation. The response may not make it back to the request system, but because of the commit in the "Z" wrapper the sales order is actually created. Now the sender thinks it failed and resends. Now you have duplicate sales order.

Synchronous postings should be avoided, or the application should be able to detect and reject duplicate postings based on application data (Not message id).

Regards,

Jason

Former Member
0 Kudos

Hi,

I really think SAP should look at this one. Creating a Z function for each BAPI that we need a create/commit is not very efficient!

Yves

MichalKrawczyk
Active Contributor
0 Kudos

Hi Werner,

this scanario can be done like this:

create RFC z_bapi_salesorder_createfromdat2_central

from it call the bapi_salesorder_createfromdat2

and after that a BAPI_TRANSACTION_COMMIT

map the response (bapiret) from

bapi_salesorder_createfromdat2

to bapiret of z_bapi_salesorder_createfromdat2_central

and done

now you can make a sync call form XI to: z_bapi_salesorder_createfromdat2_central

Regards,

michal

Former Member
0 Kudos

Hi Michal,

What does "create RFC z_bapi_salesorder_createfromdat2_central" mean? Is it a Func mod or is it a RFC destination. I am a bit confused from the scenario you described. Can you pl put the steps a little more in detail?

We are trying to create a Sales Order using BAPI_SALESORDER_CREATEFROMDAT2 and are also calling the Commit BAPI. MONI shows successful messages but no Sales Order is created in SAP47. (Pl see my message posted earlier).

Please advise.

Thanks,

Sekhar

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

z_bapi_salesorder_createfromdat2_central

has the same structure: import, export, tables

as bapi_salesorder_createfromdat2 and it's a remote funtion module

inside this module we call normal bapi_salesorder_createfromdat2 with parameters from the z_bapi_salesorder_createfromdat2_central

then bapi_commit

now a little bit clearer?

Regards,

michal

Former Member
0 Kudos

Hi michal,

I am little bit confusion about the adapter.I am using RFC reciever adapter.Shall i use RFC reciver adapter for the scenario(JDBC to BAPI Creation).

Thanks,

sekhar.

Former Member
0 Kudos

Hi michal,

sorry for the mistake,

my question is :shall i use sender RFC adapter?

Thanks,

sekhar.

Former Member
0 Kudos

Hi werner

Can u tell more on that .. How u are passing data to BAPI's and data for sales order is coming from which location ..

regards

Vinod ahir