Да однако это оно самое. Но тот кто делал ноту видно стандартный индус. Так как по ноте, максимум, что можно сделать, это для пользователя определить вывод окна подтверждения удаления приложения. В общем ноту взял на вооружение, однако вставку слегка модифицировал, добавил проверку на код объекта полномочий. В общем случае сейчас работает так, проверяет наличие у пользователя прав на удаление. Если нет, сообщает об отсутствии прав на удаление. Если права есть, тогда выводит окошко запроса подтверждения удаления и если нажато "Да", тогда и выполняется удаление.
В общем виде стандартное предложение по модификации выглядит так:
[b]Сам текст ноты[/b]
Summary
Symptom
When you delete documents from the GOS (Generic Object Services) attachment list, the system issues no confirmation prompt to check whether you really want to delete the document. This should happen.
Other terms
GOS attachment list, delete document
Reason and Prerequisites
This problem is caused by missing functions.
Solution
Use the Note Assistant to implement the correction instructions, or import the relevant Support Package. After you implement the corrections, you can use the user parameter 'SGOS_DELETE' to decide whether or not the system should issue a confirmation prompt when deleting in the attachment list. Set the parameter in the user data accordingly.
Information about implementation using the Note Assistant:
If you implement the note using the Note Assistant, you must implement the following manual corrections:
* Create the user parameter (SET/GET Parameter) SGOS_DELETE:
o Call the Object Navigator SE80, enter the development class SGOS.
o SET/GET parameters: Choose "Create".
o Parameter: SGOS_DELETE
Short text: Confirmation prompt when deleting attachments
* According to the corrections, the dialog box displays the text only in English. If you want another language, you must create the following text elements:
o Class Builder SE24, class CL_GOS_ATTACHMENT_LIST (Release 46C)
Class Builder SE24, class CL_MSG_AL_ITEM (Release higher than 620)
o In the menu, chose "Goto" and "Text elements".
Text element Text
020 Document will be deleted. Continue?
021 Confirm deletion
022 Yes
023 No
Header Data
Release Status: Released for Customer
Released on: 23.01.2007 13:01:13
Priority: Recommendations/additional info
Category: Program error
Primary Component: BC-SRV-GBT-GOS Generic Object Services
Предложение по модификации по ноте:
Delta 001
Context Block
CALL FUNCTION 'SO_DOCUMENTS_MANAGER'
EXPORTING
activity = 'EXPO'
TABLES
documents = lt_sood.
ENDIF.
WHEN OTHERS.
Delete Block
IF ip_fcode = '%ATTA_DELETE' OR
ip_fcode = '%NOTE_DELETE' OR
ip_fcode = '%URL_DELETE' OR
ip_fcode = '%DELETE_OBJECT' OR
ip_fcode = '%EDIT_OBJECT'.
Insert Block
* add confirmation popup for delete
IF ip_fcode = '%ATTA_DELETE' OR
ip_fcode = '%NOTE_DELETE' OR
ip_fcode = '%URL_DELETE' OR
ip_fcode = '%DELETE_OBJECT'.
data: question type string,
conf_popup type c,
answer type c.
get parameter id 'SGOS_DELETE' field conf_popup.
if conf_popup eq 'X'.
question = 'Document will be deleted. Continue?'(020).
call function 'POPUP_TO_CONFIRM'
exporting
TITLEBAR = 'Confirm Deletion'(021)
text_question = question
TEXT_BUTTON_1 = 'Yes'(022)
TEXT_BUTTON_2 = 'No'(023)
DEFAULT_BUTTON = '2'
DISPLAY_CANCEL_BUTTON = ' '
IMPORTING
ANSWER = answer
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2
.
else.
answer = '1'.
endif.
endif.
if answer = '1' or
ip_fcode = '%EDIT_OBJECT'.
Мое предложение по модификации выглядит так:
* Insert Block
************************************************************************
* Start add confirmation popup for delete note 1018667
************************************************************************
* IF ip_fcode = '%ATTA_DELETE' OR
* ip_fcode = '%NOTE_DELETE' OR
* ip_fcode = '%URL_DELETE' OR
* ip_fcode = '%DELETE_OBJECT' OR
* ip_fcode = '%EDIT_OBJECT'.
*&**********************************************************************
*& Comments : Управление удалениями приложений GOS (в документах)
*& Platform : SAP R/3 V4.6C or later
*& Autor : Oleg
*& Date create : 30-08-2007
*& Date change : 30-08-2007
*& Text
*& Вставка сделана согласно ноте 1018667, однако выполнена модификация
*& этой вставки, добавлен объект полномчий разрешающих операцюи удаления
*& объекта приложения к документу. В любом случае всегда задается вопрос
*& если удаление разрешено через полномочия.
*& --------------------------
*& Объект проверки полномочий:
*& AUTHORITY-CHECK OBJECT 'Y:GOS_DELE'
*& ID 'ACTVT' FIELD '06'.
*& Если объекта нет в профиле пользователя удаление запрещено.
*& Создание объектов полномочий, транзакция SU21
*&**********************************************************************
IF ip_fcode = '%ATTA_DELETE' OR
ip_fcode = '%NOTE_DELETE' OR
ip_fcode = '%URL_DELETE' OR
ip_fcode = '%DELETE_OBJECT'.
DATA: question TYPE string,
* conf_popup TYPE c,
answer TYPE c.
* GET PARAMETER ID 'SGOS_DELETE' FIELD conf_popup.
AUTHORITY-CHECK OBJECT 'Y:GOS_DELE'
ID 'ACTVT' FIELD '06'.
IF sy-subrc = 0.
question = 'Document will be deleted. Continue?'(020).
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'Confirm Deletion'(021)
text_question = question
text_button_1 = 'Yes'(022)
text_button_2 = 'No'(023)
default_button = '2'
display_cancel_button = ' '
IMPORTING
answer = answer
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
ELSE.
answer = 'E'. "Удаление запрещено
MESSAGE ID 'YA' TYPE 'I' NUMBER '091'. "У вас нет полномочий на удаление!
ENDIF.
ENDIF.
IF answer = '1' OR
ip_fcode = '%EDIT_OBJECT'.
************************************************************************
* End add confirmation popup for delete note 1018667
************************************************************************
Мне кажется что мое решение более лучшее, так как управляется стандартно через роли, а не объекты SET/GET