How to capture userid,date in a custom table while updating a form
Hi,
I have a requirement to insert the userid, the form name and the date on which the record is saved in a custom table while updating a custom form.
We are using Form Builder 6.0.
I am new to Forms and can anyone help me with these?
I would also want to know under which trigger i should be writing the code in.
Thanks in advance.
you can use:
usrid := get_application_property(username);
formname := get_application_property(current_form);
dt := to_char(sysdate,'dd/mm/yyyy hh:mi:ss');
you insert these values in on-update trigger at form level
Similar Messages
-
How to capture the data entered in a textfield in a JTable
How to capture the data entered in a textfield present in a cell of a textfield or how to add listener to this textfield
A sample of my code is:
model = new GridDisplayTableModel(gridDisp,columnName,getRows(),getCols());
final ComboRenderer cRenderer = new ComboRenderer();
final TextFieldRenderer tRenderer = new TextFieldRenderer();
combo.addItem("one");
combo.addItem("two");
combo.addItem("three");
final JTextField textfield = new JTextField();
final DefaultCellEditor cmbEditor = new DefaultCellEditor(combo);
// final JEnterDataCellEditor textEditor = new JEnterDataCellEditor(12);
final DefaultCellEditor textEditor = new DefaultCellEditor(textfield);
rm = new RowEditorModel();
table = new JTable(model){
public TableCellRenderer getCellRenderer(int row, int column) {
int posx = 0;
int posy = 0;
TableCellRenderer renderer = null;
for(int l=0;l<getDataVec().size();l++)
beanObj =(Helperbean)dataVec.elementAt(l);
posx = beanObj.getPosx();
posy = beanObj.getPosy();
if(row==posx && column==posy)
if(beanObj.getModeofDisplay() != null && beanObj.getModeofDisplay().equalsIgnoreCase("textfield"))
rm.addEditorForRow(row,textEditor);
renderer = tRenderer;
else if(beanObj.getModeofDisplay() != null && beanObj.getModeofDisplay().equalsIgnoreCase("combo"))
rm.addEditorForRow(row,cmbEditor);
renderer = cRenderer;
break;
renderer = super.getCellRenderer(row, column);
// System.out.println("getEditor"+rm.getEditor(1));
return renderer;
public TableCellEditor getCellEditor(int row, int col) {
int posx = 0;
int posy = 0;
TableCellEditor tmpEditor = null;
for(int l=0;l<getDataVec().size();l++)
beanObj =(Helperbean)dataVec.elementAt(l);
posx = beanObj.getPosx();
posy = beanObj.getPosy();
if(row==posx && col==posy)
if(beanObj.getModeofDisplay() != null && beanObj.getModeofDisplay().equalsIgnoreCase("textfield"))
System.out.println("celleditorval "+textEditor.getCellEditorValue());
tmpEditor = textEditor;
else if(beanObj.getModeofDisplay() != null && beanObj.getModeofDisplay().equalsIgnoreCase("combo"))
tmpEditor = cmbEditor;
break;
tmpEditor = super.getCellEditor(row, col);
return tmpEditor;
public boolean isCellEditable(int row,int col){
boolean isEditable = false;
int posx = 0;
int posy = 0;
for(int l=0;l<getDataVec().size();l++)
beanObj =(Helperbean)dataVec.elementAt(l);
posx = beanObj.getPosx();
posy = beanObj.getPosy();
if(row==posx && col==posy)
if(beanObj.getModeofDisplay() != null )
isEditable = true;
else
isEditable = false;
break;
isEditable = false;
return isEditable;
public void changeSelection(final int row, final int column, boolean toggle, boolean extend) {
super.changeSelection(row, column, toggle, extend);
//my attempt to avoid editCellAt from being called twice in a row
if (getModel().isCellEditable(row, column) && !(isEditing() && getEditingRow() == row && getEditingColumn() == column))
if (editCellAt(row, column)) {
getEditorComponent().requestFocus();
// Select the text when the cell starts editing
public boolean editCellAt(int row, int column) {
boolean result = super.editCellAt(row, column);
final Component editor = getEditorComponent();
if (editor != null && editor instanceof JTextField) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
((JTextField)editor).selectAll();
return result;
public boolean hasFocus()
Component editorComponent = getEditorComponent();
// Try to install the editor
int anchorRow = getSelectionModel().getAnchorSelectionIndex();
int anchorColumn = getColumnModel().getSelectionModel().
getAnchorSelectionIndex();
if (anchorRow != -1 && anchorColumn != -1 && !isEditing())
if ((this.getSelectedRow() == anchorRow) && (this.getSelectedColumn() == anchorColumn))
if (!editCellAt(anchorRow, anchorColumn)) {}
return super.hasFocus();
public void valueChanged(ListSelectionEvent e)
super.valueChanged(e);
if ((this.getSelectedRow() == 2) && (this.getSelectedColumn() == 3))
DefaultFocusManager focusManager = new DefaultFocusManager();
focusManager.focusNextComponent(this);
model.fireTableStructureChanged();
-
How to capture the date and time of a background job
Hi experts,
How to capture the date and time of a background job?
How to find whether it is runned succesfully or not?
If it is not successful how to put error message?
ASAP
Thanx in advance,
SudhaTo Display the STATUS of the JOB which is exectued in background
CLEAR : wa_jobsteplist.
REFRESH : i_jobsteplist.
WRITE:/ 'DISPLAYING JOB STATUS'.
CALL FUNCTION 'BP_JOB_READ'
EXPORTING
job_read_jobcount = w_jobcount
job_read_jobname = w_jobname
job_read_opcode = '20'
JOB_STEP_NUMBER =
IMPORTING
job_read_jobhead = wa_jobhead
TABLES
job_read_steplist = i_jobsteplist
CHANGING
RET =
EXCEPTIONS
invalid_opcode = 1
job_doesnt_exist = 2
job_doesnt_have_steps = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
To Display the status text as per the status type
CASE wa_jobhead-status.
WHEN 'S'. WRITE: / 'Scheduled'.
WHEN 'R'. WRITE: / 'Released'.
WHEN 'F'. WRITE: / 'Completed'.
WHEN 'A'. WRITE: / 'Cancelled'.
WHEN OTHERS.
ENDCASE. -
Problem while saving date field in custom table
Hi,
Iam facing the following problem while saving a date field in custome table
i have a date field zdate in which the value is 02082010.
now when i try to insert this value in the custom table it is getting updated as 20/10/0208 , but it should be 08/02/2010
How can i correct it..
Regards
Kumarjust before saving u might have to use a string reverse FM and then save it..
CALL FUNCTION 'STRING_REVERSE'
EXPORTING
STRING = p_string
LANG = sy-langu
IMPORTING
RSTRING = r_string
EXCEPTIONS
TOO_SMALL = 1
OTHERS = 2 -
How to implement a Date Picker (Calendar) as a LOV in Portal Form?
I have a form, which will input date from user, and I also have javascript calender.
How to implement a Date Picker (Calendar) as a LOV in Portal Form? Do I need to choose POPUP and LOV for Date?
Instead of typing the Date within a Portal form, a popup Calender that will allow user to Pick a date.
Please help anyone!!Once you have the JavaScript and have added it to your form, you need to the the following. First off, you need to be able to customize the HTML code for the form (i.e. choose custom for form type when creating the form). Once you do that go into the custom layout to customize your HTML code. Find the field you want to add the date picker to. It will be <#your_field_name.ITEM#>
Paste this code after it:
<a href="javascript:show_calendar('forms[0.elements[16');" onmouseover="window.status='Date Picker';return true;" onmouseout="window.status='';return true;"><img src="the source of your image file" width=34 height=21 border=0></a></TD>
You will have to play around with the forms[0].elements[16]. 16 is what date field is set to. However your will differ, so just play with it.
Hope this helps.
Martin -
How to check the data of an archived table.
I have archived a table created by me. I have executed the write program for the archiving object in SARA. Now how can check the data of my archived table.
Hello Vinod,
One thing to check in the customizing settings is your "Place File in Storage System" option. If you have selected the option to Store before deleting, the archive file will not be available for selection within the delete job until the store job has completed successfully.
As for where your archive file will be stored - there are a number of things to check. The archive write job will place the archive file in whatever filesystem you have set up within the /nFILE transaction. There is a logical file path (for example ARCHIVE_GLOBAL_PATH)where you "assign" the physical path (for example UNIX: /sapmnt/<SYSID>/archivefiles). The logical path is associated with a logical file name (for example ARCHIVE_DATA_FILE_WITH_ARCHIVE_LINK). This is the file name that is used within the customizing settings of the archive object.
Then, the file will be stored using the content repository you defined within the customizing settings as well. Depending on what you are using to store your files (IXOS, IBM Commonstore, SAP Content Server, that is where the file will be stored.
Hope this helps.
Regards,
Karin Tillotson -
Data Archival for Custom Tables
Hi Experts,
We have a requirement of archiving the related custom tables while we archive the standard SAP tables data. We are going a head with creating the custom archiving objects to handle this. However, i would like to know about the feature of "Exit routine assignement in generation" in the standard Archiving objects (AOBJ). Can this be used to handle custom tables data? If yes, can you please provide me an example how this can be acheived? If not, what is the purpose of this?
Please help!!
Thanks and Best Regards,
SuryaHello Lavaughn,
I can not speak for SAP, but from my personal experience TimeStamps are the state of the art to store time date info in db tables. Even with date/Time fields a conversion to the local timezone is necessary. Of course you can reuse your db definition on dynpros. But since UI and business logic will be divided anyway this is also not really a valid point.
Best Regards
Klaus -
Avoid customizing TR while updating data of SAP standard view
Hi all,
I am preparing TC for view V_T093C_01. View is SAP view and Requirement is to avoid customizing TR while updating data. Please suggest how we shall do that.
Thanks,
Krishna.Hi Krishna,
There is an attribute stored in the table/view maintenance dialogs, which say if there's a standard or custom transport routine to transport. By indicating a custom one, but without defining it, the system won't ask any transport request.
But I don't advise you to change it because:
- Changing this field is considered as a modification of the standard.
- why is it important that the system does not ask for a transport request? It is harmless!
Or is it that you want to allow changing it in production, in that case I would give another answer (by defining the "current settings")
Sandra -
How can I modify data from a Transparent Table without ABAP code.
Hi,All
How can I modify data from a Transparent Table (like TCURR), and important thing is I want do all that with no ABAP code here. It is like that we always do that in a Oracle database use TOAD or PLSQL third party tools, with no script code here.
I had fond that there is a way can do that:
1, type 'se11',and Display Database table 'TCURR', click Contents, then click Execute to display all data
2, type '/h' and let debugging on
3, select one of this data then click 'Display',enter in debugging system.
4, then make a breakpoint in the code. But... display a dialog let I type a 'ABAP Cmnds', I want to know what can be type in for that?
and, My system is ECC6.
thank you all
Edited by: xuehui li on Aug 20, 2008 6:30 PMHello,
Your approach (with Vijay's suggestion) MAY work. However, depending on how tight security is at the company that you are working at you may or may not be able to acutaly change the value of the SHOW field to EDIT. This will be especially true if you are working in a Production environment. Vijay's other comment is true as well. This is not a recommended approach to change data (especially data with a financial impact like TCURR) in a production environment. The auditors will not be impressed.
Explore the option of a maintenace view or look at tcode TBDM to upload a file which includes daily rates from providers like Reuters or try tcode s_bce_68000174 which is a maintenance view on TCURR.
Regards
Greg Kern -
How to check the data in a temporary table
Hi,
A procedure inserting data into a temporary table , data exists in the table now. so, how to see the data from the temporary table. Is it possible to see from the sqlplus by selecting, right now i'm not getting any data. .thanks Bcj.If you are referring to Global Temporary Tables, then the only way to see the contents of the table are to select from the table while connected to the same session that inserted the data into the GTT.
Please note however that there is not a 1 to 1 correspondence between sessions and users (shcemas). A user may be connected to 1 or more sessions, but it is only the session that inserted the records that will be able to view the records. -
How to recover the data from a dropped table in production/archive mode
How to recover the data/change on a table that was dropped by accident.
The database is on archive mode.Oracle Version. ? If 10g.
Try this Way
SQL> create table taj as select * from all_objects where rownum <= 100;
Table created.
SQL> drop table taj ;
Table dropped.
SQL> show recyclebin
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
TAJ BIN$b3MmS7kYS9ClMvKm0bu8Vw==$0 TABLE 2006-09-10:16:02:58
SQL> flashback table taj to before drop;
Flashback complete.
SQL> show recyclebin;
SQL> desc taj;
Name Null? Type
OWNER VARCHAR2(30)
OBJECT_NAME VARCHAR2(30)
SUBOBJECT_NAME VARCHAR2(30)
OBJECT_ID NUMBER
DATA_OBJECT_ID NUMBER
OBJECT_TYPE VARCHAR2(19)
CREATED DATE
LAST_DDL_TIME DATE
TIMESTAMP VARCHAR2(19)
STATUS VARCHAR2(7)
TEMPORARY VARCHAR2(1)
GENERATED VARCHAR2(1)
SECONDARY VARCHAR2(1)
SQL>M.S.Taj -
Update real time account general data into a custom table
Hi,
I have created a z table for storing account general data for some business requirement. I have created a program and executing batch job to update this z table on periodic basis. Can anyone suggest some other alternative solution to update this z table whenever an account gets created/modified in CRM system? Instead of running a batch job periodically, I need a real time replication of the account data in this custom table.
Thanks and Regards,
Sneha.Hi,
Thanks for your reply.
But, Can you elaborate the solution, Can we use Business Transaction Events(BTEs) for updating Partner data? Will these be triggered for Account Creation/Modification. If so, Can u suggest any BTE which can be used for my requirement?
Thanks and Regards,
Sneha. -
How to transport the data contains in the table from development to product
How to transport the data contains in the table from development to production.
Please let me know ASAP.Hello Dilip
Create a workbench request and add the following entries to the request:
Object key: R3TR TABU <name of z-table>
For this object add the following value key:
- client-independent table: '*'
- client-dependent table (e.g. client 100): '100*'
See also: [SAP Network Blog: Transport Table Entries|/people/community.user/blog/2007/01/07/transport-table-entries]
Regards
Uwe -
How to view the date when the Customers credit limit updated in SAP-FSCM?
How to view the date when the Customers credit limit updated in SAP-FSCM?
OK you can look at field - LIMIT_CHG_DATE in the table - UKMBP_CMS_SGM via SE16
I would assume you would want to run it based on a date range. -
How do u save datas more than one table using net beans ide using JSF
Hi,
I am new to JSF.
I save / delete / update / New master table using POJO (Plain Old Java Objects), database - oracle and Toplink Persistence Unit.
How do u save data more than one table using net beans ide using JSF (I am using POJO) ?
and also Tell me the reference book for JSF.
Thanks in advance.
regards,
N.P.SivaSivaNellai wrote:
I am new to JSF.
So, I am using net beans IDE 6.1 from sun microsystem. It is a free software.No, you don't drag'n'drop if you're new to JSF. Switch to source code mode. Write code manually, with the help of IDE for the speed up.
So, please guide me the reference books, articles. I need the basic understanding of JSF, net beans IDE.[JSF: The Complete Reference|http://www.amazon.com/JavaServer-Faces-Complete-Reference/dp/0072262400] is a good book. The [JSF specification document|http://jcp.org/aboutJava/communityprocess/final/jsr252/index.html] is also a good reading to understand what JSF is and how it works. There are also javadocs and tlddocs of Sun JSF Mojarra.
Maybe you are looking for
-
When downloading a large file, like a movie, Internet Explorer automatically opens a download window offering the choice to "Open" or "Save"the file. This provides one with the choice of where to save it - e.g. "C" drive, in the "My Documents" or "De
-
Run any number of re-entrant VI's
Hi, I'm trying to create a VI that will concurrently run any number of re-entrant subVI's. After looking at many examples, the one that best replicates the behaviour I want is found at \examples\general\Reentrant Panels.llb\Reentrant Panels.vi. My pr
-
Enable Delete button depending on the shopping cart status
Hi all, My requirement is Enable the delete button if the status of selected shopping cart is 'Awaiting Approval' in header and item level. Technical detail of delete button : Component : POWL_UI_COMP
-
I have a javascript file, which allow users to browse a pdf file located at the local hard drive. How to open the pdf file to a bookmarked page? I have tried to create bookmarks, named destinations and open the file as: "c:\mypdf.pdf#nameddest=mydes
-
FCP stays hidden since last software update
I have performed a software update yesterday and since then if I make the mistake of Hiding FCP I can't recover from it, I have to force quit and restart the software. Help please.