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

problem with budat range condition

Former Member
0 Likes
1,083

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
Read only

Former Member
0 Likes
981

Hi,

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

Rvert back.

Regards,

naveen

6 REPLIES 6
Read only

Former Member
0 Likes
981

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

Read only

Former Member
0 Likes
982

Hi,

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

Rvert back.

Regards,

naveen

Read only

0 Likes
981

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.

Read only

0 Likes
981

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.

Read only

0 Likes
981

Thank you.

The problem has been solved.

Regards,

Lalitha.

Read only

Former Member
0 Likes
981

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.