Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

iProcurement
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

Lets assume that you have a requirement to make the Account Generator in Oracle iProcurement (11.5.10)  rebuild accounts

 whenever there is a change in Requisition Line Descriptive Flex Fields Attribute5 or Attribute6 or both.

Until 11.5.9, you will be implementing this by placing some code in por_custom_pkg.set_rebuild_dist_value
The code will look similar to below( although might require slight tweak as per your requirements):-

BEGIN
  x_return_code :=
0;
  x_error_msg   :=
' ';
 
/* apassi Jan 2004. If the DFF value has been changed then we must
  rebuild the Code Combination taking into consideration all the segments */

  END IF;
  IF nvl(line_att5,
'XXX') != nvl(attribute8, 'XXX')
  THEN
    returnvalue :=
'Y';
  END IF;
  IF nvl(line_att6,
'XXX') != nvl(attribute9, 'XXX')
  THEN
    returnvalue :=
'Y';
  END IF;
END;

It looks quite simple, doesn’t it? Indeed it is quite simple, all you require is the above few lines of code in por_custom_pkg, following which changes to your Line Descriptive Flex 5 & 6 will re-initiate Proc Account Generator workflow.

Well,  welcome 11.5.10 !!
The steps in 11.5.10 will be as below( although each step is visually explained in this article with further breakdowns)
a. Extend the Entity Object that contains these attributes.
b. The Extended EO will introduce business attribute properties for these DFF Attributes. This will tell the Oracle iProc engine to regenerate the accounts.
c. Substitute the standard EO by Extended EO
d. Bounce the entire middle tier, try your luck by merely bouncing the Apache.

OK, here with go into the details of each step. These steps are documented in Oracle iProc Manual too, but in a language that can only be understood by Experienced Oracle guys. Hence this article is an effort from me to explain the steps in naïve manner.

Step 1.
FTP and bring all the iProc BC4J classes and XML files onto your PC. Ensure that the location of those packages is included in the CLASSPATH that is defined against your JDeveloper Project. You will need to import server.xml from respective package to open up the BC4J in jDeveloper.

Step 2
Extend the Entity Object PoRequisitionLineEO to create a new entity object named xxxxPoRequisitionLineEO.
Select the BC4J Package that contains the EO that you need to extend. In my case I will select oracle.apps.icx.por.schema.server and right click to see the option for “New Entity Object” 



Now define a new Entity Object xxxxPoRequisitionLineEO. Move the cursor to Extends Entity and click on button Browse to select PoRequisitionLineEO



Now click on Next,    until you see the New from Table button as below. Click on that “New from Table” button.
As in the picture below, select Attribute5 and Attribute6 ( or the appropriate attributes in your case).

Select Attribute5 anf 6 from Available Attributes for the EO being extended
Select Attribute5 anf 6 from Available Attributes for the EO being extended



Now, your EO will look somewhat similar to below.

New EO with desired Attributes
New EO with desired Attributes



Please note that the schema object is PO_REQUISITION_LINES_ALL, simply because in this example, we wish to rebuild the iProcurement Account whenever a change is made to certain attributes in Requisition Line DFF.

Step 3
One of the most important steps is to define these attributes as Business Attributes, to help re-initiate account generator workflow.

Select on Tab “Attribute Properties”

 

As in above picture, Name=AccountLineBizAttrSet
Value=Y ……click on Add

Step 4
Once having created the Extended Entity Object, next we need to create a Substitution such that our extended EO xxxxPoRequisitionLineEO will replace the standard EO PoRequisitionLineEO

For doing so, right click on the jpx file within which you had opened iProc’s BC4J packages(this was done by importing server.xml initially). Once you right click jpx file, you will see an option “Edit Business Components Project”.


Following this, select “Substitution” option as in the list below

Select Substitution option
Select Substitution option



Now, finally you can implement substitution.  In the left hand pane select PoRequisitionLineEO under the package oracle.apps.icx.por.schema.server. In the right hand side pane, select xxxxPoRequisitionLineEO from your appropriate package.

Implement substitution here
Implement substitution here



Now, this substitution will create a .jpx file for you. In my case, I will name it xxicIcxPorAccReBuild.jpx
This file will look like below
######## Begin xxicIcxPorAccReBuild.jpx #######
<?xml version="1.0" encoding='windows-1252'?>
<!DOCTYPE JboProject SYSTEM "jbo_03_01.dtd">

<JboProject
   Name="xxxxIcxPorAccReBuild"
   SeparateXMLFiles="true"
   PackageName="" >
   <DesignTime>
      <Attr Name="_version" Value="9.0.3.13.75" />
      <Attr Name="_jprName" Value="xxxxIcxPorAccReBuild.jpr" />
      <Attr Name="_ejbPackage" Value="false" />
   </DesignTime>
   <Substitutes>
      <Substitute OldName ="oracle.apps.icx.por.schema.server.PoRequisitionLineEO" NewName ="oracle.apps.icx.por.schema.server.xxxxPoRequisitionLineEO" />
   </Substitutes>
</JboProject>
######## End xxicIcxPorAccReBuild.jpx #######

Now, to  move this .jpx file from one environment to another( to move the substitution definition) you can either use personalization or you may use the script below
######################Script to load substitution definition to new environment######################
##By Anil Passi
##Please note that this can very well be done by simply exporting and importing the personalizations too.
##This is so, because the Substitution is stored as a personalization in Oracle.
##Anyhow, because I like to experiment, i prefered using JPXImporter, and it worked
MACHINE_NAME=0
PORT_NUMBER=0
export MACHINE_NAME
export PORT_NUMBER
getPortMachine()
{
    MACHINE_NAME=`sqlplus -s apps/$APPS_PWD <<EOF
                       set pages 0
                       set lines 1023
                       select fnd_profile.value('CSF_EMAP_DS_HOST') from dual ;
                       exit
                       EOF`

    PORT_NUMBER=`sqlplus -s apps/$APPS_PWD <<EOF
                        set pages 0
                        set feed off
                        select fnd_profile.value('CSF_MAP_DB_PORT') from dual ;
                        exit
                        EOF`
}
getPortMachine
echo "**********************************"
echo $MACHINE_NAME is Machine Name
echo "**********************************"
sleep 5
echo $PORT_NUMBER is port number
echo "**********************************"
sleep 5
"Echo load substitution"
adjava \
oracle.jrad.tools.xml.importer.JPXImporter $XXPO_TOP/bin/xxxxIcxPorAccReBuild.jpx \
-username apps \
-password $APPS_PWD \
-dbconnection "(description=(address_list=(address=(community=tcp.world)(protocol=tcp)(host=$MACHINE_NAME)(port=$PORT_NUMBER)))(connect_data=(sid=$TWO_TASK)))"
######################END OF Script to load substitution ######################
Step 5.
Hang on, not there as yet. You need to deploy the new EO and its implementation on the Unix server under appropriate directory structure.
This will involve three files, i.e. xxxxPoRequisitionLineEO.xml, xxxxPoRequisitionLineEOImpl.java & xxxxPoRequisitionLineEOImpl.class
Please note that it is not mandatory to deploy the .java file, but I recommend this to be a good practice.

xxxxPoRequisitionLineEO.xml will contain the EO definition and this file is generated by jDeveloper to hold meta info of extended EO.
xxxxPoRequisitionLineEOImpl will generate by your favourite jDeveloper too.

If you feel confident, the entire Rebuilding functionality can be implemented without touching jDeveloper, but for that you will be directly modifying the files that I have pasted below. In my personal opinion use jDeveloper.
######### Beginning of xxxxPoRequisitionLineEOImpl.java#########
package oracle.apps.icx.por.schema.server;
import oracle.jbo.server.EntityDefImpl;
import oracle.jbo.server.AttributeDefImpl;
import oracle.jbo.Key;
//  ---------------------------------------------------------------
//  ---    Anil Passi iProc Rebuild account.
//  ---------------------------------------------------------------

public class xxxxPoRequisitionLineEOImpl extends PoRequisitionLineEOImpl
{
  protected static final int MAXATTRCONST = EntityDefImpl.getMaxAttrConst("oracle.apps.icx.por.schema.server.PoRequisitionLineEO");
  private static oracle.apps.fnd.framework.server.OAEntityDefImpl mDefinitionObject;

  /**
   *
   * This is the default constructor (do not remove)
   */
  public xxxxPoRequisitionLineEOImpl()
  {
  }

  /**
   *
   * Retrieves the definition object for this instance class.
   */
  public static synchronized EntityDefImpl getDefinitionObject()
  {
    if (mDefinitionObject == null)
    {
      mDefinitionObject = (oracle.apps.fnd.framework.server.OAEntityDefImpl)EntityDefImpl.findDefObject("oracle.apps.icx.por.schema.server.xxxxPoRequisitionLineEO");
    }
    return mDefinitionObject;
  }

  //  Generated method. Do not modify.

  protected Object getAttrInvokeAccessor(int index, AttributeDefImpl attrDef) throws Exception
  {
    if (index == ATTRIBUTE5)
    {
      return getAttribute5();
    }
    if (index == ATTRIBUTE6)
    {
      return getAttribute6();
    }
    return super.getAttrInvokeAccessor(index, attrDef);
  }
  //  Generated method. Do not modify.

  protected void setAttrInvokeAccessor(int index, Object value, AttributeDefImpl attrDef) throws Exception
  {
    if (index == ATTRIBUTE5)
    {
      setAttribute5((String)value);
      return;
    }
    if (index == ATTRIBUTE6)
    {
      setAttribute6((String)value);
      return;
    }
    super.setAttrInvokeAccessor(index, value, attrDef);
    return;
  }

  /**
   *
   * Gets the attribute value for Attribute5, using the alias name Attribute5
   */
  public String getAttribute5()
  {
    return super.getAttribute5();
  }

  /**
   *
   * Sets <code>value</code> as the attribute value for Attribute5
   */
  public void setAttribute5(String value)
  {
    super.setAttribute5(value);
  }
  /**
   *
   * Gets the attribute value for Attribute6, using the alias name Attribute6
   */
  public String getAttribute6()
  {
    return super.getAttribute6();
  }
 /**
   *
   * Sets <code>value</code> as the attribute value for Attribute6
   */
  public void setAttribute6(String value)
  {
    super.setAttribute6(value);
  }
  /**
   *
   * Creates a Key object based on given key constituents
   */
  public static Key createPrimaryKey(oracle.jbo.domain.Number requisitionLineId)
  {
    return new Key(new Object[] {requisitionLineId});
  }
}
######### end of xxxxPoRequisitionLineEOImpl.java#########


#########Begin New EO Definition within xml########
<?xml version="1.0" encoding='windows-1252'?>
<!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">

<Entity
   Name="xxxxPoRequisitionLineEO"
   Extends="oracle.apps.icx.por.schema.server.PoRequisitionLineEO"
   DBObjectType="table"
   DBObjectName="PO_REQUISITION_LINES_ALL"
   AliasName="xxxxPoRequisitionLineEO"
   BindingStyle="Oracle"
   UseGlueCode="false"
   CodeGenFlag="4"
   RowClass="oracle.apps.icx.por.schema.server.xxxxPoRequisitionLineEOImpl"
   DefClass="oracle.apps.fnd.framework.server.OAEntityDefImpl"
   CollClass="oracle.apps.fnd.framework.server.OAEntityCache" >
   <DesignTime>
      <Attr Name="_isCodegen" Value="true" />
      <Attr Name="_version" Value="9.0.3.13.75" />
      <AttrArray Name="_publishEvents">
      </AttrArray>
   </DesignTime>
   <Attribute
      Name="Attribute5"
      Precision="255"
      Type="java.lang.String"
      ColumnName="ATTRIBUTE5"
      ColumnType="VARCHAR2"
      SQLType="VARCHAR"
      TableName="PO_REQUISITION_LINES_ALL" >
      <Properties>
         <Property Name ="AccountLineBizAttrSet" Value ="Y" />
      </Properties>
      <DesignTime>
         <Attr Name="_OverrideAttr" Value="true" />
      </DesignTime>
   </Attribute>
   <Attribute
      Name="Attribute6"
      Precision="255"
      Type="java.lang.String"
      ColumnName="ATTRIBUTE6"
      ColumnType="VARCHAR2"
      SQLType="VARCHAR"
      TableName="PO_REQUISITION_LINES_ALL" >
      <Properties>
         <Property Name ="AccountLineBizAttrSet" Value ="Y" />
      </Properties>
      <DesignTime>
         <Attr Name="_OverrideAttr" Value="true" />
      </DesignTime>
   </Attribute>
</Entity>
#########End New EO Definition within xml########

Last Step
#######Finish Recompilation of deployment#######
Recompile the .java file on the server as below. I do this to ensure that everything will work in production without any grief.
#Note that i should have actually created a new directory structure to keep
#this extended file. But if i were to redo this, i would create a new directory structure
#Neverthless, this is still safe to Recompile your deployment on Server itself.

echo deploy xxxxPoRequisitionLineEOImpl.class
cp $XXPO_TOP/bin/xxxxPoRequisitionLineEOImpl.class $JAVA_TOP/oracle/apps/icx/por/schema/server/xxxxPoRequisitionLineEOImpl.class

echo deploy xxxxPoRequisitionLineEOImpl.java
cp $XXPO_TOP/bin/xxxxPoRequisitionLineEOImpl.java $JAVA_TOP/oracle/apps/icx/por/schema/server/xxxxPoRequisitionLineEOImpl.java

echo deploy xxxxPoRequisitionLineEO.xml
cp $XXPO_TOP/bin/xxxxPoRequisitionLineEO.xml $JAVA_TOP/oracle/apps/icx/por/schema/server/xxxxPoRequisitionLineEO.xml

cd $JAVA_TOP/oracle/apps/icx/por/schema/server
echo "Now compiling....."
javac xxxxPoRequisitionLineEOImpl.java

#######Finish Recompilation of deployment#######

Your comments are welcome, if you feel I should elaborate any section further. I believe almost every second client on 11.5.10 iProcurement will have to implement this functionality.

Thanks,
Anil Passi

 


Anil Passi

Comments   

0 #1 venkatesh 2006-10-18 00:00
I did everything mentioned here. But the changes are not gettingpicked up. I am getting an error.

About page on the LOV shows that No VO is associated with the page. Neither the old nor the new one.

Is there a bug ?
Quote
0 #2 venkatesh 2006-10-18 00:00
I did everything mentioned here. But the changes are not gettingpicked up. I am getting an error.

About page on the LOV shows that No VO is associated with the page. Neither the old nor the new one.

Is there a bug ?
Quote
0 #3 Anil Passi 2006-10-19 00:00
Hi Venkat,

None of the steps above pertain to View Objects or LOV.

Are you trying to rebuild Charge Account in 11.5.10 in iProc?

I have successfully implemented the steps listed above for a client of mine, and it has been live for 10months without any issues.

I guess you should email me the precise change that you are trying to implement.
My email is

Thanks,
An il Passi
Quote
0 #4 Anil Passi 2006-10-19 00:00
Hi Venkat,

None of the steps above pertain to View Objects or LOV.

Are you trying to rebuild Charge Account in 11.5.10 in iProc?

I have successfully implemented the steps listed above for a client of mine, and it has been live for 10months without any issues.

I guess you should email me the precise change that you are trying to implement.
My email is

Thanks,
An il Passi
Quote
0 #5 Ashish 2007-04-23 00:00
Hi Anil,
Quere here..
EOs are not UI specific objects, they can be shared across multiple UI pages thru VOs. Substitution creates a site level personalization .
Having said so, EO substitution will be in effect for all the pages that make use of the EO?
And how about VOs and AMs?
Kindly confirm.

Thanks-
As hish.
Quote
0 #6 Anil Passi 2007-04-23 00:00
Hi Ashish,

EO, VO and AM are all substituted at SITE LEVEL.
Hence their effect will be felt accross application. One needs to keep this in mind when designing extensions.

Controller can be substituted via personalization at responsibility, site, function etc levels.

But yes, all BC4J substitution happen at SITE LEVEL only

Thanks,
Anil Passi
Quote
0 #7 FD 2007-07-10 12:06
Hi Anil,

I have a requirement of making customization on iProc. While generating the charge account if the code combination is not enabled than a message should come on the page stating the charge account generated by the workflow. Currently it is giving me a hyperlink 'Enter value'. Probably beside/below to this the expected charge account should come.

Importan t to note that we are currently in 11.5.9 and would be migrating to 11.5.10 in 2mths.

I am totaly a novice in iProc.

Please help.

Cheers,
Fanish
Quote
0 #8 APassi 2007-07-10 20:13
Hi Fanish

If the charge account is invalid or incomplete then iProc will not return anything into the Accounting KFF.

On the contrary, in BackOffice D2K screen, if the charge account is incomplete then KFF gets populated with partial segments. But alas, in iProc it returns absolutely nothing in KFF in case the Account Generation fails.

Thanks
Anil
Quote
0 #9 J. Arbouw 2007-08-15 13:09
Hi,

Thanks for all the instructions. They are a great help!

I am trying to create a trigger for a header descriptive flexfield. Can you tell me if this is possible?

For example we create a dff on headerlevel, this field represents the costcenter for all lines. Now i need to trigger the accountgenerato r.

My idea is to update an field in the lines or distribution table with the value of the header dff. Default this works for the project field. After the update i can create a trigger as described above. I have some troubles updating the field though.

I hope you can help me on this,

Kind regards J. Arbouw
Quote
0 #10 Anil Passi 2007-08-19 07:02
Hi J

I havent checked this out for a long time, but it appears from your comment that HeaderLevel DFF can't be used as BizAttributes.
I request you doublecheck that though, to see if your requirements can be met by extending PoRequisitionHe aderEOImpl.

Ot herwise you can simply move to using Line level DFF itself.

In my case I used line level DFF, and it can still be presented to the user such that they enter values just once into those fields.

Thanks ,
Anil Passi
Quote
0 #11 J. Arbouw 2007-08-27 17:39
Hi Anil,

Thanks for your help. I found out that attribute1 and attribute2 in the ReqSummaryVO were actually the attribute fields of table PO_Requisition_ Lines_All. So i added one of these fields to the screen and then could apply the information you' ve provided above. It all works fine.....

Kind regards Jordy
Quote
0 #12 Abhiram 2007-09-03 03:37
Anil,

I have a requirement to change the Purchase Requisition Approval notification for PO Requisition Approval(REQAPP RV). Requirement is very simple. My company wants to see the whole charge Account String instead of cost center. Notification name is PO_REQ_APPROVE.

Message Attribute is calling JSP:/OA_HTML/OA .jsp?OAFunc=ICX _POR_REQLINES_N TFN&reqHdrId=-& DOCUMENT_ID-&co ntReqFlag=-&CON TRACTOR_REQUISI TION_FLAG-&func Curr=-&FUNCTION AL_CURRENCY-&co ntStatus=-&CONT RACTOR_STATUS-& supplEmailNotAv ail=-&IS_SUPPLI ER_EMAIL_NOT_AV AIL-&vendor=-&V ENDOR_DISPLAY_N AME-&contAssign Reqd=-&CONTRACT OR_ASSIGNMENT_R EQD

Function is calling OA.jsp?page=/or acle/apps/icx/p or/wf/webui/Req LinesNotificati onsRN

Could you explain how can I get the source code of this page and then change in Jdeveloper. Is this the right approach

Thank s
Krishna Kumar
Quote
0 #13 Praveen N 2007-11-09 09:57
Hi Anil,

Is there a way to rebuild the Charge Account for POs on changing the Item Category
(PO Lines)?
Can this be acheived using Form Personalization or should we make changes to the
CUSTOM.pll Thanks

Regards
Praveen
Quote
0 #14 Amit Singh 2007-11-30 05:08
Hi Anil,
This article is really good one. I started doing same steps on my machine.I am facing issue when I tried to import server.xml file. I copied all files from /oracle/apps/ic x/por to my machine. I tried to open server.xml from schema folder. It has open only all .xml files related to views. I can see there are lots of .class file. But I don't see them in my projects but they are very much there in folder. I tried to open some other server.xml file. I got an error "Unable to load objects". I zip and download all BC$J component in binary mode. Did I do any mistake? Do I need to set something here? I have copied all files in myclasses folder also. But It did not work.

Please help.

Thanks in advance.
Amit
Quote
0 #15 Anil Passi 2007-11-30 05:42
Hi Amit

Please see www.google.com/search?q=site:apps2fusion.com+to-extend-first-run-standard-oa-framework-pages-from-jdeveloper

Also, all the dependent objects must be brought FTPed too.

Thanks,
A nil Passi
Quote
0 #16 Nikhil b 2009-01-05 04:33
Hi ,
can any one let me know how to trace invoices order through I proc.

regards,
Nikhil
Quote
0 #17 Braja 2010-01-19 11:18
I am creating a non-catalog requisition. Charge Account is getting defaulted from the Item Categories for the requisition. Segment4-Accoun t has values from 0 to 999999. We have created a Security-Rule on Segment4 which excludes values from 200000 to 899999. Included values are from 0 to 9999999. If the charge Account has Segment4 Value in the above Excluded Range, Message should be popped up. If it is in the Included range, it should. But for any value from 0 to 9999999, its displaying the same Excluded pop-up message and not accepting any value for Segment4 in the Charge Account while raising the requisition.

P lease suggest where we are going wrong and why Security Rules are not working as expected. Is there anything else which will override this functionality?

Help Appreciated.

T hanks & Regards
Braja.
Quote
0 #18 1stepsolutions.com 2022-04-29 12:46
Truly enjoyed this blog office.Truly looking at
forward-moving to interpret Sir Thomas More. Awful.
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Apr 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
  1  2  3  4  5  6  7
  8  91011121314
15161718192021
22232425262728
2930     

Enquire For Training

Related Items

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner