‎2018 Jul 09 4:33 PM


Hi Experts,
I am trying to call the selected data that I am entering in the selecting screen but the program call all the data without taking the entering data in to consideration like e.g.
When I enter a company code in the field p_bukrs2 I receive all the company codes.
Can you guide me to receive a specific data for a selected company code and supplier number?
your help well be appreciated.
Jenie
‎2018 Jul 10 7:46 AM
The problem comes from the OR operators in the where clause. Do you guess how the system interpret your clause?
‎2018 Jul 09 10:49 PM
If using prefixes, I'd strongly encourage to use different ones for parameters (p_...) and select options (s_...).
As to the question - from the top of my head, you are not JOINing by all the key fields, so could that be part of the problem? There is also a mix of AND and OR that could be problematic.
You can always run ST05 (SQL Trace) and then use Explain button there to see how exactly the DB interprets your SELECT. Also when I get strange results in JOIN I usually try to separate it into multiple SELECTs or change WHERE conditions to pinpoint the problem.
‎2018 Jul 10 1:31 AM
I tried your SQL on my system and it work as expected. How did you input into selection option? You can try to build a quick view in SQVI to check your join first.
‎2018 Jul 10 7:48 AM
‎2018 Jul 10 8:03 AM
Yes, sorry. I didnt copy his OR. The problem is because his OR need to be inside ( ).
‎2018 Jul 10 10:37 PM
‎2018 Jul 10 7:46 AM
The problem comes from the OR operators in the where clause. Do you guess how the system interpret your clause?
‎2018 Jul 11 7:43 AM