Don't credit Modi yet. This is only half the job done.
Step 1 is to ensure that majority of the population has bank accounts.
Step 2 is Demonetization. It makes sure ALL the current money goes in the banks and people are forced to use the banking system.
The next step is to ensure that people keep using the banking system and don't fall back on old habits. I read today that they are coming with a new law that all salaries from registered companies to their employees must be made by cheque or direct debit. No cash allowed for salaries. This would continue to force some people to use banks.
The last step would be a complete overhaul of laws that lead to black money generation - like reducing stamp duty, change of labor and industrial laws, etc, etc. This is so that black money generation is reduced for the future.
Missing any of the above three steps will lead to the same result - no change in the long run and will be a wasted effort. Modi has done step 1 and 2. He needs to do step 3 and 4, otherwise the costs India incurred in doing step 2 will have been for nothing.