cancel
Showing results for 
Search instead for 
Did you mean: 

pick value after .

Former Member
0 Kudos

Hi Experts,

I have one value like "abcd.txt" in one field.

I need to send the value of file extension "txt" in one field.

How I will map this ?

Study SAP

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try with substring function.ther you can give the starting position and number of digits.

Regards,

Raju.

Former Member
0 Kudos

Hi,

Thanks for your reply,

but strings are not fixed, as we can have the filename like "andnndfndndfndnnfnfndfndnnf.txt" also.

the name before extension is not fixed it can be use "n" number of characters.

Study SAP

Former Member
0 Kudos

Hi,

I think it may not be possible with standard functions.you can try with user defined function.

Regards,

Raju.

former_member200962
Active Contributor
0 Kudos

you need to implment a UDF for this case and then perform the substring function....UDF should have the input as Argument..

Suppose your Argument is fileName (type string)

int len = fileName.lastIndexOf(".");    //To check where the . appears in the input string
 fileName = fileName.substring(len+1); // To perform substring function from one position after that given by above statement
 return fileName; //will not have . but will only have txt....or whatever is after .

Regards,

Abhishek.

Answers (0)