Monday, July 18, 2011

AME Basic Setup


Step-1 Setting up Responsibilities


1. Login as SYSADMIN user .

2.Create a New user account and give an appropriate effective date. Do NOT add any Approval responsibility

3.Save the record.

4. Switch the responsibility to User Management and Navigate to the Users function.

5. Query for the newly created user.

6. Click on the update action from the result table.

7. In the Update User page, click on the Assign Roles button .

8. Change the “Search By” field from “Roles and Responsibilities” to “Roles”

9. In the search window, query for Approval%

10. Following five roles will be displayed.

11. Select only the “Approvals Management Administrator” and “Approvals Management BusinessAnalyst” roles.

12. After selecting the Roles, provide the Justification for the role and the effective date.

13. After completing the action, you can query back the same user and can verify the list of roles being attached to the user.

14. Now switch the responsibility to Functional Administrator.

15. Click on create grants under the grants sub-tab.

16. Enter a Grant Name and provide an effective date.

17. Navigate to the security Context region and select the Grantee Type as ‘Specific User’

18. In the Grantee field select the newly created User

19. In the Data Security region select ‘AME Transaction Types’ as the Object.

20. Clicking Next will take you to the ‘Select Object Data Context’ page’.

21. You have a default value of ‘All Rows’ in the Data Context Type, leave it as it is, and navigate further.

22. In the ‘Object parameter and Select Set’ page, enter ‘AME calling applications’ as the value in the Set field.

23. Clicking Next will take you to the Review page.

24. Verify the information and submit the transaction.

25. Now Switch the responsibility to System Adminstrator and Navigate to System Profiles.

26. Query for the profile ‘AME:Installed’ at the required level and set the value to ‘Yes’.

27. Save the data.


28. Now you can login as the newly created user.


29. You should be able to see the following responsibilities:

a. Approvals Management Administrator

b. Approvals Management Business Analyst


Step-2 Responsibility and its features ,Approvals Management Administrator Dashboard


Approvals Management Administrator responsibility has full access to AME’s user interface. To perform any technical tasks such as setting AME’s configuration variables, at least one user administrative privilege in AME should be granted.
The administrator dashboard mainly consists of three regions,


The transaction Type
Unused Approver Groups
Quick Links

Second Addition In Next Blog------------

Tuesday, July 12, 2011

Steps to create Sales Order for ATO Config. Model Item



Steps to create Sales Order for ATO Config. Model Item.
steps required to create the Order for a ATO config Model.(to make things easy I have included screen shot)It IncludesModel/Class/Included Item Creation (Inventory).BOM Creation (Bill of Material).Order Creation (Order Management).Process WIP Job (Work in Progress) I will explain with the viewlets how to Create1. ATO Model.2. ATO Model Class3. Included items4. Sales Order5. Progress WorkOrder in WIP.Create all the Model/Class and included items in the Master Organization and then Assign to Inventory Organization where you want to do transactions.In my example Master Organization is V1 and transaction Organization is M1.Create ItemAssign item to transaction org from Master.tttCreate Model ClassCreate Included Item ( In my case they are Finished Goods)Create Misc. transaction to create the stock for the Finished good.Once Items and Stock has defined. Create Bill of Material (BOM) for the Model in the Master Organization and then Change Organization to Transaction Organization (in my case M1) and Copy Bill of material from Master Org (V1).Define Bill of MaterialCreate the Sales Order.
1. Enter the Model line.
2. Configure as per requirement.
3. Book the Order
4. Progress Model line (It will Insert the Configure Item in OE_ORDER_LINES_ALL) table.
5. Progress the configure order line, it will push the data from OM to WIP by submitting the Concurrent program.
6. Open the output of the Concurrent program and note down the WIP Job ID.
7. Login to WIP and then go to “Discrete Jobs” and query for Job ID.
8. Complete the job ID.
9. Progress the OM Order, Ship & Invoice.
10. Finally close the Order line.
Create Sales OrderConfig. The Model Line.Book OrderProgress Model line.WIP Job IDProcess the WIPComplete the Order

Steps to create Sales Order for ATO Config. Model Item.
steps required to create the Order for a ATO config Model.(to make things easy I have included screen shot)It IncludesModel/Class/Included Item Creation (Inventory).BOM Creation (Bill of Material).Order Creation (Order Management).Process WIP Job (Work in Progress) I will explain with the viewlets how to Create1. ATO Model.2. ATO Model Class3. Included items4. Sales Order5. Progress WorkOrder in WIP.Create all the Model/Class and included items in the Master Organization and then Assign to Inventory Organization where you want to do transactions.In my example Master Organization is V1 and transaction Organization is M1.Create ItemAssign item to transaction org from Master.tttCreate Model ClassCreate Included Item ( In my case they are Finished Goods)Create Misc. transaction to create the stock for the Finished good.Once Items and Stock has defined. Create Bill of Material (BOM) for the Model in the Master Organization and then Change Organization to Transaction Organization (in my case M1) and Copy Bill of material from Master Org (V1).Define Bill of MaterialCreate the Sales Order.
1. Enter the Model line.
2. Configure as per requirement.
3. Book the Order
4. Progress Model line (It will Insert the Configure Item in OE_ORDER_LINES_ALL) table.
5. Progress the configure order line, it will push the data from OM to WIP by submitting the Concurrent program.
6. Open the output of the Concurrent program and note down the WIP Job ID.
7. Login to WIP and then go to “Discrete Jobs” and query for Job ID.
8. Complete the job ID.
9. Progress the OM Order, Ship & Invoice.
10. Finally close the Order line.
Create Sales OrderConfig. The Model Line.Book OrderProgress Model line.WIP Job IDProcess the WIPComplete the Order

Oracle Shipping

How to automatically populate unique ship set on Sales Order lines?
If the profile option "OM: Assign new set for each line" is set as "Yes", then1. Enter value as "Ship" for the field "Line Set" in Sales Order form (Tab: Others)2. Enter Sales Order line information (ordered item, quantity)3. Unique Ship set numbers would be auto-populated in the "Ship set" field at SO line levelUse the above if, a. Multiple shipments are allowed per orderb. Each SO line needs to be shipped completelyIf the profile option "OM: Assign new set for each line" is set as "No", then1. Enter value as "Ship" for the field "Line Set" in Sales Order form (Tab: Others)2. Enter Sales Order line information (ordered item, quantity)3. One Ship set number would be auto-populated in the "Ship set" field for all the SO lines Use the above if, a. Multiple shipments are NOT allowed per order

Prerequisite for Sample WF Design:

Prerequisite for Sample WF Design:

Table Creation Script:

CREATE TABLE APPS.XXXX_PO_HEADERS
(
PO_ID NUMBER,
PO_DESCRIPTION VARCHAR2(240 BYTE),
PO_STATUS VARCHAR2(50 BYTE),
SEND_EMAIL_TO VARCHAR2(1000 BYTE)
);
Package Creation Script:

CREATE OR REPLACE PACKAGE apps.xxxx_po_wf_training_pkg
IS
PROCEDURE is_po_valid (
itemtype IN VARCHAR2,
itemkey IN VARCHAR2,
actid IN NUMBER,
funcmode IN VARCHAR2,
RESULT IN OUT VARCHAR2
);

PROCEDURE set_wf_approver_role (
itemtype IN VARCHAR2,
itemkey IN VARCHAR2,
actid IN NUMBER,
funcmode IN VARCHAR2,
RESULT IN OUT VARCHAR2
);

PROCEDURE set_wf_status_to_validated (
itemtype IN VARCHAR2,
itemkey IN VARCHAR2,
actid IN NUMBER,
funcmode IN VARCHAR2,
RESULT IN OUT VARCHAR2
);

PROCEDURE start_training_wf (p_po_id IN INTEGER);

PROCEDURE xx_validate_response (
itemtype IN VARCHAR2,
itemkey IN VARCHAR2,
actid IN NUMBER,
funcmode IN VARCHAR2,
RESULT IN OUT VARCHAR2
);
END xxxx_po_wf_training_pkg;
/

CREATE OR REPLACE PACKAGE BODY apps.xxxx_po_wf_training_pkg
IS
FUNCTION is_po_validated (p_po_id IN INTEGER)
RETURN BOOLEAN
IS
BEGIN
IF p_po_id > 0
THEN
RETURN TRUE;
END IF;

RETURN FALSE;
END is_po_validated;

PROCEDURE is_po_valid (
itemtype IN VARCHAR2,
itemkey IN VARCHAR2,
actid IN NUMBER,
funcmode IN VARCHAR2,
RESULT IN OUT VARCHAR2
)
IS
BEGIN
IF (funcmode != 'RUN')
THEN
RETURN;
END IF;

IF is_po_validated
(p_po_id => wf_engine.getitemattrnumber
(itemtype => itemtype,
itemkey => itemkey,
aname => 'PO_ID'
)
)
THEN
RESULT := 'COMPLETE: Y';
ELSE
RESULT := 'COMPLETE: N';
END IF;
END is_po_valid;

PROCEDURE set_wf_approver_role (
itemtype IN VARCHAR2,
itemkey IN VARCHAR2,
actid IN NUMBER,
funcmode IN VARCHAR2,
RESULT IN OUT VARCHAR2
)
IS
v_role_email xxxx_po_headers.send_email_to%TYPE;
n_ctr INTEGER := 0;
BEGIN
v_role_email :=
UPPER (wf_engine.getitemattrtext (itemtype => itemtype,
itemkey => itemkey,
aname => 'SEND_TO_EMAIL'
)
);

SELECT COUNT (*)
INTO n_ctr
FROM wf_local_roles
WHERE NAME = v_role_email;

IF n_ctr = 0
THEN
wf_directory.createadhocrole
(role_name => v_role_email,
role_display_name => v_role_email,
LANGUAGE => NULL,
territory => NULL,
role_description => 'ROLE DESC',
notification_preference => 'MAILHTML',
role_users => NULL
-- Comma or space delimited list
,
email_address => v_role_email,
fax => NULL,
status => 'ACTIVE',
expiration_date => NULL,
parent_orig_system => NULL,
parent_orig_system_id => NULL,
owner_tag => NULL
);
END IF;

wf_engine.setitemattrtext (itemtype => itemtype,
itemkey => itemkey,
aname => 'SEND_TO_ROLE',
avalue => v_role_email
);
RESULT := 'COMPLETE: Y';
RESULT := 'COMPLETE: Y';
END set_wf_approver_role;

PROCEDURE set_wf_status_to_validated (
itemtype IN VARCHAR2,
itemkey IN VARCHAR2,
actid IN NUMBER,
funcmode IN VARCHAR2,
RESULT IN OUT VARCHAR2
)
IS
BEGIN
UPDATE xxxx_po_headers
SET po_status = 'VALIDATED'
WHERE po_id = wf_engine.getitemattrnumber (itemtype, itemkey, 'PO_ID');

RESULT := 'COMPLETE: Y';
END set_wf_status_to_validated;

PROCEDURE start_training_wf (p_po_id IN INTEGER)
IS
l_itemtype VARCHAR2 (30) := 'WRK_TRG';
l_itemkey VARCHAR2 (300) := 'TRAINING-' p_po_id;

CURSOR c_get
IS
SELECT *
FROM xxxx_po_headers
WHERE po_id = p_po_id;

p_get c_get%ROWTYPE;
BEGIN
OPEN c_get;

FETCH c_get
INTO p_get;

CLOSE c_get;

wf_engine.createprocess (l_itemtype, l_itemkey, 'PO_TRG');
wf_engine.setitemuserkey (itemtype => l_itemtype,
itemkey => l_itemkey,
userkey => 'USERKEY: ' l_itemkey
);
wf_engine.setitemowner (itemtype => l_itemtype,
itemkey => l_itemkey,
owner => 'SYSADMIN'
);
wf_engine.setitemattrnumber (itemtype => l_itemtype,
itemkey => l_itemkey,
aname => 'PO_ID',
avalue => p_po_id
);
wf_engine.setitemattrtext (itemtype => l_itemtype,
itemkey => l_itemkey,
aname => 'SEND_TO_EMAIL',
avalue => p_get.send_email_to
);
wf_engine.setitemattrtext (itemtype => l_itemtype,
itemkey => l_itemkey,
aname => 'PO_DESCRIPTION',
avalue => p_get.po_description
);
wf_engine.startprocess (l_itemtype, l_itemkey);
END start_training_wf;

PROCEDURE xx_validate_response (
itemtype IN VARCHAR2,
itemkey IN VARCHAR2,
actid IN NUMBER,
funcmode IN VARCHAR2,
RESULT IN OUT VARCHAR2
)
IS
l_nid NUMBER;
l_activity_result_code VARCHAR2 (200);
v_response_reason VARCHAR2 (50);
BEGIN
IF (funcmode IN ('RESPOND'))
THEN
l_nid := wf_engine.context_nid;
l_activity_result_code :=
wf_notification.getattrtext (l_nid, 'XX_RESPONSE_ACTION');
v_response_reason :=
wf_notification.getattrtext (l_nid, 'XX_RESPONSE_REASON');

IF l_activity_result_code = 'XX_REJECT'
AND v_response_reason IS NULL
THEN
RESULT := 'ERROR: You must enter rejection reason if rejecting.';
RETURN;
END IF;
END IF;
EXCEPTION
WHEN OTHERS
THEN
RESULT := SQLERRM;
END xx_validate_response;
END xxxx_po_wf_training_pkg;
/