Scenario:</p><p>For the output file being created, the filename should have a sequence number as part of it. For example, the file name is to be</p><p>1. <outputFile>_<XXX>.txt, where XXX is a sequence number 000-999</p><p>(or)</p><p>2. <output>_<XX>_<file>.txt, where XX is a sequence number from 00-99</p><p>I gather the above is a very common requirement, but is there a standard way to achieve this in PI?</p><p> </p><p>My assumption is that there exists no standard option for such a common requirement but only work arounds.</p><p>Some of those workarounds I can think of is;</p><p>1. Maintain a table in SAP. Use/Code a RFC call to lookup the sequence number from this table, incrementing the value after it is read. The result is then used in a dynamic configuration code, and the file name can be generated at that point.</p><p>2. Use the similar approach but with a JDBC lookup and the data stored in a JDBC table. The same concept of dynamic configuration can be used once the value is retrieved to generate the file name.</p><p>3. Use an OS script that will do the job for us – How easy can that be?</p><p>4. Using a global container to capture the sequence – Doesnt help us since the variable will be flushed at the end of the mapping execution</p><p>5. Counter option in the adapter – Only helps if you are using the NFS protocol and also only if the counter is needed at the end of the file name (before the file name extension)</p><p> </p><p>So basically, arent we missing out a standard feature? I agree there are workarounds, but still such an option should be part of the standard configuration, either in the integration engine or the adapter engine. That is my say, what do you guys feel?</p><p> </p><p>1. Is it helpful to have this as a standard feature?
2. What are other workarounds you guys can think of for such a case scenario?
3. Any other thoughts around this topic of discussion?
Hope to see your comments on the above!!