Oracle - Webdynpro Tables
hi experts,
How to Store and fetch the data from oracle BD and after fetching i want to display that result in webdynpro table and storing is also from webdynpro view interface.
can anybody help me on end to end procdure how can i achive.
Advance Thank you,
vijai
Hi vijay,
<b> using EJB and connect with oracle.</b>
the step by step procedure is follow how to connect with oracle
1) Open the J2EE perspective
2) Create an EJB Module project
3) Right click on ejbModule, create a new EJB (select your EJB type)
4) While creating the ejb itself, you can add business methods by clicking Next in the UI. Another option is after creating the ejb, write the method in the bean, then select the method from ejb-jar.xml -> <bean name> ->method. Right click and select propogate to local & remote.
5) Double click on ejb-j2ee-engine.xml. select your bean and specify a Jndi name for eg: MyJndi.
6) Right click on the EJB project and add classes12.zip file (provided by Oracle) to its build path. (under libraries tab). Also check the same file under Order & Export.
7) Create an Enterprise Application project.
8) Right click on the EJB module project and select add to EAR project, then select the created EAR project.
9) Right click on the EJB project, select Build EJB Archive
10) Right click on the EAR project, select Build Application Archive
11) Open the WebDynpro perspective, open a new project, right click on the project ->properties. Do the following configurations :-
Java Build path - select the EJB project from projects , check the selected project under Order & Export
Project references select the EAR project
WebDynpro references select sharing references tab, click add & make an entry as : <vendor>/<EAR project name without .ear extension>
You can find the vendor name under application-j2ee-engine.xml file of the EAR project. By default it is sap.com. So if my EAR projects name is ABC, my entry would look like sap.com/ABC
12) Now the configurations are over and the EJB can be invoked by writing the client code inside the webdynpro component. Like:
InitialContext context = new InitialContext();
Object obj = context.lookup("MyJndi");
MyEJBHome home = MyEJBHome)PortableRemoteObject.narrow(obj,MyEJBHome.class);
MyEJB mybean = home.create();
int a = 0;
a= mybean.add(10,15);
wdContext.currentContextElement().setSum(a);
where MyEJB is my EJB name and MyJndi is my JNDI name
To connect to Oracle , you can write the usual Java code (given below) as a business methos of the ejb (similar to add() method in the example). And access it like mybean.<businessMethodName>().
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@Oracle_server_ip:Oracle port:SID of the Database","user_name","password");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("your query");
i hope that the above steps are useful for u.
Regards,
P.Manivannan.
Similar Messages
-
Hi Everyone,
My Jdev version is 11.1.2.3.0.
I have developed many ADF applications in this version itself by setting time zone as -Duser.timezone="+05:30" and all were running fine.
But Jdeveloper got crashed so i reinstalled the same version but now none of the applications are running.
Its showing error as below:
oracle.jbo.JboException: JBO-29112: The time zone 'GMT+05:30' defined in adf-config.xml or TimeZone.getDefault().getID() does not exist in your Oracle database table V$TIMEZONE_NAMES. Please set an available time zone in your TZ environment variable or user.timezone Java system property.
What to do now?
how will i know wat time zone should be set?
please help the needful...
Thanks.Check if www.jobinesh.com/2010/12/why-do-i-get-oraclejbojboexception-jbo.html helps.
Timo -
How to import the data in a .xls or .xlsx file into a oracle database table
Hi,
Please tell me how to import the data in a .xls or .xlsx file into a oracle database table in Oracle 10gR2 using Oracle Warehouse Builder 10gR2.....can we do something through Non-Oracle->ODBC?Yes, it is possible, look at this thread
[SQLServer access from AIX Warehouse builder|http://forums.oracle.com/forums/thread.jspa?messageID=2502982]
If your server (with target DB and OWB runtime) is on Windows OS this configuration will be simpler - you can use single server.
And additional link on OWB blog (with 11g transparent gateway)
[http://blogs.oracle.com/warehousebuilder/2008/01/11g_heterogeneous_agent.html]
(configuring nonoracle connection with 10g generic connectivity very similar to 11g gateway)
Also look at
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4406709207206#18830681837358
Regards,
Oleg -
How to Display the content of Excel file into Webdynpro Table
Hi Experts
I am following the Blog to upload a file in to the webdynpro context,but my problem is after uploading a excel file i need to extract the content from that Excel file and that content should be displayed in the webdynpro table.Can any body please guide me how to read the content from excel and to Display in the Table.
Thanks and Regards
KalyanHI,
Take for example, if Excel file contains 4 fields,
Add jxl.jar to JavaBuild path and Use this snippet
File f=new File("sample.xls");
Workbook w=Workbook.getWorkbook(f);
Sheet sh=w.getSheet(0);
int cols=sh.getColumns();
int rows=sh.getRows();
Cell c=null;
String s1=null;
String s2=null;
String s3=null;
String s4=null;
ArrayList al=new ArrayList();
int j=0;
for(int i=1;i<rows;i++)
ITableElement table=wdContext.createTableElementz
s1=sh.getCell(0,i).getContents();
s2=sh.getCell(1,i).getContents();
s3=sh.getCell(2,i).getContents();
s4=sh.getCell(3,i).getContents();
table.setName(s1);
table.setAddress(s2);
table.setDesignation(s3);
table.setDummy(s4);
al.add(j,table);
j++;
wdContext.nodeTable().bind(al);
Regards
LakshmiNarayana -
Where can I change the buffer size for LKM File to Oracle (EXTRENAL TABLE)?
Hi all,
I'd a problem on the buffer size the "LKM File to Oracle (EXTRENAL TABLE)" as follow:
2801 : 72000 : java.sql.SQLException: ORA-12801: error signaled in parallel query server P000
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-29400: data cartridge error
KUP-04020: found record longer than buffer size supported, 524288, in D:\OraHome_1\oracledi\demo\file\PARTIAL_SHPT_FIXED_NHF.dat
Do you know where can I change the buffer size?
Remarks: The size of the file is ~2Mb.
TaoHi,
The behavior is explained in Bug 4304609 .
You will encounter ORA-29400 & KUP-04020 errors if the RECORDSIZE clause in the access parameters for the ORACLE_LOADER access driver is larger than 10MB and you are loading records larger than 10MB. Which means their is a another limitation on read size of a record which is termed as granule size. If the default granule size is less then RECORDSIZE it limits the size of the read buffer to granule size.
Use the pxxtgranule_size parameter to change the size of the granule to a number larger than the size specified for the read buffer.You can use below query to determine the current size of the granule.
SELECT KSPFTCTXPN PARAMETER_NUMBER,
KSPPINM PARAMETER_NAME,
KSPPITY PARAMETER_TYPE,
KSPFTCTXVL PARAMETER_VALUE,
KSPFTCTXDF IS_DEFAULT,
KSPPIFLG MODIFICATION_FLAG,
KSPFTCTXVF VALUE_FLAG
FROM X$KSPPI X, X$KSPPCV2 Y
WHERE (X.INDX+1) = KSPFTCTXPN AND
KSPPINM LIKE '%_px_xtgranule_size%';
There is no 'ideal' or recommended value for pxxtgranule_size parameter, it is safe to increase it to work around this particular problem. You can set this parameter using ALTER SESSION/SYSTEM command.
SQL> alter system set "_px_xtgranule_size"=10000;
Thanks,
Sutirtha -
Fastest way to load csv into oracle BE table
I have csv file which is having 10 million records in it . what is the fastest approach to load this data to oracle BE table .
I am using Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options .
csv format
first_name,last_name,occupation,address
above all the fields are of varchar data type.
I have tried to use external table while inserting its taking too much time .
Thankshi,
You can use sql loader.
options (skip=1)
LOAD DATA
INFILE 'csv file path'
truncate /append
INTO table table_name
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
trailing nullcols
column name ,
column name,
column name
{code}
Create this file as ctl(control file.) on the lcoation where your csv file is.
Execute it by goint to the path where your csv file resides.
{code}
cmd
cd path where your csv file resides
sqllder userid=username/password@database name control=your_control_file_name
{code} -
How to create an automatically increment column in Oracle DB Table?
Hi To All
Here I am trying to create a table in Oracle that creates an automatically increment column in Oracle DB Table. i searched almost all Forums.(Even in Oracle). They are saying that, that logic u must implement in Java Code.(*Takes Maximum no from table, add +1 to it, and store it back again)*. apart from this, while creating an table in Oracle, is there any facility like MySQL Database? please help me. Thanks in advance.Hi BalusC
Thanks for Your Response and clue. with that, i succeeded in my application. Thank you very much. here i am giving you the details which i did.
1. I Created a table named orders in Oracle like this.
CREATE TABLE ORDERS (ORDER_ID NUMBER, CUSTOMER_ID NUMBER, ISBN NUMBER,
DESCRIPTION NCHAR(5));
2. I created one sequence in Oracle like CREATE SEQUENCE SEQ01 INCREMENT BY 1 START WITH 1000 3. Then i have written jdbc program like this
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
public class SequenceTest {
public static void main(String[] args)throws Exception{
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.135:1521:orcl","scott","tiger");
String cols[] = {"ORDER_ID", "DESCRIPTION"};
PreparedStatement pstmt = con.prepareStatement("INSERT INTO ORDERS (ORDER_ID, CUSTOMER_ID, ISBN,DESCRIPTION) VALUES (SEQ01.NEXTVAL, 104, 966431505,?)", cols);
pstmt.setString(1,"Desc3");
pstmt.executeUpdate();
ResultSet rs=pstmt.getGeneratedKeys();
System.out.println("---- One Row Inserted ----");
} catch (Exception e) {
System.out.println("---- Failed Due To "+e);
4. When i ran above program 5 times, i got the following Data into my Oracle Table (select * from orders)
ORDER_ID CUSTOMER_ID ISBN DESCR
1000 101 966431502 Desc0
1001 102 966431503 Desc1
1002 103 966431504 Desc2
1003 104 966431505 Desc3
1004 104 966431505 Desc3
1005 105 966431506 Desc4
6 rows selected.
But i dont know how to do this type of program with out using prepared statements. i tried, and i got exception *"Missing Expression"* .
Once again Thank You very much for your clue. -
Duplicate Rows In Oracle Pipelined Table Functions
Hi fellow oracle users,
I am trying to create an Oracle piplined table function that contains duplicate records. Whenever I try to pipe the same record twice, the duplicate record does not show up in the resulting pipelined table.
Here's a sample piece of SQL:
/* Type declarations */
TYPE MY_RECORD IS RECORD(
MY_NUM INTEGER
TYPE MY_TABLE IS TABLE OF MY_RECORD;
/* Pipelined function declaration */
FUNCTION MY_FUNCTION RETURN MY_TABLE PIPELINED IS
V_RECORD MY_RECORD;
BEGIN
-- insert first record
V_RECORD.MY_NUM = 1;
PIPE ROW (V_RECORD);
-- insert second duplicate record
V_RECORD.MY_NUM = 1;
PIPE ROW (V_RECORD);
-- return piplined table
RETURN;
END;
/* Statement to query pipelined function */
SELECT * FROM TABLE( MY_FUNCTION ); -- for some reason this only returns one record instead of two
I am trying to get the duplicate row to show up in the select statement. Any help would be greatly appreciated.Can you provide actual output from an SQL*Plus prompt trying this? I don't see the same behavior
SQL> SELECT * FROM V$VERSION;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> CREATE TYPE MY_RECORD IS OBJECT(MY_NUM INTEGER);
2 /
Type created.
SQL> CREATE TYPE MY_TABLE IS TABLE OF MY_RECORD;
2 /
Type created.
SQL> CREATE OR REPLACE FUNCTION MY_FUNCTION
2 RETURN MY_TABLE
3 PIPELINED
4 AS
5 V_RECORD MY_RECORD;
6 BEGIN
7 V_RECORD.MY_NUM := 1;
8 PIPE ROW(V_RECORD);
9
10 V_RECORD.MY_NUM := 1;
11 PIPE ROW(V_RECORD);
12
13 RETURN;
14 END;
15 /
Function created.
SQL> SELECT * FROM TABLE(MY_FUNCTION);
MY_NUM
1
1 -
Insert and update tables from SQL server to oracle database tables
Hi,
I am having problem while update data from sql server to oracle database tables.
I am doing one way insert +updates that is from SQL Server tables ==> Oracle database tables
I am using tools Sql server Integration service. I can insert data from sql server to oracle but update can't. Please help me how can I update + insert from sql server to oracle database tables easily.
Thanks in advance.Hi,
What about using Oracle SQL Developer for migration
http://www.oracle.com/technetwork/database/migration/sqlserver-095136.html
HTH -
How to find istore tangible id in oracle apps table
Hi all,
i have search tangible id in oracle istore table,but tangible id have two table one is IBY_TANGIBLE and another one is IBY_TRXN_SUMMARIES_ALL.but i need some another table,so help me.
Thanks,
raj.Connect to the forms server.
In the $AU_TOP/resource directory run the following...
strings -a <NAMEOFFILE>.plx | grep '$Header'
For example...
To find the .pld version of INVAMCAP.plx I would run this on the forms server.
cd $AU_TOP/resource
strings -a INVAMCAP.plx | grep '$Header'
This will return the .pld version.
Hope this helps!
Jen -
Encrypting a field in oracle's table
How can I encript a field in a oracle's table?
thanks for helpIy you are using Oracle 8.1.6+ database you could use the PLSQL package DBMS_OBFUSCATION_TOOLKIT which provides two procedures for encriptying and decripting.
Look at the manual:
Oracle8i Supplied PL/SQL Packages Reference
Release 2 (8.1.6)
Part Number A76936-01
for details of usage.
Best regards, Marcelo. -
WebDynpro Table Contents to Adobe:
Hi ,
I have WebDynpro Table element containing lots of data and on click of button it has to open in Adobe and display all the contents in Adobe Table. The problem is that i receive only one record which is lead selected in WebDynpro table. In Adobe i used one Subform ( Content type is flowed) and a table element.
Expecting right ans.
Thanks
Vinod V
Points waiting.Hi, Vinod,
Really its surprising. Everything is fine, then y its not working. here I have created a sample application regarding u r problem. Its working fine. While i am giving Updatepdf it shows only one record. In generate pdf, It shows all the records. Possible, Try to create your Interactive form again as its a simple one.
GS -
Currency Key Reference field in WebDynpro Table Column
Hi Experts,
I am using a WebDynpro table (not ALV) showing multiple currency fields in a single row - each one potentially referencing a different currency key e.g. Japanese Yen and USD in a single row.
My currency context attributes are already defined as currency types, but how can I assign different currency key references to each of my currency context attributes? Or is this somehow done as a property of the table column UI element?
Thanks for your help,
PeterHi Kris,
You answer is very helpful, but I do have a question about going the DDIC route. So you are saying that if I take a DDIC structure into my context with multiple currency keys as reference fields for multiple currency fields, then my WebDynpro context will know exactly which currency key is the reference for which currency field without having do do this programatically as you described? If that's true, can I bring a whole DDIC structure over to the context and then delete the 'Dictionary Structure' refrence from my context node, so that I can add my own additional fields to the context node? E.g. in the case of DDIC structure VBAP can I get all my currency fields and their reference fields from the DDIC from VBAP and then delete 'VBAP' as a 'Dictionary Structure' from my context node and add my own custom fields. The fields I would have brought in from VBAP still retain their type and everything after the deletion of 'VBAP' as a 'Dictionary Structure', so my question is will it also retain the node_info of what currency key goes with what field?
Please let me know if you happend to have done this before.
Thanks,
Peter -
MS Access ODBC to Oracle missing tables
When linking Oracle 8i tables to a MSAccess database using an ODBC connection, some of the tables are not being shown in the list for selection. I can't seem to find any differences between those tables that are listed and those that are not. This is a PeopleSoft system using Oracle as the backend database. Please help!!!
I found my the answer to my own question....I used the Oracle Driver that was installed with my client install. For those of you that are trying to connect to Oracle from Access. I had to create the link using VBA, there is an extra parameter that needs passed in the connection to Oracle, the XSM Parameter. This will create a link in Access called "fsdev_PS_MASTER_ITEM_TBL", the source oracle table is SYSADM.PS_MASTER_ITEM_TBL. You must also have the Microsoft DAO 3.6 Object library installed in the Tools --> References. See the code below:
Option Compare Database
Option Explicit
Function AttachTable() As Variant
On Error GoTo AttachTable_Err
Dim db As Database
Dim tdef As TableDef
Dim strConnect As String
Set db = CurrentDb()
strConnect = "ODBC;DSN=FSDEV;DBQ=FSDEV;DATABASE=;XSM='SYSADM'"
' NOTE: DSN is your ODBC Data Source Name; DBQ is your TNSNAMES.ORA entry name
' NOTE: YOU MUST PASS IN THE XSM PARAMETER IN NEWER VERSIONS OF ORACLE DB
Set tdef = db.CreateTableDef("fsdev_PS_MASTER_ITEM_TBL")
tdef.Connect = strConnect
tdef.SourceTableName = "SYSADM.PS_MASTER_ITEM_TBL"
db.TableDefs.Append tdef
AttachTable_Exit:
Exit Function
AttachTable_Err:
MsgBox "Error: " & Str(Err) & " - " & Error$ & " occured in global module."
Resume AttachTable_Exit
End Function -
How to make 2 lines in a webdynpro table cell?
Hi
Is it possiable to create a WebDynpro Table Call that can contains 2 lines in 1 cell ?Hi Ami,
There are a limited number of UI elements that you may use for a Table Cell Editor, however, with a TextView, you can display text that includes a line break.
The line break is achieved by including the carriage-return-line-feed characters in the Table's data source...
LOOP AT lt_flight_tab ASSIGNING <f>.
CONCATENATE 'Line One' cl_abap_char_utilities=>cr_lf 'Line Two' INTO <f>-test.
ENDLOOP.
Cheers,
Amy
Maybe you are looking for
-
Files on external hard drive now Inaccessible
Hello, I am currently using a 2010 13 inch 2.4 GHz Intel Core 2 Duo MacBook and running OSX Lion (I upgraded in July from Snow Leopard). I have recently come across a problem with my computer recognizing files that are on my external hard drive. This
-
Why do I have to sign in every time use ibooks
Since the ios7 update, almost every time I use iBooks it prompts me to sign into my appstore account. This is new behavior and is aggrevating. Why is it necessary? Am I missing something?
-
Hello Experts, I am new to web dynpros, and I want to know how to display the menu action items under the tree node types in wd abap. please help me in this regards. Thanks in advance. Best Regards
-
How do i clean my Ipod NANO?
i was looking at my ipod when i saw fingerprints all over it, they dont seem to want to go and stay away, how can i clean it?
-
Hey im creating a class as im trying to learn java Ive been following my book word for word on creating classes heres my code which i have finished but it still wont compile /**Person class*/ public class Person private String firstname; pr