2008 Feb 14 12:52 PM
hi,
can any one help me to pass data from internal table to database table when duplicates also have to be stored in DB table
2008 Feb 14 12:56 PM
Hi,
Use the modify or update statement to modify the ddic object from the internal table.
Regards,
Himanshu
2008 Feb 14 12:57 PM
2008 Feb 14 1:02 PM
Hi,
use update statement with set and finally commit.
sample code:
UPDATE ZPST_BILL_RATES
SET STATUS = 'A'
ZZCDUID = SY-UNAME
ZZCDDATE = SY-DATUM
ZZCDTIME = SY-UZEIT
ZZFRMDATE = GV_TODATE
WHERE PSPID = GT_ZPST_BILL_RATES-PSPID.
iF SY-SUBRC = 0.
COMMIT WORK.
ENDIF.
Regards,
Ratna
2008 Feb 14 1:52 PM
here the data should be enterd into a ztable(database) which has only mandt as key field ,and the records in internal table has duplicates,plz give me a sample code
2008 Feb 14 1:58 PM
Hi,
No problems is it has duplicates but in that case ur z-table should not have any key fields you can simply use the update statement:
UPDATE dbtab FROM TABLE itab.
Regards,
Himanshu
2008 Feb 14 1:59 PM
Hi,
Refer to the below example code snippet:
INSERT SPFLI FROM TABLE ITAB ACCEPTING DUPLICATE KEYS.
Thanks,
Sriram Ponna.