‎2008 Jan 08 6:38 PM
Hi experts,
In where clause of select statement i need to check whether material number in Numerical value only(i.e it contains only '0123456789').
for these i know only we use CA logical operator.
But my question is can we CA logical operator in select statement if not which operator will provide the same functionality of CA Operator.
Good Answers rewarded with Maximum Ponits.....
‎2008 Jan 08 6:57 PM
Hi Subash,
Generally the material number is defined in the SPRO (Customizing) by the MM. In the customizing section of the material number is defined if this number should be internal (only numbers) or external (it may contain non numerical characters). You could ask your MM for information about this.
If it's defined as an external and still you need to check if the material number only has numerical values then you need to do it off the select statement. I don't think you can check if the material number is only numerical within the select statement.
To check if the material number is numerical do the following:
LOOP AT itab_material INTO wa_material.
len = strlen( wa_material-matnr ).
do len times.
v_c = wa_material-matnr+pos(1).
if NOT v_c co '0123456789'.
Not numerical
endif.
pos = pos + 1.
enddo.
ENDLOOP.
Hope it helps.
Regards,
Gilberto Li
Edited by: Gilberto Li on Jan 8, 2008 8:01 PM