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

help on Ranges

Former Member
0 Likes
927

Hi all,

I am using Ranges table R_HKONT. When i am selecting data from table using R_HKONT it is not retreiving any values.

This is R_HKONT table

E |BT |12999996 |12999999

E |EQ |16999999 |

E |EQ |34999999 |

I |BT |10000000 |10999998

I |BT |12000000 |14099998

I |BT |15099999 |17099998

I |BT |20000000 |20059998

I |BT |30000000 |30999998

I |BT |33000000 |33999998

I |BT |34000000 |35999998

I |BT |39000000 |39999998

I |BT |41000000 |41999998

The query i am using is

SELECT HKONT WAERS BUKRS

FROM BSIS

INTO TABLE I_TEST

WHERE BUKRS = 'ABC' AND

HKONT IN R_HKONT AND

WAERS <> 'USD'.

THEN SY-SUBRC IS 4.

However when i using all the data from the R_HKONT table and input it manualy through se11 and Run it gives me all the required values. I think may be Query is wrong

please help me in this.

Thanx in adv.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
867

Hi Sanjay,

Did you try filling the HKONT in internal format instead of external format? They have to be with leading zeros covering all the 10 characters.

Srinivas

Hi all,

I am using Ranges table R_HKONT. When i am selecting data from table using R_HKONT it is not retreiving any values.

This is R_HKONT table

E |BT |12999996 |12999999

E |EQ |16999999 |

E |EQ |34999999 |

I |BT |10000000 |10999998

I |BT |12000000 |14099998

I |BT |15099999 |17099998

I |BT |20000000 |20059998

I |BT |30000000 |30999998

I |BT |33000000 |33999998

I |BT |34000000 |35999998

I |BT |39000000 |39999998

I |BT |41000000 |41999998

The query i am using is

SELECT HKONT WAERS BUKRS

FROM BSIS

INTO TABLE I_TEST

WHERE BUKRS = 'ABC' AND

HKONT IN R_HKONT AND

WAERS <> 'USD'.

THEN SY-SUBRC IS 4.

However when i using all the data from the R_HKONT table and input it manualy through se11 and Run it gives me all the required values. I think may be Query is wrong

please help me in this.

Thanx in adv.

6 REPLIES 6
Read only

Former Member
0 Likes
868

Hi Sanjay,

Did you try filling the HKONT in internal format instead of external format? They have to be with leading zeros covering all the 10 characters.

Srinivas

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
867

Is your range typed as HKONT.

<b>Ranges: r_HKONT for bsis-HKONT.</b>

The values in R_HKONT, do they have the conversion done against them. They should have 2 zeros on the front of the the values.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
867

hai,

how have you declared the ranes table of hkont??

cheers

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
867

Hi,

In Query,you are giving

BUKRS = 'ABC' AND

HKONT IN R_HKONT AND

WAERS <> 'USD'.

Did you tried in SE11 by giving values to BUKRS as 'ABC' and WAERS <> 'USD' while giving values for HKONT?

Query is correct.

Kindly reward points by clicking the star on the left of reply,if it helps.

Read only

Former Member
0 Likes
867

Hi,

give r_hkont-sign = 'I'.

r_hkont-option = 'BT'.

try this one.

Thanks.

Read only

Former Member
0 Likes
867

Hi sanjay,

try this way...

SELECT HKONT WAERS BUKRS 
FROM BSIS
INTO TABLE I_TEST
WHERE BUKRS = 'ABC' AND
WAERS <> 'USD' AND
HKONT IN HKONT AND
.

regards,

venu.