Thursday, July 20, 2017

Oracle ERP- Supplier Audit - Important Points



After Supplier Is Updated, Alert On AP_SUPPLIERS Table Is Triggered Twice (Doc ID 1969553.1)

As part of enabling Oracle Alert functionality, the following trigger is created on the AP_SUPPLIERS table:

create trigger TEST_SUPP_UPD_ALERT_AU AFTER UPDATE on AP.AP_SUPPLIERS for each row
begin
insert into XXTEST_SUPP_ALERT_UPD values (:new.VENDOR_ID, :new.LAST_UPDATE_DATE);
end;

When supplier data is updated through the Supplier Master pages, multiple rows are inserted into the table XXTEST_SUPP_ALERT_UPD. The expectation is that only one row would be inserted.

Please explain / provide fix.

Thursday, April 27, 2017

Oracle SQL to validate non-english characters


We had a requirement to validate non-english characters in the data.

Well, i used standard function regexp_like(column, '[A-Z]')   considering those characters which are not replaced by this function are non-english, to my surprise it is not considering turkish characters.

select REGEXP_replace(UPPER('rn Aıklaması'), '[A-Z]','')Test from dual ;











Alternate Solution for this problem is  using : asciistr Function

If input is equal to asciistr function, then it is non-english.

select count(*) from dual where  'ĞEĞİK' <> asciistr('ĞEĞİK') ;






Wednesday, April 26, 2017

Oracle E-Business Suite : Purchase Order Type Lookup Code


PO_HEADERS_ALL
The following table describes column information for the PO_HEADERS_ALL table.
Column NameNullTypeComments
PO_HEADER_IDNOT NULLNUMBERPrimary key
AGENT_IDNOT NULLNUMBERForeign key: HR_EMPLOYEES
TYPE_LOOKUP_CODENOT NULLVARCHAR2(25)Foreign Key: PO_LOOKUP_ CODES
LAST_UPDATE_DATENOT NULLDATEN/A
LAST_UPDATED_BYNOT NULLNUMBERN/A
SEGMENT1NOT NULLVARCHAR2(20)PO number
SUMMARY_FLAGNOT NULLVARCHAR2(1)N
ENABLED_FLAGNOT NULLVARCHAR2(1)Y
VENDOR_ID NUMBERForeign key: PO_VENDORS
VENDOR_SITE_ID NUMBERForeign key: PO_VENDOR_SITES
TERMS_ID NUMBERN/A
FREIGHT_TERMS_ LOOKUP_CODE VARCHAR2(25)Foreign key: PO_LOOKUP_ CODES
CURRENCY_CODE VARCHAR2(15)N/A
APPROVED_FLAG VARCHAR2(1)Y



select * from PO_LOOKUP_CODES where lookup_type='PO TYPE';  


Friday, March 17, 2017

Oracle E-Business Suite Supplier / Supplier Site Related API's Queries



API To Update Supplier/Supplier Site


R12: AP: New Supplier Update API's in Oracle Payables (Doc ID 1618099.1)

Friday, February 24, 2017

OAF- How to get Segment values from KFF


Following is the code snippt, which can be used to get segment values from the selected KFF.


///Below is the PFR Code on Save button

         OAKeyFlexBean kffbean= (OAKeyFlexBean)webBean.findIndexedChildRecursive("kffID");     //Get the KFF bean

         KeyFlexfield kff=(KeyFlexfield)kffbean.getAttributeValue(OAWebBeanConstants.FLEXFIELD_REFERENCE);       //Getting the Reference Value
         if(kff!=null){
             if(kff.getSegment(1).getValue()!=null)
             {
                     String value = kff.getSegment(1).getValue().toString();    //This returns Value object so we can just see a object
                     String name = kff.getSegment(1).getName();                 // This returns the Segment name attached
                     String inputValue = kff.getSegment(1).getInputValue();       // This returns the Segment value when user gives as input
                    
                     System.out.println("Value -->"+ value);
                 System.out.println("name -->"+ name);
                 System.out.println("inputValue -->"+ inputValue);
             }
         }



 

Monday, February 13, 2017

Tips in ADF - for developers from OAF background

TIP # 1. How to find the backing bean of an ADF Page ?
 (In OAF, it is very easy to get the CO name which is used in a given page/region).

In ADF -- Controller logic is handled through Taskflows.

For a given page  : check the below way to get which Controller(Taskflow) is used.

Following is the page and its managed bean information.


Following is the screen for the Page file.

 Following is the content of page file in XML Code.
In the below code : (if you compare with OAF - which is based on UIX-User interface for XML) -- This is based jspx ; xml with jsp.
Top level bean in JSPX is : JSP:Root followed by : f:view

  <f:view>
    <af:document id="d1" binding="#{backingBeanScope.backing_ADFRegionsPG.d1}">
      <af:form id="f1" binding="#{backingBeanScope.backing_ADFRegionsPG.f1}"></af:form>
    </af:document>
  </f:view>

In f:view -- other tag is : af:document  
this is attached to bean -- This is bean which is attached to this page.
CTRL+CLICK on : ADFRegionsPG.d1    -- Navigates to  ADFRegionsPG.java



Backing bean information : about : package, class details of it.


Tuesday, January 10, 2017

Basic Level Comparison of OAF vs ADF - MVC Layer Execution


Hello All,

In this i will try to highlight how the page execution happens and the framework differences between OAF and ADF.

Consider the below scenario :

Display Department Data in the output.

-----------------------------------------------------------------------------------------
From OAF Perspective
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
* Following files would be required to display the data.
Model
  SampleAM.xml
  SampleAMImpl.java
  DeptVO.xml
  DeptVOImpl.java

View  
   DeptDetailsPG.xml

CO 
   DeptpDetailsCO.java
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
From ADF Perspective

Model
  SampleAM.xml
  SampleAMImpl.java
  DeptVO.xml
  DeptVOImpl.java

View  
   DeptDetailsPG.xml
   DeptDetailsPG.jspx
   DeptDetailsPGPageDef.xml

CO 
   DeptpDetailsCO.java

-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------

OAF - How to iterate rows programatically in View Object (VO) - Using RowSet or RowSetIterator


There are different requirements which we generally come across to iterate the data from VO.

Following are different approaches - we can use to get the data from VO.

You can write the below logic in : AMImpl

//Using RowSetIterator Logic 

 public void initShowEmpData()
  {
    EmpEOVOImpl vo = getEmpEOVO1();
    EmpEOVORowImpl row = null;
   
    RowSetIterator rowIter = vo.createRowSetIterator("EmpIter");
   
    while(rowIter.hasNext())
     {
       row = (EmpEOVORowImpl)rowIter.next(); //FETCH INTO
       System.out.println("EmpNO-->"+ row.getEmpno()  + " Name-->"+ row.getEname()
         + " SelectFlag-->" + row.getselectFlag()      
        );
     
     }
     rowIter.closeRowSetIterator();
   
  }

//Using FilteredRows Logic to get the filtered rows.

    public void deleteSelectedRowsNew()
       {
         EmpEOVOImpl vo = getEmpEOVO1();
         EmpEOVORowImpl row = null;
       
         Row rows[]= vo.getFilteredRows("selectFlag","Y");
         
          int selectedRowLenth = rows.length;
         
           if(selectedRowLenth>0)
             {
             
                for(int i=0;i<selectedRowLenth;i++)
                  {
                    row = (EmpEOVORowImpl)rows[i];
                    row.remove();
                  }
               OAException infoMsg = new OAException("Deleted The Selected Rows--Count-->"+selectedRowLenth,
                              OAException.INFORMATION);
                              throw infoMsg;
               }
         
           else
            {
              OAException warningMsg = new OAException("Plese Select The Rows", OAException.WARNING);
              throw warningMsg;
            }
       
       }


//Using RowQualifier

       public void showEmpDataUsingRowQualifier()
     {
         EmpEOVOImpl vo = getEmpEOVO1();
         EmpEOVORowImpl row = null;
       
     System.out.println("Using --showEmpDataUsingRowQualifier Logic");
       
         oracle.jbo.server.RowQualifier rowQualifer = new RowQualifier(vo);
         rowQualifer.setWhereClause("Deptno= 10 and Job='SALESMAN'");
         Row rows[] = vo.getFilteredRows(rowQualifer) ;
       
         int selectedRowLenth = rows.length;
       
          if(selectedRowLenth>0)
            {
             
               for(int i=0;i<selectedRowLenth;i++)
                 {
                   row = (EmpEOVORowImpl)rows[i];
                 
                     System.out.println("EmpNO-->"+ row.getEmpno()  + " Name-->"+ row.getEname()
                       + " SelectFlag-->" + row.getselectFlag() );
                     
                 }
              }

     }