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: 

report problem

former_member1284402
Participant
0 Kudos

hi all,

i m making a report but problem is that when i m passing the single value then its also picking the records for others values also. can anyone tell me the exact prob?

code.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS: KUNNR FOR VBAK-KUNNR,

VKBUR FOR VBAK-VKBUR.

SELECTION-SCREEN END OF BLOCK B1.

SELECT VKBUR KUNNR VTWEG CASSD AUFSD LIFSD FAKSD FROM KNVV INTO CORRESPONDING FIELDS OF TABLE ITAB

WHERE KUNNR IN KUNNR AND VKBUR IN VKBUR

AND CASSD = 'X' OR AUFSD NE '' OR AUFSD NE '' OR LIFSD NE ''

OR FAKSD NE ''.

this is the code.

regards saurabh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Try using the brackets in the select query.

Eg:

SELECT VKBUR KUNNR VTWEG CASSD AUFSD LIFSD FAKSD FROM KNVV INTO CORRESPONDING FIELDS OF TABLE ITAB

WHERE KUNNR IN KUNNR AND VKBUR IN VKBUR

AND ( CASSD = 'X' OR AUFSD NE '' OR AUFSD NE '' OR LIFSD NE ''

OR FAKSD NE '' ).

Regards,

Surinder

3 REPLIES 3

Former Member
0 Kudos

Hi,

Try using the brackets in the select query.

Eg:

SELECT VKBUR KUNNR VTWEG CASSD AUFSD LIFSD FAKSD FROM KNVV INTO CORRESPONDING FIELDS OF TABLE ITAB

WHERE KUNNR IN KUNNR AND VKBUR IN VKBUR

AND ( CASSD = 'X' OR AUFSD NE '' OR AUFSD NE '' OR LIFSD NE ''

OR FAKSD NE '' ).

Regards,

Surinder

Former Member
0 Kudos

Please check the select-options.

Kindly check if any range is defiined.

the other case in which it will fetch multiple records is when both select-options are empty.

Hope this helps

Raj

Former Member
0 Kudos

hai,

it is good to validate select-option in at selection-screen itself.

if select-option range is not in table, then while passing it to select query u will be getting whole record from table.

so try to validate it first.

shan.