Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to pass data frominternal table to database table

Former Member
0 Likes
722

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

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

6 REPLIES 6
Read only

Former Member
0 Likes
706

Hi,

Use the modify or update statement to modify the ddic object from the internal table.

Regards,

Himanshu

Read only

Former Member
0 Likes
706

Hi,

all the fields are same in the internal table.

Read only

Former Member
0 Likes
706

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

Read only

0 Likes
706

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

Read only

0 Likes
706

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

Read only

Former Member
0 Likes
706

Hi,

Refer to the below example code snippet:


INSERT SPFLI FROM TABLE ITAB ACCEPTING DUPLICATE KEYS.

Thanks,

Sriram Ponna.