Application Development 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: 

Problem with select range for a character type field. Kindly Help! Urgent!

gopalkrishna_baliga
Participant
0 Kudos

Hi Experts,

I have to write a report to pull data from a table BUT000 for a selected range of BPEXT field values in selection screen.

In the table BUT000, the BPEXT field is type char. Now what is happening is that if the user gives a range in selection screen from 1000 to 1010 the query pulls all the records where teh forst character starts from 1.

For example if the table has

BPEXT

-


1

10

100

101

1000

1001

1002

1005

1010

20

200

2000

Then my query pulls

BPEXT

-


101

1000

1001

1002

1005

1010

Instead it should pull only

BPEXT

-


1000

1001

1002

1005

1010

My guess this is because the BPEXT field is of CHAR type instead of numeric.

What shall i do to solve this problem? Kindly help please!

Thanks

Gopal

Message was edited by:

gopalkrishna baliga

5 REPLIES 5

Former Member
0 Kudos

Hi,

Try with the use of conversion exit. I think it will work.

use the converion exit for the selection screen value (BPEXT).

Then execute the select query

0 Kudos

Hi Chakradhar,

How to find the conversion exit for BPEXT field?

How to use the conversion exit in a select query in my ABAP report? Any sample code will be really helpfull.

Please help!

Thanks

Gopal

0 Kudos

Can you paste your code. To find the conversion exit go to the domain of the field.

There you will find it.

Regards,

Atish

0 Kudos

I went to the domain and did not find any conversion exit there.

My code:

  • Query BUT000 table

SELECT partner

bpext

INTO TABLE i_but000

FROM but000

WHERE bpext IN s_orgid.

0 Kudos

Hi,

Your select query should return the correct values. Not sure what is wrong.

Just go to SE16 and given the same range in for BUT000 for field BPEXT and see the result.

Is the type of s_orgid and BPEXT same.

Regards,

Atish