Skip to Content
0

Extension field of type phone number

Aug 23, 2017 at 10:59 AM

247

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Saurabh Kabra
Aug 24, 2017 at 05:18 AM
0

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


error.png (15.0 kB)
Show 4 Share
10 |10000 characters needed characters left characters exceeded

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

0

Hi Saurabh,

Can you please help me with this?

Regards,

Saurabh

0

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

0

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
Gustavo Munoz
Aug 23, 2017 at 07:42 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded