Modifying Oracle Standard Form
am trying to modify the purchasing transactions receiving form. I am trying to make it mandatory the purchase order number while querying for the purchase orders.At present the purchase order Receiving form can query without entering any purchase order numbers.I have written a KEY-NEXT-ITEM trigger and a WHEN_VALIDATE-ITEM trigger for the item PO_NUM in the block FIND.Also I have modified the WHEN-BUTTON-PRESSED trigger on the button FIND in the block FIND.However the form does not show up the error messages coded in the above triggers when no PO numbers are entered in the PO_NUM field.kindly help. am trying to modify the form RCVCOFND.fmb
Hello,
you can try "SET_ITEM_PROPERTY' command with the "ITEM_IS_VALID" property,so that the validation will be forced on the po_num column.
Regards
Mohan
Similar Messages
-
Calling Oracle Standard Form from OAF page - Need to hide the find screen.
Hi all,
i have a requirement where i need to call a oracle standard form(D2K form) from OAF page and need to pass parameter. Now i can able to call a form from page on button click using the following syntax,
"form:AR:US_AR_SUPER_USER:STANDARD:AR_ARXCWMAI_AGE"
My query here is, When i call this form its open with find Form and after values are entered it goes the main form.
I need to hide this find screen which is avaiable in standard and need to call directly the main form with out find form.
Please help me out to reach this.
Thanks in advance.
Regards,
RenuYou need to pass the parameter to the actual form to display the results something like "form:AR:US_AR_SUPER_USER:STANDARD:AR_ARXCWMAI_AGE&P_PARAM=123", assuming P_PARAM is the actual parameter defined in the form. Open the form and check which parameters are available and pass the values accordingly.
Thanks
Shree -
Materials for modifying Oracle Standard Report
Hi,
I need to modify Oracle Standard Reports.
Is their any material or documentation how to do it...?
If some one could give me the link or documentation that would be really great full!
Thank you!
-Preetha.hi
which type of modification u want explain me i will tel u soluation
Rizwan -
Displaying image on a standard form in Oracle Apps
Hello,
Is there any means by which we can add image item to Oracle standard form?
I will be creating a custom table to store itemwise images.
I need to synchronize the image displayed on a standard form with the item code.
Is this possible?
Kindly give some ideas or inputs on this.
Thanks
Ashwini.Ashwini,
for forms the appropriate forum is :
Personalization
--Mukul -
User Level PO Restrictions In Orcle PO Standard Form
Hi All,
I need to restrict the PO's in Oracle Standard Form. Suppose Say we have 3 users.
USER1
USER2
USER3
The PO's Created by USER1 should not able to query by USER2 and USER3. And the PO's Created by USER2 and USER3 should not able to query by USER1. But the PO'S Created by USER2 and USER3 can be queried among them.
What is the possible methods and steps to meet the above requirement.
Please Help and give the solution,
Regards,
AmeenUse standard exit available for PO release M06E0004.
This enhancement allows you to change the communication structure for
determining the release strategy for external purchasing documents.
The following user fields are available in CEKKO, which you can fill:
USRC1
USRC2
USRN1
USRN2
The communication structure CEKKOZZ is also available, enabling you to
use your own fields.
BR -
Required Trigger To be Oracle Application Forms Customization and its order
Hi All,
I am new to oracle application forms customization.
Can you please answer following?
What are the triggers required to be overrided for forms customization in oracle appliocation?
What is the order of trigger event occurrs when forms comes up in Oracle application?
Thanks
PrashantHi Prashant,
There are a number of triggers in Oracle forms. They are basically 4 types
1. Form level
2. Block Level
3. Record Level
4. Item Level
Again there are subclassifications.
The firing sequence depends on your action. If you make a change in an item and save the item level triggers fire for the item you changed. Then the record level triggers fire. However if you are click in an item(you are technically navigating to the item) the record level(when new record instance-WNRI) fires and then the item level trigger(when-new-item-instance WNII) fires.
So it depends on the situation. Look in the forms tool help sections. The have some good discussions there.
Now to 'override' triggers. I am assuming you plan to extend oracle standard forms. The best way to do this is use the CUSTOM.pll. Oracle forms call this .pll in various triggers such as WNRI, WNII etc. You can add your logic here and it will take effect and will be upgrade safe. Nowadays they have forms personalization. Take a look at this also to determine the best way.
You may want to read the Application developers guide from metalink and they have a good discussion there on forms customization. It also talks about the CUSTOM.pll
The scope of forms is huge and you would be better of taking a
1. Forms course
2. quick look through the forms section of the developer's guide and understand the concepts
3. Honing on the customizations you want to do and start working on that specific component.
4. Look in Metalink which has a lot of info on forms and forms forums.
This is actually a Framework forum which deals with Web applications :-)
Thanks
Sandeep -
Oracle seeded form color got changed after registration of a custom form
Hi,
I have register a custom form in Oracle apps 11i.
Custom form is opening properly but when we are navigating to open the oracle standard form, oracle standard form is coming completely black.
Could you please through some light on it. It would be great help.
RegardsSounds like your new form was not based on the EBS template.fmb so your new form has a different color pallet. When developing for the EBS, you should always use the template.fmb as the starting point for any new form. To fix this, I recommend you open the template.fmb and your new form and then copy all of the objects from your new form into the template.fmb and then save the template.fmb as your new form. You could change the color pallet, but there may be other things your new form is missing so it would be best to start with the template.fmb. This will ensure you have all of the default triggers and libraries attached that an EBS form should have. :)
Craig... -
How to port custom forms application from oracle apps to standard Forms
Hi All
I have developed a small custom forms application inside Oracle EBS.
I have used the TEMPLATE.fmb for all of my custom forms and followed all the standard metalink docs for building a custom forms application inside Oracle EBS 11i.
Now i kindly want to ask if there is any possibility on hos to port this custom application in a standard forms and reports services with oracle database, not using the Oracle EBS technology stack.
Is there any doc or step by step procedures?
thank you very much in advance
SoniNow i kindly want to ask if there is any possibility on hos to port this custom application in a standard forms and reports services with oracle database, not using the Oracle EBS technology stack.If you want to register this custom form and integrate it with EBS then you need to do it from EBS.
Is there any doc or step by step procedures?https://forums.oracle.com/forums/search.jspa?threadID=&q=custom+AND+form+AND+register&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
https://forums.oracle.com/forums/search.jspa?threadID=&q=custom+AND+application+AND+register&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
Converting from Oracle Express Objects to Standard Form
Hi,
I have create an EIF file from our Oracle Express database, then I have created an Analytic Workspace and imported the EIF file. After this I identify the Time dimensions. But when I want to identify the hierarchie dimension of each time dimension, it brings an Error: "ORA-34492: Analytic Workspace Object Jan96 does not exists", but when I look in the OX there exists the object. Where is the problem?
Thanks DianaDid you run the conversion program listed in the documentation:
If your Express database contains Oracle Express Objects metadata (that is, it was created by Oracle Express Administrator), then you can use a conversion program named CREATE_DB_STDFORM. Without Oracle Express Objects metadata, CREATE_DB_STDFORM cannot generate sufficient standard form metadata for the OLAP tools to work.
This should generate the required metadata but you will not to create some additional attributes to correctly manage time as the conversion utility does not do everything for you:
If you want to perform time-based analysis on your data, you must identify all time dimensions and populate end date and time span attributes before using CREATE_DB_STDFORM. A sample program is provided in this appendix:
Create date and time span attributes for each dimension.
DEFINE TIME_TIME_SPAN VARIABLE INTEGER <timedim hierdim>
PROPERTY 'USERDATA' FALSE
DEFINE TIME_END_DATE VARIABLE DATE <timedim hierdim>
PROPERTY 'USERDATA' FALSE
Populate the end date and time span attributes, as described in "Populating Time Attributes".
Set properties on the Time dimension:
CONSIDER timedim
PROPERTY 'END_DATE' attribute_name
PROPERTY 'TIME_SPAN' attribute_name
The END_DATE and TIME_SPAN values (attribute_name) identify the names of the variables that you just created.
Run the conversion tool with a command like this:
CALL CREATE_DB_STDFORM('aw')
Refer to the syntax description in "CREATE_DB_STDFORM Syntax". After the conversion tool completes successfully, save the changes:
UPDATE
COMMIT
Hope this helps
Keith Laker
Oracle EMEA Consulting
BI Blog: http://oraclebi.blogspot.com/
DM Blog: http://oracledmt.blogspot.com/
BI on Oracle: http://www.oracle.com/bi/
BI on OTN: http://www.oracle.com/technology/products/bi/
BI Samples: http://www.oracle.com/technology/products/bi/samples/ -
Modifying the format of standard form for transaction PP40
Hello gurus,
I want to modify the format of the standard form HR_ALL_BUCH for training and event management section of HR. For this i know that i have to copy the standard form into a z-form. So i copied the form and named it as ZH_ALL_BUCH. Now i am able to change the contents of the mail but i cannot reposition the windows. The section where we put the height and width of window is looking grayout even if i open th form in change mode. How can i reposition the windows?
Regards,
Yayati EkboteHello,
I solved my problem myself. The original form was in german language. so while opening the form in change mode, the language of the form should have been 'DE' and not 'EN'. So i set the language as 'DE' and the form windows were repositionable. Thanks.
Regards,
Yayati Ekbote -
How to add a new fiels to to a customized standard Oracle apps forms
Hi Guru's
I have the following requirement to modifiy the PO Receiving screen in Oracle apps 11i,
1. An additional field (No. of Items to recive) need to be created to the “PO Receiving” screen of Oracle apps 11i .
2. Once user mentioned the po num, PO Line Num and quantity in the newly created text field and when he/she click on the Find Button , the receipt lines (lines should be as many as the quantity mentioned in the newly created field) should be create in the receipt screen
Please let me know if this can be achived through Form Personalization or is there any other approach?
Thanks,
Mustaq.Mustaq,
Why do you want to customize (and break support for the PO Receiving Form) instead of extend the form with Descriptive Flex-Fields (DFF) as I suggested when I responded to your earlier question regarding this same subject: How to create a text field in Oracle apps11i Forms.?
Also, as Francois, Andreas and I have pointed out - the general Forms forum is not the proper place to ask EBS related questions. Yes, there are people in this Forum that have or are currently working with the EBS, but that is not the purpose of this forum. Please post your question in the General EBS Discussion forum. If you have a general Forms question, by all means, ask it here! ;-) Customizing or using a DFF is not a "general Forms question" so please use the appropriate forum! :-)
Craig... -
How to modify query statement in record grp of LOV in standard form
Hi,
We are using Service contracts in Production environment.
Duplicate rows selected for LOV query.
By adding a line userenv('language') we solve the problem.
But the coding was written inside the standard "OKSITMSL.pll". Here For the Field "NAME", LOV
record group "CUST_SYSTEM" assigned dynamically based on
other fields "ITEMSEL.FILTER = SYSTEM" and "ITEMSEL.CUSTOMER_FILTER = CUSTOMER".
I have added piece of the details below.
Form is Standard form "OKSITMSL", Which is calling om parent form "OKSAUDET".
Form : OKSITMSL
Block : ITEMSEL
field : NAME
pll : OKSITMSL.pll
oksitmsl.pll coding-------------
ELSIF NAME_IN('ITEMSEL.FILTER') = 'System' THEN
If UPPER(Name_In('ITEMSEL.CUSTOMER_FILTER')) = 'CUSTOMER' then
l_group_name := 'CUST_SYSTEM';
Elsif UPPER(Name_In('ITEMSEL.CUSTOMER_FILTER')) = 'RELATED' then
l_group_name := 'REL_CUST_SYSTEM';
Elsif UPPER(Name_In('ITEMSEL.CUSTOMER_FILTER')) = 'BOTH' then
l_group_name := 'BOTH_SYSTEM';
Elsif UPPER(Name_In('ITEMSEL.CUSTOMER_FILTER')) = 'ALL' then
l_group_name := 'OKS_SYSTEM';
End If;
Set_Lov_Property('ITEMSEL_LEVEL', GROUP_NAME, l_group_name);
âCUST_SYSTEMâ Record group present in âOKSITMSLâ form.
I need the advice how to solve my problem by adding a line in query of "CUST_SYSTEM" record group without touching/alter standard form.
Thanks in advance.
Navasthank you shadow,
I think you mean like below:
and trim(leading 0 from a.DD_DRX_BSID_NID) = nvl(trim(to_char(SUBSTR('00042',6,5),'XXXXXXXXX')),0)
and trim(leading 0 from a.DD_DRX_BSID_BSC) = nvl(trim(to_char(SUBSTR('00042',11,5),'XXXXXXXXX')),0) ))But i think it compares with all 0's record ... but that's not correct
Edited by: josh1612 on Dec 22, 2008 2:50 AM -
ORA-06531 reference to uninitialized collection in oracle 6i form
Hello,
I am importing data from excel to database table with column mapping (oracle 6i forms)using ole2 package, then calling package
which is having a procedure. while executing the package procedure,
I am getting error 'ora-06531 reference to uninitialized collection' i.e. before for i in 1..in_lData.count
I am working on it but still not getting any solution. There is no problem in coding my form gets compiled but at run time i am getting this error.
And while debugging, data fetched from ole2 package is not passed to for loop of the procedure.
(first of all i am calling ole 2 package, then from ole2 package i am calling my package. procedure)
please help me. My code is this
------------------------------------------------------Ole 2 Package begins-----------------------------------------------------------------
PROCEDURE get_excel IS
APPLICATION OLE2.OBJ_TYPE;
WORKBOOKS OLE2.OBJ_TYPE;
WORKBOOK OLE2.OBJ_TYPE;
WORKSHEETS OLE2.OBJ_TYPE;
WORKSHEET OLE2.OBJ_TYPE;
CELL OLE2.OBJ_TYPE;
CTR NUMBER(12);
COLS NUMBER(2);
CELLVALUE VARCHAR2(89);
C_ROUTE VARCHAR2(255);
V_ROUTE VARCHAR2(1000);
C_TRNDATE VARCHAR2(255);
V_TRNDATE VARCHAR2(1000);
C_TTIME VARCHAR2(255);
V_TTIME VARCHAR2(1000);
C_TID VARCHAR2(255);
V_TID VARCHAR2(1000);
FILENAME VARCHAR2(500);
v_path varchar2(1000):=:path;
ARGS OLE2.OBJ_TYPE;
tDataList PK_EXCEL_TO_DB.tDataList;
BEGIN
:progress:='Please wait...';
SYNCHRONIZE;
--------------INITIATE EXCEL APPLICATION---------------------------
filename := V_PATH;--GET_FILE_NAME('c:\', File_Filter=>'Excel Files (*.xls)|*.xls|'); -- to pick the file
APPLICATION := OLE2.CREATE_OBJ('EXCEL.APPLICATION');
OLE2.SET_PROPERTY(APPLICATION,'VISIBLE','FALSE');
----------------GET WORKBOOKS FROM EXCEL APPLICATION---------------
WORKBOOKS := OLE2.GET_OBJ_PROPERTY(APPLICATION, 'WORKBOOKS');
----------------OPEN REQUIRED WORKBOOK-----------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS, FILENAME);
WORKBOOK := OLE2.GET_OBJ_PROPERTY(WORKBOOKS,'OPEN',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
----------------OPEN REQUIRED WORKSHEET---------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,'Sheet1');
WORKSHEET := OLE2.GET_OBJ_PROPERTY (WORKBOOK,'WORKSHEETS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
----------------GET CELL VALUE-------------------------------------
ctr := 2; --row number
cols := 1; -- column number
FIRST_RECORD;
LOOP
-----------------------COLUMN1-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS); --COLS
OLE2.ADD_ARG(ARGS,1);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_ROUTE := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,1);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_ROUTE := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
-----------------------COLUMN2-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,2);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TRNDATE:= OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,2);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TRNDATE:= OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
-----------------------COLUMN3-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,3);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TTIME := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,3);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TTIME := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
-----------------------COLUMN4-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,4);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TID := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,4);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TID := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
PK_EXCEL_TO_DB.PR_DO_INSERT(tDataList);
EXIT WHEN length(V_Route) = 0 or length(V_Route) is null;
ctr := ctr + 1;
cols := 1;
i_ldata := PK_EXCEL_TO_DB.tDatalist(); --already define
PK_EXCEL_TO_DB.PR_DO_INSERT(tDataList);
END LOOP;
:progress:='EXCEL READING IS DONE...';
----------------CLOSE THE EXCEL SHEET AFTER READING--------------
OLE2.INVOKE(APPLICATION,'QUIT');
-----------------RELEASE ALL OBJECTS
OLE2.RELEASE_OBJ(CELL);
OLE2.RELEASE_OBJ(WORKSHEET);
OLE2.RELEASE_OBJ(WORKBOOK);
OLE2.RELEASE_OBJ(WORKBOOKS);
OLE2.RELEASE_OBJ(APPLICATION);
:PROGRESS := 'DATA INSERTED INTO THE TABLE '; SYNCHRONIZE;
SYNCHRONIZE;
exception
WHEN OTHERS THEN
MESSAGE(sqlerrm);
END;
----------------------------------------------------------------------------------------OLE2 PACKAGE ENDS-------------------------------------------------
------------------------------------------------------------PK_EXCEL_TO_DB PACKAGE SPECIFICATION---------------------------------------------
PACKAGE PK_EXCEL_TO_DB IS
TYPE tKeyValue IS RECORD (
CROUTE VARCHAR2(255),
VROUTE VARCHAR2(1000),
CTRNDATE VARCHAR2(255),
VTRNDATE VARCHAR2(1000),
CTTIME VARCHAR2(255),
VTTIME VARCHAR2(1000),
CTID VARCHAR2(255),
VTID VARCHAR2(1000));
TYPE tDataList IS TABLE OF tKeyValue;
PROCEDURE PR_DO_INSERT(i_lData IN tDataList);
END;
-----------------------------------------------------------------PK_EXCEL_TO_DB PACKAGE BODY-----------------------------------------------------
PACKAGE BODY PK_EXCEL_TO_DB IS
PROCEDURE PR_DO_INSERT(i_lData IN tDataList) IS
CC_ROUTE VARCHAR2(255);
VV_ROUTE VARCHAR2(1000);
CC_TRNDATE VARCHAR2(255);
VV_TRNDATE VARCHAR2(1000);
CC_TTIME VARCHAR2(255);
VV_TTIME VARCHAR2(1000);
CC_TID VARCHAR2(255);
VV_TID VARCHAR2(1000);
BEGIN
FOR i IN 1..i_lData.count
LOOP
CC_ROUTE:=CC_ROUTE || ',' || i_ldata(i).CROUTE;
VV_ROUTE:=VV_ROUTE|| ',''' || i_ldata(i).VROUTE || '''';
CC_TRNDATE :=CC_TRNDATE || ',' || i_ldata(i).CTRNDATE ;
VV_TRNDATE :=VV_TRNDATE || ',''' || i_ldata(i).VTRNDATE || '''';
CC_TTIME :=CC_TTIME || ',' || i_ldata(i).CTTIME ;
VV_TTIME :=VV_TTIME || ',''' || i_ldata(i).VTTIME || '''';
CC_TID :=CC_TID || ',' || i_ldata(i).CTID ;
VV_TID :=VV_TID || ',''' || i_ldata(i).VTID|| '''';
END LOOP;
--EXECUTE IMMEDIATE
FORMS_DDL('INSERT INTO TEMP2 (' || SUBSTR(CC_ROUTE, 2) || ' ' ||
SUBSTR(CC_TRNDATE, 2) || ' ' ||
SUBSTR(CC_TTIME, 2) || '' ||
SUBSTR(CC_TID, 2) || ')
VALUES (' || SUBSTR(VV_ROUTE,2) || ' ' ||
SUBSTR(VV_TRNDATE,2) || '' ||
SUBSTR(VV_TTIME,2) || ' ' ||
SUBSTR(VV_TID,2)|| ')');
commit;
END;
END;
------------------------------------------------------------------------PK_EXCEL_TO_DB PACKAGE BODY ENDS--------------------------------------
Thank You
Sameer.Hii Andreas Weiden,
Sorry for replying late. I am very thankful to Francois and your for your suggestion. I've gone through the documentation of collection and finally i got the solution.
But I am unable to insert rercord to the table. Values are passed to the procedure, i am able to see the values while debugging and i get the message
'DATA INSERTED INTO THE TABLE' but when i check it with sql, the table is empty. I've tried commit and standard.commit, but it doesn't works. My modified code is given below.
PROCEDURE get_excel IS
APPLICATION OLE2.OBJ_TYPE;
WORKBOOKS OLE2.OBJ_TYPE;
WORKBOOK OLE2.OBJ_TYPE;
WORKSHEETS OLE2.OBJ_TYPE;
WORKSHEET OLE2.OBJ_TYPE;
CELL OLE2.OBJ_TYPE;
CTR NUMBER(12);
COLS NUMBER(2);
CELLVALUE VARCHAR2(89);
C_ROUTE VARCHAR2(255);
V_ROUTE VARCHAR2(1000);
C_TRNDATE VARCHAR2(255);
V_TRNDATE VARCHAR2(1000);
C_TTIME VARCHAR2(255);
V_TTIME VARCHAR2(1000);
C_TID VARCHAR2(255);
V_TID VARCHAR2(1000);
FILENAME VARCHAR2(500);
v_path varchar2(1000):=:path;
ARGS OLE2.OBJ_TYPE;
i_ldata PK_EXCEL_TO_DB.tDataList:=PK_EXCEL_TO_DB.tDataList();
tDataList PK_EXCEL_TO_DB.tDataList;
BEGIN
:progress:='Please wait...';
SYNCHRONIZE;
--------------INITIATE EXCEL APPLICATION---------------------------
filename := V_PATH;--GET_FILE_NAME('c:\', File_Filter=>'Excel Files (*.xls)|*.xls|'); -- to pick the file
APPLICATION := OLE2.CREATE_OBJ('EXCEL.APPLICATION');
OLE2.SET_PROPERTY(APPLICATION,'VISIBLE','FALSE');
----------------GET WORKBOOKS FROM EXCEL APPLICATION---------------
WORKBOOKS := OLE2.GET_OBJ_PROPERTY(APPLICATION, 'WORKBOOKS');
----------------OPEN REQUIRED WORKBOOK-----------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS, FILENAME);
WORKBOOK := OLE2.GET_OBJ_PROPERTY(WORKBOOKS,'OPEN',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
----------------OPEN REQUIRED WORKSHEET---------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,'Sheet1');
WORKSHEET := OLE2.GET_OBJ_PROPERTY (WORKBOOK,'WORKSHEETS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
----------------GET CELL VALUE-------------------------------------
ctr := 2; --row number
cols := 1; -- column number
FIRST_RECORD;
LOOP
i_ldata.extend(ctr);
i_ldata.extend(cols);
--tDataList:=PK_EXCEL_TO_DB.tDataList();
-----------------------COLUMN1-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS); --COLS
OLE2.ADD_ARG(ARGS,1);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_ROUTE := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(cols).CROUTE:=C_ROUTE;
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,1);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_ROUTE := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(ctr).VROUTE:=V_ROUTE;
-----------------------COLUMN2-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,2);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TRNDATE:= OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(cols).CTRNDATE:=C_TRNDATE;
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,2);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TRNDATE:= OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(ctr).vtrndate:=v_trndate;
-----------------------COLUMN3-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,3);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TTIME := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(cols).CTTIME:=C_TTIME;
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,3);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TTIME := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(ctr).vttime:=v_ttime;
-----------------------COLUMN4-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,4);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TID := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(cols).CTID:=C_TID;
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,4);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TID := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(ctr).vtid:=v_tid;
PK_EXCEL_TO_DB.PR_DO_INSERT(i_ldata);
-- i_ldata := PK_EXCEL_TO_DB.tDatalist();
EXIT WHEN length(V_Route) = 0 or length(V_Route) is null;
ctr := ctr + 1;
cols := 1;
END LOOP;
:progress:='EXCEL READING IS DONE...';
----------------CLOSE THE EXCEL SHEET AFTER READING--------------
OLE2.INVOKE(APPLICATION,'QUIT');
-----------------RELEASE ALL OBJECTS
OLE2.RELEASE_OBJ(CELL);
OLE2.RELEASE_OBJ(WORKSHEET);
OLE2.RELEASE_OBJ(WORKBOOK);
OLE2.RELEASE_OBJ(WORKBOOKS);
OLE2.RELEASE_OBJ(APPLICATION);
:PROGRESS := 'DATA INSERTED INTO THE TABLE '; SYNCHRONIZE;
SYNCHRONIZE;
exception
WHEN OTHERS THEN
MESSAGE(sqlerrm);
END;Package specification and package body is
PACKAGE PK_EXCEL_TO_DB IS
TYPE tKeyValue IS RECORD (
CROUTE VARCHAR2(255),
VROUTE VARCHAR2(1000),
CTRNDATE VARCHAR2(255),
VTRNDATE VARCHAR2(1000),
CTTIME VARCHAR2(255),
VTTIME VARCHAR2(1000),
CTID VARCHAR2(255),
VTID VARCHAR2(1000));
TYPE tDataList IS TABLE OF tKeyValue;
PROCEDURE PR_DO_INSERT(i_lData IN tDataList);
END;
-----------------------------------------------------------------PK_EXCEL_TO_DB PACKAGE BODY-----------------------------------------------------
PACKAGE BODY PK_EXCEL_TO_DB IS
PROCEDURE PR_DO_INSERT(i_lData IN tDataList) IS
CC_ROUTE VARCHAR2(255);
VV_ROUTE VARCHAR2(1000);
CC_TRNDATE VARCHAR2(255);
VV_TRNDATE VARCHAR2(1000);
CC_TTIME VARCHAR2(255);
VV_TTIME VARCHAR2(1000);
CC_TID VARCHAR2(255);
VV_TID VARCHAR2(1000);
BEGIN
FOR i IN 1..i_lData.count
LOOP
CC_ROUTE:=CC_ROUTE || ',' || i_ldata(i).CROUTE;
VV_ROUTE:=VV_ROUTE|| ',''' || i_ldata(i).VROUTE || '''';
CC_TRNDATE :=CC_TRNDATE || ',' || i_ldata(i).CTRNDATE ;
VV_TRNDATE :=VV_TRNDATE || ',''' || i_ldata(i).VTRNDATE || '''';
CC_TTIME :=CC_TTIME || ',' || i_ldata(i).CTTIME ;
VV_TTIME :=VV_TTIME || ',''' || i_ldata(i).VTTIME || '''';
CC_TID :=CC_TID || ',' || i_ldata(i).CTID ;
VV_TID :=VV_TID || ',''' || i_ldata(i).VTID|| '''';
END LOOP;
FORMS_DDL('INSERT INTO TEMP2 (' || SUBSTR(CC_ROUTE, 2) || ' ' ||
SUBSTR(CC_TRNDATE, 2) || ' ' ||
SUBSTR(CC_TTIME, 2) || '' ||
SUBSTR(CC_TID, 2) || ')
VALUES (' || SUBSTR(VV_ROUTE,2) || ' ' ||
SUBSTR(VV_TRNDATE,2) || '' ||
SUBSTR(VV_TTIME,2) || ' ' ||
SUBSTR(VV_TID,2)|| ')');
--standard.commit;
commit;
END;
END;Thanks
Sam
Edited by: sam8682 on May 13, 2013 2:35 PM -
Why record had been unlock in Oracle Apps form?
I have a problem with lock in oracle apps forms.
The problem occurs with all forms in the Oracle Financials (forms with standard oracle apps user-exit), the problem does not occur with standard Oracle default form (outside of the oracle apps, form without user-exit included in Oracle Financials).
For exemple, I will take the Define Lookups forms.
If USER1 modify a record (ex. modify the date from), the record is locked, if USER2 try to update the same record in an other session, he will received an error message indicating that the record is locked and he will not be able to update it. This is normal.
But ..., if USER1 WAIT 1 minute, and just press TAB to go to an other field (WITHOUT SAVING, WITHOUT DOING ANYTHING ELSE), the record is unlock.
USER2 can modify the same record without having the locked message. This is the problem, USER2 should receive an error message because USER1 did not save the record yet but the message do not appear. At this moment USER2 lock the record. If USER1 press SAVE key, his session will be freeze until USER2 save the record.
Why the record had been unlock for USER1 session?
My Oracle Apps version is 11.5.5.
Does somebody ever seen this problem ?
Thanks.There are forums specifically for posing questions relating to EBS. I would recommend you ask your question there.
-
Adding a value to an LOV in an Oracle apps form
Hi Guys
Im new to forms and customizations in apps as im sure will be apparent with the questions i have :-)I have a requirement to add a value to an LOV on a field in an oracle apps form.
My question is
1: How do i get the lov query?
2: How do i edit an existing query.
3: How can i solve this problem.
ThanksSince you are working with the E-Business Suite, most likely the LOV is based on a Value Set. I strongly recommend you confer with a coworker for guidance on how to investigate an Oracle EBS Form. Value Sets are defined within the EBS setup screens and you have to be assigned to a responsibility that will allow you to modify and create Value Sets. I also strongly recommend you visit the Oracle Applications Documentation web site and review the Oracle Applications Developer's Guide and Oracle Applications User Interface Standards for Forms-Based Products for your particular version of the EBS.
Also, the General EBS Discussion is the more appropriate forum to post this type of question.
Hope this helps.
Craig...
Maybe you are looking for
-
HT201210 I get an error message to reinstall itunes what do I do
I get an error message to reinstall itunes what I do to get it reinstalled?
-
Reading image outside webapp contextpath??
I'm making a project that makes a picture gallery that has to be accessible throw web, wap, webdav and file sharing. The project consisting of a ejb backend and struts frontend(using velocity as presentation). I have made the EJB backend so that each
-
Wwv_usr_menus$ Production version
How do you tell which version in the wwv_usr_menus$ table is the production version? Version column contains the version number, not whether it is production! TIA
-
Hiding POSTed parameters in v2
Hi: I have a portal which contains tabbed pages. My problem is that within those tabbed pages I have jsp portlets which contain forms. When I submit the form, the data gets posted correctly, but when I change to another tabbed page, all the form vari
-
Files not found installing 12c on windows 8.1
mk_dir.sql.sbs, dr0ulib.sql.sbs not found while installing 12c on wondows 8.1. I had heard its a downloading issue, so I downloade dit again. File not found persists. Details: Oracle 12c installation - Pastebin.com