on 10-16-2015 12:37 PM
Hi All,
I'm facing a difficulty while trying to get record from table CUFD with column 'TableID' in the where clause. I think the '@' sign cause the issue where I can filter this table with other column fields.
SELECT "TableID", "AliasID" FROM "CUFD" WHERE "TableID" ='@MyTable'
Is there anyway to avoid the 'at' sign or the problem occurs due to other cause? Your help will be highly appreciate.
Thank in advance and Best Regards,
J S L Geeganage
Hi,
Sorry to bother you all. Today morning when I try to do the same, it worked. No additional step has except running the bellow query. I don't believe this fixed the problem.
SELECT "TableID" FROM "CUFD" WHERE "TableID" = (SELECT "TableID" FROM "CUFD" WHERE "CUFD"."AliasID" = 'Variant')
May be there was a kind of a latency to update the changes that I have made Or may be I mixed up with upper and lower cases. Not sure though, but now it is working fine.
Best Regards,
J S L Geeganage
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This sample code is the solution:
Dim exists As Boolean = False
Dim oUserTable As SAPbobsCOM.UserTable
oUserTable = oCompany.UserTables.Item(TableName)
Dim FieldsCount As Integer = oUserTable.UserFields.Fields.Count
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTable)
oUserTable = Nothing
GC.Collect()
Dim oUsrFldsMD As SAPbobsCOM.UserFieldsMD
oUsrFldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
For i = 0 To FieldsCount - 1
Try
If oUsrFldsMD.GetByKey("@" & TableName, i) Then
If oUsrFldsMD.Name = FieldName Then
exists = True
Exit For
End If
End If
Catch ex As Exception
Exit For
End Try
Next
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUsrFldsMD)
oUsrFldsMD = Nothing
GC.Collect()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jeewan,
what error message do you get?
Best Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Folorian,
Thank you very much. At this moment I couldn't have a way to see the column definitions of HANA database. But in SQL it is varchar(20) too.
If you have SAP B1 Database with you could you please query the table 'CUFD'? I did using 'Query Genarator' (Tools > Queries > Query Genarator)
Best Regards,
J S L Geeganage
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.