08-26-2008 11:39 AM
Hi Experts,
I want to write on my Dtab "dtab1" the result of "itab1". "Itab1" is type table of dtab1.
1. How I can write on my dtab1?
2. How I can delete single rows from my dtab1, with statement dtab1-Field date less than sy-datum and dtab1-field time less than sy-zeit?
Regards,
Mike
08-26-2008 11:45 AM
1. modify dtab from itab.
2. delete dtab where date LT sy-datum
and time lt sy-uzeit.
08-26-2008 11:46 AM
hi mike
use commands like
INSERT dtab1 FROM TABLE itab1
for insert
DELETE FROM dtab1 WHERE KEY = your key field
for deelte
Regards
Deva
08-26-2008 11:59 AM
Hi Mike,
--> DELETE dtab1 from itab1.
--> DELETE FROM dbtab1
WHERE dtab1-date LT sy-datum
AND dbtab1-time LT sy-uzeit
Regards,
Chandra Sekhar
08-26-2008 12:01 PM
Hi Mike,
Dtab means database?
If there are records with the same key you have to use UPDATE instead of INSERT. If the records should be have new key-values, use INSERT.
MODIFY will do both: records with keys already there will be updated, new records will be inserted. But I dont like MODIFY, cause you dont know what really happens in the database. sy-dbcnt will also be set for udates and for inserts, so you dont know if the record is inserted or only updated.
Use DELETE similiar to SELECT:
DELETE dtab1 WHERE ( date LT sy-datum AND time LT sy-uzeit ).
Refer to online-syntax help by pressing F1 on UPDATE, INSERT, MODIFY, DELETE for details.
regards.