Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Not getting data from vbak without leading zeros

0 Kudos
240

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 ?

1 REPLY 1

raymond_giuseppi
Active Contributor
198

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?