Application Development 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: 

Insert Query

Former Member
0 Kudos

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

naveen_inuganti2
Active Contributor
0 Kudos

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

JozsefSzikszai
Active Contributor
0 Kudos

>

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)

Former Member
0 Kudos

Hi

You create a FM

TABLES

TableName =

Internaltable =

use

insert TableName from table Internaltable.

Former Member
0 Kudos

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.

.

naveen_inuganti2
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi,

it is possible with out work area or internal table.

--Naresh.

Former Member
0 Kudos

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

0 Kudos

internal that you pass in Fm,

its type must be defined in abap dictionary.

Former Member
0 Kudos

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.

Former Member
0 Kudos

THANKS A LOT:)

RPN