2007 Feb 27 9:12 AM
Hi,
IF str NA '0123456789'.
Can you show me little examples regarding the operator NA please??
Thanks
Hi,
IF str NA '0123456789'.
Can you show me little examples regarding the operator NA please??
Thanks
2007 Feb 27 9:15 AM
"Contains Not Any: True if a logical expression with CA is false, that is if operand1 does not contain any characters from operand2. If the result of the comparison is negative, sy-fdpos contains the offset of the first character in operand1 that is also contained in operand2. If the result of the comparison is true, sy-fdpos contains the le of operand1."
In short it is the negation of Contains any: CA.
this statement:
IF str NA '0123456789'.
means that if the string str contains any other character than a numeral, then do somethins.
Regards,
Ravi
2007 Feb 27 9:16 AM
[code]NA (Contains not Any)
if str contains not any numerical
eg:
Data : str(15) value 'ABCDEF#$%'.
IF str NA '0123456789'.
write : / 'OK'.
endif.
Here Str does not contain any 0123456789, so it will go into IF condition[/code]
2007 Feb 27 9:22 AM
This means COntains Not Any:
DATA: string(10) TYPE c value 'bhhjfm23pk'.
IF string NA '0123456789'.
Write:/ 'No Numeric values'.
ELSE.
Write:/ 'Numeric found'.
ENDIF.Output:
Numneric Found.
Reward if u find helpful.
2007 Feb 27 9:26 AM
Hello,
Check this:
data: lv_var(10) value '5445zgqfzgj'
if lv_var na '0123456789'.
write: 'Has Number'.
else.
write: ' No Number'.
endif.
The other u can use the FM <b>Numeric_Check</b>.
Vasanth
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |