Using ALV OM to UPDATE (Change) Data

Hallo Dear Experts,
Would you  give a Tip how to update Datas using ALV OM. Does any body now an Example program ?
Thank a lot
Fisseha

Hi,
new ALV object model (class CL_SALV_TABLE and so on) does not support editable columns. Yoe need to use class CL_GUI_ALV_GRID to implement editable ALV. More info can be found [here|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907].
Cheers

Similar Messages

  • How to update changed data in alv grid.

    hi experts,
    i have a editable alv report how to update the changed data on the grid to database table when i click save.
    can anybody tell me how to do this if possible with example.
    thanks in advance.
    regards,
    venu

    The code below isn't a working program, but has most of what you should need.  Field-symbol <dyn_table> will always have what is in the grid.
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa>.
    DATA: pt_fieldcat TYPE lvc_t_fcat,
          ls_fcat TYPE lvc_s_fcat,
          new_table TYPE REF TO data,
          new_line TYPE REF TO data.
    CREATE OBJECT g_custom_container
          EXPORTING container_name = g_container.
    CREATE OBJECT g_grid EXPORTING i_parent = g_custom_container.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'MATERIAL'.
    ls_fcat-datatype  = 'CHAR'.
    ls_fcat-intlen    = 18.
    ls_fcat-outputlen = 18.
    ls_fcat-coltext   = 'Material'.
    ls_fcat-edit      = 1.
    APPEND ls_fcat TO pt_fieldcat.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'QUANTITY'.
    ls_fcat-datatype  = 'INT4'.
    ls_fcat-intlen    = 6.
    ls_fcat-outputlen = 6.
    ls_fcat-coltext   = 'Qty'.
    ls_fcat-edit      = 1.
    APPEND ls_fcat TO pt_fieldcat.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
                 EXPORTING
                    it_fieldcatalog = pt_fieldcat
                 IMPORTING
                    ep_table = new_table.
    * assign ref variable  to a field symbol
    ASSIGN new_table->* TO <dyn_table>.
    * Create dynamic work area and assign to FS
    CREATE DATA new_line LIKE LINE OF <dyn_table>.
    ASSIGN new_line->* TO <dyn_wa>.
    * data_itab is filled with data that you want in grid
    LOOP AT data_itab INTO data_wa.
      CLEAR <dyn_wa>.
      ASSIGN COMPONENT 'MATERIAL' OF STRUCTURE <dyn_wa> TO <fs>.
      <fs> = data_wa-material.
      ASSIGN COMPONENT 'QUANTITY' OF STRUCTURE <dyn_wa> TO <fs>.
      <fs> = data_wa-quantity.
      APPEND <dyn_wa> TO <dyn_table>.
    ENDLOOP.
    CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          i_structure_name              = '<DYN_TABLE>'
          is_variant                    = gs_variant
          i_save                        = 'A'
          i_default                     = 'X'
          is_layout                     = gs_layout
          it_toolbar_excluding          = gt_exclude
        CHANGING
          it_outtab                     = <dyn_table>
          it_fieldcatalog               = pt_fieldcat[]
          it_sort                       = gt_sort[].

  • Editable ALV, how to capture changed data

    Hi All,
    I have created an editable ALV. User can make some changes in the displayed record and press "Submit" button (custom button on application toolbar), the program should validate the data and write the file on application server if validations are successful otherwise controls stay on the same screen.
    I am handling this validation and writing file part in PAI of the screen.
    Problem: The program is capturing the data when user changes it for the first, but program is failing to capture the subsequent changes (user makes after the validation fails). Program processes always the first time changed data only. Please help me in getting this problem resolved.
    Step1 : Program shows output.
    Step2: User changes Company Code.
    Step3: User clicks on Submit Button.
    Step3.1: Program reads the new data and performs validation.
    Step3.2: New Company code is not valid, error displayed.
    Step4: User changes the company code again, presses submit button.
    Goto step 3.1 -> Here program does not read the new data, rather first time changes company code is again read and validated, and program shows the same error again, which is not a desired result

    Hi Ashish,
    you need a method HANDLE_DATA_CHANGED as handler for grid event DATA_CHANGED.
    Use
    LOOP AT er_data_changed->mt_mod_cells ASSIGNING <mod>.
    to check all changed data. In this event, add the error messages to ER_DATA_CHANGED object.
    set all required handlers, i.e.
    SET HANDLER:
          handle_data_changed          FOR ro_grid,
          handle_data_changed_finished FOR ro_grid,
          handle_toolbar_set           FOR ro_grid,
          handle_user_command          FOR ro_grid,
          handle_hotspot_click         FOR ro_grid,
          handle_f4                    FOR ro_grid,
          handle_f1                    FOR ro_grid.
       ro_grid->set_toolbar_interactive( ).
    Register ENTER and MODIFIED events.
        ro_grid->register_edit_event( cl_gui_alv_grid=>mc_evt_enter ).
        ro_grid->register_edit_event( cl_gui_alv_grid=>mc_evt_modified ).
    Regards,
    Clemens

  • Capture ALV container event and change data in screen header

    Hi,
    I have a REPORT calling a custom screen with a header section and an ALV container displaying ITEMS.
    <b>Situation:</b>
    If I use the FILTER button on the ALV container, it works fine but I wish to capture the details, so that I can change my header data accordingly.
    <b>Example</b>
    e.g : Suppose the ALV container on the screen displays 4 lines of data.
       So my header area displays '4' as the no of items displayed
    Now when I use FILTER button on the ALV container, it then dispalys only '2' lines of data as per the filter criteria. Now how do I capture this details so that my header now displays 2 instead of 4.
    Basically I want my HEADER data to get refreshed whenever I use the filter button to change the number of data lines dispalyed.
    Hope I make some sense with the example.
    Appreciate if you gurus could help ..
    Thanks and Regards
    RK

    Can you post your code.
    Regards,
    Rich Heilman

  • Exit to be used for hr to update master data

    Hi,
    Can anyone tell me which exit shud be used to update master data in HR module.
    My extraction structure is  HRMS_BW_IS_ATTENDANCE.
    i have to append 'ndays' n to fill this field which exit shud be used.
    Thnx,
    Regards,
    Nishu Gupta

    Hi,
    Transaction Data:
    EXIT_SAPLRSAP_001
    Master Data:
    Attribute:       EXIT_SAPLRSAP_002
    Text:             EXIT_SAPLRSAP_003
    Hierarchy :     EXIT_SAPLRSAP_004
    Happy Tony

  • INSERT & UPDATE changing date format to mm/dd/yyyy!!!

    I have INSERT & UPDATE ASP/VB forms which have a date
    field which submits to
    Access....except when the date is entered as dd/mm/yyyy, it
    decides to
    convert it to mm/dd/yyyy....absolutely terrific!! :o((
    I've added this:
    <% Session.LCID = 2057 %>
    I've checked the date format, I've done absolutely everything
    I can think
    of, and can source on the newsgroups, but NOTHING.
    What, on earth, is going on??????????????
    If anyone can help save me from this madness, please tell me
    why this is
    happening?
    I'm using ASP/VB, with Access on a Windows server and, up
    until now, I've
    never had this problem.
    Here's my INSERT code:
    <%@LANGUAGE="VBSCRIPT"%>
    <% Session.LCID = 2057 %>
    <!--#include file="../Connections/dsnNAME.asp" -->
    <%
    Dim MM_editAction
    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
    MM_editAction = MM_editAction & "?" &
    Server.HTMLEncode(Request.QueryString)
    End If
    ' boolean to abort record edit
    Dim MM_abortEdit
    MM_abortEdit = false
    %>
    <%
    ' IIf implementation
    Function MM_IIf(condition, ifTrue, ifFalse)
    If condition = "" Then
    MM_IIf = ifFalse
    Else
    MM_IIf = ifTrue
    End If
    End Function
    %>
    <%
    If (CStr(Request("MM_insert")) = "form1") Then
    If (Not MM_abortEdit) Then
    ' execute the insert
    Dim MM_editCmd
    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_dsnNAME_STRING
    MM_editCmd.CommandText = "INSERT INTO tblNews (newstitle,
    newsdate,
    newsenddate, thumbnail, largeimage, newstextsnip, newstext,
    emailcontact,
    urllink, [include]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 202,
    1, 75, Request.Form("newstitle")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param2", 135,
    1, -1, MM_IIF(Request.Form("newsdate"),
    Request.Form("newsdate"), null)) '
    adDBTimeStamp
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param3", 135,
    1, -1, MM_IIF(Request.Form("newsenddate"),
    Request.Form("newsenddate"),
    null)) ' adDBTimeStamp
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param4", 202,
    1, 75, Request.Form("thumbnail")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 202,
    1, 75, Request.Form("largeimage")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 203,
    1, 536870910, Request.Form("newstextsnip")) ' adLongVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7", 203,
    1, 536870910, Request.Form("newstext")) ' adLongVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8", 202,
    1, 75, Request.Form("emailcontact")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9", 202,
    1, 75, Request.Form("urllink")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param10", 5,
    1, -1, MM_IIF(Request.Form("include"), 1, 0)) ' adDouble
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
    ' append the query string to the redirect URL
    Dim MM_editRedirectUrl
    MM_editRedirectUrl = "confirm.htm"
    If (Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0)
    Then
    MM_editRedirectUrl = MM_editRedirectUrl & "?" &
    Request.QueryString
    Else
    MM_editRedirectUrl = MM_editRedirectUrl & "&" &
    Request.QueryString
    End If
    End If
    Response.Redirect(MM_editRedirectUrl)
    End If
    End If
    %>
    Thanks.
    Nath.

    Well, I've established that it's DW8.0.2 that is causing this
    strange
    occurence.
    Reverted back to previously created versions of my
    INSERT/UPDATE form pages
    (created in DWMX) and it all works fine!!
    I think that makes the whole situation even more frustrating
    because I had
    HUGE problems with this back in 2003/2004, and resolved it.
    Now I've upgraded to DW8.0.2 and it's all gone "ape" again.
    <sigh>
    Any ideas, looking at the code in my initial post, why this
    is happening?
    For comparison here is the same INSERT created in DWMX that
    WORKS:
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="../Connections/dsnNAME.asp" -->
    <%
    ' *** Edit Operations: declare variables
    Dim MM_editAction
    Dim MM_abortEdit
    Dim MM_editQuery
    Dim MM_editCmd
    Dim MM_editConnection
    Dim MM_editTable
    Dim MM_editRedirectUrl
    Dim MM_editColumn
    Dim MM_recordId
    Dim MM_fieldsStr
    Dim MM_columnsStr
    Dim MM_fields
    Dim MM_columns
    Dim MM_typeArray
    Dim MM_formVal
    Dim MM_delim
    Dim MM_altVal
    Dim MM_emptyVal
    Dim MM_i
    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
    MM_editAction = MM_editAction & "?" &
    Request.QueryString
    End If
    ' boolean to abort record edit
    MM_abortEdit = false
    ' query string to execute
    MM_editQuery = ""
    %>
    <%
    ' *** Insert Record: set variables
    If (CStr(Request("MM_insert")) = "form1") Then
    MM_editConnection = MM_dsnNAME_STRING
    MM_editTable = "tblNews"
    MM_editRedirectUrl = "confirm.htm"
    MM_fieldsStr =
    "newstitle|value|newsenddate|value|thumbnail|value|largeimage|value|newstextsnip|value|ne wstext|value|emailcontact|value|urllink|value|include|value"
    MM_columnsStr =
    "newstitle|',none,''|newsenddate|',none,NULL|thumbnail|',none,''|largeimage|',none,''|new stextsnip|',none,''|newstext|',none,''|emailcontact|',none,''|urllink|',none,''|include|no ne,1,0"
    ' create the MM_fields and MM_columns arrays
    MM_fields = Split(MM_fieldsStr, "|")
    MM_columns = Split(MM_columnsStr, "|")
    ' set the form values
    For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
    Next
    ' append the query string to the redirect URL
    If (MM_editRedirectUrl <> "" And Request.QueryString
    <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
    Request.QueryString <> "") Then
    MM_editRedirectUrl = MM_editRedirectUrl & "?" &
    Request.QueryString
    Else
    MM_editRedirectUrl = MM_editRedirectUrl & "&" &
    Request.QueryString
    End If
    End If
    End If
    %>
    <%
    ' *** Insert Record: construct a sql insert statement and
    execute it
    Dim MM_tableValues
    Dim MM_dbValues
    If (CStr(Request("MM_insert")) <> "") Then
    ' create the sql insert statement
    MM_tableValues = ""
    MM_dbValues = ""
    For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_formVal = MM_fields(MM_i+1)
    MM_typeArray = Split(MM_columns(MM_i+1),",")
    MM_delim = MM_typeArray(0)
    If (MM_delim = "none") Then MM_delim = ""
    MM_altVal = MM_typeArray(1)
    If (MM_altVal = "none") Then MM_altVal = ""
    MM_emptyVal = MM_typeArray(2)
    If (MM_emptyVal = "none") Then MM_emptyVal = ""
    If (MM_formVal = "") Then
    MM_formVal = MM_emptyVal
    Else
    If (MM_altVal <> "") Then
    MM_formVal = MM_altVal
    ElseIf (MM_delim = "'") Then ' escape quotes
    MM_formVal = "'" & Replace(MM_formVal,"'","''") &
    Else
    MM_formVal = MM_delim + MM_formVal + MM_delim
    End If
    End If
    If (MM_i <> LBound(MM_fields)) Then
    MM_tableValues = MM_tableValues & ","
    MM_dbValues = MM_dbValues & ","
    End If
    MM_tableValues = MM_tableValues & MM_columns(MM_i)
    MM_dbValues = MM_dbValues & MM_formVal
    Next
    MM_editQuery = "insert into " & MM_editTable & " ("
    & MM_tableValues & ")
    values (" & MM_dbValues & ")"
    If (Not MM_abortEdit) Then
    ' execute the insert
    Set MM_editCmd = Server.CreateObject("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_editConnection
    MM_editCmd.CommandText = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
    If (MM_editRedirectUrl <> "") Then
    Response.Redirect(MM_editRedirectUrl)
    End If
    End If
    End If
    %>
    This type of thing does my HEAD in.
    Nath.
    "tradmusic.com" <[email protected]> wrote in
    message
    news:[email protected]...
    >I have INSERT & UPDATE ASP/VB forms which have a date
    field which submits
    >to Access....except when the date is entered as
    dd/mm/yyyy, it decides to
    >convert it to mm/dd/yyyy....absolutely terrific!! :o((
    >
    > I've added this:
    > <% Session.LCID = 2057 %>
    >
    > I've checked the date format, I've done absolutely
    everything I can think
    > of, and can source on the newsgroups, but NOTHING.
    > What, on earth, is going on??????????????
    >
    > If anyone can help save me from this madness, please
    tell me why this is
    > happening?
    > I'm using ASP/VB, with Access on a Windows server and,
    up until now, I've
    > never had this problem.
    >
    > Here's my INSERT code:
    >
    > <%@LANGUAGE="VBSCRIPT"%>
    > <% Session.LCID = 2057 %>
    > <!--#include file="../Connections/dsnNAME.asp" -->
    > <%
    > Dim MM_editAction
    > MM_editAction =
    CStr(Request.ServerVariables("SCRIPT_NAME"))
    > If (Request.QueryString <> "") Then
    > MM_editAction = MM_editAction & "?" &
    > Server.HTMLEncode(Request.QueryString)
    > End If
    >
    > ' boolean to abort record edit
    > Dim MM_abortEdit
    > MM_abortEdit = false
    > %>
    > <%
    > ' IIf implementation
    > Function MM_IIf(condition, ifTrue, ifFalse)
    > If condition = "" Then
    > MM_IIf = ifFalse
    > Else
    > MM_IIf = ifTrue
    > End If
    > End Function
    > %>
    > <%
    > If (CStr(Request("MM_insert")) = "form1") Then
    > If (Not MM_abortEdit) Then
    > ' execute the insert
    > Dim MM_editCmd
    >
    > Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    > MM_editCmd.ActiveConnection = MM_dsnNAME_STRING
    > MM_editCmd.CommandText = "INSERT INTO tblNews
    (newstitle, newsdate,
    > newsenddate, thumbnail, largeimage, newstextsnip,
    newstext, emailcontact,
    > urllink, [include]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?,
    > MM_editCmd.Prepared = true
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 202,
    > 1, 75, Request.Form("newstitle")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param2", 135,
    > 1, -1, MM_IIF(Request.Form("newsdate"),
    Request.Form("newsdate"), null)) '
    > adDBTimeStamp
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param3", 135,
    > 1, -1, MM_IIF(Request.Form("newsenddate"),
    Request.Form("newsenddate"),
    > null)) ' adDBTimeStamp
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param4", 202,
    > 1, 75, Request.Form("thumbnail")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 202,
    > 1, 75, Request.Form("largeimage")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 203,
    > 1, 536870910, Request.Form("newstextsnip")) '
    adLongVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7", 203,
    > 1, 536870910, Request.Form("newstext")) ' adLongVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8", 202,
    > 1, 75, Request.Form("emailcontact")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9", 202,
    > 1, 75, Request.Form("urllink")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param10", 5,
    > 1, -1, MM_IIF(Request.Form("include"), 1, 0)) ' adDouble
    > MM_editCmd.Execute
    > MM_editCmd.ActiveConnection.Close
    >
    > ' append the query string to the redirect URL
    > Dim MM_editRedirectUrl
    > MM_editRedirectUrl = "confirm.htm"
    > If (Request.QueryString <> "") Then
    > If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) =
    0) Then
    > MM_editRedirectUrl = MM_editRedirectUrl & "?" &
    Request.QueryString
    > Else
    > MM_editRedirectUrl = MM_editRedirectUrl & "&"
    & Request.QueryString
    > End If
    > End If
    > Response.Redirect(MM_editRedirectUrl)
    > End If
    > End If
    > %>
    >
    > Thanks.
    > Nath.
    >

  • Batch change dates using filenames as source

    Howdy all!
    I take a lot of pictures with my cell phone, and the date and time of the jpegs usually are just close, but not exact. The file name however usually contains all the data I need. It is something like 1227091536.jpg, which would be a photo taken today at 3:36 pm. So I use that info to manually update the date and time of each photo.
    However, it would be really neat if a plugin, or anything for that matter, existed that would take the filename in that format, and use that info to update the date and time of the photo.
    Anybody know of anything like that out there? Or come up with some clever way to speed up the process of correcting dates and times for cell phone pics?
    Thankee!
    David

    Update:
    Upon further inspection of my files, the phone almost consistently always added 5 hours onto each image. So it was easy to fix those. But, there were still photos here and there, that the phone was off in the date and time by up to a month. Those photos were set aside for individual adjustment.
    Still a pain to sift through and find the ones that are not off by the magical 5 hours, but it's a small percentage of the overall pictures.
    Dave

  • Identifying Changed Dates on Documents in SAP B1

    Greetingsu2026I have an unusual request that is somewhat long, very serious, and hope folks can help. 
    A headquarters customer believes a subsidiary company has u2018made upu2019 dates on invoices for previous billings.  They describe the date changes as u2018radicalu2019 but I have not personally seen these invoices as of yet and am waiting a FAX.  They requested I go into SAP B1 to see if someone has fabricated or made up or changed invoice dates and who it was.  They have some specific large-dollar invoices identified to research.  The person under suspect (who is no longer there) was considered an expert in SAP B1, so maybe she knew all of the different ways to change dates around.  Being an expert means also she might have used some unusual ways to change dates to the ones she wanted.
    Here are some of my ideas to discover this situation, but I hope someone can suggest even more steps because I would like to know every way that this situation can be discovered.
    1. Open the AR Invoices and use Data > Change Log and concentrate on dates.
    2. Run some SQL to validate document dates and system dates.  SELECT T0.DocNum, T0.DocDate, T0.CreateDate, T0.TaxDate, T0.UpdateDate FROM OINV T0 WHERE (T0.DocDate does not equal T0.CreateDate OR T0.TaxDate does not equal T0.CreateDate).  The results would show invoices that maybe had their dates changed.
    3.Run a Document Journal in the Financial Module.  Finance > Financial Reports > Accounting > Document Journal with the u2018Expanded Selectionu2019 of AR Invoices and a date range covering the invoices in question.  Then see if the Transaction Numbers are out of sequence.
    4. Run a Transaction Journal Report Financials > Financial Reports > Accounting > Transaction Journal Report with AR Invoices.  Compare this report to Document Journal.
    5. Run the Utilities functions of Utilities > Check Document Numbering to see if there any anomalies there in the document numbers.
    6. Run the Administration > System Initialization > Document Numbering function to see if a special series has been set up.
    7. Check out the AR Invoice numbering order by running another simple SQL covering a range of the invoices in question. SELECT T0.DocNum, T0.TaxDate, T0.CreateDate, T0.UpdateDate FROM OINV T0 WHERE T0.DocNum > 1583 AND T0.DocNum < 3251 ORDER BY T0.CreateDate.  Then see if the AR Invoice Numbering Sequence is not consistent.
    8. Check out those documents that are connected to each suspect AR Invoice and their associated dates by using the Target and Base Document icons.  For example, if a Deliver Document has dates of January 2007 but the AR Invoice date is September 2006, then someone has played around with dates on at least one of the documents.
    9. Get copies of the complete company database before the alleged changes were made and a company database as of today and compare the two contents.  Only good if the backups are maintained for a long time.
    Here come the questions on the ways I BELIEVE dates can be changed but not sure how to find and need to work on them:
    QUESTION 1 u2013 If a person DTWs invoices up into SAP B1, how can I tell that DTW was used to change the dates, the date of the DTW run, and the dates that were changed?
    QUESTION 2 u2013 If a person uses SQL to update dates on SAP B1, how can I find out that SQL has been used, the date of the SQL run, and the dates that were changed?
    QUESTION 3 u2013 If a person goes out and changes the workstation and/or server Date and Timestamp Properties, how can I find that they did that and the date changes?  You can do this on your PC by just changing the month, date, and year in Microsoftu2019s Date and Timestamp Properties.
    QUESTION 4 u2013 I know SAP has a policy that no SQL can be used to update databases and/or tables and have been told some customers lost support because they did this.  What does SAP do to discover this in their lab?
    QUESTION 5 u2013 Are there any notes in the portals to help me find changed dates?
    QUESTION 6 u2013 Are there any logs SAP B1 produces that can help identify such changes and how do I find and use them?
    QUESTION 7 (and this is big) u2013 Are the other ways dates can be changed on AR Invoices and how would I uncover the way it was done and the needed information of Original Date and Changed Date?
    Many, many thanks for any help provided since this is a serious situation.  If you can make any suggestions it would be greatly appreciatedu2026
    Zal
    Edited by: Zal Parchem on Mar 13, 2009 7:31 AM

    Hi Zal
    If this person was an "Expert" on SAP Business One then the only way they would have changed dates would probably be directly in SQL itself. The best way to determine this would be to hope that they slipped up somewhere and forgot to change a particular date in let's say one specific table.
    For invoices, start with the post date, doc date & create date. Then check each of these to the OJDT/JDT1 tables for any discrepancies. Next check the ADOC/ADO1 table for multiple instances on the invoice. If only 1 instance then check the create date, time & user as well as the aforementioned dates between OINV/INV1 & ADOC/ADO1. If multiple instances, check the dates from 1 instance to the next (This will indicate dates being changed in the system).
    Next check the same dates against OINM table. If any of the dates do not tally then the SQL was changed directly.
    Hope this helps. Let me know if you need further assistance.
    Kind regards
    Peter Juby

  • Function Module to Update PPOCE data

    Hey all,
    Is there any MF or BAPI who can help me to update the data of an U.O in PPOCE.
    When i change the value of the name of an organisation and his date , and i keep in sql trace , i just found an update in T527X but any call of MF....
    Thanks in advance.

    Hi Filali,
    If u need to update object abbreviation or name of the object (HRP1000) you can use FM 'RH_OBJECT_NAME_MODIFY_OR_LANGU'
    For updating the date may be you can try FM "RH_UPDATE_INFTY".
    You need to test the second FM that it suits ur req. or not
    hope this will help
    Regards,
    Gus

  • Unable to change Date Created in Metadata

    Please help with my first post...
    Unable to change Date Created field in Metadata.
    I am a newspaper photographer sending .jpg pics with captions to my office from my iMac. They are viewed at the office on Windows PCs using SCC MediaGrid.
    When changing Date Created in Metadata Invalid Format warning appears "Format should be ISO 8601 XML compliant, that is YYYY-MM-DDThh:mm[:ss][tz] (eg 2006-07-11T13:14:30-07:00)"
    If 2009-09-26, for example, is entered then exported pictures opened up in Photoshop or shown on SCC MediaGrid do not display the date.
    To get dates to show up I first have to open a pic in Photoshop, go to File Info, enter 26/9/09 in Date Created and Save As.
    Next I have to Import this into Aperture where the Date Created shows as "20090926".
    Using Lift Metadata and Stamp Metadata the date can be transferred to other pics.
    Now when I export these pics the date does show up in Photoshop and SCC MediaGrid.
    Can Date Created be typed straight into field in Aperture?...Very important when pics go into archive on a server.
    Also if I hit Return key in a Metadata Caption, to type on the next line, both lines will appear as one with a small square in-between them when viewed on SCC MediaGrid on a Windows PC.
    Thanks in anticipation.

    Nick I don't generallt use the IPTC metadata, so I'm not sure I will be too much help.
    What version of Aperture are you using? I tried both things and I didn't have any problems with the latest version of Aperture on my Mac.
    I was able to enter a date into "Date Created" both with and without the time-zone adjustment. Can you tell us the exact string you tried to enter into the "Date Created" and exactly when you get the error? I tried to enter my time zone (eastern US) as "-5:00", but Aperture wouldn't let me enter the 5 and popped up the error message when I typed that key. I had to use "-05:00".
    As for the caption, when I hit return, Aperture ends my edit. I cannot reproduce your described behavior of actually getting a new-line into the field. I suspect your problem (although I don't know how you get to your problem) is one of the following:
    1) The IPTC standard doesn't tell if the software should use a Unix-style end-of-line (which is a line-feed), or a DOS/Windows style end-of-line (which is carriage-return followed by line-feed). Aperture may put in the Unix-style and your Windows programs don't know what to do with it.
    2) The IPTC standard does indicate the end-of-line style, but either Aperture or your other programs don't follow it.
    or
    3) IPTC Metadata doesn't actually support end-of-line, so Aperture should not allow you to enter multiple lines, but it has a bug so it does allow you to do that.
    Can you tell us where exactly you are editing the caption? I tried it in the inspector pane (on the left) in the "Metadata" tab, and then I hit the "IPTC" button at the bottom of the tab.
    nathan

  • Changing data in MATMAS.

    Hi,
    How can we Change data in MATMAS IDoc
    Thanks,
    Malini.

    Hi,
    Use the following BAdIs to change data in the MATMAS IDoc:
    BADI_MATMAS_ALE_CR   Change Data in MATMAS IDoc When Generating an IDoc
    BADI_MATMAS_ALE_IN   Change Data in MATMAS IDoc Before Posting
    Reward points if found helpfull...
    Cheers,
    siva.

  • Changing date and/or time of photos

    I often change the time of individual iPhoto pictures to change their order in the photo Library.
    I change the date and or time in the information section. I have iPhoto sort the photos by date.
    I just imported about 1200 photos from a DVD and want to change the order of some of them, but when I change the time, the new time stays there, but the photo either does not move or moves to the incorrect place. I have closed and reopened iPhoto and even restarted the computer.
    I would appreciate any help or suggestions.
    Thanks in advance.

    Try using the Photo menu ==> batch change date and time (if the photos either do not have a data and time or they are not in the date time sequence you want or the adjust date and time (if you want to add a constant amount to all photos selected keeping them in the same date/time sequence but with a different date and time - and select the change the original option
    LN

  • Is it possible to put colors while displaying report using ALVs?

    Gayathri

    hi
    i think the following code is the ur solution
    TABLES VBAK.
    TYPE-POOLS SLIS.
    * Data Declaration
    TYPES: BEGIN OF T_VBAK,
          VBELN TYPE VBAK-VBELN,
          ERDAT TYPE VBAK-ERDAT,
          ERNAM TYPE VBAK-ERNAM,
          AUDAT TYPE VBAK-AUDAT,
          VBTYP TYPE VBAK-VBTYP,
          NETWR TYPE VBAK-NETWR,
          VKORG TYPE VBAK-VKORG,
          VKGRP TYPE VBAK-VKGRP,
         <b> LINE_COLOR(4) TYPE C,</b>
          END OF T_VBAK.
    DATA: IT_VBAK TYPE STANDARD TABLE OF T_VBAK INITIAL SIZE 0,
          WA_VBAK TYPE T_VBAK.
    * ALV Data Declaration
    DATA: FLDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          GD_LAYOUT TYPE SLIS_LAYOUT_ALV,
          GD_REPID TYPE SY-REPID.
    *      I_EVENTS TYPE SLIS_T_EVENT,
    *      W_EVENTS LIKE LINE OF I_EVENTS.
    START-OF-SELECTION.
    PERFORM DATA_RETRIEVAL.
    PERFORM BLD_FLDCAT.
    PERFORM BLD_LAYOUT.
    PERFORM DISPLAY_ALV_REPORT.
    * Build Field Catalog for ALV Report
    FORM BLD_FLDCAT.
    FLDCAT-FIELDNAME = 'VBELN'.
    FLDCAT-SELTEXT_M = 'Sales Document'.
    FLDCAT-COL_POS = 0.
    *FLDCAT-EMPHASIZE = 'C411'.
    FLDCAT-OUTPUTLEN = 20.
    FLDCAT-KEY = 'X'.
    APPEND FLDCAT TO FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'ERDAT'.
    FLDCAT-SELTEXT_L = 'Record Date created'.
    FLDCAT-COL_POS = 1.
    FLDCAT-KEY = 'X'.
    APPEND FLDCAT TO FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'ERNAM'.
    FLDCAT-SELTEXT_L = 'Cteated Object Person Name'.
    APPEND FLDCAT TO FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'AUDAT'.
    FLDCAT-SELTEXT_M = 'Document Date'.
    FLDCAT-COL_POS = 3.
    FLDCAT-EMPHASIZE = 'C110'.
    APPEND FLDCAT TO FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'VBTYP'.
    FLDCAT-SELTEXT_L = 'SD Document category'.
    FLDCAT-COL_POS = 4.
    APPEND FLDCAT TO FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'NETWR'.
    FLDCAT-SELTEXT_L = 'Net Value of the SO in Document Currency'.
    FLDCAT-COL_POS = 5.
    FLDCAT-OUTPUTLEN = 60.
    FLDCAT-DO_SUM = 'X'.
    FLDCAT-DATATYPE = 'CURR'.
    APPEND FLDCAT TO FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'VKORG'.
    FLDCAT-SELTEXT_L = 'Sales Organization'.
    FLDCAT-COL_POS = 6.
    APPEND FLDCAT TO FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'VKGRP'.
    FLDCAT-SELTEXT_M = 'Sales Group'.
    FLDCAT-COL_POS = 7.
    FLDCAT-EMPHASIZE = 'C801'.
    APPEND FLDCAT TO FLDCAT.
    CLEAR FLDCAT.
    ENDFORM.
    * Build Layout for ALV Grid Report
    FORM BLD_LAYOUT.
    GD_LAYOUT-NO_INPUT = 'X'.
    GD_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    GD_LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
    GD_LAYOUT-WINDOW_TITLEBAR = 'GRID DISPLAY'.
    *GD_LAYOUT-TOTALS_TEXT = 'GRAND TOTAL'.
    ENDFORM.
    * Display report using ALV grid
    FORM DISPLAY_ALV_REPORT.
    DATA T_EVENT TYPE SLIS_T_EVENT.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
       I_LIST_TYPE           = 0
    IMPORTING
       ET_EVENTS             = T_EVENT.
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    GD_REPID = SY-REPID.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = GD_REPID
       IS_LAYOUT                         = GD_LAYOUT
       I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
       I_GRID_TITLE                      = 'SALES DOCUMENT HEADER'
       IT_FIELDCAT                       = FLDCAT[]
       I_SAVE                            = 'X'
      TABLES
        T_OUTTAB                          = IT_VBAK
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2.
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.
    * Retrieve data from VBAK table and populate itab IT_VBAK
    FORM DATA_RETRIEVAL.
    <b>DATA LD_COLOR(1) TYPE C.</b>
    SELECT VBELN ERDAT ERNAM AUDAT VBTYP NETWR VKORG
    UP TO 20 ROWS
    FROM VBAK
    INTO TABLE IT_VBAK.
    <b>LOOP AT IT_VBAK INTO WA_VBAK.
    LD_COLOR = LD_COLOR + 1.
    IF LD_COLOR = 8.
      LD_COLOR = 1.
    ENDIF.
    CONCATENATE 'C' LD_COLOR '10' INTO WA_VBAK-LINE_COLOR.
    MODIFY IT_VBAK FROM WA_VBAK.
    ENDLOOP.</b>
    ENDFORM.
    FORM TOP_OF_PAGE.
    DATA: T_HEADER TYPE SLIS_T_LISTHEADER,
          W_HEADER TYPE SLIS_LISTHEADER.
    W_HEADER-TYP = 'H'.
    W_HEADER-INFO = 'WELCOME HEADER LIST'.
    APPEND W_HEADER TO T_HEADER.
    W_HEADER-TYP = 'S'.
    W_HEADER-KEY = 'REPORT:'.
    W_HEADER-INFO = SY-REPID.
    APPEND W_HEADER TO T_HEADER.
    W_HEADER-TYP = 'S'.
    W_HEADER-KEY = 'DATE:'.
    CONCATENATE SY-DATUM+6(2) ' / ' SY-DATUM+4(2) ' / ' SY-DATUM(4) INTO W_HEADER-INFO.
    APPEND W_HEADER TO T_HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = T_HEADER.
    ENDFORM.
    reward points,if it is useful

  • I want popup Message when i successfully update the data

    Hi Expert
                    My requirment is update the data in the database using Bapi.I successfully update the data in the database.when i successfully update the data it will show the popup message.whether is it possible please tell me how to do it..urgent.
    Regards
    Sundaresan

    Hi SUNDARESAN BALARAMAN,
    Given link explains the steps to develop the Pop up iView in Visual Composer.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9c/ffdb4269b2f340e10000000a1550b0/frameset.htm
    Please have a look.
    Regards,
    Prashant.
    Please do rewards points for useful answers.
    Edited by: Prashant Jagdale on Jan 23, 2008 5:48 AM
    Edited by: Prashant Jagdale on Jan 23, 2008 5:50 AM

  • How to use BAPI TO change Data on EKPO from ALV

    hi all,
       i am a bignner  i have alv grid dispaly  forpurchasing document item (EKPO)  after editing my ALV i want use a BAPI to update the details on EKPO table,
    is it possible? if so please let me know how it can be done??

    hi davel,
    thank you for quick replay i am beginner to ABAP
      i am just practicing to study BAPI ...this requrement iwas taken  by myself for studing BAPI usage..if its possible please let me know how can it be done??
    thank u..

Maybe you are looking for