10-27-2007 10:53 AM
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
10-27-2007 11:08 AM
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
10-27-2007 11:16 AM
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
10-27-2007 11:19 AM
Can you paste your code. To find the conversion exit go to the domain of the field.
There you will find it.
Regards,
Atish
10-27-2007 11:25 AM
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.
10-28-2007 12:33 AM
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