2023 Jul 07 11:20 AM
In mara table, if i put matnr = '18*' then it is fetching all the records which start with 18 or leading zeros with 18 .
For example: 181234,
181,
18234567890
But if i tried the same in VBAK table like i put vbeln = '18*' , then it is not fetching any records. But if i put vbeln = '018*' then it is giving records that are 9 characters (as 10th will be zero) and start with '18'. if i put Vbeln = '0018*' then it is giving records that are 8 characters long.
this happens with se11 and via program also. How to solve this ?
2023 Jul 07 12:55 PM
The SELECT statements executes on internal format of fiedls not external (not 18123 but 0000018123)
Check the data element and domain of those fields, if the domain uses conversion-exit ALPHA or the data element is numeric then it's standard behavior.
Basically in VBAK the field uses conversion exit ALPHA, so internally it was filled with leading zeroes when only numbers where used (as it's the case for internakl range number)
You could replace the LIKE comparaison operator with some REGEX clause but what's your actual requirement?