Автор Тема: insert  (Прочитано 13147 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн Anutka

  • Newbie
  • *
  • Сообщений: 1
  • Репутация: +0/-0
  • YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
insert
« : Март 02, 2011, 06:51:14 pm »
Делаю вставку в свою таблицу, в которой 13 полей типа string. Падает дамп  Когда в таблице было 5 полей типа string в дамп не падало. Подскажите, пожалуйста, как сделать вставку в таблицу записи?

Код:
data: new_add type zps_add.
insert zps_add values new_add.

Дамп:
Динамическая ошибка DBIF_RSQL_INVALID_RSQL
ОсобСит CX_SY_OPEN_SQL_DB
Краткий текст
Error in module RSQL of the database interface.
Анализ ошибки
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
in
procedure "IF_EX_PROJECTDEF_UPDATE~BEFORE_UPDATE" "(METHOD)", nor was it
propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The SQL statement generated from the SAP Open SQL statement violates a
restriction imposed by the underlying database system of the ABAP
system.

Possible error causes:
o The maximum size of an SQL statement was exceeded.
o The statement contains too many input variables.
o The input data requires more space than is available.
o ...

You can generally find details in the system log (SM21) and in the
developer trace of the relevant work process (ST11).
In the case of an error, current restrictions are frequently displayed
in the developer trace.

Указания по устранению ошибки
The SAP Open SQL statement concerned must be divided into several
smaller units.
If the problem occurred due to the use of an excessively large table
in an IN itab construct, you can use FOR ALL ENTRIES instead.
When you use this addition, the statement is split into smaller units
according to the restrictions of the database system used.

If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:

"DBIF_RSQL_INVALID_RSQL" "CX_SY_OPEN_SQL_DB"
"ZCL_IM_PS_ADD=================CP" or "ZCL_IM_PS_ADD=================CM002"
"IF_EX_PROJECTDEF_UPDATE~BEFORE_UPDATE"

The exception must either be prevented, caught within proedure
"IF_EX_PROJECTDEF_UPDATE~BEFORE_UPDATE" "(METHOD)", or its possible occurrence
must be declared in the
RAISING clause of the procedure.
To prevent the exception, note the following:

Оффлайн Uukrul

  • SAP ECC 6.0 Ehp(*)
  • Administrator
  • Epic Member
  • *****
  • Сообщений: 3 809
  • Репутация: +47/-0
  • Пол: Мужской
  • YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
    • Sapforum.BIZ
Re: insert
« Ответ #1 : Март 02, 2011, 08:09:34 pm »
You are not allowed to view links. Register or Login
Делаю вставку в свою таблицу, в которой 13 полей типа string. Падает дамп  Когда в таблице было 5 полей типа string в дамп не падало. Подскажите, пожалуйста, как сделать вставку в таблицу записи?
Ну я наверное буду не оригинален, но тип STRING,строка длинной ну не знаю как там в SAP, тут почему-то максимальную длину у себя в справке не написали, но обычно в других языках, этот тип может в себя втягивать так за 16/32 и т.д. кб, что совсем не коррелирует данный тип с понятиями записей базы данных, так что таки работайте с типом CHAR (заранее зафиксировав длину полей) так как, похоже что ваших 13 стрингов вылезли за пределы возможностей базы данных, что требует пересмотра структуры вашей таблицы.

PS: К Дейту, за теорией по базам данных, отправлять не буду, там читать долго, а понимать еще дольше, просто примите как факт, тип поля STRING для полей таблицы базы данных не используйте.

Sapforum.Biz

Re: insert
« Ответ #1 : Март 02, 2011, 08:09:34 pm »