In prior posts I've dealt with Forms Personalizations, and played with email e.g. via BI (XML) Publisher Bursting. In this post we'll come up with a simple Forms Personalization to ensure that data entry of email addresses results in well-formed email addresses. We'll use regular expressions: an underutilized feature in Oracle since 10g. Initially we'll look at the Remittance Email address on Supplier Sites. But the implementation will allow easy re-use for other email address fields in the EBS by storing the regular expression in a Profile Option.
Lets take a look at the regular expression I'll use for email address validation. This regular expression is a consolidation from a variety of sources, considers IPv4 and IPv6 addressing, and includes specific formatting to get around an Oracle Regex bug. Note it isn't the "full official" regex for email address validation - I wanted a one-liner! What does the regular expression below mean? Basically allow a bunch of characters before the @ and a bunch of characters after the @ considering IPv4 or IPv6 addressing. If anyone has any suggestions/issues/changes, please feel free to comment!
Update 27-JUL-2010: Changed regex to allow multiple hypens as it was only accepting one hyphen in hostname.
^[-a-zA-Z0-9_\.\+\^!#\$%&*+\/\=\?\`\|\{\}~\']+@((([0-9a-zA-Z]*[-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})|(\[([0-9]{1,3}(\.[0-9]{1,3}){3})|([0-9a-fA-F]{1,4}(\:[0-9a-fA-F]{1,4}){7})\])$
We'll store the regular express as a profile option. This allows a single source of truth for our email address validation logic. We could equally put it in a PL/SQL package, but then updates would require coding ... and no-one wants to code these days ;-)
Navigate to Application Developer, Profile
Okay, moving onto the good stuff. Now we'll setup the Forms Personalization to validate the Remittance Email address on the Supplier Sites, Payment tab.
Navigate to Payables Manager, Suppliers, Entry
Enter the Forms Personalization Action
Enter junk in the Remittance Email address on the Payment tab and save.
To implement the same email address validation on other forms, run through the Forms Personalization steps above, identifying the new block and field, replacing SITE.REMITTANCE_EMAIL as required, and update the Error Message action message description / text with the field name.
If you identify a problem with the regular expression, you have one place to change it and it flows through to all the places you implemented the forms personalization the next time your Users log in!
Apologies for the cryptic title on this one. The issue is a simple but subtle one ... and if you're not an eBusiness Suite customer, but interested in the BIP HTML formatting part, please read on as the discussion may be relevant.
In the Oracle eBusiness Suite Release 12 there is an out-of-the-box solution for sending Payables Remitttance Advice notices via Email. The program is "Send Separate Remittance Advices" and is integrated into the Payments Process. The standard solution utilizes XML Publisher under the covers, but (at the time of writing) has been coded to force HTML output for the Email content and uses its own delivery mechanism, rather than a more flexible bursting one that could attach PDFs to emails. Now, this means there are a couple of limitations with the output format for these Remittance Advice notices:
So the out-of-the-box solution has these gotcha's until such time as it uses a "fixed-format", "all content embedded in email" delivery method such as attaching a PDF to the email with the advice details...
BUT WAIT, there may be workarounds.
For Issue 1. we can tell XML / BI Publisher to embed Inline CSS rather than CSS Stylesheets using the following undocumented XML Publisher configuration. Place the following configuration in the xdo.cfg file and put it in eBusiness Suite $XDO_TOP/resource directory. Usual caveats apply; please test this before rolling to Production. Also be aware that this may affect all HTML output, with output file sizes likely to increase.
<config version="1.0.0" xmlns="http://xmlns.oracle.com/oxp/config/"> <properties> <!-- html-css-embedding valid values embed-to-element | embed-to-header | externalize --> <property name="html-css-embedding">embed-to-element</property> </properties> </config>
For Issue 2. one trick is to place your formatting inside a Table and fix the width / height to that which you require. This may take a smidgen of tweaking, but at least you can get something that looks and prints nicely.
For Issue 3 ... well, I'm still working that one - no workaround from Support yet to embed the images in the HTML. Will keep you posted. UPDATE: Enhancement request (ER) Bug 9834226 has been raised for the issue of inability to embed images in Remittance Advice.
Hope this helps.
Catch ya!
Gareth
This is a post from Gareth's blog at http://garethroberts.blogspot.com
Are you running Oracle E-Business Suite (EBS) / Applications and want to get an operating system level environment variable value from a database table, for example for use in PL/SQL? Or perhaps to default a concurrent program parameter? Didn't think environment variables were stored in the database?
Try out out this query that shows you $FND_TOP:
select value
from fnd_env_context
where variable_name = 'FND_TOP'
and concurrent_process_id =
( select max(concurrent_process_id) from fnd_env_context );
VALUE
--------------------------------------------------------------------------------
/d01/oracle/VIS/apps/apps_st/appl/fnd/12.0.0
Or did you want to find out the Product "TOP" directories e.g the full directory path values from fnd_appl_tops under APPL_TOP?
col variable_name format a15
col value format a64
select variable_name, value
from fnd_env_context
where variable_name like '%\_TOP' escape '\'
and concurrent_process_id =
( select max(concurrent_process_id) from fnd_env_context )
order by 1;
VARIABLE_NAME VALUE
--------------- ----------------------------------------------------------------
AD_TOP /d01/oracle/VIS/apps/apps_st/appl/ad/12.0.0
AF_JRE_TOP /d01/oracle/VIS/apps/tech_st/10.1.3/appsutil/jdk/jre
AHL_TOP /d01/oracle/VIS/apps/apps_st/appl/ahl/12.0.0
AK_TOP /d01/oracle/VIS/apps/apps_st/appl/ak/12.0.0
ALR_TOP /d01/oracle/VIS/apps/apps_st/appl/alr/12.0.0
AME_TOP /d01/oracle/VIS/apps/apps_st/appl/ame/12.0.0
AMS_TOP /d01/oracle/VIS/apps/apps_st/appl/ams/12.0.0
AMV_TOP /d01/oracle/VIS/apps/apps_st/appl/amv/12.0.0
AMW_TOP /d01/oracle/VIS/apps/apps_st/appl/amw/12.0.0
APPL_TOP /d01/oracle/VIS/apps/apps_st/appl
AP_TOP /d01/oracle/VIS/apps/apps_st/appl/ap/12.0.0
AR_TOP /d01/oracle/VIS/apps/apps_st/appl/ar/12.0.0
...
Or perhaps the full directory path to $APPLTMP?
select value
from fnd_env_context
where variable_name = 'APPLTMP'
and concurrent_process_id =
( select max(concurrent_process_id) from fnd_env_context );
VALUE
--------------------------------------------------------------------------------
/d01/oracle/VIS/inst/apps/VIS_demo/appltmp
NB: These queries assume your concurrent managers are running!
Catch ya!