Showing posts with label Oracle. Show all posts
Showing posts with label Oracle. Show all posts

Wednesday 29 April 2020

Upload File to Application Server Oracle OAF

Upload-File-to-Application-Server-Oracle-OAF

This library is the step of our journey to build java based utilities, Use this Utilities and report if found any Bug.
Source is available here 

Setup for Installation

Install OAF and configure its envirnoment as per your Oracle E-Buisness Suite.

Read Documentations: Documents.
Open This project in Oracle JDeveloper


OAF Current Row Values

Add Current Row Values in Event Parameters.


Parameters: Open dialog and add parameters by choosing your own Parameter name and its value from current row.

${oa.FileSetupVO1.SrlFileSetupId}

FileSetupVO1 is my view name
SrlFileSetupId is my field from view


Tuesday 21 April 2020

How to get Current Row in OAF

We can Get current Row Using findRowByRef method of ApplicationModule.


Here Example Code.


Code of my AM
UploadFileAMImpl am = (UploadFileAMImpl)pageContext.getApplicationModule(webBean);

Code of RowImp
FileSetupVORowImpl setupRow = (FileSetupVORowImpl) am.findRowByRef(pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE)) ; 



findRowByRef is standard method that will return Current Rowimplement
.
Note: Your Action Type must be FireAction. findRowByRef  will return null for firePartialAction.


Wednesday 25 March 2020

Import DMP file from one schema to another

imp FILE=D:\dmpFile.dmp FULL=N fromuser=fromUser touser=ToUser LOG=D:\LOG.TXT



imp FILE=D:\25mar2020.dmp FULL=N fromuser=apps touser=pos LOG=D:\LOG.TXT

change tablespace of table Oracle


Runtime this Query and Move one table space to other.

SELECT 'ALTER TABLE <SCHEMA>.' || TABLE_NAME ||' MOVE TABLESPACE '||' <TABLESPACE_NAME> ' FROM dba_tables WHERE OWNER = '<SCHEMA>' AND TABLESPACE_NAME <> '<TABLESPACE_NAME>'


SELECT 'ALTER TABLE POS.' || TABLE_NAME ||' MOVE TABLESPACE '||' POS ' FROM dba_tables WHERE OWNER = 'POS'



Command :

ALTER TABLE POS.APPS_CATALOG_HEADER MOVE TABLESPACE  POS 

Thursday 19 March 2020

Java File.deleteOnExit() method

  1. import java.io.File;  
  2. import java.io.IOException;  
  3. public class DeleteOnExitExample  
  4. {  
  5. public static void main(String[] args)  
  6. {  
  7. File temp;  
  8. try  
  9. {  
  10. temp = File.createTempFile("abc"".temp");     //creating a .temp file  
  11. System.out.println("Temp file created at location: " + temp.getAbsolutePath());      
  12. temp.deleteOnExit();                     //delete file on runtime exit  
  13. System.out.println("Temp file exists : " + temp.exists());  
  14. }   
  15. catch (IOException e)  
  16. {  
  17. e.printStackTrace();  
  18. }  
  19. }  
  20. }  

Wednesday 18 March 2020

Update file to server OAF java

    public void uploadFileToServer(OAPageContext pageContext,String fileName,BlobDomain pBlobDomain)
    {
 
    try
    {
     File file = new File("/opt/apps/apps_st/comn/temp", fileName);
     FileOutputStream output =  new FileOutputStream(file);
    for (int bytes = 0; bytes < pBlobDomain.getLength(); bytes++)
    {
    output.write(pBlobDomain.getInputStream().read());
    }
    System.out.println(" file writing");
        output.close();
    }
    catch (Exception e)
    {
    e.printStackTrace();
    throw new OAException(e.getMessage(),OAException.ERROR);
    }
 
        throw new OAException(("file size:"+pBlobDomain.getLength()),OAException.ERROR);
    }

Saturday 14 March 2020

How to access APEX application from other Computer

If you want to access/operate Apex application from other computer then Case 1 applicable Otherwise if you want locally then Case 2 applicable.
Case 1. URL : http://ComputerName:Port/apex
or http://IPaddress:Port/apex
Case 2. URL : http://localhost:/apex
For Case 1 if you are not able to access the application then have to enable network access true.
To do so, you have to log on as SYS with SYSDBA privilege and execute the following command.
execute dbms_xdb.setListenerLocalAccess(l_access => FALSE);
Just copy the above command and paste into your SQL Editor and execute. After scuccessfull execution of the above command, if the remote computer name is ABC and apex access port 8080 then your url will be as bellow-
http://abc:8080/apex
If the remote computer IP is 119.18.144.201 and apex access port 8080 then your url will be as bellow-
http://119.18.144.201:8080/apex

Thursday 12 March 2020

JDeveloper Screen display problems while scrolling


JDeveloper on Windows using a laptop had serious problems with the display when the IDE tried to scroll as it was leaving visible marks.
 It ended up that the remedy was adding 
AddVMOption -Dsun.java2d.noddraw=true at the $JDEV_HOME/jdev/bin/jdev.conf file.

Sunday 2 February 2020

HOW TO DELETE A DFF CONTEXT

Sometime I’m quite annoyed by the typo mistake when creating a DFF context. The DFF segment screen doesn’t allow deletion of context. Fortunately, Oracle has internal API to do such thing. Following is a sample.
–*******************************************
–* Delete a descriptive flexfield
–*******************************************
SET ECHO OFF
SET FEEDBACK OFF
SET SERVEROUTPUT ON SIZE 1000000
DECLARE
l_application_id                NUMBER := 0;
l_descriptive_flexfield_name    VARCHAR2(100) :=  ‘FND_COMMON_LOOKUPS’ ;
l_descriptive_flex_context_cod  VARCHAR2(100) :=  ‘XFND_CLWW_PURGE_FOLDER’;
BEGIN
–FND_DESCRIPTIVE_FLEXS_PKG –this package is for DFF
–FND_DESCR_FLEX_CONTEXTS_PKG –this package is for DFF Context
–FND_DESCR_FLEX_COL_USAGE_PKG –this package is for DFF Column useage
–When creating a new DFF Context, it will check the DFF Column usage if the context is already used.
–so when deleting a DFF Context, both the context and column usage should be deleted.
FOR c IN (SELECT application_column_name
FROM fnd_descr_flex_column_usages
WHERE application_id = l_application_id
AND descriptive_flexfield_name = l_descriptive_flexfield_name
AND descriptive_flex_context_code = l_descriptive_flex_context_cod)
LOOP
fnd_descr_flex_col_usage_pkg.delete_row(
x_application_id                => l_application_id
,x_descriptive_flexfield_name    => l_descriptive_flexfield_name
,x_descriptive_flex_context_cod  => l_descriptive_flex_context_cod
,x_application_column_name       => c.application_column_name
);
END LOOP;
fnd_descr_flex_contexts_pkg.delete_row(
x_application_id                => l_application_id,
,x_descriptive_flexfield_name    => l_descriptive_flexfield_name
,x_descriptive_flex_context_cod  => l_descriptive_flex_context_cod
);
–commit;
end;

Thursday 2 January 2020

1404: Please first load this entity or check protect and custom level of MESSAGE 'POC_APPR/ACC_APPR_ACCEPT'.

1404: Please first load this entity or check protect and custom level of MESSAGE 'POC_APPR/ACC_APPR_ACCEPT'.


Solution;

From the menu in Workflow Builder, choose Help > About Oracle Workflow Builder 2.6.
Change the Access Level to 0 and select allow modifications of customized objects.
Hope it helps,

Tuesday 17 December 2019

Compile Oracle form scripts

For single form

frmcmp_batch userid=apps/apps module=/opt/oracle/fs1/EBSapps/appl/au/12.0.0/forms/US/Form.fmb output_file=/opt/oracle/fs1/EBSapps/appl/fnd/12.0.0/forms/US/Form.fmx module_type=form batch=no compile_all=yes



For all forms/Lib

Copy following code and paste in notepad and save as Compile.cmd

@ECHO OFF 
cls 
Echo compiling libraries 10g .... 
for %%f IN (*.pll) do frmcmp userid=User_name/pass@orcl module=%%f batch=yes module_type=library compile_all=yes window_state=minimize 
ECHO libraries compilation complete
ECHO ----------------------------------
Echo compiling menus 10g .... 
for %%f IN (*.mmb) do frmcmp userid=User_name/pass@orcl module=%%f batch=yes module_type=menu compile_all=yes window_state=minimize 
ECHO menus compilation complete
ECHO ----------------------------------
Echo compiling forms 10g .... 
for %%f IN (*.fmb) do frmcmp userid=User_name/pass@orcl module=%%f batch=yes module_type=form compile_all=yes window_state=minimize 
ECHO form compilation complete
ECHO ----------------------------------
ECHO Form Compilation complete

OADBTransactionImpl in Oracle Application Framework (OAF)

OADBTransactionImpl is a class in Oracle Application Framework (OAF), which is a framework for building Oracle E-Business Suite applications...