cancel
Showing results for 
Search instead for 
Did you mean: 

Extension field of type phone number

former_member189296
Active Participant
0 Kudos

Dear Experts,

We have the requirement to create an extension field where user should be able to entire only Number(basically they want to put phone no. only). In standard Phone no. field we can enter the alphanumeric value. So how should I create an extension field that can only take number without even putting decimal/comma.

How can I do this? request you to help.

Regards,

Saurabh Sharma

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member226
Employee
Employee
0 Kudos

Hi,

You can declare a field from PDI od type "DecimalValue" which only allows numbers to save. In case if you add a Alphanumeric digit then it throw an error.

element Z1 : DecimalValue;

For KUT as Gustavo suggested pls post it in Idea Forum.

Thanks

Saurabh

former_member189296
Active Participant
0 Kudos

Hi Saurabh,

Thanks for your reply. The thing is if I use decimal no. it will show commas/decimal between numbers. for e.g. the result after saving is 123,45,987 I want this to be without comma. Because this is phone no. not any amount.

Can we do one thing if we can use some regular expression for this so that it doesn't get save if atleast one alphabet is found or something that commas don't display?

Regards,

Saurabh Sharma

former_member189296
Active Participant
0 Kudos

Hi Saurabh,

Can you please help me with this?

Regards,

Saurabh

former_member226
Employee
Employee
0 Kudos

Hi Saurabh,

Sorry for delay in response!

I tried but not able to achieve what you are looking for because even the integer value is also storing the comma at the DB level.

Thanks
Saurabh

former_member189296
Active Participant
0 Kudos

Hello Saurabh,

ok! but is there any validation we can apply on field? with the help of regular expressions? So that field only take the numbers as input not the characters?

Regards,
Saurabh

0 Kudos

Hello Saurabh,

With the KUT fields that specific scenario cannot be achieved - I would recommend you to post this idea in our Idea's Forum: https://ideas.sap.com/ - I also think this could be a good addition to the system - note that the PM team check the Idea forums as well and also other customers (even us from support).

Additionally I would like to point that this type of field I think it can be achieved via a PDI (add-on).

Best Regards,

Gustavo Muñoz