cancel
Showing results for 
Search instead for 
Did you mean: 

Need help in ABAP (S/4) to CPI connection process

former_member565051
Participant
0 Kudos
1,548

Hello Experts,

I am new to the ABAP Proxies and Web Services and I have a requirement to fulfill.

Requirement:

We have one requirement where we need to send data for currencies (Source and Target Eg. USD to EU) to the CPI and then CPI will get the currency exchange data from the third party which has maintained the currency exchange rate (eg. EUR,USD,2021-02-22T23:59:59+0000,1.213667860955556 ). CPI then send this data back to S/4 where we need to pass the exchange data to BAPI: BAPI_EXCHANGERATE_CREATE to maintain the exchange rate in S/4 System.

Kindly help me in how to proceed with above requirement and steps need to take care.

How can I setup connection between S/4 system and CPI?

Do I need to build a Z-program or Z-FM to handle the above requirement?

Accepted Solutions (1)

Accepted Solutions (1)

Sijin_Chandran
Active Contributor

Hi Ajay,

Please find the steps below:

Part 1: Sending/Pushing DATA to CPI.

So in this case we need to consume a Service of CPI which can be recognized by CPI Middle-ware. Hence CPI Team need to give you the WSDL for that Service( the Service using which you can push DATA to CPI from S/4 HANA ).

Once CPI team shares the WSDL file for the Service, consume the same from S/4 HANA end using SPROXY, which will generate Proxy classes. These classes can be used to trigger this service and push DATA to CPI system. You can create a Program which will be scheduled as a background job periodically or find an EXIT from where this can be triggered, this totally depends upon the requirement.

Part 2: CPI then send this data back to S/4 where we need to pass the exchange data to BAPI.

For this you need to create a ZFM which will wrap the BAPI FM BAPI_EXCHANGERATE_CREATE , now once the FM is built expose this ZFM as a WEB Service. Now this Web Service can be used by CPI to push data from their end to SAP. Once the call would be made from CPI end to this service, code inside this FM would be triggered.

For this its you who need to pass the WSDL file to CPI system(on the contrary of what we saw in Part 1 of this requirement). Reason being this is a Service inside S/4 HANA and CPI needs to consume this.

Hope you got a brief idea.

Thanks,

Sijin

former_member565051
Participant
0 Kudos

Thanks a lot Sijin for your detail answer!!

I was not sure how to proceed with the development but now, at least got the brief idea about my steps.

Sijin_Chandran
Active Contributor
0 Kudos

Hence, you check on these steps in detail. There are lot of information available over SAP Forum on these.

former_member565051
Participant
0 Kudos

sijin.chandran ,

Hello Sijin,

Thank you for your valuable inputs!

I have managed to update exchange rates using WSDL provided by CPI team in a single report by a synchronous call.

But to my surprise, I am getting a response for only 5 records. If I try to send data for more than 5 records I am receiving error in response:

"SOAP:1031 SRT: Empty Soap Message received"

How can I solve this issue? Is there any limitations on receiving the data for more than 5 records?

Appreciate for your help!

Thanks,

Ajay

Sijin_Chandran
Active Contributor
0 Kudos

Hello Ajay,

Can you check at the Proxy method call level ? Are all the records being pushed correctly ?

Thanks,

Sijin

former_member565051
Participant
0 Kudos

Hello Sijin,

Yes records are being pushed correctly.

If i am sending 5 records in a request, I am getting response for those 5 records.

But if there are more than 5 records in a request, I am getting empty response with error: SOAP:1031 SRT: Empty Soap Message received.

Is there any settings I am missing here?

Thanks for your help once again!


Sijin_Chandran
Active Contributor
0 Kudos

Ideally if you can send 4 then the case of 5 is not that different. Can you ask CPI team to check once ?

Also check SRT_MONI , whats the message there ?

former_member565051
Participant
0 Kudos

Hello Sijin,

I have asked CPI team to check from their end as well, so awaiting for any inputs from them,

I checked SRT_MONI but I did not find any messages there. I checked SRT_LOG, there I found error (HTTP Code 500: Internal Server Error).

Answers (0)