Hello experts,
I have a function module with 7 input parameters, 4 of these are mandatory but 3 are optional. In WHERE of select statement i need a condition like:
SELECT *
FROM knvh
WHERE vkorg = in_vkorg AND vtweg = in_vtweg AND spart = in_spart AND hkunnr eq IN_hkunnr AND name1 = in_name1 AND ort01 = in_ort01 AND kunnr = in_kunnr.
* name1, ort01 and kunnr are optional
It works if user insert all import parameters. But If user doesnt insert optional parameters the function module return an empty table. I need something where if user dont insert optional parameters the funct module return a table with every possible value of name1, ort01 and kunnr.
It's possible to achieve this setting * (all values) in default values of optional parameters? Or via abap? If via abap how i can change the WHERE clause?
Thanks!