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

doubt in internal table.

Former Member
0 Likes
858

I have populated the internal table INT_TAB1 from the excel sheet

After this internal table is filled I have another internal table INT_TAB2 with structure same as INT_TAB1 with 3 additional fields.

I have transferred the contents of INT_TAB1 to INT_TAB2.Now I WANT TO FILL THE REMAINING 3 FIELDS from 3 different database tables.There s no relationship between them.

How can I do this?

Regards,

Selva

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
832

Try fetching data from the three database tables in a loop (at int_tab2) and then modifying the three fields using the command


MODIFY int_tab2 TRANSPORTING field3 INDEX sy-tabix.

Try fetching data from the three database tables in a loop (at int_tab2) and then modifying the three fields using the command


MODIFY int_tab2 TRANSPORTING field3 INDEX sy-tabix.

6 REPLIES 6
Read only

former_member195698
Active Contributor
0 Likes
832

I don't think there is any way other than looping at the internal table 2 and populating the fields based on the requirement and modifying your internal table

Read only

Former Member
0 Likes
832

Hi,

Fetch the values from the database table individually based on the key field in the internal table INT_TAB1 into another internal table.

Then use modify statement inside the loop at internal table INT_TAB2 to fill the values in the INT_TAB2.

Sharin.

Edited by: sharin varghese on Aug 4, 2008 2:55 PM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
832

Can you please explain your problem in detail. AS regards what data you r uploading & which DB tables are involved.

BR,

Suhas

Read only

Former Member
0 Likes
832

Hi,

you can do it in the following way,

let s_INT_TAB1 be structure for INT_TAB2

s_INT_TAB1-field1 = (field1 value).
s_INT_TAB1-field2 = (field2 value).
s_INT_TAB1-field3 = (field3 value).

APPEND s_INT_TAB1  to INT_TAB2.

Read only

Former Member
0 Likes
832

Hi,

loop at int_tab2.

select single ur fields

into int_tab2-filed.

where condition.

modify int_tab2 from ur fields.

endloop.

hope it helps you.

Read only

Former Member
0 Likes
833

Try fetching data from the three database tables in a loop (at int_tab2) and then modifying the three fields using the command


MODIFY int_tab2 TRANSPORTING field3 INDEX sy-tabix.