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 MOVE DATA FROM INT-TABLE TO DATABASE STRUCTURE?

Former Member
0 Likes
959

DEAR ALL!

CAN ANY ONE GIVE ME SAMPLE CODE TO MOVE DATA FROM INT -TABLE TO DB-STRUCTURE PLEASE.

I HAVE THE VALUES IN TABLE AND I NEED TO UPDATE STRUCTURE.

REGARDS,

VJ

DEAR ALL!

CAN ANY ONE GIVE ME SAMPLE CODE TO MOVE DATA FROM INT -TABLE TO DB-STRUCTURE PLEASE.

I HAVE THE VALUES IN TABLE AND I NEED TO UPDATE STRUCTURE.

REGARDS,

VJ

7 REPLIES 7
Read only

Former Member
0 Likes
911

Loop at it_table.

*--Use move it_table to workarea

insert <dbtab> from <wa>

if sy-subrc = 0.

commit work.

endif.

endloop.

Read only

Former Member
0 Likes
911

Use modify or update command for the same.

If ur want to update all the values from internal table use:

MODIFY dbtab FROM TABLE itab.

MODIFY (dbtabname) FROM TABLE itab.

or

UPDATE dbtab FROM TABLE itab.

UPDATE (dbtabname) FROM TABLE itab.

Regards,

Prakash.

Read only

Former Member
0 Likes
911

Hi,

If you want to update a db STRUCTURE it is not possible because Structure doesnot hold any data.

If you are trying to update a db table then the update command should do the work.

Eg : UPDATE VBPA3 FROM TABLE DA_XVBPA3U.

Note : The Internal table should be of same structure and should not have duplicate entries.

Regards,

Srini.

Read only

0 Likes
911

THANKS ALL!

BUT I AM TRYING TO PASS A DB-STRUCTURE TO A FUNCTION MODULE.

BUT I NEED TO MAKE THIS DB-STRUCTURE SIMILAR TO AN INTERNAL TABLE GENERATED VALUES.

HOW DO I GO ABOUT ACHIVING THAT.

Read only

0 Likes
911

You can pass the values in Header of internal table to the function module.

Read only

0 Likes
911

HI

Can u tell which function module you are using.. so that looking at it parameters i'll be able to know whether u can pass structure or not... actually most of the inbuilt functions only allow internal table to be passed.. So i am not sure whether u'll be able to pass structure or not.. or do one thing create simmilar type of internal table from structure with header line and pass it to function module.....

Read only

Former Member
0 Likes
911

Create a table type in SE11 for the structure and use the table type in the function module parameter..

Thanks,

Naren