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: 
Read only

Matching records having problem

Former Member
0 Likes
551

Hi

tables : zsj_order.

start-of-selection.

select single * into corresponding fields of zsj_order from

zsj_order where belnr = '11009768'.

write: sy-subrc,zsj_order-vtext.

I have created one program there while I am testing belnr = '11009768' it is giving correct result, when I am trying through se11 option and giving same belnr no. but it is not giving me any result if I am giving '11009768' or '11009768' in se11 it will give me correct result. Field type belnr is BELNR_D char 10

Regards

Sebastian John

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
528

This looks like the Problem about Leading Zeros........You might be missing the Leading Zeros while searching in SE11.......Try again with Leading Zeros.

Hi

tables : zsj_order.

start-of-selection.

select single * into corresponding fields of zsj_order from

zsj_order where belnr = '11009768'.

write: sy-subrc,zsj_order-vtext.

I have created one program there while I am testing belnr = '11009768' it is giving correct result, when I am trying through se11 option and giving same belnr no. but it is not giving me any result if I am giving '11009768' or '11009768' in se11 it will give me correct result. Field type belnr is BELNR_D char 10

Regards

Sebastian John

3 REPLIES 3
Read only

Former Member
0 Likes
529

This looks like the Problem about Leading Zeros........You might be missing the Leading Zeros while searching in SE11.......Try again with Leading Zeros.

Read only

0 Likes
528

I have tried '0011002102' then also is not comming in se11

Read only

0 Likes
528

Hi,

This is because while saving the record you have saved it without giving leading zeroes.

If you goto SE16, you can see the records in the table with 11002102, but you cannot take it using query.

So for document numbers always use conversion exits while inserting into database.

If it is a key field then there is no other way than deleting all records(take a backup before that) and again inserting them with leading zeroes. Also change the program lines which is inserting records into it to add leading zeroes, this will insert the future records correct.

Regards

Karthik D