How to create tree by database table
hello sir ,
my table is as follows,
NAME LINK ID PID ROLLID
User mgt. f?p=131:1: 1 - 10 ////root node///
district 10 1 1 child
Roles 16 14 4 child
Users 11 10 1 child
ROLLID is given from another table whis is (ROLES). i making tree by the combinations of id , pid, & roll id. by the roll id i can manage the tree to do not display specific nodes to specific users.
ROLE table as :
ROLE_ID NAME DESCRIPTION
1 Administrator This is administrator
2 Assistant Director -
3 Assistant Statistical Officer -
4 Data Entry Operator -
but i think it is very complicated process . give me solution about it
also i have to give my images to each node. how can i do that?
You already have a thread going about this: Re: how to create tree by database table .
Scott
Similar Messages
-
How to create Tree format in Table Rn in one Column having data?
Hi Gurus,
i got the new requirement it's very interesting pl z help me...
My Requirement is i have one Table Rn in Table Rn having 5 columns There here one column name is 'Competencies ' That Competencies column having the more rows liki
FUNC.ADMIN.Achievement Orientation
FUNC.ADMIN.Administrative Assistance and Support
FUNC.ADMIN.Administrative(ADMIN)
This is one column data my Requirement is now
FUNC
+ADMIN
+Achievement Orientation
like clients are expecting pl z tell me how to approach in this requirement and what are prerequisites are needed ...plz help me it's urgent requirement.
Regards,
SriniHi Gyan,
Thank's for valuable suggestions
My Requirement is This ...
"Competencies" Table Layout: (InstTableLayout)
COMPETENCIES (COLUMN NAME)
BEHV.Generic.Communication(BEHV)
BEHV.Generic.Planning, Organizing & Time Management
BEHV.Generic.Problem Solving Ability
BEHV.Generic.Productivity
BEHV.Generic.Punctuality
like number of rows are there now Tree format is row data
like each column divided each one
ex:
+ BEHV
*|*
+Generic
*|*
+Communication(BEHV)
like he expected client in tree format pl z tell me how to approach in this requirement and what are the prerequisites are required .....
Regards,
Srini
Edited by: 876628 on Dec 1, 2011 8:37 PM
Edited by: 876628 on Dec 1, 2011 8:37 PM -
How to create User and Database in different Table spaces
How to create User and Database in different Table spaces using oracle 10g
Regards
dayaI am sorry but your question does not seem to make much sense.
Can you please rephrase your question? -
How to Create A new Database in the oracle 10g XE
i have oracle 10g XE i tried to create a new database but its giveing me error when i execute the sql command that is create database testDatabase how to create a new database in oracle 10g XE
Hi there 785434,
(This is a generic SQL question relating to Database Triggers, please post future questions of this type into the relevant forum area.)
Moderator, please move this if able
I use Before Update and Before Delete Triggers to record a 'snapshot' of the row being changed in my applications.
Example:
CREATE TABLE TEST
DATA VARCHAR2(64 CHAR),
CREATING_USERID VARCHAR2(20 CHAR) DEFAULT user NOT NULL,
CREATED_DATE DATE NOT NULL,
CHANGED_BY_USERID VARCHAR2(20 CHAR),
CHANGED_DATE DATE
LOGGING
STORAGE
(MAXEXTENTS UNLIMITED);
CREATE TABLE TEST_HISTORY
DATA VARCHAR2(64 CHAR),
CREATING_USERID VARCHAR2(20 CHAR) DEFAULT user NOT NULL,
CREATED_DATE DATE NOT NULL,
CHANGED_BY_USERID VARCHAR2(20 CHAR),
CHANGED_DATE DATE,
CHANGE_DESCRIPTION
NOLOGGING
STORAGE
(MAXEXTENTS UNLIMITED);
CREATE OR REPLACE TRIGGER TRG_BU_TEST
BEFORE UPDATE ON TEST FOR EACH ROW
BEGIN
INSERT /*+ append */ INTO TEST_HISTORY
(DATA, CREATING_USERID, CREATED_DATE, CHANGED_BY_USERID, CHANGED_DATE, CHANGE_DESCRIPTION)
VALUES
(:old.DATA, :old.CREATING_USERID, :old.CREATED_DATE, USER, SYSDATE, 'UPDATE');
END;
CREATE OR REPLACE TRIGGER TRG_BD_TEST
BEFORE DELETE ON TEST FOR EACH ROW
BEGIN
INSERT /*+ append */ INTO TEST_HISTORY
(DATA, CREATING_USERID, CREATED_DATE, CHANGED_BY_USERID, CHANGED_DATE, CHANGE_DESCRIPTION)
VALUES
(:old.DATA, :old.CREATING_USERID, :old.CREATED_DATE, USER, SYSDATE, 'DELETE');
END;
Using triggers like this will record who made an update or delete to the database and record the row before it was changed.
Note that this method might not be suitable for very high transaction rates.
You will need to 'clear' these history tables as part of routine maintenance.
Hope that this Helps.
Ronald. -
How to create a logical database?
Hi,
Can anyone tell me how to create a logical database? I am curious about it.
Thanks.
Awards will be provided.
Best regards,
Chris GuTransaction code for creating Logical db is se36.
Give the name as <ldbname>..
Specify the table names and the sub nodes according to your heirarchy.The root node used is zxxx_product and child node is zxxx_orders
The heirarchy used is ZXXX_PRODUCT---->ZXXX_ORDERS
write the below code under selections ...
Enable DYNAMIC SELECTIONS for selected nodes :
SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE zxxx_product.
SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE zxxx_orders.
Enable FIELD SELECTION for selected nodes :
SELECTION-SCREEN FIELD SELECTION FOR TABLE zxxx_product.
SELECTION-SCREEN FIELD SELECTION FOR TABLE zxxx_orders.
***User defined blocks :
****Root node
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 .
SELECT-OPTIONS :
so_pname FOR zxxx_product-prname ,
so_pdelv FOR zxxx_product-prdeldate .
SELECTION-SCREEN END OF BLOCK b1 .
****Child node
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002 .
SELECT-OPTIONS :
so_odate FOR zxxx_orders-orddate ,
so_oqty FOR zxxx_orders-ordqty .
SELECTION-SCREEN END OF BLOCK b2 .
write the below code under include include DBZXX_PRODUCTTOP
TABLES : ZXXX_product, ZXXX_orders.
DATA : gt_root TYPE table of ZXXX_product ,
gt_chld TYPE table of ZXXX_orders .
write the below code under source code...
Call event GET Zxxx_PRODUCT
FORM put_zxxx_product.
TYPES : BEGIN OF ls_pid ,
prodid TYPE zxxx_product-prodid,
END OF ls_pid .
DATA : lt_pid TYPE ls_pid OCCURS 0 ,
lt_pid_tmp TYPE ls_pid OCCURS 0 .
STATICS lv_first_time VALUE 'X'.
STATICS ls_isroot_fields TYPE rsfs_tab_fields.
STATICS ls_isroot_where TYPE rsds_where.
STATICS ls_ischld_fields TYPE rsfs_tab_fields.
STATICS ls_ischld_where TYPE rsds_where.
IF lv_first_time EQ 'X'.
CLEAR lv_first_time.
o
+ Declarations for field selection for node Zxxx_PRODUCT ***
" move table name to the corresponding field
MOVE 'Zxxx_PRODUCT' TO ls_isroot_fields-tablename.
" Read values from selection screen
READ TABLE select_fields WITH KEY ls_isroot_fields-tablename
INTO ls_isroot_fields.
" move table name to the corresponding field
MOVE 'Zxxx_PRODUCT' TO ls_isroot_where-tablename.
" Read values from dynamic selection screen
READ TABLE dyn_sel-clauses WITH KEY ls_isroot_where-tablename
INTO ls_isroot_where.
o
+ Declarations for field selection for child node Zxxx_ORDERS ***
MOVE 'Zxxx_ORDERS' TO ls_ischld_fields-tablename.
READ TABLE select_fields WITH KEY ls_ischld_fields-tablename
INTO ls_ischld_fields.
MOVE 'Zxxx_ORDERS' TO ls_ischld_where-tablename.
READ TABLE dyn_sel-clauses WITH KEY ls_ischld_where-tablename
INTO ls_ischld_where.
"...Check whether entry is made in atleast one selection field:
IF NOT so_pname IS INITIAL OR
NOT so_pdelv IS INITIAL OR
NOT so_odate IS INITIAL OR
NOT so_oqty IS INITIAL OR
NOT ls_isroot_where-where_tab IS INITIAL OR
NOT ls_ischld_where-where_tab IS INITIAL .
"...Check whether entry is made in atleast one field in root node :
IF NOT so_pname IS INITIAL OR
NOT so_pdelv IS INITIAL OR
NOT ls_isroot_where-where_tab IS INITIAL .
SELECT prodid FROM Zxxx__product
INTO CORRESPONDING FIELDS OF TABLE lt_pid
WHERE prname IN so_pname AND
prdeldate IN so_pdelv AND
(ls_isroot_where-where_tab).
"...Check whether entry is made in atleast one field in child node:
IF NOT so_odate IS INITIAL OR
NOT so_oqty IS INITIAL OR
NOT ls_ischld_where-where_tab IS INITIAL AND
NOT lt_pid IS INITIAL.
SELECT prodid FROM Zxxx_orders
INTO CORRESPONDING FIELDS OF TABLE lt_pid_tmp
FOR ALL ENTRIES IN lt_pid
WHERE prodid = lt_pid-prodid AND
orddate IN so_odate AND
ordqty IN so_oqty AND
(ls_ischld_where-where_tab).
lt_pid = lt_pid_tmp.
ENDIF.
ELSEIF NOT so_odate IS INITIAL OR
NOT so_oqty IS INITIAL OR
NOT ls_ischld_where-where_tab IS INITIAL.
SELECT prodid FROM Zxxx_orders
INTO CORRESPONDING FIELDS OF TABLE lt_pid
WHERE orddate IN so_odate AND
ordqty IN so_oqty AND
(ls_ischld_where-where_tab).
ENDIF.
******lt_pid contains all the selections based product ids
******Now retrieve all the records with the corresponding product ids
CHECK NOT lt_pid IS INITIAL.
IF NOT ls_isroot_fields IS INITIAL.
SELECT (ls_isroot_fields-fields) FROM Zxxx_product
INTO CORRESPONDING FIELDS OF TABLE gt_root
FOR ALL ENTRIES IN lt_pid WHERE prodid = lt_pid-prodid.
ENDIF.
IF NOT ls_ischld_fields IS INITIAL AND
NOT gt_root IS INITIAL.
SELECT (ls_ischld_fields-fields) FROM Zxxx_orders
INTO CORRESPONDING FIELDS OF TABLE gt_chld
FOR ALL ENTRIES IN gt_root WHERE prodid = gt_root-prodid.
ENDIF.
LOOP AT gt_root INTO Zxxx_product.
PUT Zxxx_product.
ENDLOOP.
ENDIF.
ENDIF.
ENDFORM.
write the below code under
include DBZXXX_PRODUCTNXXX -->
include DBZXXX_PRODUCTN002 .
form put_zxxx_orders
LOOP AT gt_chld INTO zxxx_orders WHERE prodid = zxxx_product-prodid.
PUT ZXXX_ORDERS.
ENDLOOP.
endform.
now write a report program and call the ldb by its name using get
get <ldbname>.
Reward if this is useful.
Regards,
devi.
Edited by: Devi Raju on Jul 15, 2008 9:13 AM -
Its very urgent:how to insert data into database tables
Hi All,
I am very new to oaf.
I have one requirement data insert into database tables.
here createPG having data that data insert into one custom table.
but i dont know how to insert data into database tables.
i wrote the code in am,co as follows.
in am i wrote the code:
public void NewoperationManagerLogic()
ManagerCustomTableVOImpl vo1=getManagerCustomTableVO1();
OADBTransaction oadbt=getOADBTransaction();
if(!vo1.isPreparedForExecution())
vo1.executeQuery();
Row row=vo1.createRow();
vo1.insertRow(row);
in createPG processrequest co:
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
am.NewoperationManagerLogic();
process form request:
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
if(pageContext.getParameter("Submit")!=null)
ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
am.getOADBTransaction().commit();
please help with an example(sample code).
its very urgent.
thanks in advance
Seshu
Edited by: its urgent on Dec 25, 2011 9:31 PMHi ,
1.)You must have to create a EO based on custom table and then VO based on this EO eventually to save the values in DB
2.) the row.setNewRowState(Row.STATUS_INITIALIZED); is used to set the the status of row as inialized ,this is must required.
3.) When u will create the VO based on EO the viewattributes will be created in VO which will be assigned to the fields to take care the db handling .
You must go thtough the lab excercise shipped with you Jdeveloper ,there is a example of Create Employee page ,that will solve your number of doubts.
Thanks
Pratap -
[HTML DB] How to use the existing database table?
[HTML DB] How to use the existing database table?
I installed Oracle 10g database in Computer A(Windows 2000), and I already create all the tables with data and the data size is about 300MB.
In Computer B(Windows 2000), I installed HTML DB 1.6.
How can I use /get the existing database table (in computer A) for HTML DB?
Could anyone help me on this? I am newbie and I need some detail instructions. or Where can I find the examples.....
ThanksWell I guess if you wish to retain that architecture, i.e. HTMLDB on one machine and your data on another, you will have to establish database links to access the data. Oracle documentation will describe how to achieve that.
-
How to create an Oracle DATABASE through Java Programming Language.. ?
How to create an Oracle DATABASE through Java Programming Language.. ?
Oracle database administrators tend to be control freaks, especially in financial institutions where security is paramount.
In general, they will supply you with a database, but require you to supply all the DDL scripts to create tables, indexes, views etc.
So a certain amount of manual installation will always be required.
Typically you would supply the SQL scripts, and a detailled installation document too.
regards,
Owen -
How to insert data in database table
Hi experts,
How to insert data into database table using internal table from function module.Hi,
As per my understanding are you looking for the complete API feature of data insertion into the database using the Locking Mechanism? If yes, then you need to create a Lock Object using the Primary keys of the Primary Table and Secondary Tables. You need to call the lock object first and then you need to make the entry into the table. This principle is based on 'All or None Concept'.
For the insert Statement Key word you can have a look at the following link:
http://help.sap.com/abapdocu/en/ABAPINSERT_SOURCE.htm
Hope this helps.
Thanks,
Samantak. -
How To Create the New Advance Table in standered RN?
Hi Gurus,
How to create the New Advance Table in stander RN?
My requirement is slandered RN Having 1 Advance Table that advance table retrieve the two types of data 1.FUNC 2.BEHV Now My Client is asking split the data
1) FUNC Data
2) BEHV Data.
Now i did first one through Vo Extension Filter the FUNC Data. now i really struck the Another part plz help me i cont go the next step....pl z tell me what are prerequisites are needed and how to go next step plz help me Gurus.
Regards,
SriniHi,
I have adding new & existing forms and creating User Defined Field in row. example on adding a field in an existing Form and its corresponding to the database, including user input validations?
I want to add a new field in the detail section ( row area ) of a Production Document, and save it to database and read it back when the document is opened.
Thanks.
Syed Waqar Khurshid -
Access key needed when creating a new database table with SE11
Hi,
I'm using SAP Testdrive (evaluation) on linux in order to learn a bit about ABAP programming. I want to create a new database table in the dictionary to be used in my programs. I proceed in the following way:
1) I run the SE11 transaction
2) At the first entry I write the name of the table to be created (in the Database Table field)
3) I click on the create button.
But then the system asks me an Access Key to register, where can I get this?
Thanks in advance,
Kind Regards,
DariyooshOk I found the answer to my question in another thread
Developer Key
Make sure that your program names starts with "Z" or "Y", otherwise the system will ask you to register the object because it thinks you are creating/changing in the SAP namespace.
In fact this was my error, my table name didn't start with neither "Z" nor "Y".
Kind Regards,
Dariyoosh
Edited by: dariyoosh on Nov 13, 2010 12:34 PM -
How to create a standby database?
I am running Oracle 8.1.5 on Sun Solaris. How to create a standby database? Can somebody tell me the step-by-step procedure?
Can you tell what version of Oracle you are running, because the steps can vary depending on your version.
-
How to create a new database in SUP
Hi,
Iam using SUP 2.1 ESD#1 licensed version
How to create a new database other than the default sampleDB.
Thanks,
B.UshasriHi B.Ushasri,
This is actually pretty easy.
1) open the Unwired Workspace (SDK in eclipse).
2) Bottom right, add a new Database connection with the following details:
Sybase ASA v12.x,
host=Your Sup box,
port=5500,
user=dba
password= Your password (default = dba)
3) Once you connect successfully, right click on the connection and choose the "Create database" option.
That should do it for you. It is the same connection as the sampleDB connection so if you already have that defined then its a simple, right click on it once connected and hit create database.
Hope that helps,
Brenton. -
How to create a record for table PLAF with order type 'NB'.
How to create a record for table PLAF with order type 'NB'(standard purchase order).
who can tell me the T-code or some usefull information?
Thanks.Hi
This will be updated automatically when generate planned orders thru MRP. (MD02)
regards
Srinivas -
How to create vertical Scrollbar in table control?
Dear All,
How to create vertical scrollbar in table controll.?
regards,
DharmeshHi
It should be created automatically, if you can't see it, try to set the field lines of table control
PROCESS PBO
MODULE SET_ATTR_TC.
LOOP AT ITAB WITH .....
ENDLOOP.
MODULE SET_ATTR_TC.
DESCRIBE TABLE ITAB LINES SY-TABIX.
<TABLE CONTROL>-LINES = SY-TABIX.
ENDMODULE.
Max
Maybe you are looking for
-
My old email come up when I want to update my apps.however I don't use that password at all,I've even had a message saying its not in use. I can't update them though which is really annoying! I've tried setting up that email again and change password
-
Error while running application
I am getting the following error while running application...Any help to fix this? thanks DeepaKarun Application lmts-local is already deployed on other targets. Please use create-application-ref command to create reference to the specified target; r
-
Any idea why would the records get duplicated when I create a query of AR invoices in a month. If there are multiple lines in an invoice the invoice total is repeated instead of the value of each line that is coded to different GL account. Any help
-
HRSM_D : Error in Upload of time data
Hi all, We are trying to post data in Infotype 2001 via HRSM_D01 Idoc . But we are getting the following error "data record could not be added to table PTEXDIR" We also executed the report RPTEXTPT . Please guide. Shikha
-
Asigning a name to a host without using hosts file
Hi, we have developed a rich client application that connects to a websphere Appserver in order of using ejb. This app is intended to work in different places, connecting to a different Appserver in each place. When the service locator of our client