| Home |
| Technical Articles |
| Training Articles |
| Receive Email for New Articles |
| Contributors |
| Hands-On-Training |
| Consultancy Services |
Technical Articles
Financials
iProcurement 11.5.10 ReBuild Charge Account | iProcurement 11.5.10 ReBuild Charge Account | | Print | |
| Written by Anil Passi | |
| Wednesday, 06 September 2006 | |
|
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 BEGIN 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. Step 1. ![]() Define new Entity Object Now define a new Entity Object xxxxPoRequisitionLineEO. Move the cursor to Extends Entity and click on button Browse to select PoRequisitionLineEO ![]() New Entity Object will extend Existing EO 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 Now, your EO will look somewhat similar to below. ![]() 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” ![]() Set the EO attribute property ![]() Add EO Property AccountLineBizAttrSet As in above picture, Name=AccountLineBizAttrSet ![]() To define substitution, edit the BC4J Following this, select “Substitution” option as in the list below ![]() 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 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 Comments
(15)
written by venkatesh , October 18, 2006 written by venkatesh , October 18, 2006
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 ? written by Anil Passi , October 19, 2006
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 anilpassi@gmail.com Thanks, Anil Passi written by Anil Passi , October 19, 2006
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 anilpassi@gmail.com Thanks, Anil Passi written by Ashish , April 23, 2007
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- Ashish. written by Anil Passi , April 23, 2007
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
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. Important 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
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
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 accountgenerator. 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
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
Anil,
I have a requirement to change the Purchase Requisition Approval notification for PO Requisition Approval(REQAPPRV). 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_NTFN&reqHdrId=-&DOCUMENT_ID-&contReqFlag=-&CONTRACTOR_REQUISITION_FLAG-&funcCurr=-&FUNCTIONAL_CURRENCY-&contStatus=-&CONTRACTOR_STATUS-&supplEmailNotAvail=-&IS_SUPPLIER_EMAIL_NOT_AVAIL-&vendor=-&VENDOR_DISPLAY_NAME-&contAssignReqd=-&CONTRACTOR_ASSIGNMENT_REQD Function is calling OA.jsp?page=/oracle/apps/icx/por/wf/webui/ReqLinesNotificationsRN Could you explain how can I get the source code of this page and then change in Jdeveloper. Is this the right approach Thanks Krishna Kumar
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
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/icx/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 You must be logged in to a comment. Please register if you do not have an account yet.
|
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 ?