Create Single LOV (From Backend) and Fill Multiple Fields in Webadi

Create Single LOV (From Backend)  and Fill Multiple Fields in Webadi:-==============================================================
--====================================================


CREATE TABLE APPS.XXSD_WEB_ADI_TL
(
  EMPLOYEE_NUMBER  VARCHAR2(100 BYTE),
  FIRST_NAME       VARCHAR2(100 BYTE),
  LAST_NAME        VARCHAR2(100 BYTE),
  DATE_OF_BIRTH    DATE,
  GRADE            VARCHAR2(10 BYTE),
  REMARKS          VARCHAR2(100 BYTE),
  ATTRIBUTE1       VARCHAR2(100 BYTE),
  ATTRIBUTE2       VARCHAR2(100 BYTE),
  ATTRIBUTE3       VARCHAR2(100 BYTE),
  ATTRIBUTE4       VARCHAR2(100 BYTE),
  ATTRIBUTE5       VARCHAR2(100 BYTE),
  ATTRIBUTE6       VARCHAR2(100 BYTE),
  ATTRIBUTE7       VARCHAR2(100 BYTE),
  ATTRIBUTE8       VARCHAR2(100 BYTE),
  ATTRIBUTE9       VARCHAR2(100 BYTE),
  ATTRIBUTE10       VARCHAR2(100 BYTE)
)

--====================================================

select * from XXSD_WEB_ADI_TL

--====================================================

CREATE OR REPLACE PACKAGE APPS.XXSD_WEB_ADI_PROC  AS

  PROCEDURE INSERT_XXSD_WEB_ADI_TL (
 P_EMPLOYEE_NUMBER  VARCHAR2
,P_FIRST_NAME VARCHAR2
,P_LAST_NAME VARCHAR2
,P_DATE_OF_BIRTH DATE
,P_GRADE VARCHAR2
,P_REMARKS VARCHAR2
,P_ATTRIBUTE1 VARCHAR2
,P_ATTRIBUTE2 VARCHAR2
,P_ATTRIBUTE3 VARCHAR2
,P_ATTRIBUTE4 VARCHAR2
,P_ATTRIBUTE5 VARCHAR2
,P_ATTRIBUTE6 VARCHAR2
,P_ATTRIBUTE7 VARCHAR2
,P_ATTRIBUTE8 VARCHAR2
,P_ATTRIBUTE9 VARCHAR2
,P_ATTRIBUTE10 VARCHAR2
);    
END;

--====================================================

CREATE OR REPLACE PACKAGE BODY APPS.XXSD_WEB_ADI_PROC  AS

PROCEDURE INSERT_XXSD_WEB_ADI_TL (
 P_EMPLOYEE_NUMBER  VARCHAR2
,P_FIRST_NAME VARCHAR2
,P_LAST_NAME VARCHAR2
,P_DATE_OF_BIRTH DATE
,P_GRADE VARCHAR2
,P_REMARKS VARCHAR2
,P_ATTRIBUTE1 VARCHAR2
,P_ATTRIBUTE2 VARCHAR2
,P_ATTRIBUTE3 VARCHAR2
,P_ATTRIBUTE4 VARCHAR2    
,P_ATTRIBUTE5 VARCHAR2
,P_ATTRIBUTE6 VARCHAR2
,P_ATTRIBUTE7 VARCHAR2
,P_ATTRIBUTE8 VARCHAR2
,P_ATTRIBUTE9 VARCHAR2
,P_ATTRIBUTE10 VARCHAR2     
) IS         
      
      lc_sqlerrm              VARCHAR2 (2000);
      lc_error_msg            VARCHAR2 (2000);
     
      l_responsibility_id     NUMBER := apps.fnd_global.resp_id;
      l_resp_application_id   NUMBER := apps.fnd_global.resp_appl_id;
      l_org_id                NUMBER := apps.fnd_global.org_id;
      l_user_id               NUMBER := apps.fnd_global.user_id;
     
     
    BEGIN
      
    INSERT INTO XXSD_WEB_ADI_TL (
    EMPLOYEE_NUMBER
    ,FIRST_NAME
    ,LAST_NAME
    ,DATE_OF_BIRTH
    ,GRADE
    ,REMARKS
    ,ATTRIBUTE1
    ,ATTRIBUTE2
    ,ATTRIBUTE3
    ,ATTRIBUTE4
    ,ATTRIBUTE5
    ,ATTRIBUTE6
    ,ATTRIBUTE7
    ,ATTRIBUTE8
    ,ATTRIBUTE9
    ,ATTRIBUTE10
     )
    VALUES (
    P_EMPLOYEE_NUMBER
    ,P_FIRST_NAME
    ,P_LAST_NAME
    ,P_DATE_OF_BIRTH
    ,P_GRADE
    ,P_REMARKS
    ,P_ATTRIBUTE1
    ,P_ATTRIBUTE2
    ,P_ATTRIBUTE3
    ,P_ATTRIBUTE4
    ,P_ATTRIBUTE5
    ,P_ATTRIBUTE6
    ,P_ATTRIBUTE7
    ,P_ATTRIBUTE8
    ,P_ATTRIBUTE9
    ,P_ATTRIBUTE10
         );

    COMMIT;
     
    EXCEPTION WHEN OTHERS THEN
    lc_sqlerrm := SUBSTR(SQLERRM,1,1999);

    raise_application_error (-20001, 'MAIN_OTHER_EXCEPTION - ' || lc_sqlerrm);
    END;
         
END;



--===============================================================
select EMPLOYEE_NUMBER, FIRST_NAME, LAST_NAME,FULL_NAME, DATE_OF_BIRTH
from PER_ALL_PEOPLE_F A
WHERE first_name not like '%.%'  and last_name not like '%.%'
--===============================================================

API:-



BEGIN
BNE_INTEGRATOR_UTILS.CREATE_TABLE_LOV
                  (p_application_id       => 20003,  
                   p_interface_code       => 'XXSD_TEST5_XINTG_INTF1', 
                   P_INTERFACE_COL_NAME   => 'P_ATTRIBUTE4',   /* Interface Column Name from where the user double clicks to open the LOV and P_ID_COL is also passed to this spreadsheet column. */
                   P_ID_COL               => 'EMPLOYEE_NUMBER', /*  this value save into the table */
                   P_MEAN_COL             => 'EMPLOYEE_NUMBER', /* this is visible when you click on adi lov  */
                   P_DESC_COL             => 'FIRST_NAME, LAST_NAME,FULL_NAME,DATE_OF_BIRTH ', /* Description for recognizining the correct value */
                   P_TABLE                => 'PER_ALL_PEOPLE_F',  /*  */
                   P_ADDL_W_C             => '1=1',  /*  where Condition */
                   P_WINDOW_CAPTION       => 'Select * Value', --LOV window caption
                   P_WINDOW_WIDTH         => 400, --Window Width. Optional.
                   P_WINDOW_HEIGHT        => 300, --Window Height. Optional
                   P_TABLE_BLOCK_SIZE     => 10,  --Number of records to be displayed in the LOV
                   P_TABLE_SORT_ORDER     => 'ascending', 
                   P_USER_ID              => 1111
                  ,P_TABLE_COLUMNS        => 'EMPLOYEE_NUMBER,FIRST_NAME, LAST_NAME, FULL_NAME,DATE_OF_BIRTH',  
                   P_TABLE_SELECT_COLUMNS => 'P_ATTRIBUTE4,P_ATTRIBUTE5,P_ATTRIBUTE6,P_ATTRIBUTE7,P_ATTRIBUTE8', 
                   P_TABLE_COLUMN_ALIAS   => 'P_ATTRIBUTE4,P_ATTRIBUTE5,P_ATTRIBUTE6,P_ATTRIBUTE7,P_ATTRIBUTE8', 
                   P_TABLE_HEADERS        => 'Employee No, First Name, Last Name, Full Name, DOB', 
                   P_POPLIST_FLAG         =>'N' /*  N -> For LOV , Y -> For PopList */
);

EXCEPTION
when NO_DATA_FOUND then
dbms_output.put_line('error no data ' ||sqlerrm);
when others then
dbms_output.put_line('error ' ||sqlerrm);
end;



--===============================================================

Syntax:-

Layout:-
Output:-

Comments

Popular posts from this blog

E-Text Report In Fusion | Types of E-Text reports

Supplier API's

How to pass default Parameter in cursor