Prevent record deletion
Hello,
Is it possible to create a mechanism preventing record deletion if certain criteria is met?
For example, if particular Account has Status=Active user is prevented from deleting the record.
Workflows do not look to be helpful here, what could be the other options?
Thanks in advance,
Alexei
Edited by: Alex H. on Sep 14, 2011 6:41 AM
See if Dynamic Page Layout can help.
Similar Messages
-
How to record the records deleted in a table
Hi Experts
I want to run a report as a batch which should deleted the records
which are sysdate - 60 and The report should log the number of records deleted
from each table at End Of Run.
Criteria for selecting records to be deleted are as follows:
1. ZINT_DATA
u2022 ZINT_DATA.CREATED_ON <= (Today u2013 60 Days)
and ZINT_DATA.STATUS = u2018OKu2019
So I want to create a table for log history recorded as
Delete Date Log description
01.01.2008 1500 rows deleted
30.03.2008 2000 rows deleted.
30.04.2008 300 rows deleted.
Eg The table are ZINT_DATA.
The report starts like this
REPORT z_eslp_command.
DATA:
fs_zint_data TYPE zint_data.
DATA:
t_zint_data TYPE
TABLE OF
ZINT_DATA.
START-OF-SELECTION.
SELECT *
FROM ZINT_DATA
INTO TABLE t_ZINT_DATA PACKAGE SIZE 10000.
ENDSELECT.
LOOP AT t_zint_data INTO fs_zint_data.
INSERT INTO ZINT_DATA_DEL
VALUES fs_zint_data.
select count(*) from zint_data_del.
ENDLOOP.
IF sy-subrc EQ 0.
WRITE:
'DATA INSERTED FROM ZINT_DATA into ZINT_DATA_DEL'.
ENDIF.
But Instead of creating another table , I want only log to be recorded as described.
Thanks
Regards
PirozHi Kiran
See the final modification of the report but I am getting an error as
Field " Corresponding_fields" is unknown, it is neithere in one of the specified tables nor defined by a
DATA statement, but I have already created an internal table itab1 , could you check and revert with the correction.
REPORT ZSD1DELETION .
TYPE-POOLS:SLIS.
*Used in ZSDI_INTERFACE1 Program.
TABLES:ZINT_DATA_DEL .
*DATA: BEGIN OF ITAB1 OCCURS 0.
*DATA: SL_NO TYPE SY-TABIX.
INCLUDE STRUCTURE zint_data_del.
*DATA:END OF ITAB1.
DATA: BEGIN OF ITAB1 occurs 0 ,
MANDT type zint_data_del-mandt,
ZINT_ID type zint_data_del-zint_id,
ZINT_TY type zint_data_del-zint_ty,
CREATED_ON type zint_data_del-created_on,
KEY_VAL type zint_data_del-key_val,
SEQUENCE type zint_data_del-sequence,
STATUS type zint_data_del-status,
LENGTH type zint_data_del-length,
RAW_DATA type zint_data_del-raw_data,
end of itab1.
*DATA: i_data TYPE TABLE OF ITAB1, " internal table
*wa_data TYPE ITAB1. " work area
DATA:LINE1(10) TYPE C,
LINE2(10) TYPE C,
date1(10) type c,
date2(10) type c,
name1(60),
string1(100),
title1(65),
title2(100) type c,
FNAME TYPE STRING.
*Declarations for ALV
DATA:itfieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA:itrepid TYPE sy-repid.
itrepid = sy-repid.
DATA:itevent TYPE slis_t_event.
DATA:itlistheader TYPE slis_t_listheader.
DATA:walistheader LIKE LINE OF itlistheader.
DATA:itlayout TYPE slis_layout_alv.
DATA:top TYPE slis_formname.
DATA:itsort TYPE slis_t_sortinfo_alv WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
*PARAMETERS:P_WERKS LIKE BSEG-WERKS.
SELECT-OPTIONS: S_DATE FOR ZINT_DATA_DEL-CREATED_ON OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
*Validations w.r.t the Date
AT SELECTION-SCREEN ON S_DATE.
IF S_DATE IS INITIAL.
MESSAGE 'Enter the Date' type 'E'.
*Records from 2007 can't be deleted.
ELSEIF S_DATE-LOW+0(4) >= '2007' AND
S_DATE-HIGH+0(4) >= '2007'.
MESSAGE 'Records from the Year 2007 cannot be Deleted' type 'E'.
ENDIF.
CONCATENATE s_DATE-low6(2) '.' s_DATE-low4(2) '.' s_DATE-low+0(4)
INTO date1.
CONCATENATE s_DATE-high6(2) '.' s_DATE-high4(2) '.' s_DATE-high+0(4)
INTO date2.
PERFORM GETDATA.
*& Form DOWNLOAD
text
--> p1 text
<-- p2 text
form GETDATA.
SELECT * FROM ZINT_DATA_DEL
INTO CORRESPONDING_FIELDS OF TABLE ITAB1
WHERE CREATED_ON IN S_DATE.
IF ITAB1[] IS NOT INITIAL.
DESCRIBE TABLE ITAB1 LINES LINE1.
PERFORM DELETION.
PERFORM ALV.
ELSE.
MESSAGE 'No Data' type 'S'.
ENDIF.
endform. " GETDATA
*& Form DELETION
text
--> p1 text
<-- p2 text
form DELETION .
DELETE FROM ZINT_DATA_DEL WHERE CREATED_ON IN S_DATE.
endform. " DELETION
*& Form alv
Fieldcatalog for ALV Report
FORM alv.
LOOP AT ITAB1.
ITAB1-SL_NO = SY-TABIX.
MODIFY ITAB1.
ENDLOOP.
DEFINE m_fieldcat.
itfieldcat-fieldname = &1.
itfieldcat-col_pos = &2.
itfieldcat-seltext_l = &3.
itfieldcat-do_sum = &4.
itfieldcat-outputlen = &5.
itfieldcat-edit = &6.
append itfieldcat to itfieldcat.
clear itfieldcat.
END-OF-DEFINITION.
m_fieldcat 'MANDT' '' 'Client' '' 03 ''.
m_fieldcat 'ZINT_ID' '' 'Id' '' 10 ''.
m_fieldcat 'ZINT_TY' '' 'Type.' '' 05 ''.
m_fieldcat 'CREATED_ON' '' 'Date Created on' '' 25 ''.
m_fieldcat 'KEY_VAL' '' 'key value' '' 04 ''.
m_fieldcat 'SEQUENCE' '' 'sequence' '' 06 '' .
m_fieldcat 'STATUS' '' 'status.' '' 10 ''.
m_fieldcat 'LENGTH' '' 'Length.' '' 18 ''.
m_fieldcat 'RAW_DATA' '' 'Raw Data' '' 15 '' .
itlayout-zebra = 'X'.
itlayout-colwidth_optimize = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = itlayout
i_callback_user_command = ' '
i_callback_top_of_page = 'TOP'
it_fieldcat = itfieldcat[]
i_save = 'A'
is_variant = ITVARIANT
it_events = itevent[]
is_print = ITPRINTPARAMS
it_sort = itsort[]
TABLES
t_outtab = itAB1
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. "alv
*& Form TOP
Top of page for ALV Report
FORM top.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = itevent
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
string1 = 'Records from'.
CONCATENATE string1 date1 'to' date2 INTO title1
SEPARATED BY space.
walistheader-typ = 'H'.
walistheader-info = title1.
APPEND walistheader TO itlistheader.
CONCATENATE 'Records Deleted' '-' LINE1 INTO title2.
walistheader-typ = 'H'.
walistheader-info = title2.
APPEND walistheader TO itlistheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = itlistheader
I_LOGO = ''.
I_END_OF_LIST_GRID =
ENDIF.
CLEAR itlistheader.
ENDIF.
ENDFORM. "TOP
Regrds
Piroz -
Preventing the deletion of a PO with IR but no GR
Hello guys,
I am facing a requirement to prevent the deletion of non-GR related Purchase Orders. The POs are still marked as complete since an invoice has been released.
When trying to delete complete GR related POs, we are getting the following message: "Quantity delivered differes from qty invoiced (Function not possible)"
However, when there's no GR linked to the PO, the deletion is going through.
How can I prevent this?
ThanksHello guys,
I am facing a requirement to prevent the deletion of non-GR related Purchase Orders. The POs are still marked as complete since an invoice has been released.
When trying to delete complete GR related POs, we are getting the following message: "Quantity delivered differes from qty invoiced (Function not possible)"
However, when there's no GR linked to the PO, the deletion is going through.
How can I prevent this?
Thanks -
Oracle forms standard/default menu - Record Delete option
Hi ,
Oracle forms provides a standard menu with the below options.
Action , Query , Block , Record , Help etc.
Under each of these Menu options there are sub options.
Eg: Under Record we have Previous , Next , Insert , Delete etc.
Can someone please tell me how to control this menu item options for different forms.
Eg: for 1 form i want to allow the Record - Delete option but for another form i dont want to give this option.
How to do this ??
Please help....
I tried to search for the solution but couldnt get the right answer. Hope someone will help me out here.
Regards,
SRTHello,
The Oracle Forms documentation states:
The Default menu is built-in to every form, and is not a separate menu module.
You cannot change the structure of the Default menu or edit the menu items it
displays.
If your application requires
unique menu functions, you must create a custom menu module and attach it to
your form.
If the internal default menu almost meets your needs, you can attach the
"menudef.mmb" approximation of the default menu to the form. You can then
rename and edit this menu.
You can download the demo version for 10g R2 and menudefs_10g.mmb is included with the demos.
http://download.oracle.com/otndocs/demos/Forms_Demos_10gr2.zip
You will get menudef_10g.mmb and menudefs_10g.mmb.
If needed check metalink note:
Differences between menudef.mmb and menudefs.mmb menu files. [ID 1081136.1]
Kind regards,
Alex
If someone's answer is helpful or correct please mark it accordingly. -
Prevent recording GL Account on wrong WBS
HI,
my client has the following requirement.....
"Prevent recording GL Account on wrong WBS element in goods issue to the project: check if the GL account belong to the WBS element and if it doesn't generate error message and prevent saving till user choose the correct GL account",
Where do we assign gl to the wbs element in the goods issue.... ?
How can we do this??
thanks and regards
msrHi,
Sorry for the delayed reply.
Create sets for WBS Element and GL Account - Permissible combinations.
Check in the validation whether if GL in GL Set - WBS Element in WBS Element Set.
Find out some other unique feature like movement type and include it in the check function so that the validation is carried out only for the correct cases and you are able to carry out other transaction like posting to GL with some other account assignemnt.
Hope this helps.
Thanks
Varadharajan -
Need help for record deletion from custom table
Hi friends
I have to write a custom program which will be generic to delete any table record with date field.
This program needs to be generic (should be able to delete records from any custom table) in nature with selection screen parameters as:
Table Name and Number of Days prior to which records are deleted, both mandatory.
Program Flow:
1. From number of days calculate date before which records are deleted, ( current date u2013 no. of days = past date).
2. Custom table have date field, delete records prior to that date.
3. Program may be scheduled for background job, put default values for both fields. No. of days should not be less than 60.
4. Classical Report output with number of records deleted.
My query is how will I know the name of the Date field so that I can write a DELETE query.
If I use 'DDIF_FIELDINFO_GET' it gives me all field names but how to filter out?
with regards
samikhyaHi
I have added field on the selection screen as p_fieldname and got the F4 help for it , so that the user will get the field name run time as per the table name.
Now I am facing problem while writing the DELETE query.
I wrote like
DELETE (fp_tab)
where (fp_fieldname) LE date
It is not working. I also tried with taking a string to concatenate fp_fieldname, LE and date to l_string
when I write like this:
DELETE (fp_tab)
where (l_string) , sy-subrc is getting 4 and no records are getting deleted.
I do not understand where the dynamic Delete is failing??
with reagards
Samikhya -
Post processing records deletion log in MF47 -reg
Hi...
How to know the MF47 post processing records deletion by users ?
some of the post processing records in MF47 are being deleted by the users with out processing in time
we would like to know where this log will be there and we should be able to see the log like
which user deleted which records on which date
regards,
madhu kiranhi,
i have posted earlier on deletion of MF70 records -backdated backlogs which could not be processed
now i have asked for tracking of post processing records deletion in MF47
if some record is deleted then no way to track when and who has deleted them ?
regards,
madhu kiran -
Preventing the deletion of the workspace(Directory) while it is in use
Hello,
I have application which allows user to create the workspace.I want to avoid deletion of the workspace from backend while java application is using it.
Eclipse has the this feature ,when i create the workspace("ABCWorkSpace") and start the Eclipse and now from the windows explorer if i try to delete the workspace("ABCWorkspace") ,it won't allow me to delete it.This might be because of the .lock file created in .metadata folder.
I want the similar feature .Could anyone please sugest the way to handle this requirment.
Appreciate your time.Thanks for your quick reply.
I may be little wrong in explaining the problem .I will explain it again
--I have application which allows user to create the workspace.I want to avoid deletion of the workspace from backend (i.e avoid manual deletion of the workspace from windows explorer)while java application is using it.
-- The one way might be i open one of the file present in the workspace using the fileInputStream from the workspace
like
final currentWorkSpace ="C:\\MyWorkSpace\\config.txt"
FileInputStream fis =new FileInputStream(currentWorkSpace);
--Now if i tried to delete the workspace manually from the windows explorer it wont't allow deletion saying
"Cannot delete config.txt.It is being used by another programm or person ....."
--Using above approch i can prevent manual deletion of the workspace named "MyWorkSpace" and the file "config.txt " but it allows deletion of the other files present in "MyWorkSpace".
Appreciate your time . -
Generic delta; When R/3 record deleted.
Hi all
Please tell me What will happen to the BW record when the record in R/3 add-on table is deleted and the data is retrieved by generic delta.
(1)At the beginning.
R/3 BW
20051124000001 100$ -> 20051124000001 100$
(2)Then, R/3 record deleted.Does the record on BW will be deleted or remain in same?
R/3 record deleted -> BW record also deleted
or
R/3 record deleted -> 20051124000001 100$
remain in same
Now, I cannot access to BW; I couldn't test by myself. So, I wish someone help me.
Ken'ichiHi Ken'ichi,
Refer these posts on RECORDMODE:
Re: ods- 0 Record mode
Re: 0RECORDMODE Question
A generic datasource can be based on:
1. View/Table
2. Function module extractor
3. Infoset query.
You would find many links on the same topic in these forums. Kindly use the search option.
Bye
Dinesh -
Hi,
Is it possible in DRM to have a validation for not deleting of node having some particular mapping conditions or properties assigned.
Can we prevent node deletion with validation rules.Yes, you can use a validation with Class = PropRemove and Level = Remove, then specify a combination of up to three property values to trigger validation failure. Easiest is to create a derived property which evaluates your conditions and results in a True/False condition to be used for the validation. In our implementation we use a property that is only accessible to system admins which specifies whether deletion is allowed and defaults to False, so a node cannot be deleted without an admin override.
-
Building SCD Type2 changes. Any record deletion in Source does not expire the Target Record
Building SCD Type2 changes. Any record deletion in Source does not expire the Target Record. When I Delete any Record in Source Table, I expect the same record should be 'Expired' with 'End_Date' with Active = 'N'.
BTW: In 'Table Comp', I have Checked the 'Detect Deleted rows(s) ...'. / ' ... largest generated key' is selected by default..
This is not happening..! My Update and Insert works fine..!Hi
Do you have detect deletes set on Table Comparison?
I also add the Map operations to the output of History Preserving and manage each stream of the Insert/Update/deletes separately and control the record start/effective & record end/Expiry dates with more variables based on the stream req, ie updates to end previous record have record end date set to variable for business or run date set to date - 1.
You only need key gen for inserts (including the deleted record final state)
Use merge to bring back together. -
Lock finder sidebar to prevent accidental deletion
Somehow I occasionally drag an item from the Finder sidebar thus deleting it. Is there any way to lock the sidebar to prevent accidental deletions. I want to still be able to unlock it to add or remove items.
It appears you have been using Apple computers for a while (according to your profile), so you most likely already know that when things get accidentally dragged off the Finder sidebar, they are not actually deleted. All items in the sidebar are only aliases, and still reside where you originally saved them.
Like I say, I bet you already know that.
As to your question, I did a quick Google search for "apple finder sidebar lock" and found a bunch of hits (including this post). Since you are the one with the question, I'll let you do the looking. Or maybe one of the resident geniuses will know.
Good luck.
Arch -
Prevent ChaRM Deletion???
Hello Gurus,
I am aware that deleting service desk messages is not a straight forward task.
As ChaRM is also based on service desk, I assumed that ChaRM messages too cannot be deleted. But, it behaves the other way. We are able to delete ChaRM messages. I am sure there should be a way to avoid ChaRM deletion.
Can anybody throw some light in this regard? Your help will be greatly appreciated.
best regds,
Alagammai.Hi Alagammai,
You can use the authorization objects CRM_ORD_PR and CRM_ORD_OP to prevent the deletion of change transactions. Please remove the 'Delete' authorization from these Authorization Objects.
Also refer to SAP Note 881553.
It is very important that you remove the delete authorization from user roles - since the CRMD_ORDER transaction can be used to delete all transaction types including maintenance cycles.
Regards,
Kriti Bhalla -
SAP-OIM Reconciliation of Person Record Deletion
Hi All
Has anyone done with reconcilation of preson record deletion from SAP . Below is the indicator as mentioned in SAP ER guide .
Lookup.SAP.HRMS.ConfigurationDelete Indicator ------ Segment details of the indicator that identifies whether or not the employee is deleted ----E2PLOGI001;OPERA;77;77;D .
Any inputs will be appreciated .
In our case we are changing the STAT2 and position attribute of SAP .
Thanks
DarshanHI All
I have now successfully implemented SAP HRMS user record termination .
Please follow SAP ER connector guide for hire and terminate events to enable and disable employee .
2.3.9 Configuring Reconciliation of Effective-Dated Target System Events
Thanks
Darshan
Edited by: Shelke Darshan on Jan 16, 2013 3:16 AM
Edited by: Shelke Darshan on Jan 16, 2013 3:18 AM -
Another DNS record deletion question
I am fairly new to the environment, as i switched my consulting job to an internal job.
The environment was a flat file dns, with one primary DNS server and multiple secondary servers. I move away from the flat file DNS (single master model), to an active directory integrated DNS with multiple DNS zones. So I moved the multiple DNS domains
away from the master zone to their own dedicated DNS zones on the domain controllers within their domain.
The Colleagues already warned me that DNS records tend to mysteriously disappear from time to time, but could not find any proof. I checked the usual suspects (scavenging), but that was disabled. 3 weeks back, I splitted the single DNS zone, in multiple
DNS zones, where the splitted DNS is pointing to their own dedicated domain controllers. I used following procedure to do it:
http://blogs.technet.com/b/askpfeplat/archive/2013/12/02/how-to-split-and-migrate-child-domain-dns-records-to-a-dedicated-dns-zone.aspx
Since the migration we had several encounters of DNS records which were deleted, some were explainable (wrong ILO settings), but some were not. As i could not explain the deletions, i enabled auditing on DNS to see who or what is responsible for deleting
those objects. This morning i was notified that again a records went missing, so I went to inspect the audit logs. To my surprise I saw that my admin account was logged with the record was deleted. Now I did not delete any records, have no scripts running
that modify DNS in anyway, and i seriously doubt that my admin account has been compromised. Is there anyone who could explain why records (A records of members servers) are being deleted, although scavenging is disabled?
I have checked the DNS suffix, and verified that it is not set. In which the client uses the active directory domain to which it is a member.
Answers provided are coming from personal experience, and come with no warranty of success. I as everybody else do make mistakes.Hi,
Because the Active Directory integrated DNS replication between all the DNS server, one of the DNS server delete the record others will delete the record too, so Mahdi’s suggestion
is better to know what happen when the DNS records deleted.
More information:
Active Directory-Integrated DNS
http://technet.microsoft.com/en-us/library/cc978010.aspx
Understanding DNS Zone Replication in Active Directory Domain Services
http://technet.microsoft.com/en-us/library/cc772101.aspx
Hope this helps.
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place.
Maybe you are looking for
-
Ipod nano..error message 124..
My ipod keeps getting booted out when i use itunes. It only shows up as removable drive on 'my computer'. It also does not sync my complete library despite having all of the music ticked to sync. I've tried all of the troubleshooting options HELP>>>I
-
How to copy a physical Alias table from one rpd to another
Hi I am copy pasting the physical tables from one rpd to another. I first copied the physical table and then tried to copy the alias table i get the message ' Unknown Error' when i click ok it says 'Failed to copy from clip board"
-
Moving items generates "cannot be modified...must authenticate" message
My mom has a new MacBook Pro running 10.4.11, and she is getting these annoying "cannot be modified...must authenticate" messages when she tries to move files off her desktop into other folders, or into the trash. I have tried the following: 1. repai
-
How do I completely remove Bing from Safari
I have tried to remove Bing from Safari by doing the following: 1) Checked that default search enging is google 2) Turned off extensions (and deleted install.mac extension) 3) Searched fo Bing in finder without success All the discussion suggestions
-
My ipod classic has a white screen
my ipod classic has a white screen