Search code examples
xmloracle11ginsertobiee

OBIEE 11G writeback Insert XML


I am creating an XML for inserting values into a table using the writeback feature in OBIEE 11g. Here is my XML coding and I am getting an error message that says...."The system is unable to read the Write Back Template 'STG_DE_ACCOUNTS_RECEIVABLE_insert'. Please contact your system administrator."

<?xml version="1.0" encoding="utf-8" ?>
<WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
<WebMessageTable lang="en-us" system="WriteBack" table="Messages">
   <WebMessage name="STG_DE_ACCOUNTS_RECEIVABLE_insert">
      <XML>
         <writeBack connectionPool="LCS_CP_VAR">

<insert>INSERT INTO STG_DE_ACCOUNTS_RECEIVABLE(AL_90_RCVBL, AL_CUR_RCVBL, AL_TOT_RCVBL) Values 
(@{c3},@{c4},@{c5}) </insert>


<update></update>
         </writeBack>
      </XML>
   </WebMessage>
</WebMessageTable>
</WebMessageTables>

Solution

    1. Step 1: Enable Write Back. Add the LightWriteback tag within the serverinstance tag of the instanceconfig.xml file.

      • File path: $ORACLE_INSTANCE/config/OracleBIPresentationServicesComponent/coreapplication_obips1
      • Add the following tag: <LightWriteback>true</LightWriteback>
      • Restart OracleBIPresentationServicesComponent
    2. Step2: Add WriteBack privileges to the user/Group/Role you are using.

    3. Step3:WriteBack Template.

      • Identify the colums that are to be referenced. we can use the colum position or by colum id as you see them in the XML definition.

      • You must include both insert and update statements in the template.

      • It is the best practice to include the commit statement: <postUpdate>COMMIT</postUpdate>.

      • The template should be located here: $ORACLE_INSTANCE/bifoundation/OracleBIPresentationServicesComponent/coreapplication_obips1/analyticsRes/customMessages

    Once you are done with all writeback settings, you need to set 'Enable Write Back' feature located on Column Properties of the field, from the criteria tab.

    This link shows an example XML writeback file: http://obieetutorialguide.blogspot.com/2015/04/write-back-setting-in-obiee-11g.html