Hallo zusammen,
ich habe ein Problem und zwar: wenn ich eine Rechnung mit der Transaktion VF01 anlege, SAP generiert eine Doku-Nummer aber wenn ich versuche diese Rechnung zu schauen oder ändern, SAP sagt, dass "Die Faktura XXXXXX ist nicht vorhanden" und es gibt ein Dump bei ST22.
Anbei die ST22:
Short Text
Open SQL array insert produces duplicate records in the database.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPSIPM01" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
--------------------------------------
Error analysis
An exception has occurred which is explained in more detail below. The
exception is assigned to class 'CX_SY_OPEN_SQL_DB' and was not caught in
procedure
"FLAG_THESE_ITEMS_AS_MARKED" "(FORM)", nor was it propagated by a RAISING
clause.
Since the caller of the procedure could not have anticipated this
exception, the current program was terminated.
The reason for the exception is:
When an Open SQL array insert is performed, trying to insert a record
into the database table "IPM_TRANSFER_STA" causes the function to terminate if
a record with the same key already exists.
(When an Open SQL individual record insert is performed, this situation
does not cause the function to terminate. SY-SUBRC is set to 4 instead.)
How to correct the error
The exception must either be prevented, caught in procedure
"FLAG_THESE_ITEMS_AS_MARKED" "(FORM)", or
the possibility of it occurring must be declared in the RAISING clause
in the procedure.
To prevent the exception, note the following:
Open SQL array insert should only be used if it is certain that none of
the records specified already exists on the database. If this cannot be
guaranteed, exception CX_SY_OPEN_SQL_DB should be intercepted, and the
error must be resolved.
Line SourceCde
164
165 ENDIF.
166
167 ENDFORM. "CALL_RIGHTS_ATTR_MAPPER_BADI
168
169 " There is a separate database table that keeps the status of the mapping
170 " This table is IPM_TRANSFER_STA.
171 " When flagging the billing items, this table must be modified.
172 " Marking the billing items corresponds to inserting entries in this table.
173 FORM flag_these_items_as_marked USING iv_billing_doc_no TYPE VBELN_VF
174 it_billing_items TYPE TABLE_OF_BILLING_ITEMS.
175
176 DATA lt_transfer_status TYPE STANDARD TABLE OF IPM_TRANSFER_STA.
177 DATA ls_transfer_status TYPE IPM_TRANSFER_STA.
178 FIELD-SYMBOLS: LIKE LINE OF IT_BILLING_ITEMS.179
180 " Go through the input items and create the entries to be inserted in the database.
181 LOOP AT it_billing_items ASSIGNING .182
183 CLEAR ls_transfer_status.
184
185 ls_transfer_status-vbeln = iv_billing_doc_no.
186 ls_transfer_status-posnr = -posnr.187 ls_transfer_status-marked = 'X'.
188
189 APPEND ls_transfer_status TO lt_transfer_status.
190
191 ENDLOOP.
192
193 " Insert all entries at once.
>>>>> INSERT ipm_transfer_sta FROM TABLE lt_transfer_status.
195
196 ENDFORM. "FLAG_THESE_ITEMS_AS_MARKED
197
Ich habe die Tabelle VBRK gecheckt und es gibt keine neue Rechnung.
See Anhang von Tabelle VBRK und IPM_TRANSFER_STA:
[img=https://ibb.co/kkHTN6]IPM_TRANSFER_STA 01.png[/img]
[img=https://ibb.co/jFeWaR]IPM_TRANSFER_STA 02.png[/img]
[img=https://ibb.co/fV7HFR]VBRK.png[/img]
Vielen Dank für die Unterstützung!
Jacare