Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Selection Screens

Former Member
0 Likes
669

Hi,

I would like to know, like how can we restrict users to enter in the selection screen

For Example: Purchase Order Number as juss numbers and alphabets but not the special charecter's!

Does SAP provide any such keywords for that in the selection screens.

Please help me out in solving this!

Hi,

I would like to know, like how can we restrict users to enter in the selection screen

For Example: Purchase Order Number as juss numbers and alphabets but not the special charecter's!

Does SAP provide any such keywords for that in the selection screens.

Please help me out in solving this!

5 REPLIES 5
Read only

Former Member
0 Likes
634

Hi,

Use NUMC10 as the data type for declaring the Purchase order..

PARAMETERS: P_EBELN TYPE NUMC10..

This will allow only numbers for the parameters P_EBELN..

Thanks,

Naren

Read only

Former Member
0 Likes
634

hi Shyam,

Validate them at at slection-screen event for the values present in database else popup error message ...

i.,e


at selection-screen.

select * from vbak where vbeln in s_vbeln.

if sy-subrc <> 0.

message e100 with ' Not a Valid Record '.

endif.

Regards,

Santosh

Read only

Former Member
0 Likes
634

I really appreciate it.

Can you please tell me like if its some other case other than Purchase order and I need to validate juss not the numeric but also alphabets apart from special charecter's ( Like ASK123 should be allowed but not ASK12!#)(How ever popup also does work but.......)!

Read only

Former Member
0 Likes
634

Hi,

use the function module CHECK_STRING_SPEC_CHARACTERS

to check for special characters..

If the ERRORFLAG is returned as 'X'..Then the string is having special characters..

Thanks,

Naren

Read only

0 Likes
634

Hi,

parameters p1(10).

data p2(40).

concatenate sy-abcde '0123456789' into p2.

if p1 co '0123456789'.

elseif p1 co sy-abcde.

elseif p1 co p2.

else.

write 'error'.

endif.

Kindly reward points by clicking the star on the left fo reply,if it helps.

PS:It won't work on at selection-screen on p1.