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 budat range condition

Former Member
0 Kudos

I am doing some inventory report .

In that i am fetching data from database table mkpf to internal table it_mkpf .my select statement is

SELECT MBLNR BLART BUDAT FROM MKPF

INTO TABLE IT_MKPF

WHERE BUDAT IN R6 .

-


r6 is ranges

the problem is i am getting all records.means it's not checking that budat condition.

can anybody tell me what is the problem in my statement?

Regards

Lalitha.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Can u paste ur code , in particular ranges R6 and internal table structure.

Rvert back.

Regards,

naveen

6 REPLIES 6

Former Member
0 Kudos

Hi

Check the declartiopn of the Range and move the value to low high option if you multiple then BT single value EQ and sign as I

append it

Regards

Shiva

Former Member
0 Kudos

Hi,

Can u paste ur code , in particular ranges R6 and internal table structure.

Rvert back.

Regards,

naveen

0 Kudos

PARAMETERS:KEYDATE LIKE SY-DATUM.

-


DATA:BEGIN OF IT_MKPF OCCURS 0,

MBLNR LIKE MKPF-MBLNR,

BLART LIKE MKPF-BLART,

BUDAT LIKE MKPF-BUDAT,

END OF IT_MKPF.

-


RANGES: R1 FOR SY-DATUM,

R2 FOR SY-DATUM,

R3 FOR SY-DATUM,

R4 FOR SY-DATUM,

R5 FOR SY-DATUM,

R6 FOR SY-DATUM.

-


R6-SIGN = 'I'.

R6-OPTION = 'BT'.

R6-LOW = R5-HIGH.

R6-HIGH = KEYDATE.

-


thank you.

Lalitha.

0 Kudos

Hi,

Code seems to be ok, but i think you are not appending it.

PARAMETERS:KEYDATE LIKE SY-DATUM.

----------------
DATA:BEGIN OF IT_MKPF OCCURS 0,
MBLNR LIKE MKPF-MBLNR,
BLART LIKE MKPF-BLART,
BUDAT LIKE MKPF-BUDAT,
END OF IT_MKPF.
---------------------
RANGES: R1 FOR SY-DATUM,
R2 FOR SY-DATUM,
R3 FOR SY-DATUM,
R4 FOR SY-DATUM,
R5 FOR SY-DATUM,
R6 FOR SY-DATUM.

--------------------------------
R6-SIGN = 'I'.
R6-OPTION = 'BT'.
R6-LOW = R5-HIGH.
R6-HIGH = KEYDATE.

APPEND R6.

-------------------

Thanks,

Sriram Ponna.

0 Kudos

Thank you.

The problem has been solved.

Regards,

Lalitha.

Former Member
0 Kudos

Hi,

Keep a break point and debug the program, check whether are there any entries in the R6?

Please provide your code so that we can suggest you some solution.

Thanks,

Sriram Ponna.