ABAP中如何检查字母数字类型(alpha numeric)的变量 Business requirment经常要求某个ID的值只能包含26个字母和10个数字字符,这就要求ABAP程序能够检查相应变量内容,辨别特殊字符。sap-img上的一个例子提供了这样的功能: REPORT ZCHECK_ALPHA_NUMERIC. * Declare the variable * For Length data: serial_length type i...
SAP Managed Tags: ABAP Development Hi Nancy, We can do it in 2 ways, 1. By assigning -In this case the data will be treated as character data. 2. By using Write statement. Data will be converted as per user settings(Like decimal point representations etc). Check below code. DAT...
Business requirment经常要求某个ID的值只能包含26个字母和10个数字字符,这就要求ABAP程序能够检查相应变量内容,辨别特殊字符。sap-img上的一个例子提供了这样的功能:REPORT ZCHECK_ALPHA_NUMERIC.* Declare the variable* For Length data: serial_length type i.* For Alpha numeric data: str type string.data:...
SAP Managed Tags: ABAP Development Hi, I want to check for only numeric value for material i.e. if my material contains only numbers then i want to set indicator to Y. I have written following code in field level routine. DATA: lc_num(12) TYPE c VALUE '0123456789'. DATA: lv_strin...
SAP Managed Tags: ABAP Development Hi sam, You can use the Function Module: numeric_check. Usage: CALL FUNCTION 'NUMERIC_CHECK' EXPORTING STRING_IN = X IMPORTING STRING_OUT = X HTYPE = H_TYPE. if h_type = 'CHAR'. WRITE:/ 'NOt Numeric'. else. write:/ 'Numeric'. ENDIF. Reply ...
Structures and tables that were defined by SAP in the ABAP Dictionary can be enhanced subsequently by customers using Customizing includes or append structures. The enhancements do not only refer to structures/ tables themselves,but also to dependent structures that adopt the enhancement as...
ABAP supports the numeric data typesi,int8,p,decfloat16,decfloat34, andf, plus the internal typesbands. The latter cannot be specified directly in programs but are created when the predefined types INT1 or INT2 from ABAP Dictionary are referenced. They are generally used in the same way as...
SAP Managed Tags: ABAP Development, SAP Business Process Management Hi All Is there any direct command or function module which will find numbers in alpha numeric string or it will check that the string contains only numbers ? Regards YogeshKnow...
In ABAP, declarations like this that are known statically produce a syntax check warning.For data objects of data type p, the program attribute Fixed Point Arithmetic must be set so that the decimal separator is respected. Otherwise, the content is handled in all operations as if there is no...
SAP Managed Tags: ABAP Development hi, use this function module. CALL FUNCTION 'NUMERIC_CHECK' EXPORTING STRING_IN = L_SAKNR IMPORTING HTYPE = L_TIPO. or IF var1 CO '0123456789' FLAG = 1. ELSE. FLAG = 2. ENDIF. regards, Ashokreddy Reply Former Member In response to Former Member...