function AfterPForm return boolean is
begin
IF (:p_acct_from IS NOT NULL and :p_acct_to IS NOT NULL) then
:P_ACCT_SQL := ' and gcc.segment2 between '''|| :p_acct_from ||''' and '''|| :p_acct_to ||'''';
ELSE
:P_ACCT_SQL := '';
END IF;
IF (:p_cc_from IS NOT NULL and :p_cc_to IS NOT NULL) then
:P_CC_SQL := 'and gcc.segment3 between '''|| :p_cc_from ||''' and '''|| :p_cc_to ||'''';
ELSE
:P_CC_SQL := '';
END IF;
IF (:p_int_comp_from IS NOT NULL and :p_int_comp_to IS NOT NULL) then
:P_INT_COMP_SQL := 'and gcc.segment4 between '''|| :p_int_comp_from ||''' and '''|| :p_int_comp_to ||'''';
ELSE
:P_INT_COMP_SQL := '';
END IF;
IF (:p_proj_from IS NOT NULL and :p_proj_to IS NOT NULL) then
:P_PROJ_SQL := 'and gcc.segment5 between '''||:p_proj_from ||''' and '''|| :p_proj_to ||'''';
ELSE
:P_PROJ_SQL := '';
END IF;
return (TRUE);
end;