PL/SQL API + Defaulting Rules in OM

Hi,
I want to default custom rule in Sales Order from whenever I select Item. After selecting item from the sales order from, it should populate Warehouse value in Shipping tab. I am using custom PL/SQL API option. I wrote one function and kept in package. I was disabled all defaulting rules. Now If I select Item in sales order form, I am not getting warehouse value.
The steps are:
Step 1. Select Warehouse attribute and define defaulting rule
Application: Order Management
Entry: Order Line
Select Attribute as Warehouse
Click on Defaulting Rules
Step 2: Define Defaulting Sourcing Rule
Select Source type as PL/SQL API.
In the Defaulting Source/Value field give Package Name and Function Name.
Open Catalog Groups window from the below path: Setup  Items  Catalog Groups
Specify Name and Description for Catalog Group
Click on Details button.
Step 3: Create Catalog Group
Step 4: Specify Descriptive Elements for the Item Catalog Group
Step 5: Code preparation
-- My Custom Code
Create or replace FUNCTION custom_default_rule
RETURN VARCHAR2
AS
l_line_type_rec oe_order_cache.line_type_rec_type;
CURSOR cus_l
IS
SELECT a.organization_code, b.element_name, b.element_value
FROM mtl_parameters a,
mtl_descr_element_values b,
mtl_system_items_b c
WHERE b.inventory_item_id = c.inventory_item_id
AND a.organization_id = c.organization_id
AND a.organization_id = c.organization_id
AND c.inventory_item_id = 12924
GROUP BY a.organization_code, b.element_name, b.element_value
ORDER BY a.organization_code, b.element_name, b.element_value;
BEGIN
     l_line_type_rec := oe_order_cache.load_line_type
(ont_line_def_hdlr.g_record.line_type_id);
FOR cur_rec IN cus_l
LOOP
IF cur_rec.element_name IN
('Frequency',
'Emission Norms',
'Voltage',
'Duty Rating',
'Phase',
'Product'
AND cur_rec.element_value IN
('50', '', '230', 'Medium', 'Single', 'QSK60')
THEN
RETURN cur_rec.organization_code;
ELSIF cur_rec.element_name IN
('Frequency',
'Emission Norms',
'Voltage',
'Duty Rating',
'Phase',
'Product'
AND cur_rec.element_value IN
('50', '', '230', 'Medium', 'Three', 'QSK15')
THEN
RETURN cur_rec.organization_code;
ELSIF cur_rec.element_name IN
('Frequency',
'Emission Norms',
'Voltage',
'Duty Rating',
'Phase',
'Productfamily'
AND cur_rec.element_value IN
('50', '', '230', 'Medium', 'Single', 'DQK50')
THEN
RETURN cur_rec.organization_code;
END IF;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
IF oe_msg_pub.check_msg_level (oe_msg_pub.g_msg_lvl_unexp_error)
THEN
oe_msg_pub.add_exc_msg ('OE_Default_PVT', 'CUSTOM_DEFAULT_RULE');
END IF;
RAISE fnd_api.g_exc_unexpected_error;
END custom_default_rule;
Step 6: Create a Sales Order (Order Returns  Sales Orders)
Select Customer and Order Type and select Line Items Tab.
Select Item from the Ordered Item Field. Press Tab.
After pressing tab in the Shipping Tab Warehouse value Should be populated. But it is not working.
Can anyone guide me in this.
It is very urgent.
If possible, Please send u r details to my official id: [email protected]
Thanks in Advance,
sateesh

Sateesh,
This is working fine for me here:
CREATE OR REPLACE PACKAGE xx_def_wh
AS
FUNCTION custom_default_rule (p_database_object_name IN VARCHAR2, p_attribute_code IN VARCHAR2)
RETURN NUMBER;
END;
CREATE OR REPLACE PACKAGE BODY xx_def_wh
AS
FUNCTION custom_default_rule (p_database_object_name IN VARCHAR2, p_attribute_code IN VARCHAR2)
RETURN NUMBER
AS
l_line_type_rec oe_order_cache.line_type_rec_type;
l_item_id NUMBER;
CURSOR cus_l(p_item_id in number)
IS
SELECT a.organization_id, b.element_name, b.element_value
FROM mtl_parameters a, mtl_descr_element_values b, mtl_system_items_b c
WHERE b.inventory_item_id = c.inventory_item_id
AND a.organization_id = c.organization_id
AND a.organization_id = c.organization_id
AND c.inventory_item_id = p_item_id
and a.organization_id<>a.master_organization_id
ORDER BY a.organization_id;
BEGIN
l_line_type_rec := oe_order_cache.load_line_type (ont_line_def_hdlr.g_record.line_type_id);
l_item_id:= ONT_LINE_DEF_HDLR.g_record.inventory_item_id;
FOR cur_rec IN cus_l(l_item_id)
LOOP
IF cur_rec.element_name IN ('Frequency', 'Emission Norms', 'Voltage', 'Duty Rating', 'Phase', 'Product')
AND cur_rec.element_value IN ('50', '', '230', 'Medium', 'Single', 'QSK60')
THEN
RETURN cur_rec.organization_id;
ELSIF cur_rec.element_name IN ('Frequency', 'Emission Norms', 'Voltage', 'Duty Rating', 'Phase', 'Product')
AND cur_rec.element_value IN ('50', '', '230', 'Medium', 'Three', 'QSK15')
THEN
RETURN cur_rec.organization_id;
ELSIF cur_rec.element_name IN ('Frequency', 'Emission Norms', 'Voltage', 'Duty Rating', 'Phase', 'Productfamily')
AND cur_rec.element_value IN ('50', '', '230', 'Medium', 'Single', 'DQK50')
THEN
RETURN cur_rec.organization_id;
END IF;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
IF oe_msg_pub.check_msg_level (oe_msg_pub.g_msg_lvl_unexp_error)
THEN
oe_msg_pub.add_exc_msg ('OE_Default_PVT', 'CUSTOM_DEFAULT_RULE');
END IF;
RAISE fnd_api.g_exc_unexpected_error;
END custom_default_rule;
END;
Thanks
Nagamohan

Similar Messages

  • Defaulting Rules using PL/SQL Api - ORA error

    Hi All,
    Iam using the PLSQL api for OM defaulting rules. Based on the item in the Sales order line, Line type has to be defaulted.
    I have put debug messages and iam able to see successful execution and the required Line type value is returned. No exception is raised.
    Error ORA-06502 PL/SQL numberic to value error. Character to number conversion error is thrown outside the custom package.
    PLSQL api is coded as below.
    CREATE OR REPLACE PACKAGE BODY xx_default_ordertype IS
    G_PKG_NAME      CONSTANT VARCHAR2(30) := 'XX_DEFAULT_ORDERTYPE';
    FUNCTION get_trans_type
    p_database_object_name IN VARCHAR2,
    p_attribute_code IN VARCHAR2
    RETURN varchar2 IS
    l_trans_type VARCHAR2(30);
    -- l_item_id NUMBER := ONT_LINE_DEF_HDLR.g_record.ORDERED_ITEM_ID;
    BEGIN
    SELECT b.name
    INTO l_trans_type
    FROM OE_TRANSACTION_TYPES_tL b,
    oe_transaction_types_all a
    WHERE a.transaction_type_id=b.transaction_type_id
    AND attribute1=ONT_LINE_DEF_HDLR.g_record.INVENTORY_ITEM_ID;
    RETURN l_trans_type;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    RETURN l_trans_type;
    WHEN OTHERS THEN
    insert_sstab(7,'in exception');
    IF OE_MSG_PUB.Check_Msg_Level (OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
    OE_MSG_PUB.Add_Exc_Msg (G_PKG_NAME, 'xx_default_ordertype');
    END IF;
    RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
    END get_trans_type;
    END xx_default_ordertype;
    Not able to figure out where the ORA error is getting raised from.
    Kindly help
    Edited by: user11969666 on Mar 19, 2011 7:47 AM

    btw, I did try your test and it didn't error for me:
    CREATE OR REPLACE PACKAGE xx_default_ordertype IS
    FUNCTION get_trans_type
    p_database_object_name IN VARCHAR2,
    p_attribute_code IN VARCHAR2
    RETURN varchar2;
    end xx_default_ordertype;
    CREATE OR REPLACE PACKAGE BODY xx_default_ordertype IS
    FUNCTION get_trans_type
    p_database_object_name IN VARCHAR2,
    p_attribute_code IN VARCHAR2
    RETURN varchar2 IS
    l_trans_type OE_TRANSACTION_TYPES_tL.name%TYPE :='a';
    BEGIN
    RETURN l_trans_type;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    RETURN l_trans_type;
    END get_trans_type;
    END xx_default_ordertype;
    begin
    dbms_output.put_line(xx_default_ordertype.get_trans_type('X','Y'));
    end;
    /

  • Custom PL/SQL API that inserts the data into a custom interface table.

    We are developing a custom Web ADI integrator for importing suppliers into Oracle.
    The Web ADI interface is a custom PL/SQL API that inserts the data into a custom interface table. We have defined the content, uploader and an importer. The importer is again a custom PL/SQL API that will process the records inserted into the custom table and updates the STATUS column of the custom interface table. We want to show the status column back on the spreadsheet.
    Defined the 'Document Row' import rule and added the rows that would identify the unique record.
    Errored row import rule, we are using a SELECT * from custom_table where status<>'Success' and vendor_name=$param$.vendor_name
    The source of this parameter is import.vendor_name
    We have also defined an Error lookup.
    After the above setup is completed, we invoke the create document and click on Oracle->Upload.
    The records are getting imported, but the importer program is failing with An error has occurred while running an API import. The ERRORED_ROWS step 20003:ER_500141, parameter number 1 must contain the value BIND in attribute 1.'

    The same issue.
    Need help.
    Also checked bne.log, no additional information.
    <bne:document xmlns:bne="http://www.oracle.com/bne">
    <bne:message bne:type="DATA" bne:text="BNE_VALID_ROW_COUNT" bne:value="11" />
    <bne:message bne:type="DATA" bne:text="BNE_INVALID_ROW_COUNT" bne:value="0" />
    <bne:message bne:type="ERROR" bne:text="An error has occurred while running an API import"
    bne:cause="The ERRORED_ROWS step 20003:ER_500165, parameter number 1 must contain the value BIND in attribute 1."
    bne:action="" bne:source="BneAPIImporter" >
    <bne:context bne:collection="collection_1" />
    </bne:message><bne:message bne:type="STATUS"
    bne:text="No rows uploaded" bne:value="" >
    <bne:context bne:collection="collection_1" /></bne:message>
    <bne:message bne:type="STATUS" bne:text="0 rows were invalid" bne:value="" >
    <bne:context bne:collection="collection_1" /></bne:message></bne:document>

  • How to use DBFS PL/SQL API

    Hi guys,
    I'm re-posting this question to see if anyone can help me out. I am trying to use the DBFS PL/SQL API to manipulate files stored in DBFS.
    Environment details:
    Windows 7 or OEL 5.5 (I have tried both platforms)
    Database: Oracle DB EE 11.2.0.2
    IDE: SQLDeveloper on Windows 7
    I have two users, DBFS_USER who owns the DBFS store and MYUSER who connects to the store to manipulate files using the DBFS PL/SQL API.
    Creation scripts:
    connect / as sysdba;
    CREATE TABLESPACE dbfs_ts DATAFILE 'D:\oracle\oradata\orcl\dbfs01.dbf' SIZE 1M AUTOEXTEND ON NEXT 1M;
    -- create users
    create user dbfs_user identified by dbfs_user default tablespace dbfs_ts quota unlimited on dbfs_ts;
    create myuser identified by myuser;
    -- grant role
    GRANT CREATE SESSION, RESOURCE, CREATE VIEW, DBFS_ROLE, CREATE TABLE TO dbfs_user;
    GRANT CREATE SESSION, RESOURCE, CREATE VIEW, DBFS_ROLE, CREATE TABLE TO myuser;
    -- create file system (as DBFS_USER)
    connect dbfs_user/dbfs_user;
    exec dbms_dbfs_sfs.createFilesystem('STAGING_AREA_FS');
    exec dbms_dbfs_content.registerStore('STAGING_AREA_FS', 'posix', 'DBMS_DBFS_SFS');
    exec dbms_dbfs_content.mountStore('STAGING_AREA_FS', 'staging_area');
    commit;
    -- export store STAGING_AREA_FS (as DBFS_USER)
    exec dbms_dbfs_sfs.exportFilesystem('STAGING_AREA_FS');
    -- check table names (as MYUSER)
    connect myuser/myuser;
    -- should see nothing (no mounts)
    select * from table(dbms_dbfs_content.listMounts);
    -- note down the table_name
    select * from table(dbms_dbfs_sfs.listTables);
    -- mount as MYUSER (example with table_name SFS$_FST_32)
    exec dbms_dbfs_sfs.registerFilesystem('MYUSER_FS', 'DBFS_USER', 'SFS$_FST_32');
    exec dbms_dbfs_content.registerStore('MYUSER_FS', 'posix', 'DBMS_DBFS_SFS');
    exec dbms_dbfs_content.mountStore('MYUSER_FS', 'staging_area');
    commit;
    -- check mount (as MYUSER)
    select * from table(dbms_dbfs_content.listMounts);
    select pathname from dbfs_content;
    CREATE STORED PROC (as MYUSER)
    CREATE OR REPLACE PACKAGE MYUSER_PKG IS
    Function CreateDirectory
    (P_File_Path          IN VARCHAR2,
    P_ErrMsg          OUT VARCHAR2)
    return Number;
    END MYUSER_PKG ;
    CREATE OR REPLACE PACKAGE BODY MYUSER_PKG IS
    Function CreateDirectory
    (P_File_Path          IN VARCHAR2,
    P_ErrMsg          OUT VARCHAR2)
    return Number
    IS
    l_Return NUMBER;
    l_props DBMS_DBFS_CONTENT.PROPERTIES_T;
    BEGIN
    l_Return := 0;
    DBMS_DBFS_CONTENT.createDirectory (
    path     => P_File_Path,
    properties     => l_props);
    RETURN l_Return;
    EXCEPTION
    WHEN OTHERS THEN
    l_Return := NVL(SQLCODE, -1);
    P_ErrMsg := SQLERRM;
    RETURN l_Return;
    END CreateDirectory;
    END MYUSER_PKG ;
    When compiling the package, I am getting this error:
    Error(9,11): PLS-00201: identifier 'DBMS_DBFS_CONTENT' must be declared
    Error(9,11): PL/SQL: Item ignored
    Error(13,3): PL/SQL: Statement ignored
    Error(15,19): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    How do I solve the problem in the error message? I'm not a DB expert. I used this reference documentation: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e18294/adlob_client.htm#CIHDEJAA
    Thanks in advance.
    Cappa

    You need to grant directly the privileges from DBFS_ROLE because roles are not enabled in stored PL/SQL:
    SQL> select* from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Solaris: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    SQL> show user
    USER is "SYS"
    SQL>
    SQL> create user myuser identified by myuser;
    User created.
    SQL> GRANT CREATE SESSION, RESOURCE, CREATE VIEW, DBFS_ROLE, CREATE TABLE TO myuser;
    Grant succeeded.
    SQL>
    SQL> begin
      2  for x in (select privilege, table_name
      3           from dba_tab_privs
      4           where grantee='DBFS_ROLE')
      5  loop
      6   execute immediate 'grant ' || x.privilege || ' on ' || x.table_name
      7   || ' to myuser ';
      8  end loop;
      9  end;
    10  /
    begin
    ERROR at line 1:
    ORA-22812: cannot reference nested table column's storage table
    ORA-06512: at line 6
    SQL>
    SQL> connect myuser/myuser
    Connected.
    SQL>
    SQL> CREATE OR REPLACE PACKAGE MYUSER_PKG IS
      2  Function CreateDirectory
      3  (P_File_Path IN VARCHAR2,
      4  P_ErrMsg OUT VARCHAR2)
      5  return Number;
      6  END MYUSER_PKG ;
      7  /
    Package created.
    SQL> show errors
    No errors.
    SQL>
    SQL> CREATE OR REPLACE PACKAGE BODY MYUSER_PKG  IS
      2  Function CreateDirectory
      3  (P_File_Path IN VARCHAR2,
      4  P_ErrMsg OUT VARCHAR2)
      5  return Number
      6  IS
      7  l_Return NUMBER;
      8  l_props DBMS_DBFS_CONTENT.PROPERTIES_T;
      9  BEGIN
    10  l_Return := 0;
    11  DBMS_DBFS_CONTENT.createDirectory (
    12  path => P_File_Path,
    13  properties => l_props);
    14  RETURN l_Return;
    15  EXCEPTION
    16  WHEN OTHERS THEN
    17  l_Return := NVL(SQLCODE, -1);
    18  P_ErrMsg := SQLERRM;
    19  RETURN l_Return;
    20  END CreateDirectory;
    21  END MYUSER_PKG ;
    22  /
    Package body created.
    SQL> show errors
    No errors.You would need to check why some GRANT statement fails if you have other issue with other piece of code.

  • Defaulting Rule - Help Needed

    hi,
    I want to default the Order Line based on specific Item. I have created the Defaulting Condition Template specifying the item for Entity Order Line.
    At the Item Type : I have added a new defaulting condition with a precedence later than the Regular Line and have added a constant value as the order line type.
    But it doesnt seem to work out. I have compiled the defaulting rules. But it still does not seem to work out.
    Can any one help or atleast point out how to get this thing working ?
    The idea is to have separate line type created for manufactured shippable items and separate line type for service items. Service module is not being implemented.
    since, the number of service items are not large so I am planning to hard code with the service items.
    I am not sure how the PL/SQL process would work. But if somebody could point out the PL/SQL usage for this with pseudo code. I think it might help out.
    Thanks,
    Dhiraj

    Hi Dhiraj,
    I understand that you are looking for different line types for different item types. This can be easily set up in the transaction type definition form itself. You don't have to setup special defaulting rules for this.
    In the transaction type form , when you assign line flows, it lets you choose item type. So you can set different line types for each item_type.
    Regards,
    Swapna.

  • OM Defaulting Rule Customization

    Hi All,
    I have requirement to derive Order Header Sales Channel Code from Sales Person DFF attribute.
    Try to custom using Sales Channel defaulting rule but referencing to ONT_HEADER_DEF_HDLR.g_record.salesrep_id always return FND_API.G_MISS_NUM value.
    Any idea on how to solve this issue?
    TIA,
    Fendy

    Hi Luko,
    Seems like its Oracle bugs.
    First time i open Sales Order Form, its trigger ONT_HEADER_Def_Hdlr package
    1)
    l_attr:= 'SALESREP_ID';
    IF g_record.SALESREP_ID = FND_API.G_MISS_NUM THEN
    -- Get the defaulting api registered in the AK AND default
    l_attr:=l_attr||' 1';
    g_record.SALESREP_ID := ONT_D1_SALESREP_ID.Get_Default_Value(g_record);
    l_attr:=l_attr||' 2';
    IF g_record.SALESREP_ID IS NULL
    AND p_in_old_rec.SALESREP_ID <> FND_API.G_MISS_NUM THEN
    g_record.SALESREP_ID := p_in_old_rec.SALESREP_ID;
    END IF;
    -- For UPDATE operations, check security if new defaulted value is not equal to old value
    IF g_record.operation = OE_GLOBALS.G_OPR_UPDATE THEN
    l_attr:=l_attr||' 3';
    IF NOT OE_GLOBALS.Equal(g_record.salesrep_id, p_in_old_rec.salesrep_id) THEN
    IF OE_HEADER_SECURITY.SALESREP(p_record => g_record, x_on_operation_action => l_action) = OE_PC_GLOBALS.YES THEN
    -- Raise error if security returns YES, operation IS CONSTRAINED
    RAISE FND_API.G_EXC_ERROR;
    END IF;
    OE_GLOBALS.G_ATTR_UPDATED_BY_DEF := 'Y';
    END IF;
    END IF;
    IF g_record.SALESREP_ID IS NOT NULL THEN
    l_attr:=l_attr||' 4';
    -- Validate defaulted value if not null
    IF OE_VALIDATE.SALESREP(g_record.SALESREP_ID) THEN
    -- There is no dependent api registered in the AK dictionary
    NULL;
    l_attr:=l_attr||' 5';
    ELSE
    g_record.SALESREP_ID := NULL;
    l_attr:=l_attr||' 6';
    END IF;
    END IF;
    END IF;
    which return g_record.SALESREP_ID = FND_API.G_MISS_NUM
    then l_attr:= 'SALES_CHANNEL_CODE' is being called
    2)
    IF g_record.SALES_CHANNEL_CODE = FND_API.G_MISS_CHAR THEN
    -- Get the defaulting api registered in the AK AND default
    l_attr:=l_attr||' 1';
    g_record.SALES_CHANNEL_CODE := ONT_D1_SALES_CHANNEL_CODE.Get_Default_Value(g_record);
    l_attr:=l_attr||' 2';
    -- For UPDATE operations, check security if new defaulted value is not equal to old value
    IF g_record.operation = OE_GLOBALS.G_OPR_UPDATE THEN
    l_attr:=l_attr||' 3';
    IF NOT OE_GLOBALS.Equal(g_record.sales_channel_code, p_in_old_rec.sales_channel_code) THEN
    IF OE_HEADER_SECURITY.SALES_CHANNEL_CODE(p_record => g_record, x_on_operation_action => l_action) = OE_PC_GLOBALS.YES THEN
    -- Raise error if security returns YES, operation IS CONSTRAINED
    RAISE FND_API.G_EXC_ERROR;
    END IF;
    OE_GLOBALS.G_ATTR_UPDATED_BY_DEF := 'Y';
    END IF;
    END IF;
    -- There is no validation api registered in the AK dictionary
    END IF;
    which return g_record.SALES_CHANNEL_CODE is null because calling to xx03ont_oe_default_pvt.sales_channel_code return null.
    So the next visit to this ONT_HEADER_Def_Hdlr package when bill to location is entered :
    g_record.SALESREP_ID is filled but g_record.SALESREP_ID is not, due to following condition does not meet
    IF g_record.SALES_CHANNEL_CODE = FND_API.G_MISS_CHAR THEN
    I try to change this package as following (pls see the bold)
    IF g_record.SALES_CHANNEL_CODE = FND_API.G_MISS_CHAR
    OR g_record.SALES_CHANNEL_CODE IS NULL THEN -- New Added
    -- Get the defaulting api registered in the AK AND default
    l_attr:=l_attr||' 1';
    g_record.SALES_CHANNEL_CODE := ONT_D1_SALES_CHANNEL_CODE.Get_Default_Value(g_record);
    l_attr:=l_attr||' 2';
    -- For UPDATE operations, check security if new defaulted value is not equal to old value
    IF g_record.operation = OE_GLOBALS.G_OPR_UPDATE THEN
    l_attr:=l_attr||' 3';
    IF NOT OE_GLOBALS.Equal(g_record.sales_channel_code, p_in_old_rec.sales_channel_code) THEN
    IF OE_HEADER_SECURITY.SALES_CHANNEL_CODE(p_record => g_record, x_on_operation_action => l_action) = OE_PC_GLOBALS.YES THEN
    -- Raise error if security returns YES, operation IS CONSTRAINED
    RAISE FND_API.G_EXC_ERROR;
    END IF;
    OE_GLOBALS.G_ATTR_UPDATED_BY_DEF := 'Y';
    END IF;
    END IF;
    -- There is no validation api registered in the AK dictionary
    IF g_record.SALES_CHANNEL_CODE = FND_API.G_MISS_CHAR THEN
    g_record.SALES_CHANNEL_CODE := NULL;
    END IF;
    END IF;
    After changing this package, its working. Unfortunately, this is seeded package. So i revert back the code and change to use form personalization instead.
    Let me know if you have another work around.
    TIA,
    Fendy

  • Defaulting rules - Sold to contact

    Hi Gurus,
    I got a requirement to default the sold to contact based on the customer sold to org id, this customization applies only to certain order types.
    So, Sold to contact is dependent on sold_to_org_id & order_type. I have created a PL/SQL Api for defaulting this logic. I have also provided the dependencies in oe_dependencies_extn.
    My problem here is:
    when i provide first the order_type & then the customer details, then Sold_to_contact is defaulting correctly. But if i provide customer details first and then the order type, then sold_to_contact is not defaulting..
    Plz help me, where i am missing.
    Regards,
    kumar

    btw, I did try your test and it didn't error for me:
    CREATE OR REPLACE PACKAGE xx_default_ordertype IS
    FUNCTION get_trans_type
    p_database_object_name IN VARCHAR2,
    p_attribute_code IN VARCHAR2
    RETURN varchar2;
    end xx_default_ordertype;
    CREATE OR REPLACE PACKAGE BODY xx_default_ordertype IS
    FUNCTION get_trans_type
    p_database_object_name IN VARCHAR2,
    p_attribute_code IN VARCHAR2
    RETURN varchar2 IS
    l_trans_type OE_TRANSACTION_TYPES_tL.name%TYPE :='a';
    BEGIN
    RETURN l_trans_type;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    RETURN l_trans_type;
    END get_trans_type;
    END xx_default_ordertype;
    begin
    dbms_output.put_line(xx_default_ordertype.get_trans_type('X','Y'));
    end;
    /

  • What is difference process constraints and hold and defaulting rule.

    hi,
    what is difference process constraints and hold and defaulting rule.
    please give me a brief about all three.

    Your question is quite broad but I will try.
    1) Processing constraints are rules that you can define in OM that help you control the actions you can take on Order Headers, Order Lines, Invoices etc.
    e.g. you can setup a processing constraint that says if you have picked an order, then you cannot cancel it.
    Oracle comes with some seeded constraints but you can define your additional constraints as well.
    See http://www.oracleug.com/user-guide/order-management/holds for details
    2) Hold is a way of stopping progress on an order. e.g. If the customer's credit limit has been exceeded, you can have a hold applied to it. This will stop the order from getting shipped.
    See http://www.oracleug.com/user-guide/order-management/holds for details
    3) Defaulting rule is a mechanism to default values on sales order headers / lines etc. You can specifiy defaulting conditions and associate them with custom actions. e.g. you can say that if order type is INTERNAL then default the SUBINVENTORY on the order line to SPARES. Again, Oracle comes with some seeded ones. You can write your own. The defaulting rules also let you encapsulate complex logic in a pl/sql function and invoke it to default fields.
    see http://www.oracleug.com/user-guide/order-management/defaulting-rules for examples
    Hope this helps,
    Sandeep Gandhi

  • Order defaulting rule

    hi
    how to modify a defaulting rule using sql or pl/sql ?

    Hi,
    You have like this:
    1. Price list
    2.OE_DEFAULT_PVT.Get_SOB_Currency_Code
    You have to make
    1. XXOE_DEFAULT_PVT.custom_code
    2. Price list
    3.OE_DEFAULT_PVT.Get_SOB_Currency_Code
    Did you made own custom code to pick currency?
    Regards,
    Luko

  • Creation of New Default Rule in OPL8

    Hi,
    In TC : OPL8, in cost accounting tab we maintain the default rule.
    Can we create our own default rule?
    The issue is we are using the CO-Product scenario in IS MILL. There the two default rules are PP5 and PP6. Both are Full settlement type.
    But as we are using Cost Object Hierarchy, we cannot use the Full settlement type. So we want something similar to PP2 but having te features of PP5 or PP6.
    Can we achieve this in any way by creating new default rule or how to acheive this.
    Regards
    Kami

    Hi
    You can change it in OPL8 when you create New Order Type
    Even if you dont change, it will be overwritten by PER when you use Cost Obj Hierarchy
    br, Ajay M

  • PL/SQL API for Creating Sales Order

    Hi,
    I am new to Oracle SOA 11g.
    I have done the Deleting Sales Order using PL/SQL API ( Oracle Apps Adapter ) [ API Name: OE_ORDER_PUB.DELETE_ORDER ] in SOA BPEL. While executing the BPEL, it is correctly deleting Sales Order in E Business Suite which is created in EBS User Interface. I don't face any problem while deleting the sales order.
    Now, in same way, I have to create a new Sales Order using PL/SQL API in SOA-BPEL. I don't find any API's related to creating Sales Order in Order Management Suite (OM_PF) -->Order Management (ONT) --> Sales Order (ONT_SALES_ORDER) --> PL/SQL --> Process Order API (OE_ORDER_PUB) in Module Browser.
    Please tell me which PL/SQL API to use to create new Sales Order in BPEL.
    Thanks,
    -- Gowtham
    Edited by: user8223943 on Feb 16, 2012 7:38 AM

    You may be on a different patch level. Can you ensure that you have applied all latest patches for your version?
    See sample code at http://jyotioraapps.blogspot.com/2009/08/use-of-oeorderpubprocessorder-to-create.html
    Hope this helps,
    Sandeep Gandhi

  • PL/SQL API for Creating Sales Order in E Business Suite from BPEL

    Hi,
    I am new to Oracle SOA 11g.
    I have done the Deleting Sales Order using PL/SQL API ( Oracle Apps Adapter ) [ API Name: OE_ORDER_PUB.DELETE_ORDER ]. While executing the BPEL, it is correctly deleting Sales Order in E Business Suite which is created EBS User Interface. I don't face any problem while deleting the sales order.
    Now, in same way, I have to create a new Sales Order using PL/SQL API. I don't find any API's related to creating Sales Order in Order Management Suite (OM_PF) -->Order Management (ONT) --> Sales Order (ONT_SALES_ORDER) --> PL/SQL --> Process Order API (OE_ORDER_PUB) in Module Browser.
    Please tell me which PL/SQL API to use to create new Sales Order in BPEL.
    Thanks,
    -- Gowtham

    You may be on a different patch level. Can you ensure that you have applied all latest patches for your version?
    See sample code at http://jyotioraapps.blogspot.com/2009/08/use-of-oeorderpubprocessorder-to-create.html
    Hope this helps,
    Sandeep Gandhi

  • Error while invoking PL/SQL API from DB Adapter

    Hi everybody.
    We have a plenty of processes, which invokes PL/SQL API using DB Adapters. Everything goes ok, but sometimes API invocations results with error like this:
    <bindingFault>
    <part name="code" >
    <code>902</code>
    </part>
    <part name="summary" >
    <summary>file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/insert_person.wsdl [ insert_person_ptt::insert_person(InputParameters,OutputParameters) ]
    - WSIF JCA Execute of operation 'insert_person' failed due to: Error while trying to prepare and execute an API. An error occurred while preparing and executing the XXAR_CUSOMER_WRAP_PKG.CREATE_PERSON API. Cause: java.sql.SQLException: ORA-00902: invalid datatype ; nested exception is: ORABPEL-11811 Error while trying to prepare and execute an API. An error occurred while preparing and executing the XXAR_CUSOMER_WRAP_PKG.CREATE_PERSON API. Cause: java.sql.SQLException: ORA-00902: invalid datatype Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable. </summary>
    </part>
    <part name="detail" >
    <detail>ORA-00902: invalid datatype </detail>
    </part>
    </bindingFault>
    (text from Activity Audit trail)
    The error disappears after some "magic" actions like redeploying the process, clearing WSDL cache or restarting BPEL server.
    Any suggestions?
    Debug log for the error:
    Oracle BPEL Server version 10.1.2.0.2
    Build: 2196
    Build time: Tue Jan 10 12:31:53 UTC 2006
    Build type: release
    Source tag: BPEL_10.1.2.0.2_GENERIC_060110.1200
    <2006-06-08 09:03:45,437> <INFO> <dev.collaxa.cube.engine> <CubeEngine::load>
    <2006-06-09 15:13:45,162> <DEBUG> <dev.collaxa.cube.ws> <WSInvocationManager::invoke> operation: get_person, partnerLink: <partnerLink name="PL_get_person" partnerLinkType="{http://xmlns.oracle.com/pcbpel/adapter/db/get_person/}get_person_plt">
    <myRole name="null">
    <ServiceName>null</ServiceName>
    <PortType>null</PortType>
    <Address>null</Address>
    </myRole>
    <partnerRole name="get_person_role">
    <ServiceName>null</ServiceName>
    <PortType>{http://xmlns.oracle.com/pcbpel/adapter/db/get_person/}get_person_ptt</PortType>
    <Address>null</Address>
    </partnerRole>
    <conversationId>bpel://localhost/dev/Customer_Dispatcher~1.0/2413-BpInv2-BpSeq2.8-2</conversationId>
    <properties>{}</properties>
    </partnerLink>
    <2006-06-09 15:13:45,162> <DEBUG> <dev.collaxa.cube.ws> <WSInvocationManager::invoke> def is file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Customer_Dispatcher_1.0.jar/get_person.wsdl
    <2006-06-09 15:13:45,162> <DEBUG> <dev.collaxa.cube.ws> <WSIFInvocationHandler::invoke> opName=get_person, parnterLink=<partnerLink name="PL_get_person" partnerLinkType="{http://xmlns.oracle.com/pcbpel/adapter/db/get_person/}get_person_plt">
    <myRole name="null">
    <ServiceName>null</ServiceName>
    <PortType>null</PortType>
    <Address>null</Address>
    </myRole>
    <partnerRole name="get_person_role">
    <ServiceName>{http://xmlns.oracle.com/pcbpel/adapter/db/get_person/}get_person</ServiceName>
    <PortType>{http://xmlns.oracle.com/pcbpel/adapter/db/get_person/}get_person_ptt</PortType>
    <Address>null</Address>
    </partnerRole>
    <conversationId>bpel://localhost/dev/Customer_Dispatcher~1.0/2413-BpInv2-BpSeq2.8-2</conversationId>
    <properties>{}</properties>
    </partnerLink>
    <2006-06-09 15:13:45,162> <DEBUG> <dev.collaxa.cube.ws> <WSIFInvocationHandler::doShortCut> Parner Property optShortCut
    <2006-06-09 15:13:45,163> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Customer_Dispatcher_1.0.jar/get_person.wsdl [ get_person_ptt::get_person(InputParameters,OutputParameters) ] - No XMLRecord headers provided
    <2006-06-09 15:13:45,164> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Customer_Dispatcher_1.0.jar/get_person.wsdl [ get_person_ptt::get_person(InputParameters,OutputParameters) ] - Starting JCA LocalTransaction
    <2006-06-09 15:13:45,164> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Customer_Dispatcher_1.0.jar/get_person.wsdl [ get_person_ptt::get_person(InputParameters,OutputParameters) ] - Invoking JCA outbound Interaction
    <2006-06-09 15:13:45,164> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> client acquired
    <2006-06-09 15:13:45,165> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> begin transaction
    <2006-06-09 15:13:45,166> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.sp.AbstractStoredProcedure execute> BEGIN XXAR_CUSOMER_WRAP_PKG.GET_PERSON_REC(P_PARTY_ID=>?, X_PERSON_REC=>?, X_RETURN_STATUS=>?, X_RETURN_MESSAGE=>?); END;
    <2006-06-09 15:13:45,173> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Customer_Dispatcher_1.0.jar/get_person.wsdl [ get_person_ptt::get_person(InputParameters,OutputParameters) ] - Committing JCA LocalTransaction
    <2006-06-09 15:13:45,173> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> commit transaction
    <2006-06-09 15:13:45,174> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> client released
    <2006-06-09 15:13:45,176> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> Returning outbound XMLRecord for OutputParameters
    <2006-06-09 15:13:45,192> <DEBUG> <dev.collaxa.cube.ws> <WSInvocationManager::invoke> operation: initiate, partnerLink: <partnerLink name="PL_ins_upd_person" partnerLinkType="{http://xmlns.oracle.com/Ins_person_M2S}Ins_person_M2S">
    <myRole name="Ins_person_M2SRequester">
    <ServiceName>null</ServiceName>
    <PortType>{http://xmlns.oracle.com/Ins_person_M2S}Ins_person_M2SCallback</PortType>
    <Address>null</Address>
    </myRole>
    <partnerRole name="Ins_person_M2SProvider">
    <ServiceName>null</ServiceName>
    <PortType>{http://xmlns.oracle.com/Ins_person_M2S}Ins_person_M2S</PortType>
    <Address>null</Address>
    </partnerRole>
    <conversationId>bpel://localhost/dev/Customer_Dispatcher~1.0/2413-BpInv3-BpSeq2.8-5</conversationId>
    <properties>{}</properties>
    </partnerLink>
    <2006-06-09 15:13:45,193> <DEBUG> <dev.collaxa.cube.ws> <WSInvocationManager::invoke> def is http://wizard.etops.ru:7780/orabpel/dev/Ins_person_M2S/Ins_person_M2S?wsdl
    <2006-06-09 15:13:45,193> <DEBUG> <dev.collaxa.cube.ws> <WSIFInvocationHandler::invoke> opName=initiate, parnterLink=<partnerLink name="PL_ins_upd_person" partnerLinkType="{http://xmlns.oracle.com/Ins_person_M2S}Ins_person_M2S">
    <myRole name="Ins_person_M2SRequester">
    <ServiceName>{http://xmlns.oracle.com/Ins_person_M2S}Ins_person_M2SCallbackService</ServiceName>
    <PortType>{http://xmlns.oracle.com/Ins_person_M2S}Ins_person_M2SCallback</PortType>
    <Address>http://wizard.etops.ru:7780/orabpel/dev/Customer_Dispatcher/1.0/PL_ins_upd_person/Ins_person_M2SRequester</Address>
    </myRole>
    <partnerRole name="Ins_person_M2SProvider">
    <ServiceName>{http://xmlns.oracle.com/Ins_person_M2S}Ins_person_M2S</ServiceName>
    <PortType>{http://xmlns.oracle.com/Ins_person_M2S}Ins_person_M2S</PortType>
    <Address>null</Address>
    </partnerRole>
    <conversationId>bpel://localhost/dev/Customer_Dispatcher~1.0/2413-BpInv3-BpSeq2.8-5</conversationId>
    <properties>{}</properties>
    </partnerLink>
    <2006-06-09 15:13:45,193> <DEBUG> <dev.collaxa.cube.ws> <WSIFInvocationHandler::doShortCut> Parner Property optShortCut
    <2006-06-09 15:13:45,193> <DEBUG> <dev.collaxa.cube.ws> <WSIFInvocationHandler::doShortCut> Calling local process http://wizard.etops.ru:7780/orabpel/dev/Ins_person_M2S/1.0 ... shortcut
    <2006-06-09 15:13:45,194> <DEBUG> <dev.collaxa.cube.ws> <WSIFInvocationHandler::invokeLocalService> location=http://wizard.etops.ru:7780/orabpel/dev/Ins_person_M2S/1.0
    <2006-06-09 15:13:45,194> <DEBUG> <dev.collaxa.cube.ws> <WSIFInvocationHandler::invokeLocalService> processId=Ins_person_M2S, revisionTag=1.0, partnerLinkName=, roleName=
    <2006-06-09 15:13:45,255> <DEBUG> <dev.collaxa.cube.ws> <WSInvocationManager::invoke> operation: check_person, partnerLink: <partnerLink name="PL_check_person" partnerLinkType="{http://xmlns.oracle.com/pcbpel/adapter/db/check_person/}check_person_plt">
    <myRole name="null">
    <ServiceName>null</ServiceName>
    <PortType>null</PortType>
    <Address>null</Address>
    </myRole>
    <partnerRole name="check_person_role">
    <ServiceName>null</ServiceName>
    <PortType>{http://xmlns.oracle.com/pcbpel/adapter/db/check_person/}check_person_ptt</PortType>
    <Address>null</Address>
    </partnerRole>
    <conversationId>bpel://localhost/dev/Ins_person_M2S~1.0/2414-BpInv0-BpSeq1.5-1</conversationId>
    <properties>{}</properties>
    </partnerLink>
    <2006-06-09 15:13:45,255> <DEBUG> <dev.collaxa.cube.ws> <WSInvocationManager::invoke> def is file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/check_person.wsdl
    <2006-06-09 15:13:45,255> <DEBUG> <dev.collaxa.cube.ws> <WSIFInvocationHandler::invoke> opName=check_person, parnterLink=<partnerLink name="PL_check_person" partnerLinkType="{http://xmlns.oracle.com/pcbpel/adapter/db/check_person/}check_person_plt">
    <myRole name="null">
    <ServiceName>null</ServiceName>
    <PortType>null</PortType>
    <Address>null</Address>
    </myRole>
    <partnerRole name="check_person_role">
    <ServiceName>{http://xmlns.oracle.com/pcbpel/adapter/db/check_person/}check_person</ServiceName>
    <PortType>{http://xmlns.oracle.com/pcbpel/adapter/db/check_person/}check_person_ptt</PortType>
    <Address>null</Address>
    </partnerRole>
    <conversationId>bpel://localhost/dev/Ins_person_M2S~1.0/2414-BpInv0-BpSeq1.5-1</conversationId>
    <properties>{}</properties>
    </partnerLink>
    <2006-06-09 15:13:45,255> <DEBUG> <dev.collaxa.cube.ws> <WSIFInvocationHandler::doShortCut> Parner Property optShortCut
    <2006-06-09 15:13:45,258> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/check_person.wsdl [ check_person_ptt::check_person(InputParameters,OutputParameters) ] - No XMLRecord headers provided
    <2006-06-09 15:13:45,258> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/check_person.wsdl [ check_person_ptt::check_person(InputParameters,OutputParameters) ] - Starting JCA LocalTransaction
    <2006-06-09 15:13:45,259> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/check_person.wsdl [ check_person_ptt::check_person(InputParameters,OutputParameters) ] - Invoking JCA outbound Interaction
    <2006-06-09 15:13:45,259> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> client acquired
    <2006-06-09 15:13:45,260> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> begin transaction
    <2006-06-09 15:13:45,262> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.sp.AbstractStoredProcedure execute> BEGIN XXAR_CUSTOMER_BPCONF_CHECK_PKG.CHECK_PERSON(P_ACTION=>?, P_PERSON=>?, X_RESULT=>?, X_CONFLICTS=>?); END;
    <2006-06-09 15:13:45,263> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/check_person.wsdl [ check_person_ptt::check_person(InputParameters,OutputParameters) ] - Committing JCA LocalTransaction
    <2006-06-09 15:13:45,264> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> commit transaction
    <2006-06-09 15:13:45,264> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> client released
    <2006-06-09 15:13:45,265> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> Returning outbound XMLRecord for OutputParameters
    <2006-06-09 15:13:45,273> <DEBUG> <dev.collaxa.cube.ws> <WSInvocationManager::invoke> operation: insert_person, partnerLink: <partnerLink name="PL_insert_person" partnerLinkType="{http://xmlns.oracle.com/pcbpel/adapter/db/insert_person/}insert_person_plt">
    <myRole name="null">
    <ServiceName>null</ServiceName>
    <PortType>null</PortType>
    <Address>null</Address>
    </myRole>
    <partnerRole name="insert_person_role">
    <ServiceName>null</ServiceName>
    <PortType>{http://xmlns.oracle.com/pcbpel/adapter/db/insert_person/}insert_person_ptt</PortType>
    <Address>null</Address>
    </partnerRole>
    <conversationId>bpel://localhost/dev/Ins_person_M2S~1.0/2414-BpInv2-BpSeq4.12-1</conversationId>
    <properties>{}</properties>
    </partnerLink>
    <2006-06-09 15:13:45,274> <DEBUG> <dev.collaxa.cube.ws> <WSInvocationManager::invoke> def is file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/insert_person.wsdl
    <2006-06-09 15:13:45,274> <DEBUG> <dev.collaxa.cube.ws> <WSIFInvocationHandler::invoke> opName=insert_person, parnterLink=<partnerLink name="PL_insert_person" partnerLinkType="{http://xmlns.oracle.com/pcbpel/adapter/db/insert_person/}insert_person_plt">
    <myRole name="null">
    <ServiceName>null</ServiceName>
    <PortType>null</PortType>
    <Address>null</Address>
    </myRole>
    <partnerRole name="insert_person_role">
    <ServiceName>{http://xmlns.oracle.com/pcbpel/adapter/db/insert_person/}insert_person</ServiceName>
    <PortType>{http://xmlns.oracle.com/pcbpel/adapter/db/insert_person/}insert_person_ptt</PortType>
    <Address>null</Address>
    </partnerRole>
    <conversationId>bpel://localhost/dev/Ins_person_M2S~1.0/2414-BpInv2-BpSeq4.12-1</conversationId>
    <properties>{}</properties>
    </partnerLink>
    <2006-06-09 15:13:45,274> <DEBUG> <dev.collaxa.cube.ws> <WSIFInvocationHandler::doShortCut> Parner Property optShortCut
    <2006-06-09 15:13:45,277> <INFO> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/insert_person.wsdl [ insert_person_ptt::insert_person(InputParameters,OutputParameters) ] - Using JCA Connection Pool - max size = <unbounded>
    <2006-06-09 15:13:45,277> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/insert_person.wsdl [ insert_person_ptt::insert_person(InputParameters,OutputParameters) ] - Looking up Resource Adapter JDNI location 'eis/DB/Slave'
    <2006-06-09 15:13:45,278> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> Instantiating outbound JCA interactionSpec oracle.tip.adapter.db.DBStoredProcedureInteractionSpec
    <2006-06-09 15:13:45,278> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> Populating outbound JCA interactionSpec oracle.tip.adapter.db.DBStoredProcedureInteractionSpec with properties: {ProcedureName=CREATE_PERSON, PackageName=XXAR_CUSOMER_WRAP_PKG}
    <2006-06-09 15:13:45,299> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/insert_person.wsdl [ insert_person_ptt::insert_person(InputParameters,OutputParameters) ] - No XMLRecord headers provided
    <2006-06-09 15:13:45,299> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/insert_person.wsdl [ insert_person_ptt::insert_person(InputParameters,OutputParameters) ] - Starting JCA LocalTransaction
    <2006-06-09 15:13:45,299> <DEBUG> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/insert_person.wsdl [ insert_person_ptt::insert_person(InputParameters,OutputParameters) ] - Invoking JCA outbound Interaction
    <2006-06-09 15:13:45,300> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> client acquired
    <2006-06-09 15:13:45,300> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> begin transaction
    <2006-06-09 15:13:45,302> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.sp.AbstractStoredProcedure execute> BEGIN XXAR_CUSOMER_WRAP_PKG.CREATE_PERSON(P_PERSON_REC=>?, X_PARTY_ID=>?, X_PARTY_NUMBER=>?, X_PROFILE_ID=>?, X_RETURN_STATUS=>?, X_RETURN_MESSAGE=>?); END;
    <2006-06-09 15:13:45,304> <ERROR> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/insert_person.wsdl [ insert_person_ptt::insert_person(InputParameters,OutputParameters) ] - Could not invoke operation 'insert_person' against the 'Database Adapter' due to:
    ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the XXAR_CUSOMER_WRAP_PKG.CREATE_PERSON API. Cause: java.sql.SQLException: ORA-00902: invalid datatype
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
         at oracle.tip.adapter.db.sp.SPConstants.createResourceException(SPConstants.java:217)
         at oracle.tip.adapter.db.sp.AbstractStoredProcedure.execute(AbstractStoredProcedure.java:104)
         at oracle.tip.adapter.db.sp.SPInteraction.executeStoredProcedure(SPInteraction.java:95)
         at oracle.tip.adapter.db.DBInteraction.executeStoredProcedure(DBInteraction.java:532)
         at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:164)
         at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:458)
         at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:452)
         at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:327)
         at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:189)
         at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:601)
         at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:317)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:188)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3408)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1836)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:166)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:252)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5438)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1217)
         at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:511)
         at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:335)
         at ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.java:1796)
         at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.sql.SQLException: ORA-00902: invalid datatype
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:625)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:180)
         at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:869)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1153)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2932)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3023)
         at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4132)
         at oracle.tip.adapter.db.sp.AbstractStoredProcedure.execute(AbstractStoredProcedure.java:92)
         ... 29 more
    <2006-06-09 15:13:45,304> <ERROR> <dev.collaxa.cube.ws> <AdapterFramework::Outbound> file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/insert_person.wsdl [ insert_person_ptt::insert_person(InputParameters,OutputParameters) ] - Rolling back JCA LocalTransaction
    <2006-06-09 15:13:45,305> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> rollback transaction
    <2006-06-09 15:13:45,306> <DEBUG> <dev.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> client released
    <2006-06-09 15:13:45,306> <DEBUG> <dev.collaxa.cube.ws> <WSIFInvocationHandler::invoke> invoke failed
    org.collaxa.thirdparty.apache.wsif.WSIFException: file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/insert_person.wsdl [ insert_person_ptt::insert_person(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'insert_person' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the XXAR_CUSOMER_WRAP_PKG.CREATE_PERSON API. Cause: java.sql.SQLException: ORA-00902: invalid datatype
    ; nested exception is:
         ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the XXAR_CUSOMER_WRAP_PKG.CREATE_PERSON API. Cause: java.sql.SQLException: ORA-00902: invalid datatype
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
         at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:570)
         at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:452)
         at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:327)
         at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:189)
         at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:601)
         at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:317)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:188)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3408)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1836)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:166)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:252)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5438)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1217)
         at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:511)
         at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:335)
         at ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.java:1796)
         at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the XXAR_CUSOMER_WRAP_PKG.CREATE_PERSON API. Cause: java.sql.SQLException: ORA-00902: invalid datatype
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
         at oracle.tip.adapter.db.sp.SPConstants.createResourceException(SPConstants.java:217)
         at oracle.tip.adapter.db.sp.AbstractStoredProcedure.execute(AbstractStoredProcedure.java:104)
         at oracle.tip.adapter.db.sp.SPInteraction.executeStoredProcedure(SPInteraction.java:95)
         at oracle.tip.adapter.db.DBInteraction.executeStoredProcedure(DBInteraction.java:532)
         at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:164)
         at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:458)
         ... 25 more
    Caused by: java.sql.SQLException: ORA-00902: invalid datatype
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:625)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:180)
         at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:869)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1153)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2932)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3023)
         at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4132)
         at oracle.tip.adapter.db.sp.AbstractStoredProcedure.execute(AbstractStoredProcedure.java:92)
         ... 29 more
    <2006-06-09 15:13:45,307> <DEBUG> <dev.collaxa.cube.ws> <WSIFInvocationHandler::invoke> Fault happened: file:/d01/oracle/as10g/integration/orabpel/domains/dev/tmp/.bpel_Ins_person_M2S_1.0.jar/insert_person.wsdl [ insert_person_ptt::insert_person(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'insert_person' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the XXAR_CUSOMER_WRAP_PKG.CREATE_PERSON API. Cause: java.sql.SQLException: ORA-00902: invalid datatype
    ; nested exception is:
         ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the XXAR_CUSOMER_WRAP_PKG.CREATE_PERSON API. Cause: java.sql.SQLException: ORA-00902: invalid datatype
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.

    Adding more to what 'Arcturus' has put across :
    1) You can check your input & output arguments to a PL/SQL function/procedure using an assign activity, in which you tend to assign a source variable to a target variable.
    Here, you can check to see, if the input & output to the DB Adapter are correct, if not, you can always recreate the adapter.
    2) You can also check the schema of the PL/SQL function, to check if it has the right inputs & outputs.
    It'd be a .xsd file in the format of <SCHEMA_NAME-OF-FUNCTION.xsd> viz. SCOTT_EMPDETAILS.xsd

  • Default rule in Order type dependend parameters - OPL8 - Order Settlement

    Hello,
    We are doing settlement of production orders via Tcode - Ko88.
    After execution of the same, system is passing an FI entry to GL - which is mentioned in the Material Master (Valuation Class - 7900) i.e. through OBYC setting.
    We have also checked the OPL8 setting (Order Type dependend Parameters - Controlling Tab) in which "Default Rule" is mentioned as - PP1 - Production Material full Settlement.
    As the system is passing an entry via "Default Rule - PP1" stored in Order Type Dependend Paramenters:
    1. What is the use of Settlement Profile (OKO7) & Allocation Structure (OKO6)?
    2. Can we make "Default Rule" field as optional (In Tcode - OPL8) ? since all the settlements are resulting in same Material GL.
    Waiting for a positive answer. Points will be assigned definitly.
    Thanks & Regards,
    Shridhar Sawant

    Hi,
    Settlement Profile:
    In the settlement profile, you define a range of control parameters for settlement. You must define the settlement profile before you can enter a settlement rule for a sender.
    If you want to settle the costs each time to just one cost center or just one G/L account, you need a settlement profile. As you cannot maintain the settlement parameters during settlement to a receiver, you must save the settlement profile either in the order type or in the model order or reference order.
    Allocation Structure:
    During settlement, costs incurred under the primary and secondary cost elements by a sender are allocated to one or more receivers. When you settle by cost element, you settle using the appropriate original cost element.
    An allocation structure comprises one or several settlement assignments. An assignment shows which costs (origin: cost element groups from debit cost elements) are to be settled to which receiver type (for example, cost center, order, and so on).
    You have two alternatives in settlement assignment:
    You assign the debit cost element groups to a settlement cost element.
    You settle by cost element - that is, the debit cost element is the settlement cost element.
    This is a good idea, for example, if the required capital spending for an asset you are building yourself is to be monitored. These costs are settled by cost element to an inventory account in Asset Accounting at the end of the year, or when the measure is complete.
    Each allocation structure must fulfil the following criteria:
    Completeness
    An allocation structure is assigned to each object to be settled. All cost elements in which costs are incurred, must be represented in the appropriate allocation structure.
    Uniqueness
    Each cost element in which costs are incurred may only appear once in an allocation structure. Only one settlement cost element may be assigned to a source within a particular allocation structure.
    Source Structure:
    A source structure contains several source assignments, each of which contains the individual cost elements or cost element intervals to be settled using the same distribution rules.
    In the settlement rule for the sender you can define one distribution rule, in which you specify the distribution and receivers for the costs for each source assignment.
    Thanks,
    Rau

  • How to use the EBS PL/SQL API from outside PL/SQL

    Hi,
    our attempts to call the stored procedures/functions of the EBS PL/SQL API via JDBC revealed the following issues:
    1. Logical values cannot be exchanged through boolean parameters as the OCI has no notion of this type. Instead we need to write PL/SQL wrappers converting boolean to integer and vice versa. Is that true or are we missing something?
    2. Complex values cannot be exchanged through record types as only PL/SQL code has a notion of this type. Instead we need to write PL/SQL wrappers converting record values to object type values. Is that true or are we missing something?
    3. Types must be defined outside of packages, i.e. in the schema, for whatever reason. Instead we need to write PL/SQL wrappers converting values of types defined in packages to values of types defined in the schema. Is that true or are we missing something?
    4. It is possible to let functions return tables so the results can be queried using SELECT * FROM TABLE. Such functions are called "table functions". Is there something similar for the other direction, i.e. is it possible to call a stored procedure and pass in a table value through an sql INSERT statement?
    5. Do we really have to write all those wrapper routines on our own or is there a PL/SQL library providing such? If not, is there some kind of code generation facility that can generate such wrappers?
    Thanks and Regards,
    Konrad

    Hi Helios,
    I belive its better to move your issue on Forum Home » Database » SQL and PL/SQL which you can get more quick responseYou are probably right! I was thinking about a different forum but I did not see this one. I just posted the question there...
    Still, if somebody has an idea here as well, just let me know ;-)
    Konrad

Maybe you are looking for

  • How can I avoid a full scan when ...

    Hello How can I avoid a full scan with I apply the aggregate function "MIN" SQL> select min(c1) from hh;    MIN(C1)          1 Execution Plan    0      SELECT STATEMENT Optimizer=CHOOSE    1    0   SORT (AGGREGATE)    2    1     TABLE ACCESS (FULL) O

  • IfWithoutElse behaves dirrently after SP14

    Hi, we have recently upgraded our PI 7.00 from SP11 to SP16, and have noticed a difference in behavoiur in th estandard function IfwithoutElse. Before the upgrade we had an example where the queues looked like this: Input1                            

  • Problem using url rewriting

    Hi! I am currently developing a struts based BC4J application. This application has to run using the internet explorer without java-script and cookies. Currently with cookies enabled everything is fine. But when i disable cookies it seems as if the a

  • Plsql Collections help

    Database table has two columns category and products. Table: catalog category products fruit apple vegetable carrot soda pepsi vegetable potato fruit grapes fruit orange vegetable cabbage soda coke i need to read the records from table catalog and st

  • How to call  Java method from SAPUI5 applications?

    Hi Experts,     Please give me information that how can I call Java method or jars from SAPUI5 applications? Thanks, Nag