Skip to Content
author's profile photo Former Member
Former Member

SAP witn Windows/SQL

Hi,

One of my feloow associates has SAP witn Windows/SQL and an external SQL database for Website purposes.

he can read a table from the external database and load it in a SAP table.

but he can't write the external table from SAP/ABAP.

How could he do it?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 05:40 AM

    As it's explained in abaphelp for exec keyword) If you have update

    rights to the external table, then

    Exec sql.

    Uptade table ...

    Endexec

    Or

    Exec sql.

    Insert into table (field list) values (value list)

    Endexec.

    Should do the task.

    (you don't need to put the performing form part of the exec)

    The exact sintax for update or insert varies from RDBMS to RDBMS (but

    many of them rely on insert into to add new rows and update to change

    current values stored in a given row.

    If you have an internal table holding the values to be updated then a

    loop like the following is mandatory:

    loop at youritab

    exec sql

    << Update routine in native sql >>

    End exec

    Endloop

    Cheers,

    Chaitanya.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.