cancel
Showing results for 
Search instead for 
Did you mean: 

Count the number of messages received and add counter

swapna_patha
Explorer
0 Kudos

Hi All, We have a requirement to add the counter for each message received in pi and at EOD we need to add this counter value to the file. The counter value has to be reset '0' every day. Please assist how can i achieve this, using counter in File channel we are unable to reset it. Regards, Swapna.

Accepted Solutions (0)

Answers (4)

Answers (4)

amarnath_m
Explorer
0 Kudos

Swapna

Try this forum..might be helpful to you..

https://scn.sap.com/thread/1893351

Regards

Amarnath

swapna_patha
Explorer
0 Kudos

Hi Amarnath, i have already gonethrough the forum, cant we do it from PI end. Regards, swapna.

former_member182412
Active Contributor
0 Kudos

Hi Swapna,

If your sender is ERP then ask them to send the counter value then you can add it to the file. This is better than generating the counter in PI because we cant keep the data in PI, PI is for just pass the information.

If you use RFC lookup or JDBC lookup performance is not good.

Regards,

Praveen.

xavisanse
Active Participant
0 Kudos

You should achieve this using an RFC Lookup and maintaining this in SAP ECC.

Why? The only standard option is a parameter add Counter ( Configuring the Receiver File Adapter - Advanced Adapter Engine - SAP Library ) that only works with NFS (not FTP) and the counter value is reset every time J2EE stack is reset or file services adapter reset.

You can try to do the second option with availability time planning reset every day. Maybe it works

swapna_patha
Explorer
0 Kudos

Hi Xavier, I want to reset the value every day based on date change. REgards, swapna

xavisanse
Active Participant
0 Kudos

Try to addCounter and use availability time planning resetting the channel each day. maybe it works

manoj_khavatkopp
Active Contributor
0 Kudos

Do you have seeburger in your landscape ?

You can use the CounterBean provided by Seeburger for this.

br,

Manoj

swapna_patha
Explorer
0 Kudos

Hi Manoj, we dont have seeburger in our landscape. Regards, Swapna.

former_member186851
Active Contributor
0 Kudos

Hello Swapna,

Is it for all interfaces in SAP PI or particular one?

swapna_patha
Explorer
0 Kudos

Hi Raghuraman, its only one interface.

former_member186851
Active Contributor
0 Kudos

Hello Swapna,

Are you using Dual stack ?

for dual stack try as per below link

Get count of the messages to particular Interfa... | SCN

For single stack you need to try with date time functions.