Skip to Content
0
Former Member
Jul 01, 2009 at 06:50 AM

Import parametes and insert into database table suggestions

34 Views

experts need suggestions

created a table with 3 fields.

zstable.

field dataelement type length

kunnr kunnr char 10 key field

name dname char 30 key field

aedat aedat dats 8

aenam aenam char 12

now i am creating a function modlue with two input parameters

1)kunnr

2)name

i want to update this two fields into table zstable.

1. so suggest me the best way to do this.

Delcarations in import options which one of the below is best and why?

name type char30

kunnr type kunnr

or

name like zstable-name

kunnr like zstable-kunnr

or

kunnr type zstable-kunnr

name type zstable-name.

2. inserting into table

the data that we recieve from the import parameters need to be inserted into the zstable.

please suggest me the appropriate statement waht i need to code for this.

insert kunnr name into zstable.

can i ignore the third field as it is not the key field?

3. before inserting do i need to check whether kunnr and uname is initial ie import parametrs?

4. suppose if i delcared two input parameters in function module zfuntion say vbeln and posnr.

and source code

insert vbeln and posnr into zstable.

now i am calling from the program

zreport.

call function 'ZFUNCTION'.

EXPORT

NAME =

KUNNR =

.

Will the above statement updates the blank records into the table zstable?.