Skip to Content
author's profile photo Former Member
Former Member

Update database table - Urgent

Hi Experts,

I want to update a database table from an internal table with a certain condition .

For example I want to update the MARA table from values in the internal table it_mara (say) with a condition MTART in MARA eq 'XYZ'.

Could any one tell me the syntax for this.Its bit urgent.

Regards,

Vishnu.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jan 28, 2008 at 03:34 PM

    YOu have another internal table and get only the records that you need.

    loop at itab where mtart = 'XYZ'.

    move-corresponding itab to itab_new.

    append itab_new.

    clear itab_new.

    endloop.

    modify mara from table itab_new.

    Regards,

    Ravi Kanth Talagana

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Do not pursue any coding options that perform direct table updates!!!

      Look for BAPIs or even resort to an old-fashioned BDC ot make your updates.

      Direct table updates can quickly destroy the referential integrity of the database.

      And it could quickly end your employment as well.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 03:40 PM

    It's generally a bad idea to directly update standard SAP tables. There may be other tables that need to be updated as well and if you don't take that into account, you could run into a problem with data integrity.

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 04:31 PM

    Hi Experts,

    I want to transfer some data from 3 internal tables into an app server.I remember that there is some syntax 'Open file with appending mode'.

    Could you tell me the correct syntac for the same.

    Regards,

    Vishnu.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.