Friday, June 29, 2012

XML Publisher conditional formatting

Conditional formatting in XML publisher can be handled by If and while statements
  1. If Statement
    • <?if:COLOR='RED'?>Y<?end if?>
  2. If-then-Else
    • <?if:COLOR='RED' then Y else N end if?>
    • Nested If-then-Else
      <?if:COLOR='RED' then Y else if COLOR = 'BLUE' then B else N end if?>
Combining If with <?xdofx:expression?> helps in scripting SQL statements. Refer below.
  1. Choose
    • <?choose:?>
      <?when:expression?>
      <?otherwise?>
    • Example
      <?choose:?>
            <?when:CLOLOR = ‘RED'?>
              'Y'
            <?end when?>
            <?when:COLOR = 'B'?>
              'B'
            <?otherwise?>
              'N'
            <?end otherwise?>
      <?end choose?>

BI Publisher has extended a set of SQL and XSL functions for use in RTF templates. The syntax for these extended functions is

<?xdofx:expression?>  --> for extended SQL functions or
<?xdoxslt:expression?> --> for extended XSL functions

  •  <?xdofx:if COLOR ='Y' then substr('ACCEPTED',1,6) else REJECT end if?>
Refer --> Exteneded Functions






Set Org Context in Oracle Apps 11i and R12

R12

set_policy_context
   Sets the application context for the current org and the access
   mode to be used in server side code for validations as well as in
   the Multi-Org security policy function.
   
   Arguments
   p_access_mode    - specifies the operating unit access. 'S' for Single, 'M' for Multiple, 'A' for All.
   p_org_id              - org_id of the operating unit.
 exec mo_global.set_policy_context('S','&org_id');
           OR

           MO_GLOBAL.INIT('APPL_SHORT_CODE');



11i
  1.  Set Org Context 11i
  2. Begin
    fnd_client_info.set_org_context(&org_id);
    End;

Wednesday, June 27, 2012

Forms Trace / Diagnostics Oracle Apps

Tracing in R12
  1. Set the user value for profile option 'ICX: Forms Launcher' to be 'http://hostname.domain:port/forms/frmservlet?record=collect+log=user1.log'. Use without quotes and you can replace "user1" with your own.
  2. By default, this will enable tracing for errors only. As an optional step, you can enable different trace options (e.g. user actions, user-exit events, dbsql events, network events) by setting a trace group in file $ORA_CONFIG_HOME/10.1.2/forms/server/ftrace.cfg
  3. Login to the Personal Home Page, navigate to the form and perform the steps that you wish to trace.
  4. Locate the file in the directory set by variable FORMS_TRACE_DIR or "echo $FORMS_TRACE_DIR" to get existing value. Note: by default, this directory is named forms_.trc, where is the process identifier.
Tracing in 11.5.10
  1. Make the user value for profile option 'ICX: Forms Launcher' the same as the site value.
    e.g. http://testserver.oracle.com:8005/dev60cgi/f60cgi to be the value for the user.
  2. Append the user value of ICX: Forms Launcher with the Forms parameters for FRD. For example,update the value of ICX: Forms Launcher for the user to be: 'http://testserver.oracle.com:8005/dev60cgi/f60cgi?record=all&log=username_frd.log'
  3. Login to the Personal Home Page, navigate to the form and perform the steps that you wish to trace for the user the profile above was set for.
  4. Locate the file in the directory set by variable $FORMS60_TRACE_PATH. Note: the default directory for $FORMS60_TRACE_PATH is $ORACLE_HOME/forms60/log.

Thursday, June 21, 2012

FRM-40401: no changes to save


Error message can be suppressed by following ways

  • Set system.message_level value before your commit_form or DML command. You can assign any value between 0 to 20 where 0 allows all error messages to be displayed where as setting to 20 shows most important message.
  • :system.message_level := 5;
  • Use standard.commit instead of commit_form;

Tuesday, June 19, 2012

Install font using XML Publisher Administrator

No longer XML publisher fonts needed to be placed on the server. They can be uploaded and used from XML publisher font file and font mappings.
 
For explanatory purpose IDAutomationHC39M font and font name is used. Make sure to use your own font while defining.
 
IMP***** Font selected while defining XML template MUST match with font name defined in xml publisher.
  • Navigate to XML Publisher responsibility.
    Go to Administration Tab.
    Click on Font Files and create font file
    Font Name: IDAutomationHC39M
    File: Select IDAutomationHC39M.ttf from your saved location.
    Click Apply.
    Click on Font Mappings. Click “Create Font Mapping Set”.
    Mapping Name: Barcodes
    Mapping Code: Barcodes
    Type: FO To Pdf
    Click Apply.
    Click on Create Font Mapping. Fill the values as below screen shot.
    Font Family: IDAutomationHC39M
    In the next page enter
    Font Value: IDAutomationHC39M
    Click Apply.
    Click on Administration Tab
    Expand FO Processing and enter Barcodes as Font Mapping Set value.
    Click Save.