Search This Blog

Sunday, December 20, 2009

SQL Loader (SQLLDR) in Oracle Applications

One of the executable type in Oracle applications is SQL*Loader. In this post we will discuss more about how to define, create and use this type of Execution Method.

Execution Method SQL*Loader is used to load data into database table using SQL*Loader. Below are the steps that needs to completed
1) Create Control File and copy it in the TOP/bin directory. E.g. if your custom application top directory is $XX_TOP, then the file should be copied in $XX_TOP/bin directory


OPTIONS (SKIP=1)
LOAD DATA infile '%1'
APPEND INTO TABLE sv_test_tbl
FIELDS TERMINATED BY "," optionally enclosed by '"'
(
item_number "trim(:item_number)"
, description "trim(:description)"
, attribute1 "trim(:attribute1)"
, process_flag Constant 'UNPROCESSED'
)


2) Create an executable with execution method as SQL*Loader and use the control file Name as Execution file Name. The Application should same as where the file is copied.

3) Create a concurrent program definition and use the executable created above.
It is optional to have any parameters to the program, but in this case the data file name should be same as control file name except the extension for the data file being .dat
If you notice in the control file definition above I have used %1 as the infile name. This is how parameters are referenced in control file.
So now we can create conc. program with a file name as a parameter(Full file name with path should be entered and this is case sensitive.)

4) Assign this program to the request group and it is ready to be used.

Sunday, December 6, 2009

Error in RCV Transactions Interface (Receiving Transaction Processor)

When trying to use RCV interfaces and ran Receiving transaction Processor import program, the transaction errored out with message "The parameters passed to procedure populate_cost_details are invalid."

In the documentation, the column name LAST_UPDATE_LOGIN is noted as "optional".
However, the columns user_id and login_id in package
inv_wwacst.populate_cost_details are selected from
mtl_material_transactions_temp table in inltpu, which is populated by the
Receiving Interface Manager. These columns are expected to be NOT null and
will error if they are null. The solution is to populate the LAST_UPDATE_LOGIN
with a value (type is Number. Even though Purchasing does not require this
field to be populated, this is required in Inventory when the items are
delivered.

Refer Metalink Note: 99533.1

Keywords: Receiving Open Interface, RVCTP, PO Receipts, populate_cost_details

Copyright (c) All rights reserved. Presented by Suresh Vaishya