pass where condition as below
select trx_number,trx_datefrom ra_customer_trx_allwhere (org_id in (:p_org_id ) or least(:p_org_id) is null )
now select can select all and then select null value passed as below .
and to show same in parameter use below listagg function
SELECT
CASE
WHEN least(:p_business) IS NULL THEN
'ALL'
ELSE
(
SELECT
'['
||
LISTAGG(business_val. description, ';') WITHIN GROUP(
ORDER BY
business_val.description
)
|| ']'
FROM
fnd_tree_version_vl ftv,
fnd_tree_node business_node,
fnd_flex_values_vl business_val
WHERE
1 = 1
AND ftv.tree_code = 'VP_COA_PROJECT_TREE'
AND ftv.status = 'ACTIVE'
AND ftv.tree_structure_code = 'GL_ACCT_FLEX'
AND business_node.tree_version_id (+) = ftv.tree_version_id
AND business_node.parent_tree_ node_id IS NULL
AND business_val.flex_value = business_node.pk1_start_value
AND business_node.pk1_start_value IN (
:p_business
)
)
END v_business
from dual
