Do I need a return ticket for immigration purposes?
Yes. Indonesian immigration requires you to have proof of a return flight or onward journey. If you are unsure what your return date will be it is a good idea to get a flexible return ticket to give you the option of extending/shortening your return date if need be. A number of budget airlines offer low fares between Indonesia and other Southeast Asian countries. These tickets will also suffice as proof of onward journey (provided you meet visa requirements for your intended destination).