Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

[HELP] Asynchronous COMMIT

Former Member
0 Likes
1,033

Hello Gurus,

Here is my scenario: I have a external system that perform a BAPI_GOODSMVT_CREATE and COMMIT it via RFC, but sometimes it does the COMMIT and doesn't return the number of material doc to my external system because the communication crashed. So the operator try to process it again with the same data, creating a duplicated doc.

My question is: Is there a way to process BAPI_GOODSMVT_CREATE via RFC, wait a return of doc in my external system, and then after the return, process the COMMIT? Or SAP will release the buffer in the moment i close the RFC with BAPI_GOODSMVT_CREATE?

Regards,

Rafael

7 REPLIES 7
Read only

Former Member
0 Likes
944

Just to be clear...

External system -> BAPI_GOODSMVT_CREATE -> SAP

SAP -> Material Doc/Year -> External system

External system -> BAPI_TRANSACTION_COMMIT -> SAP

Is there any way to do it?

Regards,

Rafael

Read only

Clemenss
Active Contributor
0 Likes
944

Hi Rafael,

not as easy as it should be.

You may set up another BAPI interface that dtores confirmations given by external system. The run a repeted job that delets all POs that have not been confirmed within a certain time range.

Regards

Clemens

Read only

Former Member
0 Likes
944

Clemens,

Could you be more specific?

Thanks.

Regards,

Rafael

Read only

0 Likes
944

Hi Rafael,

> Could you be more specific?

Yes, I could.

Your question was not very specific, I have no idea about how you do the remote bapi commit.

You said "I have a external system that perform a BAPI_GOODSMVT_CREATE and COMMIT it via RFC". So I suggested that you do some programming in the external system: If the system receives a PO number, it should call a custom RFC function. This function receives the PO number as an acknowledgment. The receiving function stores this in a customer Z table.

Then you create a job that reads this table, say every 5 minutes or so, checking all POs created in this time interval: If they have not been acknowledged in time, delete them and wait for the repeated creation.

An other possibility might be to send a unique identifier with all POs from the external system and check this unique identifier before creating a PO.

Regards,

Clemens

Read only

Former Member
0 Likes
944

Clemens,

Sorry but i forgot one thing, my client don't want anything with Z, all the development must be in the .NET external system. The client wants to call (RFC) only standard objects.

But i'm starting to believe this is not possible.

Regards,

Rafael

Read only

0 Likes
944

Hi Rafael,

in this case your client may consider using the IDOC transfer: All IDOC systems enable a complete and safe handshake mechanism.

Regards

Clemens

Read only

Former Member
0 Likes
944

Clemens,

Thank you so much for the help.

Regards

Rafael