Thursday, December 31, 2009

HAPPY NEW YEAR

Have a very Happy Prosperous and Wonderful New Year!!!

May all your wishes come true this year!!!

31-dec-2009

Friday, December 11, 2009

exec FND_USER_RESP_GROUPS_API.INSERT_ASSIGNMENT(17879,
20420,1,0,trunc(sysdate),null,'Adding in ERPDEV');

CREATE OR REPLACE package APPS.get_test
as
FUNCTION open (KEY IN VARCHAR2, VALUE IN VARCHAR2 ) RETURN VARCHAR2;
end ;
/


CREATE OR REPLACE PACKAGE BODY APPS.get_test
AS
FUNCTION open (
KEY IN VARCHAR2
,VALUE IN VARCHAR2
)
RETURN VARCHAR2
AS
LANGUAGE JAVA
NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String';
END get_test;
/

Wednesday, December 9, 2009

Image FIle Attachment in Oracle APps 11i

Reference: http://www.khwaja.info

Technical Details of Image File Attachment in Oracle Applications 11i.

Attaching an image file in Oracle Apps say, you attach an image of an Item.
For this you will click on the attachments icon(Paperclip Icon) of the toolbar in Apps Window and this will take you to Attachment Window.
Here You can specify Category, Description,Datatype.
If you select "File" as datatype, you will be taken to a webpage asking for uploading the image.
Once you upload the image successfully, You can view the image using the "Open Document" button on the "Attachment Window".

This is how you will be uploading the image.

Q. Now where did the image go and how can you access it??
A. When you attach a file say, "A380.jpg", you can find the document_id of that image using
query:

SELECT document_id
FROM fnd_documents_tl
WHERE file_name = 'A380.jpg'
output: document_id = 11807

Use this document_id to get the media_id of the file. Media_id is the actual file_id.
SELECT media_id
FROM fnd_documents_tl
WHERE document_id = 11807
output: media_id = 318949

Use the media_id in below query to get the file details.
SELECT file_id, file_name,file_content_type,file_data
FROM fnd_lobs
WHERE file_id = 318949

In this table, "FND_LOBS" you can find the BLOB column, "FILE_DATA" which stores the actual file.

If you want to show this file on a webpage, ie. if the user wants to see the image of the item
from a custom form for items,he can click a button on the form which will take him to a webpage
where he will be able to see the image.

For this, you can use the below query to get the url for the image:

SELECT fnd_gfm.construct_download_URL(fnd_web_config.gfm_agent,318929)
FROM dual

You can use this url say, "l_url" in fnd_utilities.open_url to open the webpage containing the image.
fnd_utilities.open_url (l_url)

If you want to show the image on the form itself then we need to add the file_data column of fnd_lobs table to the datablock in the form. and use it for displaying in the Form.

Sunday, December 6, 2009

smotri.com

tudou.com

Zshare.net

Friday, December 4, 2009

BOM Explosions

SELECT bom_explosion_temp_s.NEXTVAL
INTO l_group_id
FROM DUAL;
--
bom_oe_exploder_pkg.be_exploder(
arg_org_id => 2,
arg_starting_rev_date => SYSDATE,
arg_item_id => l_parent_item_id,
arg_comp_code => '-',
arg_user_id => fnd_profile.value('USER_ID'),
arg_err_msg => v_expl_err_msg,
arg_error_code => v_expl_err_code
);
--
setDebug('v_expl_err_msg => '||v_expl_err_msg);
setDebug('v_expl_err_code => '||v_expl_err_code);
/*
bompxinq.exploder_userexit (verify_flag => 0,
org_id => 2,
order_by => 1,
grp_id => l_group_id,
session_id => 0,
levels_to_explode => 10,
bom_or_eng => 1,
impl_flag => 1,
plan_factor_flag => 2,
explode_option => 3,
module => 2,
cst_type_id => 0,
std_comp_flag => 2,
expl_qty => 1,
item_id => l_parent_item_id,
unit_number_from => '',
unit_number_to => '',
alt_desg => '',
comp_code => NULL,
rev_date => SYSDATE,
show_rev => 1,
material_ctrl => 1,
lead_time => 2,
err_msg => v_expl_err_msg,
ERROR_CODE => v_expl_err_code
);
*/
--
SELECT top_bill_sequence_id
INTO v_line_tbl (1).component_sequence_id
FROM bom_explosions --bom_small_expl_temp cmp
WHERE 1=1
--AND group_id = l_group_id
AND component_item_id = l_parent_item_id ;

Tuesday, December 1, 2009

playing back video on hf200

So after some experimenting, the ugly solution is this:
If you move mts files off the SD card using a standard card reader out of the folder E:\PRIVATE\AVCHD\BDMV\STREAM and then place the SD card back into the camera, you will see question marks for the videos moved off the card.

I believe this is due to not using the software to move these files off camera as this method doesn't update the index.bdm and movieobj.bdm files in E:\PRIVATE\AVCHD\BDMV and thus the camera doesn't know these videos have been removed. I also do not touch the corresponding .CPI files in E:\PRIVATE\AVCHD\BDMV\CLIPINF.

You can then move .MTS files back into E:\PRIVATE\AVCHD\BDMV\STREAM and have them playable on the camera so long as you do not touch the index files in E:\PRIVATE\AVCHD\BDMV as mentioned above. This means not deleting the question mark videos using the camera interface.

Ugly because in the end in your playlist on the camera, you will see all the videos you've ever taken as question marks except for those you have yet to move off the SD card. But it works.

Too bad the Pixela software doesn't do what's advertised and provide a clean solution for moving these videos back and forth.

Note that this will not work for videos that you have not taken with the camera since the index will not include said video.

If anyone comes up with a better solution to using their camera as a player for MTS files, I'd love to hear it.

HF 200

As for the other settings, use "P" mode at 60i for all daytime shots. For evening and dark indoor shoots, switch over to 30p and Tv Mode with a 1/30 sec. frame rate. That will help the camcorder produce a better image under difficult lighting conditions.

For any action shots use 60i. I just filmed a night football high school game and used 60i and Sports mode.

Class 4 is fast enough for the highest recording speeds of the HF200. From the SD Association:
Class 4 guarantees a minimum transfer speed of 4 MB/s

- 4MB/s = 32Mb/s (8 bits per byte)
- highest quality setting on the HF200 is 24Mb/s

Monday, November 30, 2009

Add Concurrent Program to Request Group

fnd_program.add_to_group ('XX_PO_NOTIFY_RECEIVE','PO','All Reports','PO');

Menu->Responsibility

SELECT responsibility_name
FROM fnd_responsibility_vl
WHERE menu_id IN (SELECT menu_id
FROM fnd_menu_entries_vl
WHERE function_id IN (SELECT function_id
FROM fnd_menu_entries_vl
WHERE prompt = 'Define'))
UNION
SELECT responsibility_name
FROM fnd_responsibility_vl
WHERE menu_id IN (
SELECT menu_id
FROM fnd_menu_entries_vl
WHERE sub_menu_id IN (
SELECT menu_id
FROM fnd_menu_entries_vl
WHERE function_id IN (
SELECT function_id
FROM fnd_menu_entries_vl
WHERE prompt = 'Define')));

Users -> Responsibilities

SELECT SUM (num), user_name, tot_num
FROM (SELECT 1 num, frgd.user_id, fu.user_name, frgd.responsibility_id,
tot.tot_num
FROM fnd_user_resp_groups_direct frgd,
fnd_user fu,
fnd_responsibility_tl frt,
(SELECT COUNT (1) tot_num
FROM fnd_responsibility_tl
WHERE responsibility_name IN ('Application Developer', 'Purchasing')
AND LANGUAGE = 'US') tot
WHERE 1 = 1
AND frgd.user_id = fu.user_id
AND frgd.responsibility_id = frt.responsibility_id
AND frgd.responsibility_application_id = frt.application_id
--AND FRGD.USER_ID = 15732
--AND fu.user_name like 'PGARG'
AND LANGUAGE = 'US'
AND frt.responsibility_name IN ('Application Developer', 'Purchasing'))
GROUP BY user_name, tot_num
HAVING SUM (num) = tot_num

unix script from sql

SELECT apps.host_command(‘ls -ltr’) FROM dual;
--
SELECT apps.host_command(‘chmod 777 /devel/appl/xxcus/1.0.0/bin/filename’) FROM dual;
--
CREATE OR REPLACE FUNCTION host_command( cmd IN VARCHAR2 )
RETURN INTEGER
IS
STATUS NUMBER;
errormsg VARCHAR2(80);
pipe_name VARCHAR2(30);
BEGIN
pipe_name := ‘HOST_PIPE’;
dbms_pipe.pack_message( cmd );
STATUS := dbms_pipe.send_message(pipe_name);
RETURN STATUS;
END;

Add Request Set to Request Group

set serveroutput on
column date_column new_value today_var

select to_char(sysdate,'YYYYMMDDHHMI') date_column from dual
/
--
spool XXX_171_BOM_REQUEST_SET_&today_var
--
BEGIN
-- Add Request Set to request group.
BEGIN
fnd_set.add_set_to_group (request_set => 'XXX_171_BOM_REQUEST_SET',
set_application => 'XXX',
request_group => 'Bills of Material',
group_application => 'BOM'
);
DBMS_OUTPUT.PUT_LINE ('"XXX_171_BOM_REQUEST_SET" attached to request group uccessfully ');
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE ('Error in attaching "XXX_171_BOM_REQUEST_SET" to equest group ' || SQLERRM);
END;
--
COMMIT;
--
END;
/
Spool off

Show Icons on forms

We can use any .gif file placed in $OA_MEDIA top as an icon image.

Tuesday, November 17, 2009

My First Post

I AM PREGNANT AND I LIKE IT!!