Form Personalization : Calling PL/SQL Procedure

Requirement is just like to insert item details in custom table along with in base table MTL_SYSTEM_ITEMS_B.

Table :
CREATE TABLE TEST_ITEM_TBL
(
   ITEM          VARCHAR2 (100),
   DESCRIPTION   VARCHAR2 (100)
);

Procedure:
CREATE OR REPLACE PROCEDURE TEST_ITEM_PROC (P_ITEM VARCHAR2, P_DESC VARCHAR2)
IS
   V_ITEM   VARCHAR2 (100);
BEGIN
   BEGIN
      SELECT ITEM
        INTO V_ITEM
        FROM TEST_ITEM_TBL
       WHERE ITEM = P_ITEM;
   EXCEPTION
      WHEN OTHERS
      THEN
         V_ITEM := NULL;
   END;

   IF V_ITEM IS NULL
   THEN
      INSERT INTO TEST_ITEM_TBL (ITEM, DESCRIPTION)
           VALUES (P_ITEM, P_DESC);
   END IF;

   COMMIT;
END TEST_ITEM_PROC;

Navigation: Inventory Vision Operations --> Items --> Master Items
Form Personalization : Calling PL/SQL Procedure

Navigation: Help --> Diagnostics --> Custom Code --> Personalize
Form Personalization : Calling PL/SQL Procedure




*/

No comments:

Post a Comment