Delete user table - Filed

Can anyone tell me how to delete the TABLE and FIELD i created .... using code.
i.e.  While i reach a condition true...i want to create a table(ANY TYPE) and 2 field(ANY TYPE)..and if the condition reaches other values..i need to delete the created table or filed...It depends up on the condition.
1.  Create A table and field.
2. Delete a field from a specified user table.
3. Delete the whole table (any i.e doc,docline,master,masterline,no object)...
PLEASE  TELL  ME  TO  WRITE  THE  CODE

Hi,
For create table
oTables = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
oTables.TableName = "tablename"
oTables.TableDescription = "TableDescription"
oTables.TableType = "Tabletype"
iRet = oTables.Add()
For delete table-fields and table use see this  thread
[Delete user table - Filed;
Thanks,
Mahesh

Similar Messages

  • Error removing user table

    Hello guys,
    I have a quite silly problem with deleting user tables.
    Deleting the first table is not a problem. But when I try to delete the second one, I get the error message "Ref count of this object is higher then 0".
    Can you tell me what that means? Which object?
    Thanks in advance.
    BR,
    Mario

    Hi, Mario
    You can do it in the following way:
            private bool RemoveUserTable(string table)
                SAPbobsCOM.UserTablesMD oUserTablesMD = null;
                try
                    oUserTablesMD = ((SAPbobsCOM.UserTablesMD)(Globals.company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)));
                    if (oUserTablesMD.GetByKey(table))
                        int retCode = oUserTablesMD.Remove();
                        if (retCode != 0)
                            Globals.company.GetLastError(out Globals.errorCode, out Globals.lastError);
                            return false;
                        else
                            return true;
                    return true;
                catch (Exception e)
                    Globals.company.GetLastError(out Globals.errorCode, out Globals.lastError);
                    Console.WriteLine(e.Message);
                    return false;
                finally
                    <b>System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTablesMD);
                    oUserTablesMD = null;
                    GC.Collect();</b>

  • Clear User Table

    Hello,
    I created a User table. It is for me only a temporary table.
    I would like to clear it in order to re-use it.
    I do not have find the good object to do it.
    Is there someone who have any solution please ?
    Tks All
    Laetitia.

    Hi,
    I sent  message to SAP, We cannot delete row with DI in usertables.
    There is no another solution but it doesn't work anymore.
    What I want to :
    delete User Table
    create User table
    Put data in this table.
    But there is a problem. I have to do that in the same action. And it doesn't work because SBO have to refresh itself between deletion and creation.
    So It delete my table and I can't create it again.
    If someone have any Idea ?
    Tks all for your help.
    Laetitia

  • In which table deleted user information is stored

    Hi all,
    I have made one user ZTEST in sap through SU01. Its details has been stored in USR01 .
    When i deleted this user than the details of this user has been deleted from the tables USR01.
    After deletion on which table deleted user information is stored.
    Any BAPI is available which sgives the deleted table list .
    Thanks & regards

    Hi
    You can get current database status using the following BAPIs-
    BAPI_USER_EXISTENCE_CHECK
    BAPI_USER_GETLIST
    BAPI_USER_GET_DETAIL
    Also check the report RPUAUD00 in which you can find out new infotype creation/modification etc.
    Regards

  • In which table deleted user list is stored

    Hi all,
    I have made one user ZTEST in sap through SU01. Its details has been stored in USR01 .
    When i deleted this user than the details of this user has been deleted from the tables USR01.
    After deletion on which table deleted user information is stored.
    Any BAPI is available which sgives the deleted table list .
    Thanks & regards

    Hi Lolo,
    There is no table available in SAP to view the deleted user information. But you can connect to SQL & see the deleted user information.
    I think the command " SQL>show recyclebin;" will show you the deleted user information.
    Regards,
    Mahesh Gattu

  • How to reset All users and delete their table?

    Hi,
    i want to know How to reset All users and delete their tables with username- system and password-manager.
    thanks

    Hi
    Here delete means truncate or drop?????
    If drop use the following statement to generate the script:
    select 'drop table ' || Owner || '.' || Table_Name || ';' from Dba_tables
    where owner in (<All_the_users_you_want_to_reset>);
    But before firing the above statement extract the DDL's to create all the users and put it in a file and just run that file to re-create the users.
    if its truncate then:
    select 'truncate table ' || Owner || '.' || Table_Name || ';' from Dba_tables
    where owner in (<All_the_users_you_want_to_reset>);
    Hope this Helps
    Regards

  • Cannot remove deleted user from people picker - SharePoint Foundation 2010

    So I think I've read all the people picker articles here and I can't find a solution so I thought I'd start a new thread. Here is the issue:
    A user was deleted from Active Directory and removed from SharePoint Foundation 2010. The user was still showing in the People Picker within the site collection, so we have performed a few things to try and get rid of this user.
    User is deleted from AD
    User is deleted from SharePoint Site Collection
    Have tried stsadm -o deleteuser
    Have removed all mention of this user from UserInfo table
    User does NOT show in
    https://<SiteCollectionURL/_layouts/people.aspx?MembershipGroupId=0
    Cannot find any mention of this user anywhere.
    Ran a full crawl as we read on a forum somewhere that it might help.
    If I try and add the user back to SharePoint I get "The user does not exist or is not unique"
    If I try "stsadm -o deleteuser -userlogin DOMAIN\USER -url https://<sitecollectionurl>" I get "The user does not exist or is not unique"
    I am not sure what else I can try now. Can anyone help?
    Thanks,
    Vinny
    Vinny

    No other domain trusts that this user could be in.
    Just so everyone can stop with the warnings, we do NOT regularly delete users from the UserInfo table and fully are aware of the problems behind it, which is why it is so rarely done. But at times, you have to do what you have to do to help a customer, you
    know? This one user is the only one that was removed from the UserInfo table, but there are a few other users that are also deleted (from SharePoint, not manually from UserInfo) that are still showing as well. This one user included.
    There MUST be another place that the people picker gets it's information from. ALL of the user's old information still shows in the people picker (username, email address, display name), and yet none of that information exists anywhere other than in the
    People Picker. Mailbox is gone from Exchange, User deleted from SharePoint, User deleted from Active Directory. Is there no cache someone could point me towards that People Picker might store information in.
    Vinny

  • HOW CAN I ADD/UPDATE/INSERT IN A USER TABLE WITH MATRIX

    Hi All,
    I have one User table (Defined as No Object) and what i need to do is a form with a matrix to Add/Update/Delete data in my user table.
    I already create the form and the matrix that already give me the user table data. But now i have several problems to solve.
    First I try to add a new row but this new row get the data of the last row in the matrix. What i needed is a blank row to add new data in the user table.
    Second, when i change data in matrix and do update in the form, sap show me the message that the operation is successfully done but the data in the user table in not updated.
    I am trying to do one forma like whe can find in Setup-> General -> Freight.
    Can anyone help me?
    Best Regards,
    Luis Duarte

    Hi,
    If ur dealing with a simple form like that U can as well use the direct table form, and just provide a FMS to auto matically fill the code and name. U can directly use the form by.. Tools-->UserDefined Windows
    Or
    Comming to ur problem.... when ur adding a new row clear the data sources so that u'll get a blank row.
    And for update the best thing to do is delete all the records in the table and again insert all the records directly from the matrix.
    Hope it helps,
    Vasu Natari.

  • Not able to create, deleted user again in OIM

    Hi,
    As part of our porcess we susped the user on the next day of his/her last working day. And after 20 days we are deleting that user from OIM.
    Now the deleted user again re-hire into the organization. So we need to re-create the user in OIM.
    But we are unable to create the user in OIM 11g. And it is showing error as "user already exist".
    Then we found there is an entry for this user in OIM repository as usr_status as deleted. And also we are not able to see this user in the OIM admin console even there is an entry in repository.
    Please help us how to solve this issue in creating the identity in OIM.
    Thanks in advance
    Siva

    If you want to re-create a deleted user with the same user id then you need to set the re-use id property to true and also drop the unique key contraint from the USR table.
    Ref: Re: Steps for re-using the same user id of a deleted user in OIM 11g ?
    -Bikash

  • Deleted User recovery  in SAP R/3

    Hi :
    By mistakenly I have deleted user from the user list . After some time i came to know that , that user is productive user.
    Can any one help me for how to recover the user from deleted list.
    Thanks
    Chimsi

    Hi,
    I do not think that will be possible. You can recreate the same user-id though, and he/she shall be able to carry on (get the workflow items, inbox, transport requests and so on, of the earlier user-id).
    It maybe possible to search CDHDR and CDPOS tables to get some details of user deletion.
    cheers,

  • Running forms and deleting default tables in oracle 9i

    i am presently running,the oracle 9i enterprise edition along
    with the forms on a single machine. do i have to also install
    the client side of the oracle 9i for the forms to run,because
    i am having errors when running the form, even though it tries
    to open an applet on a web page.
    the second question is can i delete existing tables and users
    that are in the default database which oracle9i installs on its
    installations and if so which users and tables am i allowed to
    delete.
    Thanks

    I don't know about your scripts in particiular, but you can create a file named something like tbl_create.sql and put a CREATE TABLE... sql statement in it. Run sqplus and at the prompt type:
    SQL>start tbl_create.sql;
    SQL>quit
    To load the data, use sqlldr. You use it at the system prompt like this:
    #> sqlldr username/password control=ctrl.txt
    In the ctrl.txt you would have something like this:
    load data infile 'datafile.csv' append
    into table tbl_name
    field terminated by "," optionally enclosed by '"' ( ID, FIELD2 )
    and data.csv woudl have records like
    1,"one"
    2,"two"
    etc.

  • User tables default forms

    Hello,
    I want to use the user tables default forms (after adding the user table in Uer Tables menu, it's generated a form to view that table: add, delete, update info).
    I'd like to lauch this form from my add-on menu. I know how to do that, but I wonder if that MenuID of the menu depends on the SBO installation (on what other tables were added before in SBO). Also, I'd like to put Choose from list capabilities in that form. I know also how to do this (just like a system form), but I also don't now if the FormID is the same on each installation.
    Thank you for your answer.
    I hope I made myself clear.
    Irina Stanca

    You may try this to find the MenuUID of your UDT:
    Start Saved Query through menuitem
    Have you checked Application.ResourceData? I'm not sure whether UDT forms are considered system forms, though. Anyway, you should be able to get the FormID of your UDT form on the fly by iterating the Application.Forms collection and checking the Title property, which equals the UDT Description.
    HTH
    Juha

  • A Table that was created at Run time. A Row Properly Deleted from Table Is Still Present on Form with BindingNavigator

    Hello
    I have a dataset that was created at design time
    but - after I run the app, it randomly creates a table based on The Users name
    since I do not know the users name before had, the table is not part of my existing dataset
    (I actually used an insert into sql nonquery to just make this table a copy of the masterUserTable)
    Now - I have a binding navigator on my form, that is originally bound to masterUserTable, but my goal is to make it bound to the users table (let's say GabrielUserTable)
    I thought I did so with this code: 
            'TODO: This line of code loads data into the 'MyLearningDBDataSet.masterUserTable' table. You can move, or remove it, as needed.
            Me.MyMainDBTableAdapter.Fill(Me.MyLearningDBDataSet.masterUserTable)
            Dim ThisNewVariable As String = MyUserNameIs & "UserTable"
            Dim ThisNewTableName As New DataTable
            Me.MyLearningDBDataSet.masterUserTable.TableName = ThisNewVariable
            Me.MyMainDBTableAdapter.Fill(Me.MyLearningDBDataSet.masterUserTable)
    that appeared to do the trick  (but if it is incorrect please advice on the proper way to add a table made at runtime to a users existing datset)
    Else where in my code  I successfully execute the following NonQuery :
            SqlString= "DELETE FROM " & MyUserNameIs & "UserTable" & vbCrLf &
                "WHERE vState='" & txtStateInfo.Text & "';"
    I check in Visual Studio 2013 that the row was deleted from the "GabrielUserTable"  (Gabriel is the current value of MyUserNameIs) by using the Server Explorer and right clicking
    on the table and choosing show talbe data
    But the MyMainDBBindingNavigator is still showing the item I deleted.
    So after searching for answers - I created a new button for testing and added the following code to test if it would work
            Me.Validate()
            Me.MyMainDBBindingSource.EndEdit()
            Me.TableAdapterManager.UpdateAll(Me.MyLearningDBDataSet)
    but the data is still shwoing after deleting it with my NonQuery 
    Please Help!

    Hi genterprise,
    >> Now - I have a binding navigator on my form, that is originally bound to masterUserTable, but my goal is to make it bound to the users table (let's say GabrielUserTable)
    In my option, if you want to rebind the users table to the navigator, you need to set the BindingNavigator.BindingSource. Based on your description, it seems that you did not reset the datasoure of the MyMainDBBindingNavigator. It was the original datasource
    of the masterUserTable. For more details about BindingNavigator.BindingSource Property. You could refer the link below:
    # BindingNavigator.BindingSource Property
    https://msdn.microsoft.com/en-us/library/system.windows.forms.bindingnavigator.bindingsource%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
    Best Regards,
    Edward
    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.
    Click HERE to participate the survey.

  • Deleting DB table contents using internal table

    Hi Gurus,
    I have a requirement of deleting DB table contents. Requirement is as follows,
    User will select the DB table description in the seletion screen using drop down list.
    Whichever description he selects,the corresponding table contents should be deleted and we should not hardcode the table name in if or case conditions.
    Is this possible?
    Regards,
    G.Srinivasan

    Hi,
    You can get the Table name from the desciption from table DD02T.
    Use the Key word DELETE to delete the contents of a table from program.
    PARAMETERS : p_ddtext type ddtext.
    select single * from dd02t into table db_tab where DDLANGUAGE = 'EN' and ddtext = p_ddtext.
    DELETE DB_TAB-TABNAME
    FROM ITAB. " Take F1 help on this Key word
    IMPORTANT --> Do not manually delete the contents of a DB table in SAP.
    The individual records only deleted through BDC or any other Acceptable Methods.
    Rest is left to you. Be careful about this activity. Take enough Authourizations/ Permissions or consult your BASIS or other team members.
    Cheerz
    Ram

  • User Master Records/Tables - Exporting User tables for Recovery

    Hi there,
    Work in the Security area ....Outside of the client export of SCC8 for user master records/roles. Is there another recommended method for saving user tables that can be re-imported on the chance of deletion of users and roles and can be selectively re-imported if needed. For instance if a particular User Grouip was deleted with X number of users, could that be re-imported by a selective means ? SU10 is handled delicately in prod when used but unwanted results still occur. Approaches appreciated ..

    Hi,
    Try the following..
    BAPI_USER_CREATE         Create a User
    BAPI_USER_CREATE1       Create a User 
    Hope that helps! 
    Regards,
    Tanveer
    <b>Please mark helpful answers</b>

Maybe you are looking for

  • Is it possible to replace nx1c's keyboard with x1c's?

    Just curious if that's technically possible? Solved! Go to Solution.

  • Merge pdf docs together

    Hello my name is Ian. I have 23 numbered pdf docs. I want to merge into one and have them list in order. I have Adobe Export pdf. Thank you for any help. Ian

  • Captivate 4 - not exporting publishing avi.

    My goal was to record what I was doing on screen. Then create an avi file out of it. When I published, there was no output file. STEPS I TOOK: 1. Opened Captivate 4, and chose "Software Simulation". 2. I set it to record full screen on my single moni

  • ORA-00332 - archived log is too small - may be incompletely archived

    Hi, i have a problem with a physical standby database, the apply process is stoped, the databas is version 9.2.0.7.0 on Solaris 10. I received the the next errors into the alert logfile, What can i do?? Thanks for your help. Regards. Media Recovery W

  • SRM shopping: cost assignment

    Hi experts, I would like to ask you for an information - we want to fill in the cost assignment in the shopping cart, but the search help does not work, we do not get any error message neither. What might be the root cause? thank you very much for an