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

Using MASK on screen

Former Member
0 Likes
863

Hi experts,

I have a dynpro. I would like to use a MASK format to check whether the input is in the right format or not.

For example I want to check if the year is starts with '20__'. How can I do that?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
731

Hi,

first pick that variable in string in se38 or se80(means in your abap editor), then check that varible using CP.

CP is for compare.

like EQ is for equal.

i.e

IF variable cp '20*'.

statement.......

else .

statement...

endif.

you can use it in PAI .

4 REPLIES 4
Read only

Former Member
0 Likes
731

I don't know why you'd want to use a mask; a simple substring in the PAI should do it.

Rob

Read only

0 Likes
731

How can I do that?

Read only

0 Likes
731


data: date_fld   type d value sy-datum.

if date_field+0(2) = '20'.
  write:/ 'Good'.
else.
  write:/ 'Bad'.
endif.

Read only

Former Member
0 Likes
732

Hi,

first pick that variable in string in se38 or se80(means in your abap editor), then check that varible using CP.

CP is for compare.

like EQ is for equal.

i.e

IF variable cp '20*'.

statement.......

else .

statement...

endif.

you can use it in PAI .