<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[select *
    from (               
        select fc.COMPANY_ID,
          fc.COMPANY_CODE,
          fc.COMPANY_SHORT_NAME,
          sob.SET_OF_BOOKS_NAME,
          sob.SET_OF_BOOKS_CODE,
          sob.SET_OF_BOOKS_CODE||'-'||sob.SET_OF_BOOKS_NAME CODE_NAME,
          sob.SET_OF_BOOKS_ID
     from fnd_companies_vl fc, gld_set_of_books_vl sob
    where (fc.end_date_active is null or
          sysdate between fc.start_date_active and fc.end_date_active)
      and fc.SET_OF_BOOKS_ID = sob.SET_OF_BOOKS_ID
      and sob.ENABLED_FLAG = 'Y' 
       
    ) v
	
		#WHERE_CLAUSE#  order by COMPANY_CODE]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="set_of_books_id" queryExpression="v.SET_OF_BOOKS_ID = ${@set_of_books_id}"/>
        <bm:query-field name="company_code_from" queryExpression="v.COMPANY_CODE &gt;= ${@company_code_from}"/>
        <bm:query-field name="company_code_to" queryExpression="v.COMPANY_CODE &lt;= ${@company_code_to}"/>
    </bm:query-fields>
</bm:model>
