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

Inserting the records into standard table without using INSERT statement

Former Member
0 Likes
1,998

Hi friends,

I have a requirement to insert the records into table TROLZ.

Without using SM30 they want it through ABAP program.

We can use INSERT statement, but it is not suggestable.

We can do BDC for SM30, for this table....

But do we have any other method using FM or BAPI etc....Please let me know

Thanks

6 REPLIES 6
Read only

roger_gomez
Active Participant
0 Likes
1,432

Hi,

I think you should matain this table in IMG.

SPRO --> Logistics execution>Shipping>Basic Shipping functions>Routes>Route determination>Mantain route determination

Rgads,

Roger

Read only

0 Likes
1,432

Thanks for the reply,

But i.e nothing but V_TROLZ view, again it will go table maintenace.

I want it programatically........

Any inputs?

Read only

Former Member
0 Likes
1,432

USE:

BDC to upload data..

you can call transaction sm30.

Just use SHDB for recording.

Pass the table name-->upload data

Upload the data into an internal table..

Either use session method or call transaction method.

This will resolve the issue..

regards,

Gurpreet.

Read only

Former Member
0 Likes
1,432

these are the following options.

1. Table maintenance

2. BDC ; this is the best method as it ill modify other tables realted to TROLZ.

3. via program : a. using insert statement

b. using Modify statement

Note ; structure of internal table should be same as TROLZ.

Synatax : modify table TROLZ using <itab>.

4. there are function modules.

Read only

Former Member
0 Likes
1,432

Hi.. AV,

populate data into internal table of type TROLZ and try with the FM DB_INSERT_TABLE.

i have done once like this.

try. i think it's hekpful.

Regards,

KP.

Read only

awin_prabhu
Active Contributor
0 Likes
1,432

Hi friend,

If u dont want to use 'insert' statements in abap program,

then use 'modify' statements for inserting into database table.

The MODIFY statement inserts one or several lines specified in source

into the database table specified in target, or overwrites existing lines.

Syntax:

MODIFY target FROM { {wa} | {TABLE itab} }.

Ex:

MODIFY TROLZ FROM wa. <------ wa - contains new records

(Note: 'wa' should have same structure as databsae table TROLZ.)

Might solve ur problem..

Thanks..

Edited by: Sap Fan on Feb 19, 2009 5:49 AM