0% found this document useful (1 vote)
1K views7 pages

SAP CPI - Use SELECT Operation To Fetch All Records From Datastore - SAP Blogs

sap cpi

Uploaded by

vish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
1K views7 pages

SAP CPI - Use SELECT Operation To Fetch All Records From Datastore - SAP Blogs

sap cpi

Uploaded by

vish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

5/23/2021 SAP CPI – Use SELECT Operation To Fetch All Records From Datastore | SAP Blogs

Community

Ask a Question Write a Blog Post Login

Technical Articles

Rashmi Joshi
May 23, 2021 2 minute read

SAP CPI – Use SELECT Operation To Fetch All Records From


Datastore
Follow RSS feed Like

5 Likes 385 Views 3 Comments

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.

Below is the used condition for the loop

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

Below is the list of entries in my datastore – DS_Books

I ow 2 executed succes uly, below are the monitoring page screenshots

I have received mail with datastore records –

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

You can download datastore record to check header

With SELECT we can group the records and can be used with loop call

!Happy Learning!

Regards,

Rashmi

Alert Moderator

Assigned tags

SAP Integration Suite | Cloud Integration | SAP Integration Suite tools |

Related Blog Posts

CPI Integration Flow improvements - Example Flow using Datastore


By Axel Albrecht , Dec 08, 2020
SAP CPI - Fetch All Security Artifacts - Don't Read this!
By Santhosh Kumar Vellingiri , Jan 27, 2021
Fetching data from Non-SAP system in a loop via SAP Cloud Platform Integration Suite
By Divya Mary , Sep 23, 2020

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

ODATA POST Synchronous - Response not coming in CPI


By Former Member , Dec 10, 2020
OData vs REST for SAP SaaS Integration using CPI
By rajashekhar malgi , Mar 19, 2021

SAP CPI issue HTTP operation failed invoking https://xyz/graphql with statusCode: 400
By Shikha Chaudhary , Jan 28, 2021

3 Comments

You must be Logged on to comment or reply to a post.

Dastagiri N

May 23, 2021 at 10:21 am

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)

Rashmi Joshi | Post author

May 23, 2021 at 11:31 am

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

May 23, 2021 at 1:09 pm

Hi Rashmi,

Nice Blog.Thanks for sharing.

Thank you,

Syam

Like(0)

Find us on

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Cookie Preferences

Newsletter Support

https://blogs.sap.com/2021/05/23/sap-cpi-use-select-operation-to-fetch-all-records-from-datastore/ 7/7

You might also like