on 09-02-2010 10:47 AM
Can anyone tell me how to delete the TABLE and FIELD i created .... using code.
PLEASE TELL ME TO WRITE THE CODE
Hello
Use the Remove method .
Dim oUserTablesMD As SAPbobsCOM.UserTablesMD
oUserTablesMD = oCompany.GetBusinessObject(BoObjectTypes.oUserTables)
If oUserTablesMD.GetByKey("TABLE") Then
oUserTablesMD.Remove()
End If
Regards
János
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for the reply..it was help full...but i cant able to delete the field...
oUserFieldsMD.GetByKey("TABLE", "FIELD")
the if condition is not successfull...becoz
oUserFieldsMD.GetByKey(String TableName, Int FieldId)
I am not getting the field id.
i have a table VBN
with one field - ItDesc
1. code
2. Name
3. ItDesc
I want to delete this Itdesc..
PlzHelp
Hello
TableName : Specifies the name of the user defined table.
(use the symbol @ as a prefix to the name, see the TableName property of the UserTablesMD object).
FieldID
Specifies the field identification key.
You can delete fields starts with U_ sign in the table. (Code, Name are standard fields, you cannot delete them).
in your example:
So for table name use @VBN
you can delete the field: ItDesc, and to indetify the field id run the following query:
select * from cufd where tableid = '@VBN' and AliasID = 'ItDesc'
Regards,
János
Edited by: János Nagy on Sep 2, 2010 3:31 PM
no use.
My concept is this..
i have an excel file...with the table name and field name.
i wrote the code to read the data from the excel file and also find the FIELD ID from the table.
now i have both th table name and id in a string and int.
Now i used your methos to delete the field but it doesnt work...
Edited by: vibinvarghese on Sep 11, 2010 8:06 AM
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.