Search This Blog

Wednesday, September 8, 2010

Use of variable with comma seperated value in Oracle SQL Query

The requirement is to pass comma seperated value to a procedure and to use that variable in the query to extract values. For e.g. variable p_ord_num_list has a value of '90001234, 90001235, 90001236' and we attempt to use this in variable in the query as below

SELECT * FROM oe_order_headers_all WHERE order_number IN p_ord_num_list 
The above query completes in error
ORA-01722: invalid number
ORA-06512: at line 13

The above requirement can be achieved in following way
DECLARE
   p_ord_num_list   VARCHAR2 (4000) := '90001234, 90001235, 90001236';
BEGIN
   FOR i IN (SELECT order_number
             FROM   oe_order_headers_all e
             WHERE  order_number IN (
                       SELECT EXTRACTVALUE (xt.COLUMN_VALUE, 'e')
                       FROM   TABLE (XMLSEQUENCE (EXTRACT (XMLTYPE (   '<ord_num><e>'
                                                                    || REPLACE (p_ord_num_list, ',', '</e><e>')
                                                                    || '</e></ord_num>'
                                                                   )
                                                         , '/ord_num/*'
                                                          )
                                                 )
                                    ) xt))
   LOOP
      DBMS_OUTPUT.put_line ('a = ' || i.order_number);
   END LOOP;
END;

The way above statement works is that it first generates the XML tag for each comma seperated value and then extracts values from each element.

The other way to do this is by using regular expression functions as shown below
DECLARE
   p_ord_num_list   VARCHAR2 (4000) := '90001234, 90001235, 90001236';
BEGIN
   FOR i IN (SELECT * FROM oe_order_headers_all WHERE order_number IN (         
SELECT     TRIM(REGEXP_SUBSTR(p_ord_num_list   , '[^,]+', 1, LEVEL)) item_id
FROM       (SELECT p_ord_num_list    str
            FROM   DUAL)
CONNECT BY LEVEL <= LENGTH(str) - LENGTH(REPLACE(str, ',')) + 1))
   LOOP
      DBMS_OUTPUT.put_line ('a = ' || i.order_number);
   END LOOP;
END;

Thursday, June 17, 2010

Create form with Cancel Query option

Set the form level property Interaction Mode to Blocking or non-Blocking.
When set to non-Blocking, a dialog box appears that contains the following prompt:

Press cancel to end this database operation

When a long running query is executed in forms, this enables the option to interrupt the query by pressing the cancel button. However, this only works for Forms blocks which are based on standard tables or views.
It does not work for blocks based on stored procedures, where the data is returned by a ref cursor or a table of records.

Wednesday, June 16, 2010

Enable Cancel Query option on Oracle Forms

Sometimes when we query form with higher data results the forms hangs and leaves us with option to wait until data is displayed or close it forcefully.
Using profile option FND: Enable Cancel Query, the cancel button with message "Press cancel to end this database operation" can be displayed that allows canceling query. The profile option may not support all forms but still you can have this option for most of the oracle provided forms.

Tuesday, June 1, 2010

ReCompile invalid objects using UTL_RECOMP

The UTL_RECOMP package contains two procedures used to recompile invalid objects. As the names suggest, the RECOMP_SERIAL procedure recompiles all the invalid objects one at a time, while the RECOMP_PARALLEL procedure performs the same task in parallel using the specified number of threads. Their definitions are listed below:

PROCEDURE RECOMP_SERIAL(
schema IN VARCHAR2 DEFAULT NULL,
flags IN PLS_INTEGER DEFAULT 0);

PROCEDURE RECOMP_PARALLEL(
threads IN PLS_INTEGER DEFAULT NULL,
schema IN VARCHAR2 DEFAULT NULL,
flags IN PLS_INTEGER DEFAULT 0);

-- Schema level.
EXEC UTL_RECOMP.recomp_serial('APPS');
EXEC UTL_RECOMP.recomp_parallel(4, 'APPS');

-- Database level.
EXEC UTL_RECOMP.recomp_serial();
EXEC UTL_RECOMP.recomp_parallel(4);

-- Using job_queue_processes value.
EXEC UTL_RECOMP.recomp_parallel();
EXEC UTL_RECOMP.recomp_parallel(NULL, 'APPS');

Reference: Oracle Base

Friday, May 7, 2010

Disable interactive prompts at SQL*Plus

Whenever we have ampersand "&" in our script, SQL Plus prompts for a value to be entered. There are several ways to avoid that prompt as discussed below

1) user chr(38) instead of &

SELECT 'I love SQL '||chr(38)||' PLSQL' from dual; 

2) Use & at the end just below the single quotes
SELECT 'I love SQL &'||' PLSQL' from dual;  

3) SET DEFINE OFF can be use to disable the prompt
SET DEFINE OFF
SELECT 'I love SQL & PLSQL ' from dual; 
SET DEFINE ON

Wednesday, May 5, 2010

Change SQL prompt oracle SQL*Plus (pre 10g)

Here we discussed how to change prompt for release 10g and up. Now we will discuss how to achieve same in pre 10g releases

Enter following commands in glogin.sql file located at $ORACLE_HOME/sqlplus/admin directory or execute them one by one at SQL Prompt.

col username new_value username
col dbname new_value dbname
set termout off
SELECT lower(user) username,
       substr(global_name, 1, instr(global_name, '.')-1) dbname
FROM   global_name
/
set termout on
set sqlprompt '&&username@&&dbname> '

Change SQL Prompt in oracle SQL*Plus (10g and up)

Below is an example to change the SQL*Plus prompt (10g and up), simple and yet very useful.
SET SQLPROMPT command is used to change the default SQL> prompt

1) Display username

set sqlprompt '_user>' 
2) Display database name
set sqlprompt '_connect_identifier_privilege>' 

Step 2 and 3 can be combined together to display username and database name together.
3) Display username and database name (e.g. apps@dbname> )
set sqlprompt "_USER'@'_CONNECT_IDENTIFIER _PRIVILEGE>"
4) To set the time at sqlprompt
set time on 

Now the best part is to avoid typing this command everytime you open a new SQL*Plus session, edit glogin.sql file located at $ORACLE_HOME/sqlplus/admin directory as follows.
set sqlprompt "_USER'@'_CONNECT_IDENTIFIER _PRIVILEGE>"
set time on

Related Post: For Pre 10g Releases

Tuesday, May 4, 2010

Display line number in VI editor in Unix

Following command can be used to display line numbers

:set number 

Following command can be used to hide the line numbers
:set nonumber 

Sunday, May 2, 2010

Example of DBMS_XMLGEN.getxml to generate XML Tag using oracle query

Below is an example of DBMS_XMLGEN.getxml to generate XML tags directly out of the query

SELECT DBMS_XMLGEN.getxml(
'SELECT CURSOR(SELECT oha.order_number,
                     ola.ordered_item,
                     ola.ordered_quantity
                FROM ont.oe_order_headers_all oha,
                     ont.oe_order_lines_all ola
               WHERE oha.header_id = ola.header_id 
                 and oha.order_number in (&order_number) order by ola.line_id) as order_detail,
       CURSOR(SELECT ohd.name, ohs.hold_comment
                FROM ont.oe_hold_sources_all ohs,
                     ont.oe_order_holds_all ohld,
                     ont.oe_hold_definitions ohd,
                     ont.oe_order_headers_all oha,
                     ont.oe_order_lines_all ola
               WHERE oha.header_id = ola.header_id
                 AND ola.line_id = ohld.line_id 
                 and ohld.hold_release_id is null
                 AND ohld.hold_source_id = ohs.hold_source_id
                 AND ohs.hold_id =  ohd.hold_id
                 AND oha.order_number = &&order_number) as holds_detail
FROM DUAL')
FROM DUAL

Output

Wednesday, April 28, 2010

FNDLOAD - Menu Driven

Hi friends, before I proceed thanks to everyone reading and supporting the blog.

Here is another new post on FNDLOAD which provides a menu to select the option and execute FNDLOAD Command.
Below are the screenshots of how screen looks
1)Accepts the apps password. Note that the password is hidden and not displayed on the screen.


2)Displays a menu to select an option and Downloads/Uploads a .ldt file


Below is the script
#The script that Displays a Menu and calls FNDLOAD command accordingly. 
#Created by       Date            Version
#Suresh Vaishya   29-Jul-09       1.0
#http://sureshvaishya.blogspot.com

#Suresh Vaishya. Reading apps password outside loop to avoid entering same thing again and again.
echo "Enter APPS Password: "
stty -echo             #Turns echo off
read appspwd
stty echo              #Turns echo on

sel='123456789'
while true
do  
if [ $sel -ne '123456789' ]
then
echo "Press ENTER key to continue"
read key
fi

tput clear
echo "1.  Download Concurrent Program"
echo "2.  Upload   Concurrent Program"
echo "3.  Download Request Group for a program"
echo "4.  Upload   Request Group for  a program"
echo "5.  Download Value Set"
echo "6.  Upload   Value Set"
echo "7.  Download Menu"
echo "8.  Upload   Menu"
echo "9.  Download Descriptive Flexfield Definition"
echo "10. Upload   Descriptive Flexfield Definition"
echo "11.  Download Descriptive Flexfield Definition"
echo "12. Upload   Descriptive Flexfield Definition"
echo "13. Download Lookup Definition and Values"
echo "14. Upload   Lookup Definition and Values"
echo "15. Download Forms Personalization"
echo "16. Upload   Forms Personalization"
echo "17. Download Responsibility"
echo "18. Upload   Responsibility"
echo "q or Q. Quit"

echo "Enter your selection  "
read sel

#echo "You entered $sel"
if [ "$sel" = 'q' ] || [ "$sel" = 'Q' ]
then
exit
fi

if [ $sel -gt 0 ] && [ $sel -lt 19 ]
then
if [ `printf "%d\n" "'$sel"` -gt 57 ] || [ `printf "%d\n" "'$sel"` -lt 49 ] # Suresh Vaishya. Using the ascii value to check valid values
then
echo "You entered $sel"
echo "Invalid selection. Valid value are from 1 to 18."
else
echo "Enter .ldt Name: "
read ldtname

#Suresh Vaishya   Download Concurrent program
if [ $sel -eq 1 ]
then
echo "Enter Application Short Name: "
read applname

echo "Enter Concurrent Program Short Name: "
read cpname

FNDLOAD apps/$appspwd O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct $ldtname PROGRAM APPLICATION_SHORT_NAME="$applname" CONCURRENT_PROGRAM_NAME="$cpname"

echo "LDT File $ldtname created"
#Suresh Vaishya Upload Concurrent program
elif [ $sel -eq 2 ]
then
FNDLOAD apps/$appspwd O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct $ldtname - CUSTOM_MODE=FORCE
echo "LDT File $ldtname uploaded"
#Suresh Vaisha Download Request Group
elif [ $sel -eq 3 ]
then
echo "Enter Request Group Application Short Name"
read applname

echo "Enter Request Group Name"
read rgname

echo "Enter Program Short Name"
read cpname

FNDLOAD apps/$appspwd O Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct $ldtname REQUEST_GROUP REQUEST_GROUP_NAME="$rgname" APPLICATION_SHORT_NAME="$applname" REQUEST_GROUP_UNIT UNIT_NAME="$cpname"
#Suresh Vaishya Upload Request Group
elif [ $sel -eq 4 ]
then
FNDLOAD apps/$appspwd O Y UPLOAD $FND_TOP/patch/115/import/afcpreqg.lct $ldtname
echo "LDT File $ldtname uploaded"
#Suresh Vaishya   download Value Set
elif [ $sel -eq 5 ]
then
echo "Enter Value set Short Name"
read vsname

FNDLOAD apps/$appspwd 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct $ldtname VALUE_SET FLEX_VALUE_SET_NAME="$vsname"
echo "LDT File $ldtname created"
#Suresh Vaishya Upload Value Set
elif [ $sel -eq 6 ]
then
FNDLOAD apps/$appspwd 0 Y UPLOAD $FND_TOP/patch/115/import/afffload.lct $ldtname
echo "LDT File $ldtname uploaded"
#Suresh  Vaishya Download Menu 
elif [ $sel -eq 7 ]
then
echo "Enter Menu Name"
read mname
FNDLOAD apps/$appspwd O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct $ldtname MENU MENU_NAME="$mname"
#Suresh Vaishya Upload Menu 
elif [ $sel -eq 8 ]
then
FNDLOAD apps/$appspwd O Y UPLOAD $FND_TOP/patch/115/import/afsload.lct $ldtname
#Suresh    Vaishya Download DFF
elif [ $sel -eq 9 ]
then
echo "Enter Application Name"
read applname
echo "Enter Descriptive Flexfield Name"
read dff
FNDLOAD apps/$appspwd 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct $ldtname DESC_FLEX APPLICATION_SHORT_NAME="$applname" DESCRIPTIVE_FLEXFIELD_NAME="$dff"
#Suresh  Vaishya Upload DFF
elif [ $sel -eq 10 ]
then
FNDLOAD apps/$appspwd 0 Y UPLOAD $FND_TOP/patch/115/import/afffload.lct $ldtname
#Suresh Vaishya Download KFF
elif [ $sel -eq 11 ]
then
echo "Enter Application Name"
read applname
echo "Enter Key Flexfield Name"
read dff
FNDLOAD apps/$appspwd 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct $ldtname KEY_FLEX APPLICATION_SHORT_NAME="$applname" DESCRIPTIVE_FLEXFIELD_NAME="$dff"
#Suresh  Vaishya Upload KFF
elif [ $sel -eq 12 ]
then
FNDLOAD apps/$appspwd 0 Y UPLOAD $FND_TOP/patch/115/import/afffload.lct $ldtname

#Suresh Vaishay Download Lookup type
elif [ $sel -eq 13 ]
then
echo "Enter Application Name"
read applname
echo "Enter Lookup Type Name"
read lname
FNDLOAD apps/$appspwd O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct $ldtname FND_LOOKUP_TYPE APPLICATION_SHORT_NAME="$applname" LOOKUP_TYPE="$lname"
#Suresh Vaishya Upload Lookup Type
elif [ $sel -eq 14 ]
then
FNDLOAD apps/$appspwd O Y UPLOAD $FND_TOP/patch/115/import/aflvmlu.lct $ldtname
#Suresh Vaishya Download Forms Personalization
elif [ $sel -eq 15 ]
then
echo "Enter Function Name for the form"
read fname
FNDLOAD apps/$appspwd 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct $ldtname FND_FORM_CUSTOM_RULES FUNCTION_NAME="$fname"
#http://sureshvaishya.blogspot.com Upload forms personalization
elif [ $sel -eq 16 ]
then
FNDLOAD apps/$appspwd 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct $ldtname
#Suresh Download Responsibility
elif [ $sel -eq 17 ]
then
echo "Enter Responsibility Key"
read rname
FNDLOAD apps/$appspwd O Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct $ldtname FND_RESPONSIBILITY RESP_KEY="$rname"
#Suersh Upload Responsibility
elif [ $sel -eq 18 ]
then
FNDLOAD apps/$appspwd O Y UPLOAD $FND_TOP/patch/115/import/afscursp.lct $ldtname
fi

fi # ascii if
else
echo "You entered $sel"
echo "Invalid selection. Valid value are from 1 to 18."
fi # number check if
done
# End of Script. http://sureshvaishya.blogspot.com

Tuesday, April 20, 2010

Colors in Concurrent Request Manager Screen

On concurrent manager screen normally along with default form color we see Red, Yellow and Green color for Error, Warning and Pending respectively. Recently I came across a profile that would change this normal behavior and hide these colors.

The profile name is FND: Indicator Colors. The profile also affects the behavior of required parameter which is normally displayed in yellow.
Another point to note is that by setting this profile to No only concurrent manager screen is affected and other forms behave normally.

This is just for your information.

Monday, March 29, 2010

How to complete Host(Unix Shell Script) Concurrent Program with Warning

If we have a concurrent program as of type host(Unix Shell Script), then the program by default either completes Normal or in Error.
If we return from shell script using text exit 0, program completes in normal and if we use any value other value e.g. exit 1, exit 2, exit 10 etc then the program completes in error.
Below is the code that can be used if requirement is to complete it in warning.


sqlplus -s $p_usr_pwd <<-EOF
set feedback off
declare
l_stat Boolean;
l_session_id Number;
begin
fnd_global.initialize(session_id => l_session_id
, user_id => fnd_global.user_id
, resp_id => fnd_global.resp_id
, resp_appl_id => fnd_global.resp_appl_id
, security_group_id => null
, site_id => null
, login_id => null
, conc_login_id => null
, prog_appl_id => null
, conc_program_id => null
, conc_request_id => $p_req_id
, conc_priority_request => null);
l_stat := fnd_concurrent.set_completion_status('WARNING','Completed in Warning. Review log for details.');
commit;
end;
/
exit;
EOF

In the example above $p_usr_pwd stores database username/password, $p_req_id stores the request ID for concurrent request that needs to complete in warning.

Related Post:
Concurrent program parameter in Unix Shell Script
Calling SQLPLUS from unix shell script

Friday, March 12, 2010

In a directory in Unix convert Tab Delimeted file to Comma delimeted

On Request from one of our reader here is a post to convert excel files into a comma delimeted file.

create shell script using following code. The script below will fetch all files with extension xls and convert tabs into comma and create a .csv file.


cd /applmgr/custom/inbound/data
for i in *.xls
do
echo $i
newfile=$i.csv
awk 'BEGIN {
FS = "\t"
OFS = ","
}
{
$1 = $1
for (i = 1; i <= NF; i++) {
if ($i == "") {
$i = "null"
}
}
print $0
}' $i > $newfile
done

Friday, March 5, 2010

SQLLDR - Shell script to load Multiple files in table

Based on request from one of our reader, here is the post to read file from a directory and then call sqlloader command to load data file into a table.
Assumptions:
1) There has to be some way/standard to recognize the file name. In my case its a .dat file starting with sample. If you don't know data file name then create a directory specific to the load and select all data files from that directory.
2) The file format has to be same so that same .ctl file can be used to read the file and load the table.
3) Once loaded the file is then archived.

Control file code


LOAD DATA
insert into table sv_temp
fields terminated by '|' optionally enclosed by '"'
(first_col
,second_col
)


Shell Script Code

cd $CUSTOM_TOP/data
for file in sample*.dat
do
sqlldr userid=$login control=$CUSTOM_TOP/bin/sv_test.ctl data=$CUSTOM_TOP/data/$file
mv $CUSTOM_TOP/data/$file $CUSTOM_TOP/archive/$file
done


3 files sample1.dat, sample2.dat, sample3.dat was copied in CUSTOM_TOP/data directory.
Sample Output is

SQL*Loader: Release 8.0.6.3.0 - Production on Fri Mar 5 13:24:18 2010

(c) Copyright 1999 Oracle Corporation. All rights reserved.

Commit point reached - logical record count 8
Commit point reached - logical record count 9

SQL*Loader: Release 8.0.6.3.0 - Production on Fri Mar 5 13:24:18 2010

(c) Copyright 1999 Oracle Corporation. All rights reserved.

Commit point reached - logical record count 4
Commit point reached - logical record count 5

SQL*Loader: Release 8.0.6.3.0 - Production on Fri Mar 5 13:24:18 2010

(c) Copyright 1999 Oracle Corporation. All rights reserved.

Commit point reached - logical record count 7

Monday, February 15, 2010

View Barcode in BI Publisher Report when run from Application

Following steps should be completed in order to register your Barcode font to be viewed when report is run from Application.

1) From XML Publisher responsibility, create a font file in XML administration.
Navigation: XML Publisher Administrator -- Administration -- Font FilesCreate Font File
2) Create a font mapping set. Navigation: XML Publisher Administrator -- Administration -- Font Mapping
3) In the template screen , edit configuration -- FO Processing -- Font Mapping Set , provided the corresponding font mapping set
4) The last important step is to always use Territory column while defining Template. E.g. United States.

Now when report is generated from application, barcode font should be viewed.

Related Post:
Using 3 of 9 Barcodes in XML Publisher
Cannot View Output when previewed from RTF Template

Friday, February 5, 2010

Notify when SO is booked or new line is entered on booked order

Based on a request from one of our reader, below are the steps on how to notify users when an order is booked or new line is inserted on a booked order.

The Alert below will send notification once a day in the morning at 8:00 am.

1) Define Alert

Query used is


SELECT ooh.order_number
, ool.line_number||'.'||ool.shipment_number line_number
, ordered_item, ordered_quantity, ool.flow_Status_code
INTO &order_num, &line_num,&Item_num, &Quantity, &line_Status
FROM oe_order_headers_all ooh, oe_order_lines_all ool
WHERE ooh.header_id = ool.header_id
AND
( ooh.booked_date >= to_date(Sysdate,'DD-MON-RRRR HH24:MI:SS')
OR (ool.creation_Date >= to_date(Sysdate,'DD-MON-RRRR HH24:MI:SS')
AND ool.creation_date > ooh.booked_date)
)

2) Define Actions
Click on the actions button and then actions Detail button and define message as shown in screenshot. Note that the message type is summary.

3) Define Action Sets
Click on action sets and then action set details and in the members tab enter the action defined in step 2

4) Schedule the Request
Navigate to Request --> Check and submit the alert. Based on the definition of alert it will be scheduled to run.

Kindly let me know if any questions.

Related Link: Introduction to Oracle Alerts

Tuesday, January 26, 2010

List of Receipts API in Oracle Receivables

Below is the list of some of the Receipt API's in Oracle Receivables. Receipt APIs provide an extension to existing functionality for creating and manipulating receipts through standard AR Receipts forms and lockboxes.

AR_RECEIPT_API_PUB is the main package that has several procedures to perform different actions


1) AR_RECEIPT_API_PUB.APPLY & AR_RECEIPT_API_PUB.UNAPPLY:
Use this procedure to apply or unaply respectively, the cash receipts from a customer to an invoice, debit memo, or other debit item .
2) AR_RECEIPT_API_PUB.APPLY_ON_ACCOUNT & AR_RECEIPT_API_PUB.UNAPPLY_ON_ACCOUNT
Use this procedure to apply or unapply a cash receipt on account.
3) AR_RECEIPT_API_PUB.APPLY_OPEN_RECEIPT & AR_RECEIPT_API_PUB.UNAPPLY_OPEN_RECEIPT
To apply or unapply a cash receipt to another open receipt.
4) AR_RECEIPT_API_PUB.CREATE_CASH:
Procedure to create a single cash receipt for payment received in the form of a check or cash.
6) AR_RECEIPT_API_PUB.REVERSE
Procedure to reverse cash and miscellaneous receipts

In later post I will try to explain in detail how to use each API and the impact of same in application.

Thursday, January 21, 2010

For BI Publisher Reports, cannot view Barcodes when previewed output in PDF

Based on question from one of our reader here are the steps to view the barcode fonts when the report is previewed in PDF format from .rtf file.

The problem here is that the fonts are correctly installed in computer but when output is previewed instead of barcodes actual text is seen. One of the possible reason for this could be that the xdo.cfg file is not configured correctly. Below are the steps

1) Copy Barcode font in C:\Windows\Fonts directory.
2) Copy xdo.cfg in C:\Program Files\Oracle\XML Publisher Desktop\Template Builder for Word\config directory. The sample file is already available when BI Publisher desktop is installed.
3) Right click the font file and go to properties. Copy the .ttf file name. Double click the font file to get the family name.
4) Open the xdo.cfg file and paste as follows (My filename is FRE3OF9X.ttf and font family is Free 3 of 9 Extended)

[font family="Free 3 of 9 Extended" style="normal" weight="normal"]
[truetype path="C:\Windows\fonts\FRE3OF9X.ttf" /]
[/font]
Note: replace brackets([ & ]) with angle brackets as was unable to paste due to HTML restriction in comments. There should be sample already available in the xdo.cfg file.

5) Try your report should work fine and barcodes should be correctly displayed.

Related Post:
Using 3 of 9 Barcodes in XML Publisher
View Barcode in XML Publisher report when run from Application

Keywords: Code 39, Barcode 39, 3 of 9 Barcodes

Tuesday, January 19, 2010

Types of Purchase Orders

Different types of purchase order in Oracle
Standard Purchase Order: A standard purchase orders is generally created for one–time purchase of various items. Standard purchase orders is created when we know the details of the goods or services we require, estimated costs, quantities, delivery schedules, and accounting distributions.

Blanket Purchase Agreements: A blanket purchase agreements are created when we know the detail of the goods or services we plan to buy from a specific supplier in a period, but we do not yet know the detail of your delivery schedules. Blanket purchase agreements can be used to specify negotiated prices for items before actually purchasing them. Blanket purchase agreements can be created for a single organization or to be shared by different business units of organization (global agreements).

Blanket Releases: A blanket release is issued against a blanket purchase agreement to
place the actual order (as long as the release is within the blanket agreement effectivity dates).

Contract Purchase Agreements: A contract purchase agreement is an agreement between buyer and a supplier for unspecified goods or services. This agreement may include terms and conditions, amount, and effective dates. Later Standard Purchase orders can be issued based on the agreements decided.

Planned Purchase Orders: A planned purchase order is a long–term agreement committing to buy items or services from a single source. Tentative delivery schedules and all other details like item, price, quantity is specified in planned purchase orders. We can issue scheduled releases against planned purchase order to create standard purchase orders.

Wednesday, January 13, 2010

Types of Discrete Jobs in WIP

There are 2 types of discrete Jobs
1) Standard - Standard discrete jobs are used to manufacture a brand new product using Bill of Materials and Routings. E.g. There is a demand in the sales order for an Assembly item which in turn creates a WIP Job. For this case standard discrete job will be created.
2) Non-Standard - Non Standard discrete jobs are mostly used to repair a defective item. E.g. A product is returned by the customer for some defective reason. For this item a non-standard job is created and item is refurbished.

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