Skip to Content
0
Former Member
Nov 20, 2007 at 03:31 PM

Dynamic native SQL Insert Statement

460 Views

Hi,

i will execute/modifiy the following code example to work dynamic. I mean that i want to configure how many fields and which field should be insert in the DB-Table

Samplecode:

LOOP AT vendor_tab INTO vendor_wa.

EXEC SQL.

insert into DatabaseTable.Dummy

(

ve_vendor_no,

ve_name,

ve_country

<b>.......(dynmaic)</b>

)

VALUES

(

:vendor_wa-a-lifnr,

:vendor_wa-a-name1,

:vendor_wa-a-land1

<b>............(dynamic)</b>

)

ENDEXEC.

ADD 1 TO commit_count.

IF commit_count EQ db_comit.

COMMIT WORK AND WAIT.

MOVE 0 TO commit_count.

ENDIF.

ENDLOOP.

If anyone has an idea it will be greatfull.

Thx

Joachim