Delete user and all his related data form the relation table

HI All,
I have user and for the user i have 3 more tables with additional fields that relate to the user
the the user is a key on the 3 tables and relate with foreign key .
in case i want to delete the user and i want that all the user data from all the related table will be deleted how can i do that ?
Regards
Joy

HI,
The user is in Z DB tables so i cant delete it with this bapi,
The problem is when i have 4 table and i want to delete the user from them like that :
  DELETE FROM: (sv_user_table_name) WHERE userid = iv_user_id,
               (sv_add_fld_table_name) WHERE userid = iv_user_id,
               (sv_att_table_name) WHERE userid = iv_user_id,
               (sv_app_attributes_table_name) WHERE userid = iv_user_id.
IF sy-subrc <> 0.
    RAISE EXCEPTION TYPE .....
if the user are exist in the first and the second table and not in the third and four
i get the sy-subrc = 4 despite the user has deleted from the first and seconed tables
there is nice way to overcome this issue ?
Regards
Joy
Edited by: Joy Stpr on Aug 3, 2009 8:57 AM

Similar Messages

  • How to allow user to modify his own data with a Portal Form

    Hi,
    I have a form (Master-Detail) to update a user-profile (Master) and the user's skills (Detail).
    How can I make sure, that a user can only modify his own profile - assuming the master table has an attribute containing the users loginname for Portal?
    thanks!
    bye Stephan...

    Yes, along with the default value of wwctx_api.get_user, you also need to specify the default value type. In this case it should be Expression returning Varchar2.

  • Okay, so my friends music downloaded to my iPhone when i put it on his computer to charge and i re-synced it to mine and all his music is still there but blank and wont play how can i get it off of my phone, its so annoying!!

    Okay, so my friends music downloaded to my iPhone when i put it on his computer to charge and i re-synced it to mine and all his music is still there but blank and wont play how can i get it off of my phone, its so annoying!! My itunes only has like 4 songs because my computer crashed and lost all my songs, and I'm not trying to steal his music. But like I said its still in the music app on the phone but its all blank and wont play. I just want it off.

    When he plugs it into his Mac again, he should be asked if he wishes to sync with that Mac.

  • I am having problems opening iTunes! ever since I updated to 10.5.3ver, I cannot open the application.  I have deleted iTunes and all associated apps (bonjour, Cloud, Apple support apps, etc) and still something is wrong. I cant find it anywhere; where di

    i am having problems opening iTunes! ever since I updated to 10.5.3ver, I cannot open the application.  I have deleted iTunes and all associated apps (bonjour, Cloud, Apple support apps, etc) and still something is wrong. I cant find it anywhere; where did it go? I received the download confirmation each time for each application!  HELP!!  Using Win7 (64-bit)--IE9

    Your post is too difficult to read. Please repost using paragraphs.
    In the interim... For All things TM... See Pondini's Excellent information here...
    http://pondini.org/OSX/Home.html
    In particular... FAQs and Troubleshooting.

  • Delete Versions/Delete Master and All Versions w/ Multiple Images Selected

    When I select multiple images from a project (one image has a thicker white line around it and the other selected images have a thinner white line) and then select Delete Master and All Version the ONLY image that gets deleted is the one with the thicker white line. Whereas if I were to choose Delete Version all of the images are deleted?
    Am I not able to perform Delete Master and All Versions on multiple files? It is not working for me.

    Try turning off:
    Edit >> Primary Only
    DLS

  • I am having trouble updating minomonsters and I would like to find a way to fix it without erasing all of my data from the app.

    I am having trouble updating minomonsters and I would like to find a way to fix it without erasing all of my data from the app.

    I am having trouble updating minomonsters and I would like to find a way to fix it without erasing all of my data from the app.

  • Has anyone heard of RoboHelp HTML v10 "magically" deleting itself and all project files?

    We have an off-site contractor that swears RoboHelp HTML "magically" deleted itself and all project files. I've never heard of this and wondered if anyone else had. It sounds kinda fishy to me, but I've seen some strange things from RH, so thought I'd ask around first.
    Thanks-

    Hi all-
    No, no source control in play that I know of. It appears we have gotten few answers to questions. The problems began when it was reported that they could not copy the project files to a flash drive. I personally have never had an issue with this task. Then, it was reported that the project had gotten deleted by RH. The resolution after-the-fact is that the contractor spent 1+/- week recreating the project (60-70 topics) from the published content.
    I'm surprised that as a contractor they didn't know to come here and ask questions or find tools available to reverse engineer from the published content, but I suppose not everyone knows of the goldmine that lives here. I'd never heard of an uninstall removing project files, but I know there are a million ways it could have been configured and never say never, right?
    Thanks for the quick replies - you guys ROCK!
    Leah Eaton Vance
    Senior Technical Writer
    Technical and Business Communication Adjunct Professor, Austin Community College
    Austin STC, Past President

  • Selection of ICP and custom dimension in data forms

    We are investigating the possibility of changing our divisional reporting – and we are looking into different possible solutions. Maybe you can help us?
    We eliminate on both ICP and divisions (custom1= division, custom2= divisional counterpart).
    We have 150 ICP entities and (in the future maybe) 100+ divisional counterparts (custom2). However, one entity only has 10-15 divisions (and not 100+).
    Do you know of a smart way to choose ICP entity and custom2 in a data form – so the reporting will be easy for the reporting companies?
    Ideally I would like to be able first to select ICP entity (add member function) and then at the same time select a custom2 (divisional counterpart) – but only choose between those custom2/divisions that the company has. I do not think you can add member functions for both ICP and Custom2 at the same time in a data form?
    Do you have any suggestions?
    BR
    PT

    We thought about that solution but it would not follow good metadata structure (more like Hyperion Enterprise). We are hoping for a clever solution to make the webforms work.
    BR
    PT

  • I downloaded OS X Maverick and all of my data is gone, photos, iTunes, etc

    I just updated to OS X Maverick and all of my data on my laptop is gone. Photos, I tunes, everything.  How do I get it back?

    If no recent backups, shutdown the computer and take it to a local PC/Mac tech that does data recovery, they likely also can fix your problem.
    Hardware problems, take it into Apple.

  • I want to store the data form the PWM and the value of the changing duty cycle into a file simultaneously and continually

    i want to store the data form the PWM and the value of the changing duty cycle into a file simultaneously and continually but having problem.Please can anyone help out.
    Attachments:
    data.vi ‏60 KB

    Hello,
    Have you looked at the "Write Binary File.vi" and "Read Binary File.vi" examples?
    They give you a good clue as how to write and read arrays to and from binary files.
    For your data it means that you could put the two data items to write in an array and write the array to file, for the read its important to in what sequence the number were written to file.
    Kind regards,
    André
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • Deletion of data within the database tables

    The user is trying to clean up the 2014 data within the database tables. He is running a delete function which keeps causing the log files
    to exceed their limit. The tables are large and he is unable to delete the data in one command due to available size and logging. What is the best way to approach this?
    Thanks,

    Hi venkatesh1985,
    According to your description, the user fails to delete data in tables due to the limited space of log file. Based on my research, this issue could occur when you use the delete statement(DELETE FROM ExampleTable) in a single transaction and consume all
    available space on your transaction log disk.
    To avoid this issue, you could use the two methods below to delete the data.
    1. Use a loop combined with TOP and delete rows in smaller transactions as the following example. This method requires you to delete all the tables one by one.
    SELECT 1
    WHILE @@ROWCOUNT > 0
    BEGIN
    DELETE TOP (1000)
    FROM LargeTable
    END
    For more information about the process, please refer to the article:
    http://dbadiaries.com/how-to-delete-millions-of-rows-using-t-sql-with-reduced-impact
    2. If you want to delete all the data from all tables in the specific database, you could script the entire database and all database objects. Then drop the database and recreate it using the script as the steps below.
    a. In Object Explorer, expand the node for the instance containing the database to be scripted.
    b. Point to Tasks, and then click Generate Scripts and click Next.
    c. Select the option of 'Script the entire database and all database objects'.
    d. Specify how scripts should be saved. You could save the script to a file or new query window. Click Next, then click ok.
    e. Drop the database, and run the script in the query window to recreate it. For more information, please refer to the article:
    http://msdn.microsoft.com/en-us/library/bb895179.aspx#Introduction
    In addition, if possible, please increase the size of the log file or move the log file to a different disk with more disk space.
    Regards,
    Michelle Li

  • How to Bind a Combo Box so that it retrieves and display content corresponding to the Id in a link table and populates itself with the data in the main table?

    I am developing a desktop application in Wpf using MVVM and Entity Frameworks. I have the following tables:
    1. Party (PartyId, Name)
    2. Case (CaseId, CaseNo)
    3. Petitioner (CaseId, PartyId) ............. Link Table
    I am completely new to .Net and to begin with I download Microsoft's sample application and
    following the pattern I have been successful in creating several tabs. The problem started only when I wanted to implement many-to-many relationship. The sample application has not covered the scenario where there can be a any-to-many relationship. However
    with the help of MSDN forum I came to know about a link table and managed to solve entity framework issues pertaining to many-to-many relationship. Here is the screenshot of my application to show you what I have achieved so far.
    And now the problem I want the forum to address is how to bind a combo box so that it retrieves Party.Name for the corresponding PartyId in the Link Table and also I want to populate it with Party.Name so that
    users can choose one from the dropdown list to add or edit the petitioner.

    Hello Barry,
    Thanks a lot for responding to my query. As I am completely new to .Net and following the pattern of Microsoft's Employee Tracker sample it seems difficult to clearly understand the concept and implement it in a scenario which is different than what is in
    the sample available at the link you supplied.
    To get the idea of the thing here is my code behind of a view vBoxPetitioner:
    <UserControl x:Class="CCIS.View.Case.vBoxPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:v="clr-namespace:CCIS.View.Case"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    d:DesignWidth="300"
    d:DesignHeight="200">
    <UserControl.Resources>
    <DataTemplate DataType="{x:Type vm:vmPetitioner}">
    <v:vPetitioner Margin="0,2,0,0" />
    </DataTemplate>
    </UserControl.Resources>
    <Grid>
    <HeaderedContentControl>
    <HeaderedContentControl.Header>
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
    <TextBlock Margin="2">
    <Hyperlink Command="{Binding Path=AddPetitionerCommand}">Add Petitioner</Hyperlink>
    | <Hyperlink Command="{Binding Path=DeletePetitionerCommand}">Delete</Hyperlink>
    </TextBlock>
    </StackPanel>
    </HeaderedContentControl.Header>
    <ListBox BorderThickness="0" SelectedItem="{Binding Path=CurrentPetitioner, Mode=TwoWay}" ItemsSource="{Binding Path=tblParties}" />
    </HeaderedContentControl>
    </Grid>
    </UserControl>
    This part is working fine as it loads another view that is vPetioner perfectly in the manner I want it to be.
    Here is the code of vmPetitioner, a ViewModel:
    Imports Microsoft.VisualBasic
    Imports System.Collections.ObjectModel
    Imports System
    Imports CCIS.Model.Party
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' ViewModel of an individual Email
    ''' </summary>
    Public Class vmPetitioner
    Inherits vmParty
    ''' <summary>
    ''' The Email object backing this ViewModel
    ''' </summary>
    Private petitioner As tblParty
    ''' <summary>
    ''' Initializes a new instance of the EmailViewModel class.
    ''' </summary>
    ''' <param name="detail">The underlying Email this ViewModel is to be based on</param>
    Public Sub New(ByVal detail As tblParty)
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Me.petitioner = detail
    End Sub
    ''' <summary>
    ''' Gets the underlying Email this ViewModel is based on
    ''' </summary>
    Public Overrides ReadOnly Property Model() As tblParty
    Get
    Return Me.petitioner
    End Get
    End Property
    ''' <summary>
    ''' Gets or sets the actual email address
    ''' </summary>
    Public Property fldPartyId() As String
    Get
    Return Me.petitioner.fldPartyId
    End Get
    Set(ByVal value As String)
    Me.petitioner.fldPartyId = value
    Me.OnPropertyChanged("fldPartyId")
    End Set
    End Property
    End Class
    End Namespace
    And below is the ViewMode vmParty which vmPetitioner Inherits:
    Imports Microsoft.VisualBasic
    Imports System
    Imports System.Collections.Generic
    Imports CCIS.Model.Case
    Imports CCIS.Model.Party
    Imports CCIS.ViewModel.Helpers
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' Common functionality for ViewModels of an individual ContactDetail
    ''' </summary>
    Public MustInherit Class vmParty
    Inherits ViewModelBase
    ''' <summary>
    ''' Gets the underlying ContactDetail this ViewModel is based on
    ''' </summary>
    Public MustOverride ReadOnly Property Model() As tblParty
    '''' <summary>
    '''' Gets the underlying ContactDetail this ViewModel is based on
    '''' </summary>
    'Public MustOverride ReadOnly Property Model() As tblAdvocate
    ''' <summary>
    ''' Gets or sets the name of this department
    ''' </summary>
    Public Property fldName() As String
    Get
    Return Me.Model.fldName
    End Get
    Set(ByVal value As String)
    Me.Model.fldName = value
    Me.OnPropertyChanged("fldName")
    End Set
    End Property
    ''' <summary>
    ''' Constructs a view model to represent the supplied ContactDetail
    ''' </summary>
    ''' <param name="detail">The detail to build a ViewModel for</param>
    ''' <returns>The constructed ViewModel, null if one can't be built</returns>
    Public Shared Function BuildViewModel(ByVal detail As tblParty) As vmParty
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Dim e As tblParty = TryCast(detail, tblParty)
    If e IsNot Nothing Then
    Return New vmPetitioner(e)
    End If
    Return Nothing
    End Function
    End Class
    End Namespace
    And final the code behind of the view vPetitioner:
    <UserControl x:Class="CCIS.View.Case.vPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    Width="300">
    <UserControl.Resources>
    <ResourceDictionary Source=".\CompactFormStyles.xaml" />
    </UserControl.Resources>
    <Grid>
    <Border Style="{StaticResource DetailBorder}">
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <TextBlock Grid.Column="0" Text="Petitioner:" />
    <ComboBox Grid.Column="1" Width="240" SelectedValuePath="." SelectedItem="{Binding Path=tblParty}" ItemsSource="{Binding Path=PetitionerLookup}" DisplayMemberPath="fldName" />
    </Grid>
    </Border>
    </Grid>
    </UserControl>
    The problem, presumably, seems to be is that the binding path "PetitionerLookup" of the ItemSource of the Combo box in the view vPetitioner exists in a different ViewModel vmCase which serves as an ObservableCollection for MainViewModel. Therefore,
    what I need to Know is how to route the binding path if it exists in a different ViewModel?
    Sir, I look forward to your early reply bringing a workable solution to the problem I face. 
    Warm Regards,
    Arun

  • HT1766 4 voice memos in iTunes backup from iPhone had ! marks and would not play so I deleted them and although they are still on the iPhone, they will not sync back to iTunes from iPhone.

    4 voice memos in iTunes backup from iPhone had ! marks and would not play so I deleted them and although they are still on the iPhone, they will not sync back to iTunes from iPhone.

    You may have to try deleting all the music from your phone (by going to Settings>General>Usage>Music, swipping All Music and tapping Delete), then sync it all back on with iTunes in order to fix this.

  • How to delete entire data in the hierarchy table,?

    hi friends
    i need to delete entire data in the hierarchy table which contains parent child relationship,when i am selecting entire records and choose the option delete from the context menu, it is not deleting, and i have to delete one by one or i have delete first the child items and later parents items, it is time consuming process.
    Is there any other option to delete entire records in the hierachy table , irrespective of parent and child relationship?
    if any one have solution for my issue, please provide to me
    thanks in advance
    bharat.chinthapatla

    Hi Bharat,
      Unload the Repository and Delete the Table and fields in Hierarchy table and Recreate and reload the data.OIther wise you have to lot of manual work.
    Thanks
    Ganesh Kotti

  • How to remove bullets and spacing for url links in the Related Links iview?

    I tried to look for a property that I can edit the look-n-feel of the url links in the Related Link iView using "Theme Editor".
    All I need is to remove the bullets and increase some vertical spacing between the links.
    Currently, it looks like this:
    URL iView A
    URL Iview B
    I go through the whole section of Related Links properties, none of them seems to do what I want.
    Here are the list of properties in Related Link section (of Navigation Panel):
    Link Color
    Text Decoration of Link
    Hover Color
    Text Decoration of Hovered Link
    Initially, I thought "Text Decoration of Link" should be the right property I should look at. But there are a drop-down with 5 options: None, Underline, Blinking, Overline and Line-Through, which really can't achieve what I want.
    Thanks for advice.
    Kent
    Post with Diagram Illustration:
    <a href="http://sapnetweaverforum.blogspot.com/2006/11/how-to-remove-bullets-and-spacing-for.html">How to remove bullets and spacing for url links in the Related Links iview?</a>
    Message was edited by: Kent C.

    Hi, Kai.
    I checked the Related iView properties (URL Template), I don't see what layoutset it is really using. I am not sure, is that a layout set apply to the Related Link Iview?
    For the regular KM iView, I will see what Layout Set I want to apply, then I can go and change the properties (of layout coontroller, collection renderer & resource renderer)you mentioned. But for this Related Link iView, I really don't know. I guess it may be in the code itself.
    If there is a layout set for Related Link iView (or the place to apply layout set to it), can you point to me which one is that? (I did a search through the layout set names, I only find the AppQuicklinkExplorer (I used this for Dynamic Nav. Link iView before), if I can aply this layout set to Related Link iView, my problem will be solved.)
    Thanks for help.
    Kent

Maybe you are looking for