01-28-2008 3:31 PM
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.
01-28-2008 3: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
01-28-2008 3: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
01-28-2008 3:54 PM
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.
01-28-2008 3: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
01-28-2008 4: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.
01-28-2008 4:36 PM
Vishnu,
Just to be clear - you did NOT implement direct table updates - did you?
01-28-2008 4:38 PM
Vishnu,
Your answer:
OPEN DATASET your_app_server_path_and_filename_here FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
01-28-2008 4:45 PM
This is an entirely different question. Since you've marked it as solved, you'll probably get more response if you post a new thread.
Rob