cancel
Showing results for 
Search instead for 
Did you mean: 

How to add serial counter

former_member229127
Participant
0 Kudos

Hi all,

Can you pls help me out Whether is their any option in PI 7.4 side  to add counter .

Means currently in my  scenario is from the ECC side we are using the serial counter field to add the counter ,

And now the issue is we are passing multiple Idocs from the ECC side and in PI we have to generate only 1 file ,In that way our counter is miss matching in the order . for example : In  ECC we are getting 10 idocs means we have to get only 1 count .??

Regards,

Sandhya

Accepted Solutions (1)

Accepted Solutions (1)

vijender_p
Active Participant
0 Kudos

Hi Sandhya ,

You can Call a RFC as a counter and use it as a lookup your mapping that may help you ....

Regards.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sandhya,

I have faced issues while using "Add counter" option in the file channel as the counter value will reset to 0 once the Java restart is done.

Regards

former_member229127
Participant
0 Kudos

But the counter is added at the last ., i need it in the middle

Regards,

Former Member
0 Kudos

Hope the below blog might help you,

Regards,

Indu

Former Member
0 Kudos

Hi Sandhya,

If you are sending multiple IDocs, and generating single file, and if you need counter to be generated for the file side data , you can use the Statistic COUNT function in Message mappping.

Or if you want to pass this counter from the ECC side , you need to accordingly maintain the counter in ECC and increment the counter value batch wise ( for a set of IDocs, against which a file is expected to be generated by PI system )

Thanks and Regards,

Sushil.

former_member229127
Participant
0 Kudos

Hi Sushil ,

Thanks for the Reply i have done the changes from PI side using Static count ,

But my counter should start from the value 1432 .

How it can be possible ??

Regards,

former_member186851
Active Contributor
0 Kudos

Hello Sandhya,

Your collecting multiple idocs to single file right?

try adding counter or use and dyanmic file UDF ,Give one of the input as counter.

former_member229127
Participant
0 Kudos

Yes i have already used  Dynamic file UDF .

Regards,

former_member186851
Active Contributor
0 Kudos

so all do Idocs will be collected and send once right?or how ur appending at the file level?

former_member229127
Participant
0 Kudos

can u pls the mapping  level .

And we are doing it through changing the occurrence of the mapping .

regards,

former_member186851
Active Contributor
0 Kudos

Sandhya all IDOCS will be in same example??..

Instead of passing counter function you can pass  serial counter field as input to the UDF.

former_member229127
Participant
0 Kudos

In the counter function in the which counter is not moving from the first value can u please help me out .


Regards,

former_member186851
Active Contributor
0 Kudos

Select the Counter and select increment option.

former_member229127
Participant
0 Kudos

Hi raghu ,

Can u pls  elaborate me how it is possible ??

It is not  working when am using also .

Regards,

former_member186851
Active Contributor
0 Kudos

Sandhya let me know how your collecting IDOCs .At PI side or @ ABAP side?

former_member229127
Participant
0 Kudos

Hi Raghu ,

we collect idocs from PI side only and in the which i have used dynamic confrgution for file name and also time stamp ,

but my problem is that i have counter at the middle means after file name it should be counter and then time stamp .

help me out pls ..

Regards,

former_member186851
Active Contributor
0 Kudos

Hello Sandhya,

I guess the better option for you would be use the "add counter" in the file channel,Since your idocs are collected in PI only.

former_member186851
Active Contributor
0 Kudos

Hello Sandhya,

Instead of naming the file with the counter field using add counter in the file channel to add the counter to the field.

former_member229127
Participant
0 Kudos

Hi raghu,

Thanks for the reply .. but here my issue is we are using multiple idocs so whther it is fine ??

Regards,