Dienstag, 8. März 2016

ABAP Numeric

Prüfung auf eine Zahl
1:    DATA htype       TYPE dd01v-datatype.  
2:    DATA string_out    TYPE string.  
3:    DATA cust_timeout   TYPE char80.  
4:    CONSTANTS is_no TYPE dd01v-datatype VALUE 'NUMC'.  
5:    cust_timeout = '45kj75'.  
6:  *   check no  
7:     CALL FUNCTION 'NUMERIC_CHECK'  
8:      EXPORTING  
9:       string_in = cust_timeout  
10:      IMPORTING  
11:       htype   = htype  
12:       string_out = string_out.  
13:     CASE htype.  
14:      WHEN is_no.  
15:        write 'OK'.  
16:      WHEN OTHERS.  
17:       write 'NO Number'.  
18:     ENDCASE.  

Keine Kommentare: