In table maintance to save date and time.

Hi,
I am trying to write a code in table maintenance for updating date, time and user id.
I have created a z include and written a below code which i got from help document. Thid code i have implemented in maintenance event 01. When i checked the code system is showing declare total. Where shall i declare this. Is this code is correct.
FORM abc.
DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found
LOOP AT TOTAL.
IF <ACTION> = desired constant.
READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
IF SY-SUBRC EQ 0.
F_INDEX = SY-TABIX.
ELSE.
CLEAR F_INDX.
ENDIF.
(make desired changes to the line TOTAL)
MODIFY TOTAL.
CHECK F_INDX GT 0.
EXTRACT = TOTAL.
MODIFY EXTRACT INDEX F_INDX.
ENDIF.
ENDLOOP.
SY-SUBRC = 0.
ENDFORM.
Please any one suggest on this.
Thanks in advance,
Ravi

Hi Ravi,
Can you go to SE80 and check the function group you have provided while creating the table maintainance generator.
See at the top include what the name SAP has generated for the  internal table .
I think if you get the name of the internal table name you can do the manipulation.

Similar Messages

  • Table change date and time

    hi experts,
    i want to know my table changed or modified date and time.. plz help..
    Frequently asked basic question. Please search the web before posting and put a little more effort in framing a question that is understandable for all others.
    Locked by: kishan P on Aug 24, 2010 3:08 PM

    Hi,
    Check the Table: DD02L
    DD02L~AS4USER
    DD02L-AS4DATE
    other way..
    thought you want to know who last changed the contents?
    If you're lucky then the table is set for "table logging" in the technical settings (SE11), then you can find out via tx SCU3
    Hope this will help you..
    Regards,
    Kiran

  • Unable to insert date and time when using date datatype

    Hi
    I am hitting a bit of a problem when using the date datatype. When trying to save a row to the table where the field it throws an error ora 01830 and complains about converting the date format picture ends...etc. Now when I do the insert, I use the to_date function with the format of "dd-mon-yyyy hh24:mi:ss". Of course, when I remove the time element, everything is perfect.
    Checking sysdate, I noticed that the time element wasn't be displayed, and I used alter session set nls_date_format to set the date and time I want to save to the table, which worked!
    Then based on advice in a previous thread to permanently fix the problem, I used alter system set nls_date_format ="dd-mon-yyyy hh24:mi:ss" scope=spfile; This showed that it was altered, and I can see the setting in the em. In sqlplus, I shutdown the database, and restarted with startup mount; alter database open; and then selecting sysdate, it still shows the date as dd-mon-yy, and still no time! Checking the em, and looking up the nls_date_format the setting is still shown as "dd-mon-yyyy hh24:mi:ss".
    So, my question is this - what am I doing wrong? Why can't save date and time using date in Oracle 11g?????
    Thanks

    user633278 wrote:
    Hi
    I am hitting a bit of a problem when using the date datatype. When trying to save a row to the table where the field it throws an error ora 01830 and complains about converting the date format picture ends...etc. Now when I do the insert, I use the to_date function with the format of "dd-mon-yyyy hh24:mi:ss". Of course, when I remove the time element, everything is perfect.
    Checking sysdate, I noticed that the time element wasn't be displayed, and I used alter session set nls_date_format to set the date and time I want to save to the table, which worked!
    Then based on advice in a previous thread to permanently fix the problem, I used alter system set nls_date_format ="dd-mon-yyyy hh24:mi:ss" scope=spfile; This showed that it was altered, and I can see the setting in the em. In sqlplus, I shutdown the database, and restarted with startup mount; alter database open; and then selecting sysdate, it still shows the date as dd-mon-yy, and still no time! Checking the em, and looking up the nls_date_format the setting is still shown as "dd-mon-yyyy hh24:mi:ss".
    So, my question is this - what am I doing wrong? Why can't save date and time using date in Oracle 11g?????
    ThanksYou most certainly can save the time. A DATE column, by definition stores date and time. What you describe is a presentation problem, and setting nls_date_format at the system as an init parm is the weakest of all settings as it is overridden by several other locations.
    without seeing the exact sql that produced the error (not just your description of what you think you were doing) it is impossible to say for sure.
    However, I'd suggest you read http://edstevensdba.wordpress.com/2011/04/07/nls_date_format/

  • User status Date and  time

    Hi EXPERTS,
    In notification when we change user status, system logs date and time in action log
    I want to know in which table does user status date and time can be found.
    Regards
    Anil Kumar

    Anil Kumar,
    I'm not a t a system right now, but have a look at JEST and JCDS.
    PeteA

  • Date and Time comparisons...

    Hi! and regards to all.... I´m trying to get the interval from a table depending on current date and time (sysdate), but i´m having problems when comparing date where first one is greater than second one...
    My table is defined and populated as...
    HRA_ID HRA_INTERV HRA_INICIO HRA_FIN
    1 15 01/01/2008 08:00:00 a.m. 01/12/2020 10:00:00 p.m.
    2 30 01/01/2008 10:01:00 p.m. 01/12/2020 07:59:00 a.m.
    Whend doing comparison between 8:00am to 10:00pm no problem is found and the data 15 is returned... but when comparing in the second interval (10:01pm to 7:59am next day) problems are come.. I supose is because of different days are considered in my sql statement... nevertheless i would like to receive comments...
    My sql statement is:
    SELECT HRA_INVERV
    FROM UBI_HORARIOS A
    WHERE TO_DATE(TO_CHAR(SYSDATE,'HH24:MI:SS'),'HH24:MI:SS')
    BETWEEN (TO_DATE(TO_CHAR(A.HRA_INICIO,'HH24:MI:SS'),'HH24:MI:SS'))
    AND
         (TO_DATE(TO_CHAR(A.HRA_FIN,'HH24:MI:SS'),'HH24:MI:SS'))
    Your suggestions are welcome...

    Thanks Justin!!, and EXACTLY!!!... That was the first error I found when my supervisors gave me the database ralational diagram... But in this case fields with data type TIME are not allowed.. So, what I´m trying to to is trim the date parte of the field (01/01/2008, etc,etc) and JUST USE TIME INTERVALS... That´s why I´m using to_char and to_date... in order to ELIMINATE DATE PARTS AND USE JUST THEIR TIME PERIODS... But being honest.. i don´t know if there´s another function could help...

  • What is the best way to captue current date and time?

    I got a field in table to capute current date and time...i am
    using SQL Server.
    field name datatype length
    enter_datetime datetime 8
    What is the best way to get current date and time and insert
    to table?.
    Is this way?.
    <cfset curtime = 'dateformat(#now()#,'mm/dd/yyyy')&"
    "&timeformat(#now()#,'hh:mm:ss')'>
    This way looks like time is not entered correctly.
    or any other better way?.

    > get current date and time and insert to table?
    You can use cfqueryparam
    <cfqueryparam value="#now()#"
    cfsqltype="cf_sql_timestamp">
    Or as was suggested, set the default for your table column to
    getdate(). Then you won't have to insert anything. Sql server will
    do it automatically when a new record is created.

  • Database dictionary name to get last modified DML statement date and time?

    How can i know in the table is lastly modified date and time? There must be a data dictonary table, please let me know the name of that table.

    AshishS wrote:
    Thks for reply, but it give last DDL alter/modified basically i need last DML time and date on the table.oh yes,
    SQL> desc user_tab_modifications
    Name                                      Null?    Type
    TABLE_NAME                                         VARCHAR2(30)
    PARTITION_NAME                                     VARCHAR2(30)
    SUBPARTITION_NAME                                  VARCHAR2(30)
    INSERTS                                            NUMBER
    UPDATES                                            NUMBER
    DELETES                                            NUMBER
    TIMESTAMP                                          DATE
    TRUNCATED                                          VARCHAR2(3)
    DROP_SEGMENTS                                      NUMBER
    SQL>check this link also
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1590655700346557237
    Edited by: CKPT on Oct 3, 2011 12:41 PM

  • Date and time for credit block and release in Sales document

    Hi.
    For sales document [sales order and delivery], we need to find out the date and time :
    1. when it was blocked from credit block.
    2. when it was released from credit block.
    Is there a standard table that stores these dates and time?
    Tks.
    Rgds,
    Johnhuang05

    Try as in Environment--> Changes in sales Order.
    Or VKM2
    Hope this satisfies.
    regards,
    Ganesh Sabnis

  • How to load date and time from text file to oracle table through sqlloader

    hi friends
    i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
    this is my data in this path (c:\external\my_data.txt)
    7369,SMITH,17-NOV-81,09:14:04,CLERK,20
    7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
    7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
    7566,JONES,02-APR-81,09:24:10,MANAGER,20
    7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
    create table emp2 (empno number,
                      ename varchar2(20),
                      hiredate date,
                      etime date,
                      ejob varchar2(20),
                      deptno number);the control file code in this path (c:\external\ctrl.ctl)
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>any help i greatly appreciated
    thanks
    Edited by: user10947262 on May 31, 2010 9:47 AM

    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)Try
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
    this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>
    That's not an error, you can see errors within log and bad files.

  • Find record insert date and time in a table

    Hi All,
    I want to get record insert date and time in a table. There is no datetime column in my table. Are there any possibility to get date and time for each record?
    Thank You

    Thats not easy. If your transaction info still resides on active portion of the log you can use fn_dblog to read out the time at which the transactions occurs. This is useful only if you try it shortly after transaction.
    the code would look like this
    SELECT *
    FROM fn_dblog(null,null)
    WHERE [Transaction Name] LIKE 'INSERT%'
    OR [Transaction Name] LIKE 'UPDATE%'
    Also see
    http://www.mssqltips.com/sqlservertip/3076/how-to-read-the-sql-server-database-transaction-log/
    http://solutioncenter.apexsql.com/read-a-sql-server-transaction-log/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Ned to insert current Date AND Time in a table

    Hi:
    This should be a simple one. I need to insert the current (system) date AND time in a columnof a table. From the documentation, it appears that the column datatype should be DATE (at least it claims to be able to support both date and time). It is also claimed that SYSDATE contains the current system date and time. But when I try to insert SYSDATE into a DATE column, all that gets logged is the date (without the time of day).
    insert into foo (curr_date_time) values (sysdate);
    select curr_date_time from foo;
    CURR_DATE
    02-AUG-07
    THere must be some way to instruct the insertion of the time as well. Also, the YY-MMM-DD format is undesirable. I'd prefer "YYYY-MM-DD HH:MI:SS". An attempt to insert TO_DATE(SYSDATE,'YYYY-MM-DD HH:MI:SS') fails as well.
    Any suggestions?
    P.S. I entered this question yesterday, Aug 6th, but it didn't seem to stick for some reason.

    Your NLS_DATE_FORMAT is set to show only the DATE element. If you run this query:
    SELECT to_char(curr_date,'HH:MI:SS')
    FROM   your_table
    /You would see that the time element has been populated as well.
    If you follow this URL you will find some helpful links, including jumps to the online Oracle documentation:
    Re: How to attach a java bean in forms6i
    Vibes, APC

  • Why can't I save my text message to my computer???  Persons number, date, and time...

    Why can't I save my text message to my computer???  I need a legit way to show my entire conversation back n forth with the persons number, date, and time...

    You can also find non-Apple utility programs that will allow you to transfer your text messages to your computer.
    If you use a Mac, look at this:  http://www.ecamm.com/mac/phoneview/
    This works on Macs and PCs: http://www.wideanglesoftware.com/touchcopy/index.php

  • Date and time at bios can not save the previous setting of hp pavilion g6-1208sx

    my laptop hp pavilion g6-1208sx using windows 7, i`m using it since only one year .
    date and time at bios can not update or save the previous setting.
    every start i must set time and date on bios.
    please help me how to saving bios time and date.

    Hi,
    you need to update your system bios to most recent version you can do it here:
    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=pt&cc=br&prodTypeId=32...
    then you can update your bios settings date and hour and test again if persist you might need to replace you real time clock battery, but if your unit is in warranty i advise you to contact hp assistance so they can take an in warranty solution to you.
    Any doubts or questions don´t hesitate.
    Best regards

  • Updating Date and Time at Save

    I have inserted a 'Date and Time' field in the header of a Pages document. I would like it to update each time the document is saved. I cannot seem to find how to do this. Can anybody help please?
    Thanks
    Tim

    Hello
    I wrote upon Automator for those using 10.5 which gives the ability to record the user's actions in a process file which may be replaid later.
    With 10.4.x this feature doesn't exists.
    This is a very good reason to switch to 10.5
    You are lucky, insomniae strikes again so here is the announced brute force script.
    Copy the script in the clipboard
    Paste in a blank window of Script Editor
    Save it as an application
    Move the newly created application into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Pages:
    Now, enter your Pages document.
    Click in the header.
    Go to
    menu Scripts > saveWithCurrentDateInHeader
    The contents of the header will be replaced by the current date/time
    and the document will be saved exactly as if you pressed cmd + s
    Yvan KOENIG
    26 janvier 2008
    --(SCRIPT saveWithCurrentDateInHeader.app]
    property theApp : "Pages"
    tell application theApp
    activate
    tell application "System Events" to tell application process theApp
    keystroke "a" using {command down} (* print *)
    set cd to current date
    set the clipboard to (cd as text)
    keystroke "v" using {command down}
    keystroke "s" using {command down}
    end tell -- System Events …
    end tell --theApp
    -- [/SCRIPT]
    As you may read, there are more lines to explain the use of the beast than for the code itself
    As I am unable to activate the dialog allowing us to adjust the date whe it is inserted the official way, I simply paste the current date-time into the header.
    Just click tnto the header of the current page. It will be automatically reported into other pages's header.
    Yvan KOENIG (from FRANCE samedi 26 janvier 2008 4:48:47)

  • HT2822 apple tv just says date and time will not connect press menu button on remote,dose nothing then goes to screen saver shots of animails

    First time connecting apple tv just says date and time will not connect press menu button on remote,dose nothing then goes to screen saver shots of animails

    Read this: http://appletv2.com/stuck-on-setting-date-and-time-fix/

Maybe you are looking for