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 Query

Former Member
0 Likes
1,155

hi,

am creating a Function Module,

i just want to insert a record into my ZTABLE through SE37.

No Internal table or work area is used.

I couldn't frame out the inert query properly..

Can any one please help me by providing possible insert query.

Thanks.

1 ACCEPTED SOLUTION
Read only

naveen_inuganti2
Active Contributor
0 Likes
1,113

Hi..,

You have to use work area in your source code of your function module, If you dont want declare it in parameters..

data: wa type ztable.
wa-f1 = 'a'.
wa-f2 = 'b'.
wa-f3 = 'c'.
\\\\\\\
insert into ztable values wa.

here a, b, c are either importing parameters or entries which you fetched from other table with where condition of ur import parameter.

Thanks,

Naveen.I

9 REPLIES 9
Read only

JozsefSzikszai
Active Contributor
0 Likes
1,113

>

i just want to insert a record into my ZTABLE through SE37.

> No Internal table or work area is used..

it won't be easy then... (the versions of INSERT without internal table / work area are obsolate)

Read only

Former Member
0 Likes
1,113

Hi

You create a FM

TABLES

TableName =

Internaltable =

use

insert TableName from table Internaltable.

Read only

Former Member
0 Likes
1,113

Hi,

You must have declared table under TABLES section in Function module.

FUNCTION ZTEST1.

*"----


""Local Interface:

*" TABLES

*" TAB STRUCTURE ZTEST

*"----


INSERT ZTEST FROM TAB.

ENDFUNCTION.

.

Read only

naveen_inuganti2
Active Contributor
0 Likes
1,114

Hi..,

You have to use work area in your source code of your function module, If you dont want declare it in parameters..

data: wa type ztable.
wa-f1 = 'a'.
wa-f2 = 'b'.
wa-f3 = 'c'.
\\\\\\\
insert into ztable values wa.

here a, b, c are either importing parameters or entries which you fetched from other table with where condition of ur import parameter.

Thanks,

Naveen.I

Read only

Former Member
0 Likes
1,113

Hi,

it is possible with out work area or internal table.

--Naresh.

Read only

Former Member
0 Likes
1,113

thanks a lot for all ur suggestions..

Am getting the following error message while declaring the internal table in tables tab:

Tables parameters are obsolete!

How to declare the Internal table?

Thanks.

Edited by: RPN on Sep 18, 2008 12:02 PM

Read only

0 Likes
1,113

internal that you pass in Fm,

its type must be defined in abap dictionary.

Read only

Former Member
0 Likes
1,113

you have to declare the table in changing option of the FM with reference to a table type that you have to create in SE11, using this table type declare your internal table in CHANGING,

as tables options have became obsolete.

With luck,

Pritam.

Read only

Former Member
0 Likes
1,113

THANKS A LOT:)

RPN