cancel
Showing results for 
Search instead for 
Did you mean: 

Calling multiple BAPI/RFC in a single LUW from CPI

SandeshK
Participant
0 Kudos

Hello All,

We are trying to create a PM maintenance notification in S/4HANA from CPI. We are trying to achieve this by calling the standard BAPI available for it. However, we need to call the below BAPIs in sequence before the commit.

  • BAPI_ALM_NOTIF_CREATE (We get a temporary notification ID in the format of %000001 as output which is passed as input to the next BAPI below)
  • BAPI_ALM_NOTIF_SAVE (This should return the real notification ID. For example: 10001223)

However, when we call these BAPIs in sequence using RFC adapter from CPI, the second BAPI does not save the notification because it cannot identify the ID %000001. We were guessing it could be because both the BAPI calls are not happening in the same LUW of S/4.

How can we make sure from CPI that sequence of BAPIs are executed in the same LUW?

Regards,
Sandesh

SandeshK
Participant
0 Kudos

Someone with a clue?

former_member235395
Contributor
0 Kudos

Hi Sandesh, could you Clarify technically your scenario? I mean, how built the RFC adapter(What options was flagged on Adapter)? How built your Custom RFC on Backend(both BAPI's are calling it on same custom RFC)? First of all, Test directly in Backend your Custom RFC and be sure that PM Notifications was created.

Regards.

SandeshK
Participant
0 Kudos

Hi David,

We did not flag either 'Send Confirm Transaction' nor 'Create new connection'.

There is no custom RFC involved. It is the standard BAPIs that I had mentioned. Yes they work when we have tested them from SE37 in a test sequence. So we are hoping it works the same way from CPI too.

deepak_gupta2018
Explorer
0 Kudos

Hi Sandesh,

Is it resolved using standard CPI options instead of custom API

SandeshK
Participant
0 Kudos

Hi Deepak,

We could not achieve it using standard CPI options. We had to build a wrapper RFC to include different BAPIs in sequence and then use this custom RFC from CPI.

Regards,
Sandesh

Accepted Solutions (1)

Accepted Solutions (1)

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Sandesh,

I dont think you can control this using SAP CPI.I guess you need to create wrapper BAPI which executes the related BAPI in sequence( you need to call wrapper BAPI from SAP CPI ).Below thread might give more details.

https://answers.sap.com/questions/9509610/bapialmnotifcreate-is-not-creating-a-notification-.html

Also have you tried using sequential multicast with 2 different calls ( both having Send Confirmation ).But this does not guarantee both the request processed in single LUW.

Regards,

Sriprasad Shivaram Bhat

Answers (1)

Answers (1)

former_member235395
Contributor
0 Kudos

Sandesh,

Thanks for clarification. I think, you could try use RFC Receiver Adapter on CPI(Configure a RFC Conection on SCC first, that call a Custom RFC). On Backend side, create a Custom RFC(it Will be call from CPI) and use Both BAPI's(sequentially) inside Custom RFC, this option will works.

Regards,

SandeshK
Participant
0 Kudos

Indeed that is our last resort to do but we would like to see a standard option to call multiple BAPIs in a single LUW from CPI

Regards,
Sandesh