SAP CPI - Use SELECT Operation To Fetch All Records From Datastore - SAP Blogs
SAP CPI - Use SELECT Operation To Fetch All Records From Datastore - SAP Blogs
Community
Technical Articles
Rashmi Joshi
May 23, 2021 2 minute read
Hi All,
There might be requirement to store the records temporarily in Datastore and use it later till all entries are
consumed. For this article I have created two I ows one is to store payload using WRITE operation and another
I ow is to fetch all the records from Datastore using SELECT operation in group of two. Hope this will be usefully
to other who trying to achieve the same.
IFlow 1 – WRITE operation to store data. I am using ID value from incoming payload to generate entry IDs in
Datastore.
https://blogs.sap.com/2021/05/23/sap-cpi-use-select-operation-to-fetch-all-records-from-datastore/ 1/7
5/23/2021 SAP CPI – Use SELECT Operation To Fetch All Records From Datastore | SAP Blogs
IFlow 2 – I am using loop process call to fetch all the entries from datastore in group of 2. To avoid passing last
empty records to target system I am using router. This will suppress processing of empty record.
So my loop will end whenever select step will give me empty entry or max number of iterations are reached. I
am fetching records in group of 2 using SELECT operation.
https://blogs.sap.com/2021/05/23/sap-cpi-use-select-operation-to-fetch-all-records-from-datastore/ 2/7
5/23/2021 SAP CPI – Use SELECT Operation To Fetch All Records From Datastore | SAP Blogs
https://blogs.sap.com/2021/05/23/sap-cpi-use-select-operation-to-fetch-all-records-from-datastore/ 3/7
5/23/2021 SAP CPI – Use SELECT Operation To Fetch All Records From Datastore | SAP Blogs
Please share your thoughts if there are any other ways to achieve this.
Learning :-
With GET operation this is not possible, GET is used for fetching single record at a time.
This looks for the entry ID to fetch the data
If we have selected save header values during WRITE operation, this can be fetched with GET operation
https://blogs.sap.com/2021/05/23/sap-cpi-use-select-operation-to-fetch-all-records-from-datastore/ 4/7
5/23/2021 SAP CPI – Use SELECT Operation To Fetch All Records From Datastore | SAP Blogs
With SELECT we can group the records and can be used with loop call
!Happy Learning!
Regards,
Rashmi
Alert Moderator
Assigned tags
Related Questions
https://blogs.sap.com/2021/05/23/sap-cpi-use-select-operation-to-fetch-all-records-from-datastore/ 5/7
5/23/2021 SAP CPI – Use SELECT Operation To Fetch All Records From Datastore | SAP Blogs
SAP CPI issue HTTP operation failed invoking https://xyz/graphql with statusCode: 400
By Shikha Chaudhary , Jan 28, 2021
3 Comments
Dastagiri N
Hi Rashmi,
Thank you for sharing your knowledge and Integration experience.I am following your blogs it really helped.
Could you please share more useful CPI blogs my next assessment CPI Integration project before that i want
gain more knowledge CPI Integration.
Thank you .
Dastagiri.N
Like(1)
Thanks Dastagiri N
It feels good to know my blog is helpful to others. I will try to post my learning as and when possible.
Cheers to learning
BR,
Rashmi
Like(0)
https://blogs.sap.com/2021/05/23/sap-cpi-use-select-operation-to-fetch-all-records-from-datastore/ 6/7
5/23/2021 SAP CPI – Use SELECT Operation To Fetch All Records From Datastore | SAP Blogs
Syambabu Allu
Hi Rashmi,
Thank you,
Syam
Like(0)
Find us on
Newsletter Support
https://blogs.sap.com/2021/05/23/sap-cpi-use-select-operation-to-fetch-all-records-from-datastore/ 7/7