Wednesday, November 30, 2016

The 37 best websites for learning a new skill

Forget overpriced schools, long days in a crowded classroom, and pitifully poor results.
These websites and apps cover myriads of science, art, and technology topics.
They will teach you practically anything, from making hummus to building apps in node.js, most of them for free.
There is absolutely no excuse for you not to master a new skill, expand your knowledge, or eventually boost your career.
You can learn interactively at your own pace and in the comfort of your own home. It’s hard to imagine how much easier it can possibly be.
Honestly, what are you waiting for?

Take an online course

edX— Take online courses from the world’s best universities.
Coursera — Take the world’s best courses, online, for free.
Coursmos — Take a micro-course anytime you want, on any device.
Highbrow — Get bite-sized daily courses to your inbox.
Skillshare — Online classes and projects that unlock your creativity.
Curious — Grow your skills with online video lessons. — Learn technology, creative and business skills.
CreativeLive — Take free creative classes from the world’s top experts.
Udemy — Learn real world skills online.

Learn how to code

Codecademy — Learn to code interactively, for free. — Learn how to code from scratch.
Udacity — Earn a Nanodegree recognized by industry leaders.
Platzi — Live streaming classes on design, marketing and code.
Learnable — The best way to learn web development.
Code School — Learn to code by doing.
Thinkful — Advance your career with 1-on-1 mentorship. — Start learning today with easy tutorials.
BaseRails — Master Ruby on Rails and other web technologies.
Treehouse — Learn HTML, CSS, iPhone apps & more.
One Month — Learn to code and build web applications in one month.
Dash — Learn to make awesome websites.

Learn to work with data

DataCamp — Online R tutorials and data science courses.
DataQuest— Learn data science in your browser.
DataMonkey— Develop your analytical skills in a simple, yet fun way.

Learn new languages

Duolingo — Learn a language for free.
Lingvist — Learn a language in 200 hours.
Busuu — The free language learning community.
Memrise — Use flashcards to learn vocabulary.

Expand your knowledge

TED-Ed — Find carefully curated educational videos
Khan Academy— Access an extensive library of interactive content. — Search the largest collection of online guides.
Squareknot — Browse beautiful, step-by-step guides.
Learnist — Learn from expertly curated web, print and video content.
Prismatic — Learn interesting things based on social recommendation.


Chesscademy — Learn how to play chess for free.
Pianu — A new way to learn piano online, interactively.
Yousician— Your personal guitar tutor for the digital age.
Written by @kristynazdot, founder and CEO of  —  app discovery platform for inspiring entrepreneurs. At the moment, it features 1,500+ handpicked tools for startups, small businesses, and freelancers.

Friday, November 11, 2016

Send Email Through PL/SQL code

Send Email:
Sample code to send email through pl/sql code.
It uses UTL_SMTP package.
In Oracle 11g version, UTL_MAIL package can be used which makes use of UTL_SMTP internally.

                                       p_from      IN VARCHAR2,
                                       p_subject   IN VARCHAR2,
                                       p_text_msg  IN VARCHAR2 DEFAULT NULL,
                                       p_html_msg  IN VARCHAR2 DEFAULT NULL,
                                       p_smtp_host IN VARCHAR2,
                                       p_smtp_port IN NUMBER DEFAULT 25,
                                       p_email_status OUT VARCHAR2 )
  l_mail_conn   UTL_SMTP.connection;
  l_boundary    VARCHAR2(50) := '----=*#abc1234321cba#*=';

fnd_file.put_line (fnd_file.LOG, 'XX_SEND_MAIL (+)');

  l_mail_conn := UTL_SMTP.open_connection(p_smtp_host, p_smtp_port);
  UTL_SMTP.helo(l_mail_conn, p_smtp_host);
  UTL_SMTP.mail(l_mail_conn, p_from);
  UTL_SMTP.rcpt(l_mail_conn, p_to);

  UTL_SMTP.write_data(l_mail_conn, 'Date: ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') || UTL_TCP.crlf);
  UTL_SMTP.write_data(l_mail_conn, 'To: ' || p_to || UTL_TCP.crlf);
  UTL_SMTP.write_data(l_mail_conn, 'From: ' || p_from || UTL_TCP.crlf);
  UTL_SMTP.write_data(l_mail_conn, 'Subject: ' || p_subject || UTL_TCP.crlf);
  UTL_SMTP.write_data(l_mail_conn, 'Reply-To: ' || p_from || UTL_TCP.crlf);
  UTL_SMTP.write_data(l_mail_conn, 'MIME-Version: 1.0' || UTL_TCP.crlf);
  UTL_SMTP.write_data(l_mail_conn, 'Content-Type: multipart/alternative; boundary="' || l_boundary || '"' || UTL_TCP.crlf || UTL_TCP.crlf);
  IF p_text_msg IS NOT NULL THEN
    UTL_SMTP.write_data(l_mail_conn, '--' || l_boundary || UTL_TCP.crlf);
    UTL_SMTP.write_data(l_mail_conn, 'Content-Type: text/plain; charset="iso-8859-1"' || UTL_TCP.crlf || UTL_TCP.crlf);

    UTL_SMTP.write_data(l_mail_conn, p_text_msg);
    UTL_SMTP.write_data(l_mail_conn, UTL_TCP.crlf || UTL_TCP.crlf);

  IF p_html_msg IS NOT NULL THEN
    UTL_SMTP.write_data(l_mail_conn, '--' || l_boundary || UTL_TCP.crlf);
    UTL_SMTP.write_data(l_mail_conn, 'Content-Type: text/html; charset="iso-8859-1"' || UTL_TCP.crlf || UTL_TCP.crlf);

    UTL_SMTP.write_data(l_mail_conn, p_html_msg);
    UTL_SMTP.write_data(l_mail_conn, UTL_TCP.crlf || UTL_TCP.crlf);

  UTL_SMTP.write_data(l_mail_conn, '--' || l_boundary || '--' || UTL_TCP.crlf);

  p_email_status := 'S';

fnd_file.put_line (fnd_file.LOG, 'XX_SEND_MAIL (-) ');
        p_email_status := 'F';
        fnd_file.put_line (fnd_file.LOG, 'Exception: - '||sqlerrm);

How to Migrate/Transfer Workflow/Custom business events


The Workflow XML Loader is a command line utility that lets you upload and download XML definitions for Business Event System objects between a database and a flat file.
When you download Business Event System object definitions from a database, Oracle Workflow saves the definitions as an XML file. ( .wfx extension)
When you upload object definitions to a database, Oracle Workflow loads the definitions from the source XML file into the Business Event System tables in the database, creating new definitions or updating existing definitions as necessary.

You can download Business Event System object definitions in either normal download mode or exact download mode.

  • Normal download mode: save a generic copy of object definitions from one system that you can use to create similar definitions in other systems. (ex. Dev instance to Prod instance)
  • Exact download mode: save object definitions exactly as they are specified in the database. (Ex. Prod instance to prod instance)

You can upload Business Event System object definitions in either normal upload mode or force upload mode.

  • In normal upload mode, the Workflow XML Loader loads the object definitions from the source XML file into the Business Event System tables in the database, but does not update any event or subscription definition with a customization level of User. Oracle Workflow uses this mode to preserve your customizations during upgrades.
  • In force upload mode, the Workflow XML Loader loads the object definitions from the source XML file into the Business Event System tables in the database and overwrites any existing definitions, even for events or subscriptions with a customization level of User. Use this mode when you want to update the definitions for your own custom events and subscriptions.

To Download Business Event System XML Definitions from a Database

  • To download Business Event System object definitions from a database to a flat XML file, you can either run the Workflow XML Loader manually, 
  • Or, if you are using the standalone version of Oracle Workflow, you can use sample scripts called wfxload for UNIX. These scripts are located on your server in the Oracle Workflow admin subdirectory. For example, on UNIX, use the following command:

wfxload -d[e] <user> <password> <connect_string> <protocol> <lang> <output_file> <object> <key> OWNER_TAG <owner_tag>

When running the Workflow XML Loader, use either the -d option or the -de option to specify the download mode that you want.

  • -d --Normal download mode. The loader converts system-specific data within the object definitions to tokens prefixed with #, where appropriate.
  • -de --Exact download mode. The loader copies the object definitions exactly and does not convert any data to tokens.

Additionally, replace the variables in the download command with your parameters as follows:

  • <user> -- DB user name
  • <password> -- DB password
  • <connect_string> -- The connect string for the database. The format of the connect string depends on the JDBC driver type.
    • For a JDBC OCI8 driver, the connect string should be the database name as specified in its TNSNAMES entry, in the following format: <database_name>
    • For a JDBC THIN driver, you can use two different types of connect string. For the first type, the connect string should include the host name, port number, and database system identifier (SID) in the following format: <host_name>:<port_number>:<database_SID>
    • For the second type, the connect string should include an Oracle Net name-value pair with the host name, protocol, port number, and SID in the following format: (description=(address=(host=<host_name>)(protocol= <protocol>)(port=<port_number>))(connect_data=(sid= <database_SID>)))
  • <protocol> -- The JDBC driver type you want to use to connect to the database. The JDBC driver type can be either oci8 or thin.
  • <lang> -- Standard language abbreviations for the Oracle Database, such as US for American or JA for Japanese. 
  • <output_file> -- The name and full path of the output file to which you want to save the definitions. The output file should have the extension .wfx.
  • <object> -- The type of object definitions you want to download.
    • EVENTS -- Event and event group member definitions
    • SUBSCRIPTIONS -- Event subscription definitions
    • AGENTS -- Agent and system definitions
  • <key> -- An optional key to restrict the definitions that are downloaded. If you specify a key, the loader retrieves definitions only for those objects whose internal names include that key.
  • OWNER_TAG <owner_tag> -- An optional program ID code for the program or application that owns the object definitions you want to download.

Providing few example below.
Can choose based on system configuration:

$ADJVAPRG -d apps_user apps_password "(description = (load_balance = on) (failover = on) (address_list = (address = (protocol=tcp)(host = = 1521))) (connect_data = (failover_mode = (type = select)(method = basic)(retries = 20)(delay = 15)) (service_name = db_service_name)))" thin US xxg_wf_ev.wfx EVENTS wf.apps.xxg.ce.custom.event

$ADJVAPRG -d apps_user apps_password "(description = (load_balance = on) (failover = on) (address_list = (address = (protocol=tcp)(host = = 1521))) (connect_data = (failover_mode = (type = select)(method = basic)(retries = 20)(delay = 15)) (service_name = db_service_name)))" thin US xxg_wf_ev.wfx SUBSCRIPTIONS wf.apps.xxg.ce.custom.event

adjava -d apps_user apps_password db_host:port:sid thin US ./xxg_wf_ev.wfx EVENTS wf.apps.xxg.ce.custom.event

adjava -d apps_user apps_password db_host:port:sid thin US ./xxg_wf_ev.wfx SUBSCRIPTIONS wf.apps.xxg.ce.custom.event

java -d apps_user apps_password db_host:port:sid thin US ./xxg_wf_ev.wfx EVENTS wf.apps.xxg.ce.custom.event

java -d apps_user apps_password db_host:port:sid thin US ./xxg_wf_ev.wfx SUBSCRIPTIONS wf.apps.xxg.ce.custom.event

Concurrent Program Queries

Some of the queries we can use:

select prog.user_concurrent_program_name,
decode( exe.execution_method_code, 'I', 'PLSQL Stored Procedure', 'P', 'Report', 'L', 'SQL Loader', exe.execution_method_code)
from apps.fnd_executables exe,
apps.fnd_application_tl appl,
apps.fnd_concurrent_programs_vl prog
where prog.application_id = appl.application_id
AND exe.executable_id = prog.executable_id
AND prog.user_concurrent_program_name = 'Autoinvoice Import Program';

Status for submitted concurrent requests:

SELECT DISTINCT fcp.user_concurrent_program_name,
                flv.meaning status,
  FROM apps.fnd_concurrent_programs_vl fcp,
       apps.fnd_concurrent_requests    fcr,
       apps.fnd_lookup_values          flv
 WHERE fcr.concurrent_program_id = fcp.concurrent_program_id
   AND trunc(fcr.last_update_date) = trunc(SYSDATE)
   AND user_concurrent_program_name like '%Create%Sett%'
   AND flv.lookup_code = fcr.status_code
   AND flv.lookup_type = 'CP_STATUS_CODE'
   AND flv.language = 'US'
 ORDER BY fcr.request_date,
          fcr.request_id DESC;

Concurrent program request log file with location

select logfile_name from apps.fnd_concurrent_requests 
where request_id = &request_id;



C - Completed
I - Inactive
P - Pending
R - Running


A - Waiting
B - Resuming
C - Normal
D - Cancelled
E - Error
F - Scheduled
G - Warning
H - On Hold
I - Normal
M - No Manager
Q - Standby
R - Normal
S - Suspended
T - Terminating
U - Disabled
W - Paused
X - Terminated
Z - Waiting.

Oracle EBS AR / Interview questions focus

  • AR documents
  • Interfaces
    • Standard interface programs in AR
      • Autoinvoice
      • Autolockbox
      • Customer interface
  • Conversions
  • Customers
    • Party
    • Customer Account
    • Customer Locations - Sites
    • Site Uses
  • Accounting
    • Periods - AR/GL
    • Create Accounting
      • Working
      • Tables
      • Link to GL - GL_SL_LINK_ID from xla_ae_lines to gl_import_references
  • Receipt
    • Types of receipts - Sign
    • Receipt Class
    • Receipt Method
    • Receipt bank account
    • Receipt customer
    • Receipt tables
    • Receipt life cycle
    • Accounting for receipts
    • Autolockbox
      • Stages
        • Import
        • Validation
        • Postquickcash
      • Functioning
      • Setup
        • Lockbox number
      • Staging/interface tables
    • Receipt Reversal
      • Receipt Reversal
      • Debit Memo Reversal
    • Receipt batch
    • Receipt activity (write-off, Refund)
    • Receipt application
    • On-account application
  • Transactions
    • Setup
      • Batch source
        • Automatic numbering
        • Automatic batch numbering
        • Type: Manual/Imported
      • Transaction type
        • Natural application/Allow overapplication flags
      • AutoAccounting setup
    • Invoice
      • Ways to create Invoices
        • Autoinvoice - created_from = RAXTRX
        • Manual Batch
        • Manual (UI)
    • Credit Memo
      • Types of CMs
        • Regular
        • On-Account
      • Payment term - No
    • Commitment
    • Chargeback
    • Autoinvoice
      • Autoinvoice Import program
      • Autoinvoice Master program
      • Autoinvoice Purge Program
        • Do not need to run this program if 'Purge Interface Tables' option is set in system options
      • Interface tables
        • ra_interface_lines_all
          • Interface_status: NULL/P/E
        • ra_interface_salescredits_all
        • ra_interface_distributions_all
        • ra_interface_errors_all
      • Grouping Rule
        • Mandatory grouping rule columns
          • Ex. ORIG_SYSTEM_BATCH_NAME - (optional column - May be used as legacy batch name)
        • Optional columns
      • Validation
    • Invoicing Rule
      • -2/-3 - Advance/Arrears
    • Accounting Rule
  • Adjustments
    • Creation types
    • Adjustment type
    • Line type
    • User Approval limit
  • AR Public APIs
    • Transaction
    • Credit Memo
    • Receipts
    • Adjustment
  • Bank Accounts
  • Flexfields used in AR
    • Key Flexfield
    • Descriptive Flexfiled
      • Transaction Flexfields
      • Line Transaction Flexfields
  • Personalizations
    • Form/Function Level
    • Resp/User/Global
    • Condition
      • Triggers
        • When-New-Record-Insstance
        • When-New-Item-Instance
        • When-Validate-Record
    • Action
  • Custom .pll
  • AR Tables
    • ra_batches_all
    • ra_customer_trx_all
    • ra_cust_trx_lines_all
    • ra_cust_trx_line_salesreps_all
    • ra_cust_trx_line_gl_dist_all
    • ar_payment_schedules_all
    • ar_cash_receipts_all
    • ar_cash_receipt_history_all
    • ar_receivable_applications_all
    • ar_distributions_all
    • ar_adjustments_all
    • ar_batches_all

Autolockbox: Standard Oracle Receipt Rejection reasons

AR_PLB_APP_OK - Receipt applications validated
AR_PLB_APP_OVERAPPLIED - ERROR Credit balance not sufficient for applied amount
AR_PLB_AUTOASSOC - Customer identified by invoice numbers
AR_PLB_BAD_CUST_NUM - ERROR Customer number is invalid
AR_PLB_BAD_GL_DATE_SOURCE - ERROR GL date cannot be determined from the source
AR_PLB_BAD_MICR_NUM - ERROR MICR number refers to more than one customer
AR_PLB_BAD_ORIGIN - ERROR Bank origination number not defined for this lockbox
AR_PLB_BATCH_AMT_BAD - ERROR Batch amount does not equal sum of receipt amounts
AR_PLB_BATCH_COUNT_BAD - ERROR Batch record count does not equal number of receipts
AR_PLB_CLASS_BAD - ERROR Receipt may not be applied to this invoice type
AR_PLB_CONTROLS_OK - Unable to continue validating, check transmission errors
AR_PLB_CURRENCY_DISABLED - ERROR Currency is not available for use
AR_PLB_CURRENCY_OK - Currency matches bank account's currency
AR_PLB_CURR_CONFLICT - ERROR Receipt's currency must match invoice's currency
AR_PLB_CUSTOMER_CONFLICT - ERROR MICR and customer number do not refer to the same customer
AR_PLB_CUST_NUM_CONFLICT - ERROR Receipt has more than one customer number
AR_PLB_CUST_OK - Customer identified by customer number
AR_PLB_DEP_DATE_GT_GL_DATE - ERROR Deposit Date cannot be later than GL Date
AR_PLB_DUP_BANK_ACCT_NAME - ERROR MICR number already exists as bank account name
AR_PLB_DUP_BATCH_NAME - Duplicate lockbox batch name
AR_PLB_DUP_INV - ERROR Duplicate invoice number for customer
AR_PLB_DUP_ITEM_NUM - Duplicate Item Number for receipt
AR_PLB_DUP_LB_NUM - Duplicate lockbox number
AR_PLB_DUP_OVRFLW_SEQ - Duplicate overflow sequence for this receipt
AR_PLB_DUP_PMT - ERROR Receipt number already exists for this customer and amount
AR_PLB_GL_DATE_OK - Record validated
AR_PLB_GL_PERIOD_CLOSED - ERROR GL date is not in an open or future period
AR_PLB_INACTIVE_LB_NUM - Lockbox is either not defined or currently has a Inactive status.
AR_PLB_INVALID_BATCH - ERROR Batch has invalid receipts
AR_PLB_INVALID_BATCH_NAME - Batch with this name does not exist in this transmission
AR_PLB_INVALID_CURRENCY - ERROR Currency must match the bank account's currency
AR_PLB_INVALID_INSTALLMENT - ERROR Installment number is invalid
AR_PLB_INVALID_ITEM_NUM - Receipt with this Item Number does not exist.
AR_PLB_INVALID_LB_NUM - Lockbox with this number does not exist in this transmission.
AR_PLB_INVALID_LOCATION - ERROR Receipt has invalid billing location
AR_PLB_INVALID_MATCH - ERROR Invalid matching number
AR_PLB_INVALID_RECEIPT - ERROR Receipt has invalid applications
AR_PLB_INVALID_RECEIPT_METHOD - ERROR Payment method not valid for this bank account
AR_PLB_INVALID_REC_TYPE - Record identifier is not in the requested transmission format.
AR_PLB_INV_BAD - ERROR The invoice does not belong to the paying customer or any related Customers
AR_PLB_INV_OK - Invoice numbers are valid for this customer
AR_PLB_LB_AMT_BAD - ERROR Lockbox amount does not equal sum of receipt amounts
AR_PLB_LB_COUNT_BAD - ERROR Lockbox record count does not equal number of receipts
AR_PLB_MICR_CONFLICT - ERROR Receipt has more than one MICR number
AR_PLB_MICR_OK - Customer identified by MICR number
AR_PLB_NEGATIVE_RECEIPT - Remittance amount may not be less than zero.
AR_PLB_NEW_RECORD - New record
AR_PLB_NOT_DUP_RECEIPT - Receipt is not a duplicate
AR_PLB_NO_BATCH_NAME - Lockbox batch name is missing.
AR_PLB_NO_CUST - Receipt has no customer
AR_PLB_NO_DEPOSIT_DATE - ERROR You have specified your GL Date Source to be the Deposit Date,however no Deposit Date has been provided.
AR_PLB_NO_EXCHANGE_RATE - ERROR Exchange rate is unavailable
AR_PLB_NO_FIRST_OVRFLW - Overflow records for each receipt must begin with the same sequence number.
AR_PLB_NO_INV_NUMBER - ERROR Invoice number is missing for applied amount
AR_PLB_NO_ITEM_NUM - Receipt is missing item number.
AR_PLB_NO_LB_NUM - Lockbox number is missing.
AR_PLB_NO_NEXT_OVRFLW - Overflow record with next sequence is missing.
AR_PLB_NO_ORIGIN - Bank origination number is missing from transmission.
AR_PLB_NO_PRIMARY_LOCATION- ERROR Billing location is required and the customer has not been assigned a Primary Bill-To site
AR_PLB_NO_RECEIPT_NUM - Receipt number is missing.
AR_PLB_NO_REMIT_AMT - Receipt is missing remittance amount.
AR_PLB_NO_REQUESTED_GL_DATE - ERROR GL date must be entered when the GL Date Source has been defined as a Constant AR_PLB_ORIGIN_CONFLICT - Transmission has more than one bank origination number.
AR_PLB_PASSED_TRIM - Fill characters trimmed from data.
AR_PLB_PENDING_AUTO_RECEIPT - ERROR Invoice has been selected for automatic receipt
AR_PLB_PRIMARY_LOCATION - Associated receipt with customer's primary billing location
AR_PLB_RCPT_DATE_GT_GL_DATE - ERROR Receipt Date cannot be later than GL Date
AR_PLB_RECEIPT_METHOD_OK - Payment method is valid
AR_PLB_RECEIPT_OK - Receipt is valid
AR_PLB_REMIT_EXCEEDED - ERROR Sum of the applied amounts is greater than remittance amount
AR_PLB_TRANSFERRED - Receipt transferred
AR_PLB_TRANS_AMT_BAD - ERROR Transmission amount does not equal sum of receipt amounts
AR_PLB_TRANS_COUNT_BAD - ERROR Transmission record count does not equal number of records
AR_PLB_TRANS_HDR_CONFLICT - Transmission has more than one transmission header.
AR_PLB_TRANS_TRL_CONFLICT - Transmission has more than one transmission trailer.
AR_PLB_VALID_LOCATION - Billing location is valid
same customerAR_related Customers
Deposit Date has been provided.sequence number.assigned a Primary Bill-To siteAR_been defined as a Constant Date

Monitor/Restart/Bounce Workflow Agent Listener

Need to restart workflow agent listeners when configuration is changed

We raise a business event which has a subscription to initiate workflow.
Many times we see that our batch does not get processed and we have to Restart agent listeners and then batch gets processed.

Below are the steps we to restart the agent listeners :

  1. Login with Workflow Administrator responsibility
  2. Select 'Workflow Manager' link
  3. Click 'Agent Listener' icon
  4. Please make sure all workflow agent listeners are up
  5. Restart the below mentioned workflow agent listeners
    • Select 'Workflow Deferred Agent Listener'
    • Select 'Stop' Action and click 'Go' button
    • Select 'Start' Action and click 'Go' button
    • Select 'Workflow Java Deferred Agent Listener'
    • Select 'Stop' Action and click 'Go' button
    • Select 'Start' Action and click 'Go' button

Actually you not need to restart agent listeners unless you change the configuration.
It may be taking some time to process the events when you submit in batches based on phase value for event subscription.
Please wait for some time and check.
You can increase the performance of the agent listeners by increasing the tread count.

How to improve blog performance

Improving the performance of a blog can involve a variety of strategies, including optimizing the website's technical infrastructure, im...