on 07-10-2008 11:56 AM
Hi All,
I am configuring an IDOC to FILE (fcc scenario) with a requirement of using the IDOC number in the output file name.
Using variable substitution, I manged to get the IDOC number from incoming Idoc-control record but it comes in its entitre length with a few leading zeroes like '00000001234'.
So my output file name looks like 'Output_000000001234.txt' . I want it to be like 'Output_1234.txt'.
Is it possible to achieve it ?
Thanks
Shirin
Hi Shirin,
First supress the leading zeros of IDOC number by using the following code:
Create a user defined funciton zerosuppress and take the cache as value and take one argument input. Then put the code below:
//write your code here
String output = input.replaceFirst("^0+","");
return output;
Then use variable substitution for generating ur IDOC number in the out put file name.
Regards,
Vinod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shirin,
Why dont you use ASMA and get the filename in mapping. Then you can delete the preceding 0's using a UDF in the mapping.
Regards,
Sanjeev.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shirin,
ASMA stands for Adapter Specific Message Attribute aka Dynamic Configuration.
If you select the option Use Adapter Specific Message Attribute in the Configuration Channel, you can use a UDF to access the dynamic configuration parameters.
For further information have a look into this blog:
Regards,
Sanjeev.
Hi,
Try to use the trim which will solve your problem,
Regards,
Nithiyanandam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shirin,
'Output_000000001234.txt' . I want it to be like 'Output_1234.txt'.
as metoined above u wan the output and this is file i want to just known that it same as mentioned above or some else is added is it preceed by zero or some other data
if we add the time stamp to file then we get the output as mentioned above
remove the time stamp and do chk
update further
Thnax
Sampath
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.