Tuesday, July 12, 2022

OAF by SSPatil

 

Partial Page Rendering (PPR) in OAF



PARTIAL PAGE RENDERING (PPR) IN OAF


PPR is a technology that lets you refresh a specific part of a page when you want to make a UI change instead of having to refresh (redraw) the entire page.
Gives users a more responsive and interactive application
Improves application Performance

Steps for Partial Page Rendering:-
First create one workspace and project.
Create the AM.
Create one Page and attach the page AM to it.
Create one Entity object and VO and attach to AM.
Create the controller.

For PartialRendering here I am using my data insert project only.

The structure of my data insert project is like this.





The output of my Data Insert page is like.



For partial Rendering in the above example 

If the position code is “DIRECTOR” it should hide the managerID

For this first make the position code item as message choice.

position-->itemStyle-->messegeChoice

                  DATA-->
piclistViewInstance-->Give the view instance name
                                    PicklistDisplayAttribute-->what we want to display in message choice
                                                                                 the column name of that(Meaning)
                                    PiclistValueAttribute-->what value shuld take.

Next create one PartialVO without any query.

And after that create one transient attriobute.

Right click on PartialVO and select edit.



Click new.

U will get the window for creating new attribute set the following properties.

Name:- ManagerIDRendered

Type:- BOOLEAN.

 Click Apply and ok.




After creating the partialVO.

Select the positionCode item and in the property inspector set the following properties.

Client Action---- >

           Action Type-- > firePartialAction.

           Event --- > positionEvent.




Select the managerID item and set the following properties

managerid-->visual
                        ->Rendered-->${oa.<Partial View Instance Name>.<New Attribute Name>}

                                                ${oa.PartialVO1. ManagerIdRendered}





Create one method in AM java file

  public void Partialvo()
    {
              OAViewObject vo=getPartialVO1();   //we have to create one new partialvo
              if(!vo.isPreparedForExecution())
              {
               vo.executeQuery();
              }
             
              OARow row=(OARow)vo.createRow();
              vo.insertRow(row);
              vo.first().setAttribute("ManagerIdRendered",Boolean.TRUE);
                                                                         
    }


Create the method for hide and show of managerID


 public void showManager(String PositionCode)
    {
       OAViewObject vo=getPartialVO1();
       if(PositionCode.equalsIgnoreCase("DIRECTOR"))
       {
         vo.first().setAttribute("ManagerIdRendered",Boolean.FALSE);
       }
       else
       {
           vo.first().setAttribute("ManagerIdRendered",Boolean.TRUE);
       }
    }



Write the following code in processRequest of the controller.

 OAApplicationModule am=(OAApplicationModule)pageContext.getRootApplicationModule();

 //call the method  we created for creating new row

am.invokeMethod("Partialvo");


Write the following code in the processFormRequest.

   if(eventName.equalsIgnoreCase("positionEvent"))  //the event name that we given in
                                                                                                position column
    {
      String position=pageContext.getParameter("PositionCode"); //the id of the position column
     
      Serializable [] parm={position};
      am.invokeMethod("showManager",parm);//we have to call the method that we created for showing managerid
    }
  }


Run the page to see the output.




If u select the position as director the manegerID should hide.


ORACLE EBS R12- O2C Order to Cash Cycle

 

O2C full cycle in oracle R12


Following are the steps the process will go through from creating a Sales Order to Posting the details in GL.
·         Enter the Sales Order

·         Book the Sales Order

·         Launch Pick Release

·         Ship Confirm

·         Create Invoice

·         Create the Receipts either manually or using Auto Lockbox ( In this article we will concentrate on Manual creation)

·         Transfer to General Ledger

·         Journal Import

·         Posting

INVOLVED MODULES

 

Order ManagementCreating and shipping the Order

Inventory Onhand availability, Reservation

Receivables: For Receipt against invoice
General LedgerImporting, entering and posting the journals.

ENTER THE SALES ORDER:


Order Management Super User Operations (USA)>Orders Returns >Sales Orders
Enter the Customer details (Ship to and Bill to address), Order type.
Tables Affected
If Autocreate Delivery is set to ‘Yes’ then a new record is created in the table WSH_NEW_DELIVERIES
DELIVERY_ID is populated in the table WSH_DELIVERY_ASSIGNMENTS
The RELEASED_STATUS in WSH_DELIVERY_DETAILS would be now set to ‘Y’ (Pick Confirmed) if Auto Pick Confirm is set to Yes otherwise RELEASED_STATUS is ‘S’ (Release to Warehouse)

PICK CONFIRM THE ORDER:

If Auto Pick Confirm is set to Yes during Pick Release, then this process will happen systematically.
In other cases, need to do this by doing a move order transaction
Inventory Super User > Move Order> Transact Move Order
Take the Move Order Number form the Shipping Transaction Form and find that and transact.

SHIP CONFIRM THE ORDER:

Order Management Super User>Shipping >Transactions
Find by Order Number
Here you can find all the details
If the line status is Staged/Pick Confirmed, we can go for a shipment
Then Click on the Delivery tab


Then Click Ship Confirm
Note: If Ship Confirm button is inactive, then please check to the user id you are logged in, whether Shipping Grant given or not. If not they add a shipping grant to the user id and try again.



Then OK.
The Status in Shipping Transaction form in Delivery tab should be closed
This will kick off concurrent programs like.INTERFACE TRIP Stop, Commercial Invoice, Packing Slip Report, Bill of Lading
Tables Affected:
RELEASED_STATUS in WSH_DELIVERY_DETAILS would be ‘C’ (Ship Confirmed)
FLOW_STATUS_CODE in OE_ORDER_HEADERS_ALL would be “BOOKED
FLOW_STATUS_CODE in OE_ORDER_LINES_ALL would be SHIPPED
Once all background process completes, the Shipping Transaction Status in Lines/LPNs tab becomes Interfaced

CREATE INVOICE:

Run workflow background Process
Order Management >view >Requests

Workflow Background Process inserts the records RA_INTERFACE_LINES_ALL with
INTERFACE_LINE_CONTEXT     =     ’ORDER ENTRY’
INTERFACE_LINE_ATTRIBUTE1=     Order_number
INTERFACE_LINE_ATTRIBUTE3=     Delivery_id

And spawns Auto invoice Master Program and Auto invoice import program which creates Invoice for that particular Order 

CHECK THE INVOICE:

The Invoice created can be seen using the Receivables responsibility
Receivables Super User> Transactions> Transactions
Query with the Order Number as Reference
Affected Tables:
RA_CUSTOMER_TRX_ALL will have the Invoice header information. The column INTERFACE_HEADER_ATTRIBUTE1 will have the Order Number. 
RA_CUSTOMER_TRX_LINES_ALL will have the Invoice lines information. The column INTERFACE_LINE_ATTRIBUTE1 will have the Order Number.

CREATE RECEIPT:  

RECEIVABLES> RECEIPTS> RECEIPTS


Click Apply to apply this to an invoice and then select the invoice in next screen and then apply.

Tables affected:
AR_CASH_RECEIPTS_ALL

TRANSFER TO GENERAL LEDGER:

To transfer the Receivables accounting information to general ledger, run General Ledger Transfer Program
Receivables> View Requests
Parameters:
  • Give in the Start date and Post through date to specify the date range of the transactions to be transferred.
  • Specify the GL Posted Date, defaults to SYSDATE.
  • Post in summary: This controls how Receivables creates journal entries for your transactions in the interface table. If you select ‘No’, then the General Ledger Interface program creates at least one journal entry in the interface table for each transaction in your posting submission. If you select ‘Yes’, then the program creates one journal entry for each general ledger account.
  • If the Parameter Run Journal Import is set to ‘Yes’, the journal import program is kicked off automatically which transfers journal entries from the interface table to General Ledger, otherwise follow the topic Journal Import to import the journals to General Ledger manually.
Tables Affected:

GL_INTERFACE

JOURNAL IMPORT:

To transfer the data from General Ledger Interface table to General Ledger, run the Journal Import program from Oracle General Ledger.
General Ledger > Journal> Import> Run
Parameters:
  • Select the appropriate Source.
  • Enter one of the following Selection Criteria:
No Group ID: To import all data for that source that has no group ID. Use this option if you specified a NULL group ID for this source.
All Group IDs: To import all data for that source that has a group ID. Use this option to import multiple journal batches for the same source with varying group IDs.
Specific Group ID: To import data for a specific source/group ID combination. Choose a specific group ID from the List of Values for the Specific Value field.
If you do not specify a Group ID, General Ledger imports all data from the specified journal entry source, where the Group_ID is null.
  • Define the Journal Import Run Options (optional)
Choose Post Errors to Suspense if you have suspense posting enabled for your set of books to post the difference resulting from any unbalanced journals to your suspense account.
Choose Create Summary Journals to have journal import create the following:
• one journal line for all transactions that share the same account, period, and currency and that has a debit balance
• One journal line for all transactions that share the same account, period, and currency and that has a credit balance.
  • Enter a Date Range to have General Ledger import only journals with accounting dates in that range. If you do not specify a date range, General Ledger imports all journals data.
  • Choose whether to Import Descriptive Flexfields, and whether to import them with validation.
Click on Import button

Affected tables
GL_JE_BATCHES, GL_JE_HEADERS, GL_JE_LINES

POSTING:

We have to Post journal batches that we have imported previously to update the account balances in General Ledger
General Ledger> Journals > Enter

Click Find
From the list of unposted journals displayed, select one journal at a time and click on Post button to post the journal.
If you know the batch name to be posted you can directly post using the Post window

Workflow Adhoc

https://erpschools.com/erps/workflow-tools/oracle-workflow-ad-hoc-roles 

worked Exmaple SOA getway EBS

 https://notetoself.dev/2020/09/30/using-oracle-integrated-soa-gateway-a-worked-example/



https://blogs.oracle.com/ebs/post/oracle-ebs-plsql-apis-as-rest-web-services

Call Workflow from OAF Page

 We can call Workflow in 2 ways from the OAF

1) Using PL SQL Procedure, call procedure from OAF page using callable
statement.
CREATE OR REPLACE PROCEDURE start_wf_prc
IS
l_itemtype VARCHAR2 (30) := ‘XX_WF’;
l_itemkey VARCHAR2 (300) := 'xx';
BEGIN
wf_engine.createprocess (l_itemtype, l_itemkey,
‘XX_MAIN_PROCESS_WF’);
wf_engine.setitemowner (itemtype => l_itemtype,itemkey => l_itemkey,owner
=> '1');
wf_engine.startprocess (l_itemtype, l_itemkey);
COMMIT; END;

2) Write following function in Controller of the OAF page.
public void callCustomWorkFlow(OAPageContext pageContext)
{
String strWfItemType = “XX_WF”;
String strWfProcess =
“XX_MAIN_PROCESS_WF”;
String strWfItemKey = "xxitemkey";
OANavigation wfNavigation = new OANavigation(); // Create Workflow
Process
wfNavigation.createProcess(pageContext, strWfItemType, strWfProcess,
strWfItemKey);
wfNavigation.setItemOwner(pageContext,"xx"); // Start Workflow
Process
wfNavigation.startProcess(pageContext, strWfItemType, strWfProcess,
strWfItemKey);
}

How to Import/Upload Open Purchase Requisitions (in oracle R12 purchasing module)

note 

You wil have to prepare a script to load the data into Requisition interface
tables and then use 'Requisition Import Process' to import them to
Purchasing application.

refer to 'Requisition Import Process' section in the PO user guide.
If this is for a new implementation, my experience has been that users would
prefer to import only Open Purchase Orders.. not requisitions.



 You can use PO_REQUISITIONS_INTERFACE_ALL to import a purchase requisitions.


Below is an example:


INSERT INTO PO_REQUISITIONS_INTERFACE_ALL
(
DELIVER_TO_LOCATION_ID
, DELIVER_TO_REQUESTOR_ID
, AUTHORIZATION_STATUS
, REQUISITION_HEADER_ID
, REQUISITION_TYPE
, CREATION_DATE
, CREATED_BY
, QUANTITY
, UNIT_PRICE
, ITEM_SEGMENT1
, ITEM_DESCRIPTION
, CATEGORY_ID
, CURRENCY_CODE
, PREPARER_ID
, CHARGE_ACCOUNT_ID
, REQ_NUMBER_SEGMENT1
, SOURCE_TYPE_CODE
, HEADER_DESCRIPTION
, BATCH_ID
, DESTINATION_TYPE_CODE
, DESTINATION_ORGANIZATION_ID
, INTERFACE_SOURCE_CODE
, UNIT_OF_MEASURE
)
VALUES
(
H_CUR.DELIVER_TO_LOCATION_ID
, V_PREPARER_ID
, 'APPROVED'
, H_CUR.REQ_NUMBER
, 'INTERNAL'
, H_CUR.REQ_DATE
, V_PREPARER_ID
, H_CUR.REQ_LINE_QUANTITY
, H_CUR.UNIT_PRICE
, H_CUR.ITEM
, H_CUR.ITEM_DESCRIPTION
, V_CAT_ID
, H_CUR.CURRENCY_CODE
, V_PREPARER_ID
, V_CODE_ID
, H_CUR.REQ_NUMBER
, H_CUR.SOURCE_TYPE_CODE
, H_CUR.HEADER_DESCRIPTION
, 100
, H_CUR.DESTINATION_TYPE_CODE
, H_CUR.DESTINATION_ORGANIZATION_ID
, 'Loading 2010'
, H_CUR.UNIT_MEAS_LOOKUP_CODE
) ;


Then you need to run "Requisition Import" request from the purchasing module.


SQL Query to Convert number into Words for Money

SELECT INITCAP ( DECODE ( FLOOR (TO_NUMBER ( :amount)), 0, '', TO_CHAR (TO_DATE...