Profile -change output
Viewer: Text
Value = APPLETVIEWER
Wednesday, March 30, 2016
SQL- Array from string of values
CURSOR c_email (l_list IN VARCHAR2)
IS
SELECT REGEXP_SUBSTR (l_list,
'[^,]+',
1,
LEVEL)
email
FROM DUAL
CONNECT BY REGEXP_SUBSTR (l_list,
'[^,]+',
1,
LEVEL)
IS NOT NULL;
IS
SELECT REGEXP_SUBSTR (l_list,
'[^,]+',
1,
LEVEL)
FROM DUAL
CONNECT BY REGEXP_SUBSTR (l_list,
'[^,]+',
1,
LEVEL)
IS NOT NULL;
FORM COMPILE Command
FORM COMPILE
compile fmb from custom top and now it should.
export FORMS_PATH=$FORMS_PATH:$AU_TOP/forms/US
form compile
frmcmp_batch module=$AU_TOP/forms/US/XXCNCOMTMPT.fmb output_file=$XXCNC_TOP/forms/US/XXCNCOMTMPT.fmx userid=apps/xxxx module_type=form compile_all=special
frmcmp_batch module=$AU_TOP/forms/US/XXCNC_INV_TAG_COUNT.fmb output_file=$XXCNC_TOP/forms/US/XXCNC_INV_TAG_COUNT.fmx userid=apps/aaaaaa module_type=form compile_all=special
frmcmp_batch module=$XXCNC_TOP/forms/US/XXCNC_OM_KCN_RMA_V1.fmb output_file=$XXCNC_TOP/forms/US/XXCNC_OM_KCN_RMA_V1.fmx userid=apps/zzzzzz module_type=form compile_all=special
FORMS_PATH
echo $FORMS_PATH
cd $XXCNC_TOP/forms/US
cp formfilename.fmb $AU_TOP/forms/US/
cd $AU_TOP/forms/US/
frmcmp_batch module=$AU_TOP/forms/US/formfilename.fmb output_file=$XXCNC_TOP/forms/US/formfilename.fmx userid=apps/zzzzz module_type=form compile_all=special
compile fmb from custom top and now it should.
export FORMS_PATH=$FORMS_PATH:$AU_TOP/forms/US
form compile
frmcmp_batch module=$AU_TOP/forms/US/XXCNCOMTMPT.fmb output_file=$XXCNC_TOP/forms/US/XXCNCOMTMPT.fmx userid=apps/xxxx module_type=form compile_all=special
frmcmp_batch module=$AU_TOP/forms/US/XXCNC_INV_TAG_COUNT.fmb output_file=$XXCNC_TOP/forms/US/XXCNC_INV_TAG_COUNT.fmx userid=apps/aaaaaa module_type=form compile_all=special
frmcmp_batch module=$XXCNC_TOP/forms/US/XXCNC_OM_KCN_RMA_V1.fmb output_file=$XXCNC_TOP/forms/US/XXCNC_OM_KCN_RMA_V1.fmx userid=apps/zzzzzz module_type=form compile_all=special
FORMS_PATH
echo $FORMS_PATH
cd $XXCNC_TOP/forms/US
cp formfilename.fmb $AU_TOP/forms/US/
cd $AU_TOP/forms/US/
frmcmp_batch module=$AU_TOP/forms/US/formfilename.fmb output_file=$XXCNC_TOP/forms/US/formfilename.fmx userid=apps/zzzzz module_type=form compile_all=special
SQL-order lines exist where invoice is generated but inventory not reduced
Following script can be used to know if such order lines exist where invoice is generated but inventory not reduced:
SELECT
(SELECT h.order_number
FROM oe_order_headers_all h
WHERE h.header_id = l.header_id
) Order_Num,
Oe_Order_Misc_Pub.Get_Concat_Line_Number(l.line_id) Line_Num,
l.line_id,
l.org_id operating_unit,
l.creation_date
FROM oe_order_lines_all l
WHERE l.open_flag = 'N'
AND l.flow_status_code = 'CLOSED'
AND l.invoice_interface_status_code = 'YES'
AND l.ordered_quantity > 0
AND l.item_type_code IN ('STANDARD', 'INCLUDED')
AND NOT EXISTS
(SELECT 'Inventory Interface Record in MTI, to be processed later.'
FROM mtl_transactions_interface mti
WHERE mti.trx_source_line_id = l.line_id
AND mti.transaction_type_id = 33
AND mti.source_code = 'ORDER ENTRY'
)
AND NOT EXISTS
(SELECT 'Record of a completed material transaction for SO Issue.'
FROM mtl_material_transactions mmt
WHERE mmt.trx_source_line_id = l.line_id
AND mmt.transaction_type_id = 33
AND mmt.source_code = 'ORDER ENTRY'
)
AND NOT EXISTS
(SELECT 'Delivery details because this is a ship-only line.'
FROM wsh_delivery_details wdd
WHERE wdd.source_code = 'OE'
AND wdd.source_line_id = l.line_id
)
ORDER BY Order_Num ASC;
SELECT
(SELECT h.order_number
FROM oe_order_headers_all h
WHERE h.header_id = l.header_id
) Order_Num,
Oe_Order_Misc_Pub.Get_Concat_Line_Number(l.line_id) Line_Num,
l.line_id,
l.org_id operating_unit,
l.creation_date
FROM oe_order_lines_all l
WHERE l.open_flag = 'N'
AND l.flow_status_code = 'CLOSED'
AND l.invoice_interface_status_code = 'YES'
AND l.ordered_quantity > 0
AND l.item_type_code IN ('STANDARD', 'INCLUDED')
AND NOT EXISTS
(SELECT 'Inventory Interface Record in MTI, to be processed later.'
FROM mtl_transactions_interface mti
WHERE mti.trx_source_line_id = l.line_id
AND mti.transaction_type_id = 33
AND mti.source_code = 'ORDER ENTRY'
)
AND NOT EXISTS
(SELECT 'Record of a completed material transaction for SO Issue.'
FROM mtl_material_transactions mmt
WHERE mmt.trx_source_line_id = l.line_id
AND mmt.transaction_type_id = 33
AND mmt.source_code = 'ORDER ENTRY'
)
AND NOT EXISTS
(SELECT 'Delivery details because this is a ship-only line.'
FROM wsh_delivery_details wdd
WHERE wdd.source_code = 'OE'
AND wdd.source_line_id = l.line_id
)
ORDER BY Order_Num ASC;
sql-db locks
SELECT DECODE(request,0,'Holder: ',' Waiter: ')||a.sid sess,
decode(request,0,to_char(a.inst_id),' '||to_char(a.inst_id)) inst,b.audsid ,
id1, id2, lmode, request, a.type, a.sid,
b.sql_hash_value hash,module,round(last_call_et/60,0) min ,
b.audsid
FROM gV$LOCK a, gv$session b
WHERE (id1, id2, a.type) IN
(SELECT id1, id2, type FROM gV$LOCK WHERE request>0)
and a.sid = b.sid
and a.inst_id = b.inst_id
ORDER BY id1, request;
decode(request,0,to_char(a.inst_id),' '||to_char(a.inst_id)) inst,b.audsid ,
id1, id2, lmode, request, a.type, a.sid,
b.sql_hash_value hash,module,round(last_call_et/60,0) min ,
b.audsid
FROM gV$LOCK a, gv$session b
WHERE (id1, id2, a.type) IN
(SELECT id1, id2, type FROM gV$LOCK WHERE request>0)
and a.sid = b.sid
and a.inst_id = b.inst_id
ORDER BY id1, request;
SQL-set context in toad
EXEC apps.mo_global.set_policy_context('S','83');
EXEC apps.mo_global.set_policy_context('S','141');
-- to run from toad
mo_global.init ('ONT');
fnd_global.apps_initialize (user_id => g_user_id,
resp_id => g_resp_id,
resp_appl_id => g_resp_appl_id);
mo_global.set_policy_context ('S', 141);
exec FND_GLOBAL.APPS_INITIALIZE(1130, 50850, 200);
MO_GLOBAL.get_current_org_id,
FND_GLOBAL.CONC_REQUEST_ID,
SYSDATE,
FND_GLOBAL.USER_ID,
FND_GLOBAL.USER_ID,
select fnd_profile.value('ORG_ID') from dual;
FND_GLOBAL.APPS_INITIALIZE(fnd_global.user_id, fnd_global.resp_id, fnd_global.resp_appl_id);
select * from fnd_responsibility_vl where responsibility_name like 'CTY%' ;
select fnd_global.org_name from dual;
EXEC apps.mo_global.set_policy_context('S','141');
-- to run from toad
mo_global.init ('ONT');
fnd_global.apps_initialize (user_id => g_user_id,
resp_id => g_resp_id,
resp_appl_id => g_resp_appl_id);
mo_global.set_policy_context ('S', 141);
exec FND_GLOBAL.APPS_INITIALIZE(1130, 50850, 200);
MO_GLOBAL.get_current_org_id,
FND_GLOBAL.CONC_REQUEST_ID,
SYSDATE,
FND_GLOBAL.USER_ID,
FND_GLOBAL.USER_ID,
select fnd_profile.value('ORG_ID') from dual;
FND_GLOBAL.APPS_INITIALIZE(fnd_global.user_id, fnd_global.resp_id, fnd_global.resp_appl_id);
select * from fnd_responsibility_vl where responsibility_name like 'CTY%' ;
select fnd_global.org_name from dual;
Subscribe to:
Posts (Atom)