on 2021 Mar 08 5:31 AM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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!
User | Count |
---|---|
71 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.