I got the problem with my query. I was able to solve my problem. In the function where I am using SELECT while calling the function, I just replaced the keyword SELECT with the keyword with PERFORM.
I changed it and made it something like this:
PERFORM ccdb.o_dtr_update(sec_code.section_code);
PERFORM ccdb.o_consumer_update_for_update(sec_code.section_code);
PERFORM ccdb.o_bills_update_for_update(sec_code.section_code);
PERFORM ccdb.o_payments_update_for_update_new(sec_code.section_code);
PERFORM ccdb.o_payments_map_update_for_update(sec_code.section_code);
After making this change my function worked perfectly.
Thanks.