Skip to Content
author's profile photo Former Member
Former Member

help on Ranges

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    Posted on Oct 14, 2005 at 12:30 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 12:40 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 14, 2005 at 12:33 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 14, 2005 at 12:32 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 12:33 PM

    hai,

    how have you declared the ranes table of hkont??

    cheers

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 12:36 PM

    Hi,

    give r_hkont-sign = 'I'.

    r_hkont-option = 'BT'.

    try this one.

    Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.