What is the SQL to default ledger value is WebADI?
We would like to default the ledger value based on the profile option of the user creating the WebADI template for the GL. We set the Ledger to be placed in the Context with SQL reference to select name from gl_ledgers where LEDGER_ID IN (select SET_OF_BOOKS_ID from hr_operating_units where organization_id = FND_PROFILE.VALUE('ORG_ID')).
This seems to work for most of the ledgers with the correct default ledgers and data access set. But for some ledgers I was getting the wrong default ledgers. I checked the responsibility profile options and data access set, everything looks correct. On the template all the other default values looks correct, just the ledger is showing the wrong value,