Update the database table with the content of the internal table

Hello!
  I have the next form:
  FORM erase_data.
SELECT * FROM zadrress INTO CORRESPONDING FIELDS OF TABLE itab_adrress.
  DELETE TABLE itab_adrress: FROM zadrress,
                             WITH TABLE KEY adrid = '456'.
  WRITE 'The information after the DELETE operation'
  COLOR 2.
  LOOP AT itab_adrress INTO wa_adrress .
    WRITE:/
           wa_adrress-adrid COLOR 5,
           wa_adrress-name COLOR 7,
           wa_adrress-email COLOR 5,
           wa_adrress-depart COLOR 7,
           wa_adrress-display COLOR 5.
  ENDLOOP.
  SKIP.
LOOP AT itab_adrress INTO wa_adrress.
   MODIFY zadrress FROM wa_adrress.
   COMMIT WORK.
   IF sy-subrc = 0.
     WRITE 'OK !'.
     SKIP.
   ELSE.
     WRITE 'FAIL !'.
     SKIP.
   ENDIF.
ENDLOOP.
  MODIFY zadrress FROM TABLE itab_adrress.
  UPDATE zadrress FROM TABLE itab_adrress.
TRANSPORTING adrid, name, email, depart, display.
INSERT zadrress FROM TABLE itab_adrress ACCEPTING DUPLICATE KEYS.
PERFORM display_data .
ENDFORM.                    "erase_data
I see that my record is deleted  when I display the records from my internal table, but
now I want to delete the record from database table.
   For that I want to move the content of the modified internal table in the database table. You can see the methods I tried (some of them commented), but nothing seems to work.
Any advice ?
Thank you.

FORM erase_data.
SELECT * FROM zadrress INTO CORRESPONDING FIELDS OF TABLE itab_adrress.
DELETE TABLE itab_adrress: FROM zadrress,
WITH TABLE KEY adrid = '456'.
WRITE 'The information after the DELETE operation'
COLOR 2.
LOOP AT itab_adrress INTO wa_adrress .
WRITE:/
wa_adrress-adrid COLOR 5,
wa_adrress-name COLOR 7,
wa_adrress-email COLOR 5,
wa_adrress-depart COLOR 7,
wa_adrress-display COLOR 5.
ENDLOOP.
SKIP.
LOOP AT itab_adrress INTO wa_adrress.
MODIFY zadrress FROM wa_adrress.
COMMIT WORK.
IF sy-subrc = 0.
WRITE 'OK !'.
SKIP.
ELSE.
WRITE 'FAIL !'.
SKIP.
ENDIF.
ENDLOOP.
<b>DELETE FROM zadrress.</b>  "Make this change and try
MODIFY zadrress FROM TABLE itab_adrress.
UPDATE zadrress FROM TABLE itab_adrress.
TRANSPORTING adrid, name, email, depart, display.
INSERT zadrress FROM TABLE itab_adrress ACCEPTING DUPLICATE KEYS.
PERFORM display_data .
ENDFORM. "erase_data'.

Similar Messages

  • The contents in a internal table

    Hi Experts,
    I have a doubt in filling the contents of an internal table with the database table fields reference.
    For eg: There is an internal table like this:
    data: begin of t_conditions occurs 0,
                 kschl like rv13a-kschl,
                 vkorg like komg-vkorg,
                 kunnr like komg-kunnr,
                 matnr like komg-matnr,
                 kbetr(15) type c,
                 datab(10) type c,
                 datbi(10) type c,
          end of t_conditions.
    in the above example, the "matnr" he has taken with the reference field "komg-matnr"..
    Please look at the following internal table:
    data: begin of t_material occurs 0,
                    matnr(18) type c,
                    matkl(9)  type c,
                    bismt(18) type c,
          end of t_material.
    In the above 2 examples the declaration of "matnr" field is diffrent from one with the other.
    in 1st eg., he has taken as: <b>matnr like komg-matnr</b>
    where as in the 2nd eg: <b>matnr(18) type c,</b>
    my question is: how can i know where to declare as in the 1st eg., and where to use like in the 2nd eg.,
    Please clarify.
    I greatly appreciate your help.
    Thanks,

    Hi sey
    If you see in the domain level both the DOMIAN's will be the same. So it doesn't matter. All the matnr will have a character type of size 18.
    for the programmer reference they will using the table name in which they want to select the data.
    i.e for the first ex. he will be selecting data from the KOMG table and in the second from the MARA table.
    but both the Matnr type are same.
    <b>there is a small change since the second ex doesn't use any table it is simply of type c. the difference is when you reference to any Data DICTIONARY object then it can contain certain conversion exits, etc. so it will apply for your reference data typr</b>
    regards
    kishore
    Message was edited by: Harikishore Sreenivasulu

  • The SYSVAL table entry for the database version (16) does not match the required version

    We upgraded from Tidal Enterprise Scheduler (TES) 5.31 to 6.1 on fresh Windows x64 2008 R2 servers.  I did a fresh install but our DBA restored a copy of our database from pre-prod which was at 5.31.  I get the error below.  Note, SQL went from 2005 to 2012 during this upgrade.  Do I need to change a value in this table to reflect the SQL change?
    [04/29 12:47:14:198]:TIDAL Enterprise Scheduler: version 6.1.0.133
    [04/29 12:47:14:198]:Java version: 1.8.0
    [04/29 12:47:14:198]:Java Virtual Machine version: 25.0-b70
    [04/29 12:47:14:198]:Start Time : 04/29/14 12:47:14:198
    [04/29 12:47:14:198]:----------------------------------------------------------------------------
    [04/29 12:47:14:198]:Database URL :jdbc:sqlserver://SQL2012-Host:1433;responseBuffering=adaptive
    [04/29 12:47:14:198]:Database Driver :com.microsoft.sqlserver.jdbc.SQLServerDriver
    [04/29 12:47:14:198]:Maximum number of log files = 100
    [04/29 12:47:14:198]:Added a LogFile called 'RegularFile'
    [04/29 12:47:14:198]:LogManager: setting default log
    [04/29 12:47:14:214]:Retrieved a LogFile called 'RegularFile'
    [04/29 12:47:14:495]:MessageBroker: Instantiated TcpTransportServer (URI = tcp://0.0.0.0:6215)
    [04/29 12:47:16:975]:Retrieved a LogFile called 'RegularFile'
    [04/29 12:47:17:272]:The SYSVAL table entry for the database version (16) does not match the required version (23). Shutting down.
    [04/29 12:47:20:282]:
    [04/29 12:47:20:282]:
    [04/29 12:47:20:282]:Shutting down the application

    I had this error last night while applying a patch to 6.0. However in my case the version was 21 versus a required version of 23.
    As far as i know 6.1 is not compatible with the 5 db schema, so you will need an update / migration plan for the db also.

  • Wirte the content of an internal table into a text file

    Hello Experts,
    how can I wirte the content of an internal table into a text file and putit on my local
    desktop ?
    Regards
    ertas

    Hi,
      You can use the FM GUI_DOWNLOAD for this purpose.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = 'c:\testmmv.txt'
      FILETYPE                        = 'ASC'
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = ' '
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
      WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
      SHOW_TRANSFER_STATUS            = ABAP_TRUE
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = LT_STR
      FIELDNAMES                      = 
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       GUI_REFUSE_FILETRANSFER         = 3
       INVALID_TYPE                    = 4
       NO_AUTHORITY                    = 5
       UNKNOWN_ERROR                   = 6
       HEADER_NOT_ALLOWED              = 7
       SEPARATOR_NOT_ALLOWED           = 8
       FILESIZE_NOT_ALLOWED            = 9
       HEADER_TOO_LONG                 = 10
       DP_ERROR_CREATE                 = 11
       DP_ERROR_SEND                   = 12
       DP_ERROR_WRITE                  = 13
       UNKNOWN_DP_ERROR                = 14
       ACCESS_DENIED                   = 15
       DP_OUT_OF_MEMORY                = 16
       DISK_FULL                       = 17
       DP_TIMEOUT                      = 18
       FILE_NOT_FOUND                  = 19
       DATAPROVIDER_EXCEPTION          = 20
       CONTROL_FLUSH_ERROR             = 21
       OTHERS                          = 22
    IF SY-SUBRC <> 0.
    Implement suitable error handling here
    ENDIF.
    With regards,
    Vamsi

  • How to drop the contents on an internal table?

    Dear all,
    can some one suggest me the code to drop the content of an internal table.
    VJ

    Following are the different ways of DELETIONS from ITAB, DTAB and FILE:
    DELETE FROM dbtab       WHERE cond.
    DELETE FROM (dbtabname) WHERE cond.
    - DELETE dbtab.
    DELETE *dbtab.
    DELETE (dbtabname) ... .
    - DELETE dbtab       FROM TABLE itab.
    DELETE (dbtabname) FROM TABLE itab.
    - DELETE dbtab  VERSION vers.
    DELETE *dbtab VERSION vers.
    Delete from an internal table
    - DELETE itab.
    - DELETE itab INDEX idx.
    - DELETE itab FROM idx1 TO idx2.
    - DELETE itab WHERE cond.
    - DELETE ADJACENT DUPLICATES FROM itab.
    Delete a program
    - DELETE REPORT prog.
    Delete text elements
    - DELETE TEXTPOOL prog LANGUAGE lg.
    Delete a data cluster from a database table
    - DELETE FROM DATABASE dbtab(ar) ...ID key.
    Delete a data cluster from the cross-transaction application buffer
    - DELETE FROM SHARED BUFFER dbtab(ar) ...ID key.
    Delete a file
    - DELETE DATASET dsn.
    Delete a screen
    - DELETE DYNPRO f.
    Thanks,
    Santosh

  • My ipad battery ran out while verifiying the last update. Now all I see on the screen is the plugin symbol with an arrow and the itunes symbol. Help!

    Help, as above, lost power part way though verifiying last update.
    Now all i see is the plugin symbol with an arrow, and the itunes symbol
    in the middle of a black screen.
    Does anyone have any ideas? I've tried  powering down, with no luck.
    Help, please, or should I just box it up and send to repair center?

    CREEEP wrote:
    Now all i see is the plugin symbol with an arrow, and the itunes symbol in the middle of a black screen.
    1: Connect the device to Your computer and open iTunes.
    2: If the device appears in iTunes, select and click Restore on the Summary pane.
    Restoring  >  http://support.apple.com/kb/HT1414
    3: If the device doesn't appear in iTunes, try using the Steps in this article to force the device into Recovery Mode.
    Make sure you have the Current Version of iTunes Installed on your computer
    iTunes free download from www.itunes.com/download
    Note on Recovery Mode.
    You may need to try this More than Once... Be sure to Follow ALL the Steps...
    After you have Recovered your Device...
    Re-Sync your Content or Restore from the most Recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766

  • Since upgrading to Mavericks, my Canon MP980 printer no longer works. I've tried deleting the printer and adding it again. the process ends with my mac saying the software is not currently available from the software update server.

    Since upgrading to Mavericks, my Canon MP980 printer no longer works. I've tried deleting the printer and adding it again. I've downloaded the driver software from Canon. My Mac dropbox tells me "the selected printer software is available from Apple", but when I click to download it, the process ends with my mac saying the software is not currently available from the software update server.

    Open Finder and click on Go > Go to Folder. Then type
    /Library/Printers/Canon
    and press Enter. This will show the BJPrinter and iJScanner folders. You could try moving or trashing this folder and then installing the driver that you downloaded from Canon again.

  • Lync 2013 Error - Certificate could not be published in the database associated with User Services Cluster

    Hi Lync gurus,
    I have a weird issue:
    Just installed a Lync Standard 2013. 
    Everything works except I keep getting this error in Log: every 30 minute or so.
    First an Error:  Event 47067
    A server did not respond to HTTP request
    Server lyncserver.domain.local did not respond to HTTP request PublishCertRequest targeted at
    https://lyncserver.domain.local:444/LiveServer/UserPinService.
    Cause: Server might be down or the network path between servers might not be properly configured.
    Resolution:
    Please ensure that the server can be connected on the target port using telnet and then re-try.
    Then I get a Warning: Event 47068
    GetAndPublish web service failed.
    Certificate could not be published in the database associated with User Services Cluster [lyncserver.domain.local ]. Request Details - Entity: [[email protected]], Device Id: [6BB30A3E-2923-553A-8E5F-0B2FB2CEA330], Authenticated User: [sip:[email protected]].
    Additional Context: [Publish_Failure: OtherFailure;HttpNoResponse:"lyncserver.domain.local "]
    Cause: This could be due to network connectivity issues with the remote server, or because the database is down.
    Resolution:
    Please ensure that the user services is reachable and the database is up and running.
    Thanks for any help

    Please check you can telnet port 443 and port 444 on Lync Front End Serve from client.
    Try to regenerate a new certificate for Lync Front End Server.
    Check all the services on Lync Front End Server are started.
    Check the option “Enable all purposes for this certificate” is checked for the trusted root CA certificate.
    For the detailed steps:
    Run MMC--Add\Remove Snap-ins--certificates--Local Computer--Trusted Root Certificate Authorities--Certificates, find the Root CA certificate you installed--Properties--General, check the "Enable all purposes for this certificate".
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • When I forward or reply to the email from Mail, the receiver gets it as multiple attachments with no content in the mail., When I forward or reply to the email from Mail, the receiver gets it as multiple attachments with no content in the mail.

    When I forward or reply to the email from Mail, the receiver gets it as multiple attachments with no content in the mail., When I forward or reply to the email from Mail, the receiver gets it as multiple attachments with no content in the mail.

    That's probably because the message is in HTML format. Send the reply as plain text.

  • The report terminated with error:  REP-501: The specified database cannot b

    Dear All,
    We are usning forms and reports 11g in weblogic . while running the reports from forms
    frequently getting the error The report terminated with error: REP-501: The specified database cannot be connected..
    Can anyboby help me to solve this problem

    REP-501 typically means that Oracle Reports are unable to locate any available Oracle Databases. By default, Oracle Reports (similar to Oracle Forms) will only look for available databases in tnsnames.ora. Not only that, but the Reports environment by default will always look for the tnsnames.ora file in %ORACLE_INSTANCE%\config ($ORACLE_INSTANCE/config in Unix). I have seen these scenarios happen before especially if the TNS_ADMIN variable for your Forms environment variables is a directory different from %ORACLE_INSTANCE%\config. This would be the first place I would look.
    If tnsnames.ora is located in %ORACLE_INSTANCE%\config, do all generated reports fail with this message or a select amount of them? If only a select amount of them, are there any similarities with these reports (e.g, size, parameters, etc.)?
    Thanks,
    Scott
    http://pitss.com/us

  • I plugged my Ipad3 in order to update the software to version 6.1 but I got an error and my Ipad now is locked, it's showing the Itunes logo with usb cable on the screen. What should I do now?

    I plugged my Ipad3 in order to update the software to version 6.1 but I got an error message and my Ipad is locked now, it's showing the Itunes logo with USB cable on the screen. What should I do now?

    You will probably need to restore using Recovery Mode. You can read about it here.
    http://support.apple.com/kb/ht4097
    Or you can follow these Recovery Mode Instructions
    Disconnect the USB cable from the iPad, but leave the other end of the cable connected to your computer's USB port.
    Turn off iPad: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for iPad to turn off.
    If you cannot turn off iPad using the slider, press and hold the Sleep/Wake and Home buttons at the same time. When the iPad turns off, release the Sleep/Wake and Home buttons.
    While pressing and holding the Home button, reconnect the USB cable to iPad. When you reconnect the USB cable, iPad should power on.
    Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears you can release the Home button.
    If necessary, open iTunes. You should see the recovery mode alert that iTunes has detected an iPad in recovery mode.
    Use iTunes to restore iPad.

  • [svn:fx-4.x] 14680: update AIK version file with correct version of the AIK that we have

    Revision: 14680
    Revision: 14680
    Author:   [email protected]
    Date:     2010-03-10 12:16:06 -0800 (Wed, 10 Mar 2010)
    Log Message:
    update AIK version file with correct version of the AIK that we have
    QE notes: no
    Doc notes: no
    Bugs: no
    Reviewer: no
    Tests run: no
    Is noteworthy for integration: no
    Modified Paths:
        flex/sdk/branches/4.x/in/air/air_version.txt

    With all that automatic installations, beware of one thing:
    It's up to the administrator of the machine to decide what VM he drives. Maybe there is a good reason for the admin NOT to drive the latest VM from Sun but a slightly older from IBM? It is not YOUR decision what VM runs on that machine.
    Keep in mind that the JRE is a wrapper around the actual OS and as such it is not to be included with you app. Just think of it as if it would be an optional OS extension. You also do not deliver Oracle with you app if you just need ANY JDBC connection, do you?
    With our customers we do it this way: We tell them that ANY Java 1.4 JRE is good to run our apps, but it is the customer's problem to get one, since we do not know the preferred VMs of that customer, nor could we provide a VM for every OS. For fairness reasons, we provide the latest Sun JRE for Windows, Solaris and LINUX with our app. But we do not start the installation of this.

  • [svn:fx-4.0.0] 13714: updating the AIR kits with versions that have the fx4 swc recompiled using SDK 13653

    Revision: 13714
    Revision: 13714
    Author:   [email protected]
    Date:     2010-01-22 08:12:15 -0800 (Fri, 22 Jan 2010)
    Log Message:
    updating the AIR kits with versions that have the fx4 swc recompiled using SDK 13653
    Modified Paths:
        flex/sdk/branches/4.0.0/in/air/mac/AIR Integration Kit.tbz2
        flex/sdk/branches/4.0.0/in/air/win/AIR Integration Kit.zip

    Thanks dude, you saved my ***!
    This is my platformOptions.xml file now:
    <platform xmlns="http://ns.adobe.com/air/extension/3.5">
        <sdkVersion>6.0</sdkVersion>
        <linkerOptions>
            <!-- to link with the libicucore.dylib -->
            <option>-licucore</option>
            <option>-framework GameKit</option>
            <option>-framework CoreData</option>
            <option>-framework StoreKit</option>
            <option>-framework iAd</option>
            <option>-framework MessageUI</option>
         </linkerOptions>
    </platform>
    And it works!
    I looked into including the 2 .a files
        <packagedDependencies>
            <packagedDependency>libWebp.a</packagedDependency>
            <packagedDependency>libFlurryAnalytics.a</packagedDependency>
        </packagedDependencies>
    I put the 2 files into my ane build folder and into my adt command line, but when I try to build the app I get an duplicate symbol error... so i took them out.
    \o/

  • Was doing the latest os update on my iphone 4 the update was interuptedby a bad internet connection and now the screen is stuck on an image of the itunes logo with a pic of the usb cord and an arrow in between HELP!!!n

    was doing the latest os update on my iphone 4 the update was interuptedby a bad internet connection and now the screen is stuck on an image of the itunes logo with a pic of the usb cord and an arrow in between HELP!!!n

    or you can try this
    http://www.iclarified.com/entry/index.php?enid=1034

  • I erase all content and settings in ipod. Now the iPod won't turn on. The Apple logo with black background is the only thing that appears.

    I erase all content and settings in ipod. Now the iPod won't turn on. The Apple logo with black background is the only thing that appears.

    put it into recovery mode
    See here
    http://www.apple.com/support/ipodtouch/assistant/restore/
    Then restore
    http://support.apple.com/kb/HT1414

  • How to select the data from a Maintainance View into an internal table

    Hi All,
    Can anybody tell me how to select the data from a Maintainance View into an internal table.
    Thanks,
    srinivas.

    HI,
    You can not retrieve data from A mentenance view.
    For detail check this link,
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
    Regards,
    Anirban

Maybe you are looking for

  • 3.1 library not compatible with iMovie '09 and iDVD 7.0.4 ???

    I took the Aperture upgrade last night to 3.1 and Aperture itself appears to be running ok, although I haven't tested a ton of the functionality yet. What I was working on was wrapping up a wedding I shot and am putting the final touches on the movie

  • I need to uninstall v10.0 and re install 3.0 to 3.6.13 Help!

    I am using k12.com Public charter school academy's "elluminate" software for online classroom sessions. I can not log in because It is only compatable with versions 3.0 to 3.6.13

  • I have a key figure in my master data table i want to display the key figur

    Hi All, I have a key figure in my master data table i want to display the keyfigure in my report how can i display it can somebody help me in this scenario  Regards Kiran Kumar

  • Can't install air applications anymore...

    I'm a flex developer who has been working with air for a few months now. I've been using Air 1.5 and decided to update to 2.0 today. I downloaded and installed and even restarted. Now when I try to open an air application, (ive tried a few) it tell m

  • How do I create XDB.DBMS_XDBUTIL_INT

    when running either "imp" or "exp" on an 9.2.0.5 DB I am getting the error "PLS-00201: identifier 'XDB.DBMS_XDBUTIL_INT' must be declared" I see this package on other instances but it is indeed missing on this instance. How do I create it?