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

insert internal table into database table...

0 Likes
1,225

hi, i made zstudent_table DBtable my self, but there's some problem to activate.... how can i solve it?

and if i want to use INSERT instead of MODIFY , how can i solve it,,,? i tried many ways to solve,, but never getting better,,, pls give me a advice, many thanks.


DATA : GT_ZSTUDENT_TABLE TYPE TABLE OF ZSTUDENT_TABLE,
GS_ZSTUDENT_TABLE TYPE ZSTUDENT_TABLE.

GS_ZSTUDENT_TABLE-STNUM = '0001'.
GS_ZSTUDENT_TABLE-STNAM = 'Charls'.
GS_ZSTUDENT_TABLE-STCIT = 'LA'.
APPEND GS_ZSTUDENT_TABLE TO GT_ZSTUDENT_TABLE.

GS_ZSTUDENT_TABLE-STNUM = '0002'.
GS_ZSTUDENT_TABLE-STNAM = 'Chris'.
GS_ZSTUDENT_TABLE-STCIT = 'Sydney'.
APPEND GS_ZSTUDENT_TABLE TO GT_ZSTUDENT_TABLE.



MODIFY ZSTUDENT_TABLE FROM TABLE GT_ZSTUDENT_TABLE.

2 REPLIES 2
Read only

former_member34
Product and Topic Expert
Product and Topic Expert
0 Likes
1,169

Thank you for visiting SAP Community to get answers to your questions. Since this is your first question, I recommend that you familiarize yourself with our Q&A Tutorial: https://developers.sap.com/tutorials/community-qa.html, as it provides tips for preparing questions that draw responses from our members. Should you wish, you can revise your question by selecting Actions, then Edit.

By adding a picture to your profile you encourage readers to respond: https://www.youtube.com/watch?v=46bt1juWUUM

Many thanks!

Read only

joltdx
Active Contributor
1,169

Hi!

You need to activate your table. It is in status "New", so you have saved it but not activated it yet. That should do it.

And syntax for INSERT instead of MODIFY would be:

INSERT zstudent_table FROM TABLE gt_zstudent_table.

Here's the ABAP Documentation for INSERT dbtab