Home » Applications » Oracle Fusion Apps & E-Business Suite » Price List API error
Price List API error [message #299717] Wed, 13 February 2008 00:28 Go to next message
suraj_an
Messages: 15
Registered: February 2008
Junior Member
Hi

I am trying to insert lines into qp_list_lines (header already defined)using qp_price_list_pub.process_list_api...
But while compiling i'm getting an error 'Wrong number of types of arguments'... here is the code snippet...

Can somebody help?

declare
gn_user_id NUMBER := FND_GLOBAL.USER_ID;
gn_login_id NUMBER := FND_GLOBAL.LOGIN_ID;

lc_ret_status varchar2(1000);
ln_msg_count number;
lc_msg_data varchar2(1000);

type gt_price_list_tbl_type is table of qp_price_list_pub.price_list_line_rec_type INDEX BY BINARY_INTEGER;
type gt_price_list_tbl_type_out is table of qp_price_list_pub.price_list_rec_type INDEX BY BINARY_INTEGER;

TYPE lt_price_list_tbl_type IS TABLE OF qp_price_list_pub.price_list_line_rec_type INDEX BY BINARY_INTEGER;
TYPE lt_price_list_tbl_type_out IS TABLE OF qp_price_list_pub.price_list_rec_type INDEX BY BINARY_INTEGER;

TYPE lt_price_list_line_val_tbl IS TABLE OF qp_price_list_pub.price_list_line_val_rec_type INDEX BY BINARY_INTEGER;
TYPE lt_price_list_line_val_tbl_out IS TABLE OF qp_price_list_pub.price_list_line_val_rec_type INDEX BY BINARY_INTEGER;

TYPE lt_qualifiers_tbl IS TABLE OF qp_qualifier_rules_pub.qualifiers_rec_type INDEX BY BINARY_INTEGER;
TYPE lt_qualifiers_tbl_out IS TABLE OF qp_qualifier_rules_pub.qualifiers_rec_type INDEX BY BINARY_INTEGER;

TYPE lt_qualifiers_val_tbl IS TABLE OF qp_qualifier_rules_pub.qualifiers_val_rec_type INDEX BY BINARY_INTEGER;
TYPE lt_qualifiers_val_tbl_out IS TABLE OF qp_qualifier_rules_pub.qualifiers_val_rec_type INDEX BY BINARY_INTEGER;

TYPE lt_pricing_attr_tbl IS TABLE OF qp_price_list_pub.pricing_attr_rec_type INDEX BY BINARY_INTEGER;
TYPE lt_pricing_attr_tbl_out IS TABLE OF qp_price_list_pub.pricing_attr_rec_type INDEX BY BINARY_INTEGER;

TYPE lt_pricing_attr_val_tbl IS TABLE OF qp_price_list_pub.pricing_attr_val_rec_type INDEX BY BINARY_INTEGER;
TYPE lt_pricing_attr_val_tbl_out IS TABLE OF qp_price_list_pub.pricing_attr_val_rec_type INDEX BY BINARY_INTEGER;

lr_price_list_tbl_type gt_price_list_tbl_type;
lr_price_list_tbl_type_out gt_price_list_tbl_type_out;

lr_price_list_line_val_tbl lt_price_list_line_val_tbl;
lr_price_list_line_val_tbl_out lt_price_list_line_val_tbl_out;

lr_qualifiers_tbl lt_qualifiers_tbl;
lr_qualifiers_tbl_out lt_qualifiers_tbl_out;

lr_qualifiers_val_tbl lt_qualifiers_val_tbl;
lr_qualifiers_val_tbl_out lt_qualifiers_val_tbl_out;

lr_pricing_attr_tbl lt_pricing_attr_tbl;
lr_pricing_attr_tbl_out lt_pricing_attr_tbl_out;

lr_pricing_attr_val_tbl lt_pricing_attr_val_tbl;
lr_pricing_attr_val_tbl_out lt_pricing_attr_val_tbl_out;

lr_price_list_rec qp_price_list_pub.price_list_rec_type;
lr_price_list_rec_out qp_price_list_pub.price_list_rec_type;

lr_price_list_val_rec qp_price_list_pub.price_list_val_rec_type;
lr_price_list_val_rec_out qp_price_list_pub.price_list_val_rec_type;


begin

lr_price_list_tbl_type(1).base_uom_code:='One';
lr_price_list_tbl_type(1).inventory_item_id:=1234;
lr_price_list_tbl_type(1).organization_id:=234;
lr_price_list_tbl_type(1).created_by:=gn_user_id;
lr_price_list_tbl_type(1).last_updated_by:=gn_user_id;
lr_price_list_tbl_type(1).last_update_date:=SYSDATE;
lr_price_list_tbl_type(1).last_update_login:=gn_login_id;
lr_price_list_tbl_type(1).creation_date:=SYSDATE;
lr_price_list_tbl_type(1).list_header_id:=14800;

lr_price_list_rec.description:='testing';
lr_price_list_rec.currency_code:='USD';
lr_price_list_rec.operation:='insert';
lr_price_list_rec.name:='Test';


lr_price_list_val_rec.currency:='USD';

lr_price_list_line_val_tbl(1).accrual_uom:='Ea';

lr_qualifiers_tbl(1).operation:='insert';

lr_qualifiers_val_tbl(1).qualifier_rule:='now';

lr_pricing_attr_tbl(1).accumulate_flag:='Y';
lr_pricing_attr_tbl(1).product_attribute:='Attr';
lr_pricing_attr_tbl(1).product_attribute_context:='Bcg';
lr_pricing_attr_tbl(1).product_uom_code:='Ea';
lr_pricing_attr_tbl(1).product_attr_value:='attr';
lr_pricing_attr_tbl(1).operation:='insert';
lr_pricing_attr_tbl(1).comparison_operator_code:='yes';

lr_pricing_attr_val_tbl(1).accumulate:='yes';

qp_price_list_pub.process_price_list (p_api_version_number => 1.0
,p_init_msg_list => FND_API.G_FALSE
,p_return_values => FND_API.G_FALSE
,p_commit => FND_API.G_FALSE
,x_return_status => lc_ret_status
,x_msg_count => ln_msg_count
,x_msg_data => lc_msg_data
,p_price_list_rec => lr_price_list_rec
,p_price_list_val_rec => lr_price_list_val_rec
,p_PRICE_LIST_LINE_tbl => lr_price_list_tbl_type
,p_price_list_line_val_tbl => lr_price_list_line_val_tbl
,p_qualifiers_tbl => lr_qualifiers_tbl
,p_qualifiers_val_tbl => lr_qualifiers_val_tbl
,p_pricing_attr_tbl => lr_pricing_attr_tbl
,p_pricing_attr_val_tbl => lr_pricing_attr_val_tbl
,x_price_list_rec => lr_price_list_rec_out
,x_price_list_val_rec => lr_price_list_val_rec_out
,x_PRICE_LIST_LINE_tbl => lr_price_list_tbl_type_out
,x_price_list_line_val_tbl => lr_price_list_line_val_tbl_out
,x_qualifiers_tbl => lr_qualifiers_tbl_out
,x_qualifiers_val_tbl => lr_qualifiers_val_tbl_out
,x_pricing_attr_tbl => lr_pricing_attr_tbl_out
,x_pricing_attr_val_tbl => lr_pricing_attr_val_tbl_out
);
end;
Re: Price List API error [message #299762 is a reply to message #299717] Wed, 13 February 2008 02:30 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Get the package specification with the following sql
SELECT text
  FROM user_source
 WHERE name = 'QP_PRICE_LIST_PUB'
   AND type = 'PACKAGE'
 ORDER BY line;
Cross verify your calling code with the definition of the procedure process_price_list.

By
Vamsi
Re: Price List API error [message #299765 is a reply to message #299717] Wed, 13 February 2008 02:41 Go to previous messageGo to next message
suraj_an
Messages: 15
Registered: February 2008
Junior Member
I checked it out. The number of arguments are right. So it means that 'types of arguments' is wrong (only other possibility). But i can't find the problem.

I only want to enter lines for a particular header.I dont want to enter any qualifiers etc. But should I still initialise all the fields in the record (and table) fields of qualifiers record type and attribute record type to null?

Or is there any other problem?

[Updated on: Wed, 13 February 2008 02:42]

Report message to a moderator

Re: Price List API error [message #299783 is a reply to message #299765] Wed, 13 February 2008 03:18 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Instead of creating the type
type gt_price_list_tbl_type is table of qp_price_list_pub.price_list_line_rec_type INDEX BY BINARY_INTEGER;
type gt_price_list_tbl_type_out is table of qp_price_list_pub.price_list_rec_type INDEX BY BINARY_INTEGER;

lr_price_list_tbl_type gt_price_list_tbl_type;
lr_price_list_tbl_type_out gt_price_list_tbl_type_out;
use the ones, which are already declared in the package.
lr_price_list_tbl_type qp_price_list_pub.Price_List_Line_Tbl_Type;
lr_price_list_tbl_type_out qp_price_list_pub.Price_List_Line_Tbl_Type;
By
Vamsi

[Updated on: Wed, 13 February 2008 03:23]

Report message to a moderator

Re: Price List API error [message #300999 is a reply to message #299783] Mon, 18 February 2008 23:41 Go to previous message
suraj_an
Messages: 15
Registered: February 2008
Junior Member
Yea... Thanks a lot... it worked...
Previous Topic: PO quantity changes to 0 when PO type is changed
Next Topic: Problem Loading BAI2 File into Cash Management
Goto Forum:
  


Current Time: Sat Dec 03 01:29:52 CST 2016

Total time taken to generate the page: 0.15147 seconds