cancel
Showing results for 
Search instead for 
Did you mean: 

Add counter in File Name

manoj_khavatkopp
Active Contributor
0 Kudos

Hi experts,

Regarding the counter in dynamic configuration filename.

Requirment is to get the filename as "ENURES-CC" where ENUS is the value coming from source field & CC is file number for that day 01 to 99

If the value in source field changes  then the file number should be start from 00.

EX: first file triggered and field has ENURES then the filename should be as "ENURES-01"

     second file triggered and field has  ENURES then the filename should be as "ENURES-02" etc

and if the file triggered  with different value in field like ABCDE then the filename should be as "ABCDE-01".

please provide if there is any way to acheive the above solution.

Thanks,

Manoj

Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor
0 Kudos

Thanks guys for your reply.

I achieved this by using seeburger Mapping variables and java code .

thanks for your valuable time

Harish
Active Contributor
0 Kudos

Hi Manoj,

Good to know that your issue is resolved. Can you provide more detail about the solution.

And please close the thread, please refer the below blog for more details

http://scn.sap.com/community/support/blog/2013/04/03/how-to-close-a-discussion-and-why

regards,

Harish

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Harish,

I used a counterbean class of java which uses seeburger mapping variables.

imported required arhcives and used it in my mapping .

Thanks for you support

Br,

Manoj

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Harish ,

I have some more queries on SAP PI as i am new to this technology,

1.I need some blogs for BPM for beginners.

2.If i need to write java code...what all are the topics on java i have to concentrate(core java or advanced java) so that i can expertise on that ?

Please help me on this .

Br,

Manoj

Harish
Active Contributor
0 Kudos

Hi Manoj,

Please raise new thread for new question as per forum rules, but for now you can refer below blogs for NW BPM (on single stack)

refer the below thread for java topis

regards,

Harish

Answers (3)

Answers (3)

JaySchwendemann
Active Contributor
0 Kudos

Manoj,

see if standard counter fits your needs

Configuring the Receiver FTP Adapter - Advanced Adapter Engine - SAP Library

See here for details (including RFC Lookup option if standard counter is not feasible)

Cheers

Jens

former_member184720
Active Contributor
0 Kudos

You can go for RFC look up and handle these validations there.

You can define a custom table to store/retrieve/reset the counter.

Pass the current date & filed value to FM

Store date, field value and sequence number in a table.

Select/update table and return the counter value..

Harish
Active Contributor
0 Kudos
manoj_khavatkopp
Active Contributor
0 Kudos

Hi Harish,

if i use Add counter option in Comm Channel then the file gets continous counter which should not happen in my case

If i use add counter :

first file triggered and field has ENURES then the filename should be as "ENURES-01"

second file triggered and field has  ENURES then the filename should be as "ENURES-02" etc

and if the file triggered  with different value in field like ABCDE then the filename becomes as "ABCDE-03".

This should not happen as the field has new value the counter has to start for beginning for that and it should have a value like  ABCDE-01"..

Any solution on how to do this ?

br,

Manoj

azharshaikh
Active Contributor
0 Kudos

Hi Manoj,

How many different file names you have?

You can create a separate Receiver Channels for each of the files and use the Standard Counter function in CC config to achieve this...

Regards,

Azhar