How to populate username to database table automatically
Hi Experts,
I have a query that how to populate the username like in every standard table we have field called 'created by'.
so i want to populated that field to our database automatically when user make an entry through his/her userid.
Can anybody help me out.
Thanks & Regards,
Vipul
Hi,
I understand that you had created a Ztable and when user enters USER ID, Username should automatically get populated into that field.
You cfan achive this by creating an ew module.
In PAI module at Chain and ENdchain create a new module. ex : Module Cust.
Place a breakpoint and then try to execute it. If the cursor is triggering it then you can place a pice of code in that module.
Ex :
types : begin of ty_usr,
USERID
USERNAME
end of ty_usr.
data : t_usr type standard table of ty_usr,
wa_usr type ty_usr.
Select USERID
USER NAME
from XYZ table
into table t_USR
where USERID = INPUT field (UserId) filled by the user in that table.
Then you can populate the t_usr-USERNAME into the Field of the Ztable.
In this way, if the user just put the User id and press enter it will automatically populate the Usrename into the Field.
This will fix the issue.
Similar Messages
-
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 -
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 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 do i make the database open automatically at startup in solaris?
How do i make the database open automatically at startup in solaris?
need to write a shell script that is invoked from /etc/init.d/ and soft link the following:
ln -s /etc/init.d/MYoracle /etc/rc3.d/S99oracle
ln -s /etc/init.d/MYoracle /etc/rc2.d/K99oracle
ln -s /etc/init.d/MYoracle /etc/rc1.d/K99oracle
ln -s /etc/init.d/MYoracle /etc/rc0.d/K99oracle
ln -s /etc/init.d/MYoracle /etc/rcS.d/K99oracleThe shell script should be pretty straight forward.
Cheers,
Mich -
How to find relationship between database tables
Hi Mate,s.
Iam new to SAPBW , PLZ tell me , How to find releationship between database table(Transperent tables).
Regards.
harryhi harry,
from your previous postings, i guess you are asking relationship between tables in r/3, following links may help :
http://www.sapgenie.com/abap/tables.htm
http://www.sapgenie.com/abap/tables_sd.htm
http://www.sapgenie.com/abap/tables_mm.htm
http://www.sapgenie.com/abap/tables_fi.htm
http://www.sapgenie.com/abap/tables_ps.htm -
How to insert data into database table from a servlet? Help please.
From a servlet I want to insert a message with some servlet parameters into an oracle database table by writing 'insert into tablename'. How shall I write the sql statement?
simple suppose u wanned to insert user name and password into table user_info then this is a simple example .....
Best Regds
bondzoro
[email protected]
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class tester extends HttpServlet {
Connection con = null;
public void init(ServletConfig sc){
super.int(sc);
Class.forName("oracle.jdbc.driver.OracleDriver");
public void service(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOE
try {
con=DriverManager.getConnection("jdbc:oracle:thin:@database_URL:1521:ORA8","username","pa
String user = req.getParameter("username");
String pass = req.getParameter("pass");
PreparedStatement pst = con.prepareStatement("insert into user_info values(?,?)");
pst.setString(1,user);
pst.setString(2,pass);
pst.executeQuery();
pst.close();
con.close();
}catch(Exception _e){
_e.printStackTrace(System.err);
~ -
How to populate values from database into a Combo Box?
Hi,
How to display all the values of a field of a database table in a combo box inside a grid in B1 user defined form?
Regards,
Sudeshna.Hi,
If you are trying to do this on a system form (I gues this is your case, reading the other question), for example Sales Orders, and you want to show the values from a User Defined Table (UDT), you just need to add a User Defined Field on Marketing Documents Line level, and say it is linked to the UDT.
SBO will automatically show the combo with the values on the Code field of the UDT.
Regards,
Ibai Peña
Sorry, I didn´t read the post well.
What you could do is each time the form is loaded, read the values from the table, and asign them as Valid Values for the combobox column. You can do this programatically, or using XML (which is recommended becouse of better performance).
Message was edited by: Ibai Peña -
How to populate data in PAY_PEOPLE_GROUPS table (People Group Flexfiled)
Hello
We are migrating the data from one oracle instance to another oracle instance which are in same version of Oralce Applications 11.5.10.2. As a part of migration can anybody let me know how to populate data in "People Group Key Flexfiled" (PAY_PEOPLE_GROUPS table), ideally I will create or update employee records from the source instance to destination instance, so while creating or updating the employee records in can pass people_group_id while calling to the assignment api but my question here is before passing group id to the api i should have the data populated in PAY_PEOPLE_GROUPS TABLE so that i can fetch the group id as per the combination and pass it in to the api.. please suggest...Thanks for your information! by any chance do you have any sample code which will create/update assignments with People Group Flexfield; when i check "hr_assignment_api.update_emp_asg_criteria" it only has parameter to pass people group id and not having segments parameters to pass individual segments.
Also let me know the links if you have any for all HR API guide which will help me to develope the interfaces...
My requirement is we have two instances in which in one instance we are treating as source for HR which will be used to master for all HR related activities and we are planning to develope an interface which will bring master instance in sync with dummy instance. -
How to populate string array in table view.
Hi,
By using webservice i am able to get an array of strings but, I am unable to populate those values in the tableview.
Can any one please suggest me how to populate array of strings in table view with an example.
Thanks,
SRI.Search this forum. You will find plenty of threads on the same...
Raja -
How to populate USERNAME into a text field [SOLVED]
Hi all,
Forms 10g(10.1.2.0.2), Windows XP
In my form I have 2 blocks.
Block 1 with only one item, where we enter some value and hit enter(this will navigate to block2 and execute the query).
Block 2(tabular) will fetch the records. Now this block2 have 3 columns(caseid, userid, date).
Now when I insert a new record, I just need to enter the caseid only. And userid and date have to be automatically populated.
I'm able to populate date by setting Initial Value property to *$$DATETIME$$* for the date column.
And I tried many ways to populate USERNAME into userid column without any success.
I tired something like this
In *When-New-Item-Instance*
if :System.Cursor_Item is null then
:BLOCK2.userid := Get_Application_Property(USERNAME);
else
null;
end if;
/*In this case, I can navigate to to the last recrord w/o any changes in the fetced records
and while inserting the new record, USERNAME doesn't populate.*/
In *When-New-Record-Instance*
declare
v_dummy varchar2(15) := null;
begin
v_dummy := nvl(:system.cursor_value, null);
Copy(to_char(v_dummy), :System.Cursor_Item);
if :System.Cursor_Item is null then
Copy(null, :System.Cursor_Item);
:BLOCK2.userid := Get_Application_Property(USERNAME);
else
null;
end if;
end;
/* Nothing populates into the userid item while inserting new record */Any help please...Hi Ammad,
It is populating number 73 (which is not my username) into the field.
And when I changed it to :BLOCK2.userid:=GET_APPLICATION_PROPERTY('USERNAME');
I get FRM-40735 WHEN-CREATE-RECORD trigger raised unhandled exception ORA-06502
Also when the new record is inserting, the user shouldn't be able to edit userid and date fields. But this is also not working...
Edited by: Charan on Sep 20, 2011 11:26 AM -
How to import oracle 9i database tables only to oracle 10g express edition
I had a database dump file created in oracle 9i now i want to import the 9i database table to oracle 10xe...
Depends whats in the export file, was it a full, user, or tablespace export?
One way to find out whats in the dump file, run an import show=y and it will only pull out the DDL for the objects in the file
$ imp file=<dumpfile name> log=implog.log show=y
username: system
There are lots of options and ways to run imp, 10g Utilities doc has all the details, here's the chapter on the original imp and exp utilities: http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/exp_imp.htm#i1023560
If you only want one schema, just the tables, no data, no indexes, create your target user, and do a schema import no rows, no indexes, maybe leave out the grants and statistics too:
$ sqlplus /nolog
SQL> connect system
SQL> create user target_user identified by <passwd> default tablespace <tblspc>;
SQL> exit;
$ imp file=... log=... fromuser=<source username> touser=target_user rows=n indexes=n statistics=none grants=n -
How to sort a custom database table ?
Hi,
how do I sort/order a custom (Z) database table (not internal table) ? Couldn't find a suiting option with F1 for the SORT statement.
Thanks,
Avraham>
Avraham Kahana wrote:
> I have to do this within my program.
Use ORDER BY in your select. Or just select your data into an itab and use SORT. I don't see the problem.
If you mean that you want to sort your table in the database itself, then you can't. Database table rows are not held in any specific order; the order is applied when you select the data out of the table. -
How to insert date into database table
Hi,
i used date navigator in htmlb. i want toupdate date into the database table ystudetn_inf. and also please tell me how to insert that date into table.give me small example in stepby step.Hi,
I am sure you have used htmlb:dateNavigator as follows
<htmlb:dateNavigator id = "myDateNavigator"
monthsPerRow = "1"
onNavigate = "myOnNavigate"
onDayClick = "myOnDayClick"
onWeekClick = "myOnWeekClick"
onMonthClick = "myOnMonthClick">
</htmlb:dateNavigator>
Trap the onDayClick event in oninputprocessing
date_event ?= cl_htmlb_manager=>get_data(
request = runtime->server->request
name = 'inputField'
id = 'mydate' ).
date = datenavigator_event->day.
and use date value to update your table.
If found helpfull rewards points.
Regards,
Albert
Maybe you are looking for
-
Performance Issues with Acrobat Reader 11.0.0.2 when secure mode is enabled
Hello All, We are experiencing sporadic issues with Acrobat 11.0.0.2 across our domain, users are reporting performance issues when opening PDF documents whether locally or from a network share. We have found that turning off Secure Mode helps toward
-
RBATP - is it possible to activate them only if certain conditions are met?
Hello APO - RBATP experts! I have a question that I hope you can help me with: Is it possible to have rules that become active only in certain circumstances, for example, if the RDD of the sales order is today or tomorrow? I have limited knowledge on
-
Hi brother, What is te menaing below msg from v$sql_workarea_active ? Is a problem in SQL statement or index? SQL_HASH_VALUE SQL_ID WORKAREA_ADDRESS OPERATION_TYPE OPERATION_ID POLICY SID QCINST_ID QCSID ACTIVE_TIME WORK_AREA_SIZE EXPECTED_SIZE ACTUA
-
Using php-mysql module and Apache2.2 provided with FMS4.5
Hi, we've recently downloaded and upgraded FMS from 3 to 4.5 on a server that has this configuration (before upgrading): - Centos 5.5 - Apache 2.2.3 - mysql 5.0.77 - php 5.3.3 - perl 5.8.8 Everything was fined before upgrading since 3 years. We decid
-
hi, i throw an Exception in try block and also throw an Exception in finally block. why do i get only the Exception thrown in finally block. i completely lose the Exception thrown in try block. The reason i'm asking this is because of the way JUnit i