1732: wf_engine.SetItemAttrText
1733: (itemtype => 'FUNRMAIN',
1734: itemkey => p_eventkey,
1735: aname => 'UI_ACTION_USER_NAME',
1736: avalue => FND_GLOBAL.USER_NAME);
1737:
1738: wf_engine.SetItemAttrNumber
1739: (itemtype => 'FUNRMAIN',
1740: itemkey => p_eventkey,
1738: wf_engine.SetItemAttrNumber
1739: (itemtype => 'FUNRMAIN',
1740: itemkey => p_eventkey,
1741: aname => 'UI_ACTION_USER_ID',
1742: avalue => FND_GLOBAL.USER_ID);
1743:
1744: --get process/activity name
1745: SELECT WPA.ACTIVITY_NAME
1746: INTO l_activity_name
1757:
1758: IF l_activity_name IN ('APPROVAL_NTF', 'APPROVAL_ONLY_NTF',
1759: 'FIX_ACCT_DIST_NTF_NO_REJ', 'FIX_ACCT_DIST_NTF' )
1760: THEN
1761: l_approver_record.name := FND_GLOBAL.USER_NAME;
1762: l_approver_record.approval_status := AME_UTIL.approvedStatus;
1763:
1764: ame_api2.updateApprovalStatus(
1765: applicationIdIn => 435,
1770: -- Update the approver id onto the fun_trx_headers table.
1771: -- approver_id will always hold the id of the last person
1772: -- to approve the transaction.
1773: UPDATE fun_trx_headers
1774: SET approver_id = FND_GLOBAL.USER_ID,
1775: approval_date = SYSDATE
1776: WHERE trx_id = p_trx_id;
1777:
1778: END IF;
1838: wf_engine.SetItemAttrText
1839: (itemtype => 'FUNRMAIN',
1840: itemkey => p_eventkey,
1841: aname => 'UI_ACTION_USER_NAME',
1842: avalue => FND_GLOBAL.USER_NAME);
1843:
1844: wf_engine.SetItemAttrNumber
1845: (itemtype => 'FUNRMAIN',
1846: itemkey => p_eventkey,
1844: wf_engine.SetItemAttrNumber
1845: (itemtype => 'FUNRMAIN',
1846: itemkey => p_eventkey,
1847: aname => 'UI_ACTION_USER_ID',
1848: avalue => FND_GLOBAL.USER_ID);
1849:
1850: --check reject allowed
1851: SELECT reject_allow_flag INTO l_result
1852: FROM fun_trx_batches
1878: p_trx_id => p_trx_id,
1879: p_update_status_to => 'REJECTED');
1880:
1881: -- Update the AME System with the 'APPROVED' status.
1882: l_approver_record.name := FND_GLOBAL.USER_NAME;
1883: l_approver_record.approval_status := AME_UTIL.rejectStatus;
1884:
1885: ame_api2.updateApprovalStatus(
1886: applicationIdIn => 435,
2070: crec.amount_dr,
2071: crec.amount_cr,
2072: l_ccid,
2073: 'N',
2074: FND_GLOBAL.USER_ID,
2075: sysdate,
2076: FND_GLOBAL.USER_ID,
2077: sysdate,
2078: FND_GLOBAL.LOGIN_ID,
2072: l_ccid,
2073: 'N',
2074: FND_GLOBAL.USER_ID,
2075: sysdate,
2076: FND_GLOBAL.USER_ID,
2077: sysdate,
2078: FND_GLOBAL.LOGIN_ID,
2079: l_trx_id);
2080:
2074: FND_GLOBAL.USER_ID,
2075: sysdate,
2076: FND_GLOBAL.USER_ID,
2077: sysdate,
2078: FND_GLOBAL.LOGIN_ID,
2079: l_trx_id);
2080:
2081: END LOOP;
2082:
3025: l_new_dist_tbl(l_new_index).amount_dr := l_init_dist_tbl(1).init_amount_dr;
3026: l_new_dist_tbl(l_new_index).ccid := l_ccid;
3027: l_new_dist_tbl(l_new_index).description := l_init_dist_tbl(1).description;
3028: l_new_dist_tbl(l_new_index).auto_generate_flag := 'Y';
3029: l_new_dist_tbl(l_new_index).created_by := FND_GLOBAL.USER_ID;
3030: l_new_dist_tbl(l_new_index).creation_date := SYSDATE;
3031: l_new_dist_tbl(l_new_index).last_updated_by := FND_GLOBAL.USER_ID;
3032: l_new_dist_tbl(l_new_index).last_update_date := SYSDATE;
3033: l_new_dist_tbl(l_new_index).last_update_login := FND_GLOBAL.LOGIN_ID;
3027: l_new_dist_tbl(l_new_index).description := l_init_dist_tbl(1).description;
3028: l_new_dist_tbl(l_new_index).auto_generate_flag := 'Y';
3029: l_new_dist_tbl(l_new_index).created_by := FND_GLOBAL.USER_ID;
3030: l_new_dist_tbl(l_new_index).creation_date := SYSDATE;
3031: l_new_dist_tbl(l_new_index).last_updated_by := FND_GLOBAL.USER_ID;
3032: l_new_dist_tbl(l_new_index).last_update_date := SYSDATE;
3033: l_new_dist_tbl(l_new_index).last_update_login := FND_GLOBAL.LOGIN_ID;
3034:
3035: l_new_index := l_new_index + 1;
3029: l_new_dist_tbl(l_new_index).created_by := FND_GLOBAL.USER_ID;
3030: l_new_dist_tbl(l_new_index).creation_date := SYSDATE;
3031: l_new_dist_tbl(l_new_index).last_updated_by := FND_GLOBAL.USER_ID;
3032: l_new_dist_tbl(l_new_index).last_update_date := SYSDATE;
3033: l_new_dist_tbl(l_new_index).last_update_login := FND_GLOBAL.LOGIN_ID;
3034:
3035: l_new_index := l_new_index + 1;
3036:
3037: -- Generate Recipient Distributions
3397: l_new_dist_tbl(l_new_index).amount_dr := l_reci_dist_tbl(1).reci_amount_dr;
3398: l_new_dist_tbl(l_new_index).ccid := l_ccid;
3399: l_new_dist_tbl(l_new_index).description := l_reci_dist_tbl(1).description;
3400: l_new_dist_tbl(l_new_index).auto_generate_flag := 'Y';
3401: l_new_dist_tbl(l_new_index).created_by := FND_GLOBAL.USER_ID;
3402: l_new_dist_tbl(l_new_index).creation_date := SYSDATE;
3403: l_new_dist_tbl(l_new_index).last_updated_by := FND_GLOBAL.USER_ID;
3404: l_new_dist_tbl(l_new_index).last_update_date := SYSDATE;
3405: l_new_dist_tbl(l_new_index).last_update_login := FND_GLOBAL.LOGIN_ID;
3399: l_new_dist_tbl(l_new_index).description := l_reci_dist_tbl(1).description;
3400: l_new_dist_tbl(l_new_index).auto_generate_flag := 'Y';
3401: l_new_dist_tbl(l_new_index).created_by := FND_GLOBAL.USER_ID;
3402: l_new_dist_tbl(l_new_index).creation_date := SYSDATE;
3403: l_new_dist_tbl(l_new_index).last_updated_by := FND_GLOBAL.USER_ID;
3404: l_new_dist_tbl(l_new_index).last_update_date := SYSDATE;
3405: l_new_dist_tbl(l_new_index).last_update_login := FND_GLOBAL.LOGIN_ID;
3406:
3407: l_new_index := l_new_index + 1;
3401: l_new_dist_tbl(l_new_index).created_by := FND_GLOBAL.USER_ID;
3402: l_new_dist_tbl(l_new_index).creation_date := SYSDATE;
3403: l_new_dist_tbl(l_new_index).last_updated_by := FND_GLOBAL.USER_ID;
3404: l_new_dist_tbl(l_new_index).last_update_date := SYSDATE;
3405: l_new_dist_tbl(l_new_index).last_update_login := FND_GLOBAL.LOGIN_ID;
3406:
3407: l_new_index := l_new_index + 1;
3408:
3409:
3725: l_trx_id := wf_engine.GetItemAttrNumber
3726: (itemtype => itemtype,
3727: itemkey => itemkey,
3728: aname => 'TRX_ID');
3729: FND_GLOBAL.APPS_INITIALIZE(l_user_id,l_resp_id,l_appl_id);
3730:
3731: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3732: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'fun.plsql.fun_recipient_wf.generate_acct_lines', 'l_trx_id = ' || l_trx_id);
3733: END IF;
3802: CURSOR get_user_names IS
3803: select 'X'
3804: from wf_local_user_roles role
3805: where role.role_name = 'FUN_ADHOC_RECI_'||trx_id
3806: and role.user_name = FND_GLOBAL.USER_NAME;
3807: BEGIN
3808: OPEN get_user_names;
3809: FETCH get_user_names INTO c_user_name;
3810: