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

repeat structure

Former Member
0 Likes
433

Hi,

How to insert values to the db table which has repeat structure ?plz help if u know.

Regards,

Suchithra

3 REPLIES 3
Read only

Former Member
0 Likes
407

hi,

take an internal table of database structure and use insert statement to insert on to data base.

i.e,


data : it_mara like mara occurs 0 with header line.
  
 insert mara table itab. 

Read only

Former Member
0 Likes
407

Hi,

1.Take the internal table of the structure.

2.Get the data into that internal table.

3.Use LOOP AT ITAB - ENDLOOP to insert the internal table

data into database table.

Write the INSERT and MODIFY statements in loop.

Reward,if useful.

thanks,

Chandu

Read only

Former Member
0 Likes
407

Pass all the values to the structure .. and insert ...

For Ex:

pass ...

p0041-DAR01 = <value>

p0041-DAT01 = <value>

p0041-DAR02 = <value>

p0041-DAT02 = <value>

p0041-DAR03 = <value>

p0041-DAT03 = <value>

along with all other key fields ..

Use FM HR_INFOTYPE_OPERATION to insert/modify ..

into PA0041 ...