Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9190

Compare character pattern in a field

$
0
0

Hi,

 

I have a requirement to check if a variable matches a particular pattern.

 

The right value is - 9780194663762-0001

 

So I want to check the first 13 characters are numeric and then symbon '-' followed by 4 numerics and it should not all 0s

 

I tried simple CP as below in my program but not reliable though gives right output only to some extent.

 

 

 

IF wa_wbs2-wbs_element NP '+++++++++++++#-++++'.

 

 

      ENDIF.

 

Can any one think of something robust please?

 

 


Viewing all articles
Browse latest Browse all 9190

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>