Events for changed entry in data dictionary

Hi ,
I  have a requirement as mentioned below:
my table has four fields : 1. vkorg 2. validity_period 3. modification_date and 4. modification_time.
I have to capture the modification date and modification time if a user changes an entry (or entries) in the table and update the date and time fields in the table.  I have done it by creating an event "creating a new entry"which is triggered when a new entry is added to the table. But if an existing entry is modifies then the entry is not triggered. when I use  " before saving the data " event then only the last record of the table moves to the "Routine"  of the event. So I am not able to capture the date and time when an entry (or entries ) is modified.  Can anyone suggest me what I should do?
Regards
Amit kumar
Edited by: amitku1201 on Jan 15, 2010 3:05 PM

This question has been asked many times before. Please see:
*&      Form  FILL_SY_FIELDS                                    FISKROB
*       Add the creation date and userid if the line is being created.
*       Add the change date and userid if the line is being changed.
form fill_sy_fields.
  data: f_index like sy-tabix. "Index to note the lines found
  data begin of total_s.
          include structure zzv_my_tab.
  data action.
  data mark.
  data end of total_s.
  data extract_s like total_s.
  loop at total.
    if <action> = 'U'.
      move total to total_s.
      read table extract with key total.
      if sy-subrc eq 0.
        f_index = sy-tabix.
        extract_s = extract.
      else.
        clear f_index.
      endif.
*       (make desired changes to the line TOTAL)
      total_s-zzfchdate = sy-datum.
      total_s-zzfchusr  = sy-uname.
      move total_s to total.
      modify total.
      check f_index gt 0.
      extract = total.
      modify extract index f_index.
    elseif <action> = 'N'.
      move total to total_s.
      read table extract with key total.
      if sy-subrc eq 0.
        f_index = sy-tabix.
        extract_s = extract.
      else.
        clear f_index.
      endif.
*       (make desired changes to the line TOTAL)
      total_s-zzfcredate = sy-datum.
      total_s-zzfcreusr  = sy-uname.
      move total_s to total.
      modify total.
      check f_index gt 0.
      extract = total.
      modify extract index f_index.
    elseif total is initial.
      move total to total_s.
      read table extract with key total.
      if sy-subrc eq 0.
        f_index = sy-tabix.
        extract_s = extract.
      else.
        clear f_index.
      endif.
*       (make desired changes to the line TOTAL)
      delete total.
      check f_index gt 0.
      delete extract index f_index.
    endif.
  endloop.
  sy-subrc = 0.
endform.                    " FILL_SY_FIELDS
Rob
The link I posted earlier may not work now. The above code does.
Edited by: Rob Burbank on Jan 15, 2010 12:20 PM

Similar Messages

  • Error: while configuring logs for changes in infotype data

    Hi All,
    I am configuring the following Tables for maintain logs for changes in infotype data.
    V_T585A, V_T585B and V_T585C
    While configuring V_T585B, when i input * in 'field name' column it gives me an warning message " All data fields in **** infotype 31 will be deleted.
    Please let me know, what does this warning message means?
    Also, How is the report RPUAUD00 read?
    Regards
    Simran

    Hi Simran,
    you are not suppose to give the IT 0031-Reference Personnel Numbers in these tables. why because this will done at the time of Employee hiring only and we don't change this. if you change you will lost the old data in the IT.
    Normally we assign only the IT which we change frequently for the master data. example like 0 1 2 7 8 9 27 582 - 589 2001 2006.
    if you are configuring today means from today on-wards any changes had made to these IT's you can see in the report. before changes will not be seen. in the report you have to choose either long-term document / short-term document and remaining fields as per the requirement.
    Regards,
    Praneeth kumar

  • BAPI for change PO confirmation date

    Hi,
    Does anyone know a bapi or a function module for change the confirmation date of one item of a purchase order ( that changes the field EINDT of table EKES ) ?
    I need to change it according to goods receipt date.
    Thanks in advance,
    Paulo Sousa

    you can use BAPI_PO_CHANGE
    In particular you would be interested in schedule line table POSCHEDULE in the function interface and the field for confirmation date is DELIVERY_DATE.
    Also you need to pass the BAPI some header fields like PO number etc and item fields liek material number etc along with the POSCHEDULE structure.
    Also remember to mark X in POSCHEDULEX for corresponding field POSCHEDULEX-DELIVERY_DATE, so that the change will be transferred to the PO in database.
    Also this BAPI can auto COMMIT
    Hope this helps

  • Tracking Changes for Single record in Data Dictionary

    Hi Experts,
    I encountered with this question in an interview. I was asked how to maintain/track changes for a particular single record in a Data Dictionary table. I knew that for an entire table we can do it using table maintenance events. But I was confused when the interviewer asked for one particular record in table. Kindly input your thoughts on this.
    Thanks.

    Hi Radhika,
    In case of record in a table we can use "log data changes" option (Table DBTABLOG) in Technical Settings > Log data changes. It enable writing of change documents in Tables CDHDR/CDPOS.
    Hope this helps.
    Regards,
    Naveen

  • User Exit for Changing Payment Due date for Invoices

    HI Gurus,
    Could anyone suggest a User Exit which cane be used for Due Date calculation an all Invoice Entries like MIRO, FB60 etc.
    This is required for overwriting the Due Date determined via payment terms by a Particular day in a week. (Eg: Friday)

    Hi
    User exit
    Re: user exits in MM
    Regards
    Ram

  • How to catch the event for change dropdown value in alv

    it has a column output by dropdown in alv. the dropdown type cl_salv_wd_uie_dropdown_by_idx.
    now the problem is if change the dropdown value, i want to catch the event to change another column value.
    how can i do it?

    This part contains other ALV initialization code
    *... init ColumnSettings
      DATA:
            lr_column_settings TYPE REF TO if_salv_wd_column_settings.
      lr_column_settings ?= wd_this->r_table.
      DATA:
            lt_columns TYPE salv_wd_t_column_ref.
      lt_columns = lr_column_settings->get_columns( ).
      DATA:
            ls_column     TYPE salv_wd_s_column_ref,
            lr_col_header TYPE REF TO cl_salv_wd_column_header,
            l_tooltip     TYPE string.
      LOOP AT lt_columns INTO ls_column.
        CASE ls_column-id.
          WHEN 'PLANETYPE'.
            DATA:
                  lr_drdn_by_key TYPE REF TO cl_salv_wd_uie_dropdown_by_key.
            CREATE OBJECT lr_drdn_by_key
              EXPORTING
                selected_key_fieldname = ls_column-id.
            lr_drdn_by_key->set_key_visible( abap_true ).
            ls_column-r_column->set_cell_editor( lr_drdn_by_key ).
          WHEN OTHERS.
        ENDCASE.
    ENDLOOP.
      DATA:
            node_info TYPE REF TO if_wd_context_node_info,
            lt_valueset   TYPE STANDARD TABLE OF wdr_context_attr_value,
            l_value       TYPE wdr_context_attr_value.
      node_info = wd_context->get_node_info( ).
      node_info = node_info->get_child_node( 'FLIGHT_INFO' ).
    data : lt_sflight type STANDARD TABLE OF sflight,
           ls_sflight like LINE OF lt_sflight.
    SELECT * from sflight into TABLE lt_sflight.
    LOOP at lt_sflight into ls_sflight.
      l_value-value = ls_sflight-planetype.
      l_value-text  = ls_sflight-planetype.
      INSERT l_value into TABLE lt_valueset.
      ENDLOOP.
      node_info->set_attribute_value_set(
      name = 'PLANETYPE'
      value_set = lt_valueset ).

  • How to run sql scripts using batch file for a web dynpro data dictionary

    Hi,
    I want to develop a sql script to be executed on the server alongwith the installation of a product to pre-populate web dynpro data dictionary tables required for the application.
    I further require to make the scripts independent of the database name,so that it can be run at any client environment.
    Your help will be appreciated and rewarded.

    See shoblock's answer
    call sql script from unix
    masterfile.sql:
    @file1 &1
    @file2 &2
    @file3 &3
    @file4 &4
    then just call the master script:
    sqlplus userid/password @masterfile <p1> <p2> <p3> <p4>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Bapi for change work center data

    HIi All
                    I need BAPI to change work center data for all categories and work center change transactions .....IR02 ,CNR2,CR02.
    Thanks in advance .

    Hai,
    Try the fm CRAP_WORKCENTER_CREATE
    BAPI_BUS2054_CHANGE_MULTI
    CRAP_WORKCENTER_CREATE
    Regards,
    Venkat

  • T-code for changing valid to date

    hi
    is there any t-code other than MP01 to change Valid to date for MPNs?
    Regards
    Smitha

    Hi,
    I dont think , we can do it from other transaction code.
    MP01                   Maintain AMPL Records             
    MP02                   Display AMPL Records              
    MPAD                   Delete archived materials from AMPL
    Thanks,
    Naveen Inuganti

  • BAPI for changing BP communication data

    Hi,
    I am trying to change BP Communication data using FM BAPI_BUPA_ADDRESS_CHANGE but it is changing
    "Address-Independent" data only and not the normal communications data.
    Which FM should I use ? Or are there any specific parameters which I need to pass?
    Please help
    Regards
    Yashodha

    Hi Sandy,
    Thanks for the quick response. Would also appreciate if you let me know what parameters to pass? I am sending following :
    IV_PARTNER: <BP Number>
    IV_X_SAVE : X  (Already Defaulted)
    IV_CHANGE_BAS :X (Already Defaulted)
    IV_CHECK_ADDRESS : X ( Already Defaulted)
    Table: IT_ADTEL
               Telephone: < New Telephone Number>
               Con         :  001
    Table: IT_ADTEL_X
              T: X
              C: X
              U: U
    But it is not updating the address dependent telephone number!!
    Please let me know where am I missing out?
    Regards,
    Yashodhan

  • Move and event and change to-do date?

    I use OmniFocus, so on Monday morning, I'll open iCal to a flood of To Dos for the entire week. These are all just day dates, not specific hours. I then drag/drop those To Dos into my daily schedule so I have a nice daily hour by hour breakdown. For example, I'll take "To Do Tuesday" and drop it Tuesday at 3:00-3:30PM.
    Sometimes I'll notice a day filling up more than I might like, and I'll move "To Do Tuesday" from Tuesday to Thursday.
    Where I'm hitting a hitch is, the To Do that I originally drag/dropped to create that Event for "To Do Tuesday" still has the original To Do date of Tuesday and does not update to Thursday when I move the event.
    Is there an iCal setting I'm missing, a 3rd party app, or an arcane spell I could cast that would make the To Do update in this fashion?

    Just wanted to ask again and see if the weekend crowd had any ideas. Thanks.

  • Possible t-codes for changing schedule line dates

    Hi
       I am trying to find out all possible t-codes for changing schedule dates in sales order. I found out of the following t-codes:
    VA02
    CO06
    V_RA
    V_V2
    Experts please tell if I'm missing any t-code
    TIA

    Hi,
    As far as my knowledge goes, you have got all the tcode. if you get more tcode send me a mail.
    Thanking you
    Regards
    Manoj
    ([email protected])

  • Alert for change in due date on sales order

    Hi,
    I would like the system to create an alert when ever a user changes the due date on an existing sales order. The alert should only be triggered once when the change takes place.
    Please help
    Kind Regards
    Grant

    Grant,
    You could use the Query below 
    SELECT DISTINCT T1.DocNum AS 'Document Number', T1.CardCode, T1.CardName, T0.DocDueDate [Old Due Date], T1.DocDueDate [New Due Date] FROM  [dbo].[ADOC] T0  INNER JOIN  [dbo].[ORDR] T1 ON T0.DOCNUM = T1.DOCNUM WHERE T0.ObjType = N'17'   AND  T0.DocNum = 400000
    AND T1.DOCDUEDATE <> T0.DOCDUEDATE
    NOTE: The number of times the Alert appear cannot be controlled through a Query, it is a setting in the Alerts windows. 
    Suda

  • SAP EHS : Generation of Report for change in substance data

    hi Experts,
    i want to generate report for the change in any substance specific data, editing of the substance. the report should contain the date, time, user details who has done this changes, what is changed, what is new value etc. how can i do that?
    i want to generate change document for substance.
    i dont want any ABAP interaction for creation of reports.
    can i create by using some t codes or just by clicking to the options.
    please help me out in this.
    thanks in advance
    regards
    Anand Bende
    Edited by: anand bende on Sep 5, 2008 11:22 AM

    Hello Anand,
    Did you check in the standard EHS documentation the paragraph: Creation of Change Documents for Specifications.
    It is under Specification editing > Engineering Chg Mgmt.
    Regards,
    John

  • BAPI for Changing Applicant Master Data

    Hi,
    We are trying to access our SAP R/3 remotely for the creation and
    maintenence of Applicant Master Data. We were able to identify the BAPI
    "BAPI_applicant_create" for the creation of an applicant but are unable
    to determine the BAPI required to maintain / change applicant data. Can
    you please assist us in this regard.
    regards,
    Bilal Nazir

    Hey
    I believe since there is no BAPI available so we could use the FM. And as far it being not remote enabled, i think thats not a major problem, we can always make a copy of it and make it remote enabled.
    If anyone has any other option in mind, please do share.
    Regards
    Bilal

Maybe you are looking for