‎2009 Feb 24 2:39 PM
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?
‎2009 Feb 24 6:25 PM
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 .
‎2009 Feb 24 3:07 PM
I don't know why you'd want to use a mask; a simple substring in the PAI should do it.
Rob
‎2009 Feb 24 3:10 PM
‎2009 Feb 24 6:18 PM
data: date_fld type d value sy-datum.
if date_field+0(2) = '20'.
write:/ 'Good'.
else.
write:/ 'Bad'.
endif.
‎2009 Feb 24 6:25 PM
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 .