CFL for user table
I have created a user table as,
CREATE TABLE [dbo].[@U_TCHN] (
[Code] [nvarchar] (8) COLLATE SQL_Latin1_General_CP850_CI_AS NOT NULL ,
[Name] [nvarchar] (30) COLLATE SQL_Latin1_General_CP850_CI_AS NOT NULL ,
[U_PODocNum] [int] NULL ,
[U_ChangeDate] [datetime] NULL ,
[U_ProductCode] [nvarchar] (20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_ChangeType] [smallint] NULL ,
[U_ItemCode] [nvarchar] (20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_OldItemCode] [nvarchar] (20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_Quantity] [nvarchar] (10) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_ChangedBy] [nvarchar] (20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_Remark] [nvarchar] (254) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_Machine_Name] [nvarchar] (20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_Machine_IP] [nvarchar] (20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_OldQuantity] [nvarchar] (10) COLLATE SQL_Latin1_General_CP850_CI_AS NULL
In this table , I am savinf the details of updated production orders.I want CFL for U_PODocNum.
What is the objecttype in ChooseFromListCreationParams for this table ?
Dim objPara As SAPbouiCOM.ChooseFromListCreationParams
objPara = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
objPara.MultiSelection = False
objPara.ObjectType = "93"
objPara.UniqueID = "CFL1"
objCFL = objCFLS.Add(objPara)
txtOrderNo = objForm.Items.Item("txtOrderNo").Specific
txtOrderNo.DataBind.SetBound(True, "", "DSPO")
txtOrderNo.ChooseFromListUID = "CFL1"
txtOrderNo.ChooseFromListAlias = "U_PODocNum"
I am getting error as,
Data Source - Alias Not Found
Edited by: Dilip Kumbhar on Jan 2, 2009 2:43 PM
Adele,
I created master object and registered it.The structure of table is as,
CREATE TABLE [dbo].[@U_TCHN] (
[Code] [nvarchar] (8) COLLATE SQL_Latin1_General_CP850_CI_AS NOT NULL ,
[Name] [nvarchar] (100) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[DocEntry] [int] NOT NULL ,
[Canceled] [char] (1) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[Object] [nvarchar] (20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[LogInst] [int] NULL ,
[UserSign] [int] NULL ,
[Transfered] [char] (1) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[CreateDate] [datetime] NULL ,
[CreateTime] [smallint] NULL ,
[UpdateDate] [datetime] NULL ,
[UpdateTime] [smallint] NULL ,
[DataSource] [char] (1) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_Machine_IP] [nvarchar] (20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_Machine_Name] [nvarchar] (20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_Remark] [nvarchar] (253) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_ChangedBy] [nvarchar] (20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_OldQuantity] [nvarchar] (10) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_OldItemCode] [nvarchar] (20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_Quantity] [nvarchar] (10) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_ItemCode] [nvarchar] (20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_ChangeType] [nvarchar] (30) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_ProductCode] [nvarchar] (20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL ,
[U_ChangeDate] [datetime] NULL ,
[U_PODocNum] [int] NULL
The cfl that I have created is working on the field Code.But I want cfl on the field U_PODocNum.
Similar Messages
-
Stored procedures for User Tables
Can somebody please help me with this matter?. I need to add stored procedures for user tables. Is there any way of doing so?.
Thanks in advance.
Ernesto.Ernesto,
You have posted multiple threads for the same question. Please check the other thread and close this one:
Stored procedures in User Tables
Thanks,
Gordon -
CFL for user defined object in matrix
I am creating CFL for city .For this I created a user defined table and later registred it to create the object of City.I created the CFL for City as ,
Private Sub AddCFL()
Dim intI As Integer
Dim objCFLsName As SAPbouiCOM.ChooseFromListCollection
Dim objParaName As SAPbouiCOM.ChooseFromListCreationParams
Dim objCFLName As SAPbouiCOM.ChooseFromList
Dim objCons As SAPbouiCOM.Conditions
Dim objCon As SAPbouiCOM.Condition
Try
objForm = SBO_Application.Forms.ActiveForm
For intI = 0 To objForm.DataSources.UserDataSources.Count - 1
If objForm.DataSources.UserDataSources.Item(intI).UID = "CityName" Then
Exit Sub
End If
Next
objForm.DataSources.UserDataSources.Add("CityName", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
objCFLsName = objForm.ChooseFromLists
objParaName = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
objParaName.MultiSelection = False
objParaName.UniqueID = "CFL"
objParaName.ObjectType = "City"
objCFLName = objCFLsName.Add(objParaName)
objCons = objCFLName.GetConditions
objCon = objCons.Add
objCon.Alias = "U_Active"
objCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
objCon.CondVal = "Y"
objCFLName.SetConditions(objCons)
Catch ex As Exception
SBO_Application.MessageBox("AddCFL()=" & ex.Message)
End Try
End Sub
I want to load city names in matrix using this cfl.For this, I added few blank rows in matrix.Then I binded the matrix as ,
Private Sub BindMatrix()
Dim objColumns As SAPbouiCOM.Columns
Dim objColumn As SAPbouiCOM.Column
Dim matDetails As SAPbouiCOM.Matrix
objColumn = objColumns.Item("CityName")
objColumn.DataBind.SetBound(True, "", "CityName")
objColumn.ChooseFromListUID = "CFL"
objColumn.ChooseFromListAlias = "CityName"
objColumn.Editable = True
matDetails.LoadFromDataSource()
End Sub
Problem is created by ChooseFromListAlias .It gives error as,
Data Source - Alias Not Found
If I remove that statement, the cfl fires when I press tab in the matrix.But I can not set value in the matrix.I created CFL as,
Private Sub AddCFL()
Dim intI As Integer
Dim objCFLsName As SAPbouiCOM.ChooseFromListCollection
Dim objParaName As SAPbouiCOM.ChooseFromListCreationParams
Dim objCFLName As SAPbouiCOM.ChooseFromList
Dim objCons As SAPbouiCOM.Conditions
Dim objCon As SAPbouiCOM.Condition
Try
objForm = SBO_Application.Forms.ActiveForm
For intI = 0 To objForm.DataSources.UserDataSources.Count - 1
If objForm.DataSources.UserDataSources.Item(intI).UID = "CityName" Then
Exit Sub
End If
Next
objForm.DataSources.UserDataSources.Add("CityName", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
objCFLsName = objForm.ChooseFromLists
objParaName = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
objParaName.MultiSelection = False
objParaName.UniqueID = "CFL"
objParaName.ObjectType = "City"
objCFLName = objCFLsName.Add(objParaName)
objCons = objCFLName.GetConditions
objCon = objCons.Add
objCon.Alias = "U_Active"
objCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
objCon.CondVal = "Y"
objCFLName.SetConditions(objCons)
Catch ex As Exception
SBO_Application.MessageBox("AddCFL()=" & ex.Message)
End Try
End Sub
Private Sub BindMatrix()
Dim objColumns As SAPbouiCOM.Columns
Dim objColumn As SAPbouiCOM.Column
Dim matDetails As SAPbouiCOM.Matrix
Try
If SBO_Application.Forms.ActiveForm.UniqueID = "TourDetails" Then
matDetails = SBO_Application.Forms.ActiveForm.Items.Item("matDetails").Specific
Else
matDetails = objForm.Items.Item("matDetails").Specific
End If
objColumns = matDetails.Columns
objColumn = objColumns.Item("#")
objColumn.DataBind.Bind("objDT", "#")
objColumn.Editable = False
objColumn = objColumns.Item("CityName")
'If strPara = "Edit" Then
objColumn.DataBind.Bind("objDT", "CityName")
'Else
' objColumn.DataBind.SetBound(True, "", "CityName")
'End If
objColumn.ChooseFromListUID = "CFL"
'objColumn.ChooseFromListAlias = "CityName"
objColumn.Editable = True
objColumn.Width = 290
objColumn = objColumns.Item("NoOfVisits")
objColumn.DataBind.Bind("objDT", "NoOfVisits")
objColumn.Editable = True
objColumn = objColumns.Item("FromDate")
objColumn.DataBind.Bind("objDT", "FromDate")
objColumn.Editable = True
objColumn.Width = 80
objColumn = objColumns.Item("ToDate")
objColumn.DataBind.Bind("objDT", "ToDate")
objColumn.Editable = True
objColumn.Width = 80
matDetails.LoadFromDataSource()
Catch ex As Exception
SBO_Application.MessageBox("BindMatrix()=" & ex.Message)
End Try
End Sub
Edited by: Dilip Kumbhar on Mar 31, 2010 10:02 AM -
FNDLOAD lcts for User Tables, EIT Definitions, Elements
Hi,
Can someone point me to lcts for the following :
1. HRMS user tables (structure and values)
2. EIT definition and values (Generic one or particular to Life Event Extra information)
3. Element and element link definitions.
Regards.Hi Vinayak,
We wrote our own custom LCT file to migrate Links. iSetup doesn't provide migration for element links.
Ofcourse - you may need to edit the API call as we needed few segments to migrate.
# $Header: ele_links.lct 1.0.0.0 2007/01/18 12:41:05 appldev ship $
# links.lct - LINK loader file
# -- DEFINE SECTION --
# Entities:
# LINK_INFO
# Parameters:
# BUSINESS_GROUP_ID
# ELEMENT_NAME
DEFINE LINK_INFO
KEY BUSINESS_GROUP_ID VARCHAR2(100)
KEY ELEMENT_NAME VARCHAR2(100)
BASE ELEMENT_BG_ID VARCHAR2(100)
BASE ELEMENT_LEG_CODE VARCHAR2(100)
BASE BUSINESS_GROUP_NAME VARCHAR2(100)
BASE EFFECTIVE_START_DATE VARCHAR2(100)
BASE EFFECTIVE_END_DATE VARCHAR2(100)
BASE COSTABLE_TYPE VARCHAR2(100)
BASE LINK_TO_ALL_PAYROLLS_FLAG VARCHAR2(100)
BASE MULTIPLY_VALUE_FLAG VARCHAR2(100)
BASE STANDARD_LINK_FLAG VARCHAR2(100)
BASE TRANSFER_TO_GL_FLAG VARCHAR2(100)
BASE COSTING_SEGMENT11 VARCHAR2(100)
BASE BALANCING_SEGMENT11 VARCHAR2(100)
END LINK_INFO
# -- DOWNLOAD SECTION --
# For each entity, specify the SQL statement to use to flesh out
# its entity definition. SELECT columns must be in same order and
# datatype as the entity's attributes as defined above.
# Convert dates to varchar2 using:
# to_char(sysdate, 'DD/MM/YYYY')
# Protect against null parameter passing using
# and (:parm is null or (:parm is not null and col like :parm))
# -- DOWNLOAD SECTION --
# For each entity, specify the SQL statement to use to flesh out
# its entity definition. SELECT columns must be in same order and
# datatype as the entity's attributes as defined above.
# Convert dates to varchar2 using:
# to_char(sysdate, 'DD/MM/YYYY')
# Protect against null parameter passing using
# and (:parm is null or (:parm is not null and col like :parm))
DOWNLOAD LINK_INFO
"select l.business_group_id, t.element_name,
t.business_group_id element_bg_id,
t.legislation_code element_leg_code, b.name business_group_name,
'1900/01/01 00:00:00' effective_start_date,
fnd_date.date_to_canonical(l.effective_end_date),
l.costable_type, l.link_to_all_payrolls_flag, l.multiply_value_flag,
l.standard_link_flag, l.transfer_to_gl_flag,
c.segment11 cost_seg11, bc.segment11 balance_seg11
from pay_element_links_f l, per_business_groups b, pay_element_types_f t,
pay_cost_allocation_keyflex c, pay_cost_allocation_keyflex bc
where l.business_group_id = :BUSINESS_GROUP_ID
and l.business_Group_id = b.business_group_id
and l.element_type_id = t.element_type_id
and t.element_name = nvl(:ELEMENT_NAME, t.element_name)
and trunc(sysdate) between t.effective_start_date
and t.effective_end_date
and l.cost_allocation_keyflex_id = c.cost_allocation_keyflex_id(+)
and l.balancing_keyflex_id = bc.cost_allocation_keyflex_id(+)"
# -- UPLOAD section --
# For each entity, specify the pl/sql block to use to upload the
# entity into the database. Bind names must match DEFINE attribute names.
# If the relevant tables have table handlers defined, use the LOAD_ROW
# procedure.
# Non-leaf entities must include the BEGIN keyword.
# Child entities may use bind names from their parents' definitions.
# Use command line parameters to control branching between desired behavior.
# For example, in the upload statement below, we use the parameter
# UPLOAD_MODE to specify whether we are doing a regular upload or a
# special upload of translated columns.
UPLOAD LINK_INFO
" Declare
l_tmp NUMBER;
cursor link_csr (p_bg_id NUMBER, p_et_id NUMBER) is
select element_link_id
from pay_element_links_f
where business_group_id = p_bg_id
and element_type_id = p_et_id;
cursor elem_csr (p_bg_id NUMBER, p_el_nm VARCHAR2) is
select element_type_id
from pay_element_types_f
where ((:ELEMENT_BG_ID IS NULL AND
legislation_code = :ELEMENT_LEG_CODE)
or (:ELEMENT_BG_ID IS NOT NULL AND
business_group_id = p_bg_id))
and element_name = p_el_nm;
l_bg_id NUMBER;
l_et_id NUMBER;
l_link_id NUMBER;
l_ed DATE;
l_esd DATE;
l_eed DATE;
l_comment_id NUMBER;
l_ovn NUMBER;
l_warn BOOLEAN;
l_cost_segs VARCHAR2(1000);
l_bal_segs VARCHAR2(1000);
Begin
l_bg_id := 456; --- Either hard code this or pass it as parameter...
open elem_csr (l_bg_id, :ELEMENT_NAME);
fetch elem_csr into l_et_id;
If elem_csr%NOTFOUND Then
Close elem_csr;
raise_application_error(-20001, 'Unable to find Element Name: ' ||
:ELEMENT_NAME);
End If;
Close elem_csr;
open link_csr(l_bg_id, l_et_id);
fetch link_csr into l_link_id;
If link_csr%NOTFOUND Then
close link_csr;
l_ed := fnd_date.canonical_to_date(:EFFECTIVE_START_DATE);
pay_element_link_api.create_element_link
(p_effective_date => l_ed
,p_element_type_id => l_et_id
,p_business_group_id => l_bg_id
,p_costable_type => :COSTABLE_TYPE
,p_link_to_all_payrolls_flag =>
:LINK_TO_ALL_PAYROLLS_FLAG
,p_standard_link_flag => :STANDARD_LINK_FLAG
,p_transfer_to_gl_flag => :TRANSFER_TO_GL_FLAG
,p_cost_segment11 => :COSTING_SEGMENT11
,p_balance_segment11 => :BALANCING_SEGMENT11
,p_cost_concat_segments => l_cost_segs
,p_balance_concat_segments => l_bal_segs
,p_element_link_id => l_link_id
,p_comment_id => l_comment_id
,p_object_version_number => l_ovn
,p_effective_start_date => l_esd
,p_effective_end_date => l_eed);
l_eed := fnd_date.canonical_to_date(:EFFECTIVE_END_DATE);
If l_eed != to_date('31-DEC-4712', 'DD-MON-YYYY') Then
l_ed := l_eed;
pay_element_link_api.delete_element_link
(p_effective_date => l_ed
,p_element_link_id => l_link_id
,p_datetrack_delete_mode => 'DELETE'
,p_object_version_number => l_ovn
,p_effective_start_date => l_esd
,p_effective_end_date => l_eed
,p_entries_warning => l_warn);
End If;
Else
dbms_output.put_line('Link already exists for element: ' || :ELEMENT_NAME);
End If;
End; "
Edited by: vaibhav468 on Sep 28, 2009 4:44 PM -
Creating reports for user tables using XL reporter
Hi all
i wish to create a report based on user tables using the XL reporter.
question is: is it possible? and if so how can it be done?
appreciate the help
YoavHi Yoav,
XL Reporter cannot pull data from UDTs. However, you can use an Excel template when creating your XL Reporter report and then embed VBA code in the template to pull the UDT data in to the report after the XL Reporter has finished generating the report. It all depends on how you need to combine the UDT data with other SBO data. If you are interested in a report based entirely on UDT data then it would be simpler just to write the report using VBA in Excel (or Crystal).
Kind Regards,
Owen -
Make CFL for user defined tables in Crystal Report 8.8 ?
Hi Experts
Use Follwing qry for CFL ( user defined tables) in Crystal Report But its not Show CFL after run the Report in SAP B1 8.8
Period@Select T0.* from @OICC T0
Thanks & Regards
Dinesh LadeHi,
As far as i know, SBO can't figure out in such instance what are you doing, try linking it to an original table.
I usually use OADM for this purpose.
Hope this helps.
Regards,
Daniel -
How to popup form according to query by CFL for user defined tables?
Hi Experts!
Please write a simple code for adding CFL in UDO and popup the window according to query. suppose i want to execute query
"select code,name from [@WITM]". I want to add CFL in edittext which is on UDO. how can we add CFL in that Edittext by code.
Thanking You
vishwajit kumarHi Vishwajit,
Please response to your previous posting or close it first. Whatever the answer working or not, you need reply.
Thanks,
Gordon -
Authorization for User Table (User-Defined Windows)
Hi Experts
I want to restrict access for specific users to User Defined Tables. Is this possible?
Regards
NabeelYou can do it by using Additional Authorization Creator Winow
1. Open Additional Authorization Creator Window.
2. Click on 'Add Same Level ' Button
3. On the Right side window, Type in
Authorization ID = 'Activity Subject'
Name = 'Activity Subject'
Option = 'Full/ ReadOnly/ No Authorization"
4. In form ID, press 'Edit Butto' and type Form Id of the UDT
5. press OK to close this window
6. Open 'General Authorization' Screen
7. On the Right Side, navigate 'User Authorization'
8. Scroll down ''Activity Subject' and select the user and Set appropriate authorization('Full/ ReadOnly/ No Authorization")
9. Now Log off and Login with user.
You can see the authorization in effect.
Similarly you can do for any window which are missing in 'General Authorization' -
hi,
I need to set a item groups in cfl for user defined form
thanks & Regards
B.Lakshmi NarayananHI ,
First u create UDT for Itemgroup and put value in UDT.
And UDT table assign in Form when open Item group.
Regards
kalpen -
Formatted search on User Table
Hi..,
I need to set formatted search for user table which is @DCNR . My Requirement is that i need to Pick CST NO from BP Master . In my user screen i had taken CARDCODE value using CFL which is binded to the field U_ven in the table @DCNR.Using this CARDCODE value i need to pick CSTNO from BP master to the user screen which is binded to the table (@DCNR).My Query is as follows but it is not working,
SELECT crd7.taxid1 from crd7 inner join @dcnr on crd7.cardcode = @dcnr.u_ven where crd7.cardcode = $[@dcnr.u_ven]
U_VEN field contains card code value.
Do i need to follow some other terms in order to write formatted search on user table.
Hope some one would help to fix this problem.
thank u,
-Ashok KrishnanDear Mr Krishnan,
As a starting poing I would suggest reading these documents regarding UDF and Formatted search:
https://websmp108.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_HIER_KEY=701100035871000437965&_OBJECT=011000358700004463532006E&_SCENARIO=01100035870000000183&
https://websmp108.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_HIER_KEY=701100035871000437965&_OBJECT=011000358700003625432006E&_SCENARIO=01100035870000000183&
let us know if they were usefull.
Kind Regards,
Marcella Rivi
SAP Business One Forums Team
Edited by: Paul Finneran on Aug 14, 2008 1:15 PM -
Reasons to use separate temp tablespace for user tablespace
Hi,
I know that guideline says is not use system tablespace for user tables. But need i create for user tablespace separate TEMP teblespace or i can use same TEMP tablespace for all tablespaces?Hi,
>>But need i create for user tablespace separate TEMP tablespace or i can use same TEMP tablespace for all tablespaces?
You can use one temp tablespace for a database , Temp tablespace usage are for sorting the data.
for more detail you can go with :Creating Tablespaces
HTH -
How to Create CFL to user defined table
Hi all,
I have a user table with four fields. How to create a CFL for these fields?
Regards,
Fabio Ferreira.this is sub fn required for registration
Here i mentioned heder level table and child table
Fields are mentioned will be displayed on CFL
If u want assign this CFL to any text field assign normal way but object id is:VEDA_PRN_WR_DOC
Public Function UDOExists(ByVal code As String) As Boolean
GC.Collect()
Dim v_UDOMD As SAPbobsCOM.UserObjectsMD
Dim v_ReturnCode As Boolean
v_UDOMD = objMain.objUtilities.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
v_ReturnCode = v_UDOMD.GetByKey(code)
System.Runtime.InteropServices.Marshal.ReleaseComObject(v_UDOMD)
v_UDOMD = Nothing
Return v_ReturnCode
End Function
'Second fn
Function registerUDO(ByVal UDOCode As String, ByVal UDOName As String, ByVal UDOType As SAPbobsCOM.BoUDOObjType, ByVal findAliasNDescription As String(,), ByVal parentTableName As String, Optional ByVal childTable1 As String = "", Optional ByVal childTable2 As String = "", Optional ByVal childTable3 As String = "", Optional ByVal LogOption As SAPbobsCOM.BoYesNoEnum = SAPbobsCOM.BoYesNoEnum.tNO) As Boolean
Dim actionSuccess As Boolean = False
Try
registerUDO = False
Dim v_udoMD As SAPbobsCOM.UserObjectsMD
v_udoMD = objMain.objUtilities.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
v_udoMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tNO
v_udoMD.CanClose = SAPbobsCOM.BoYesNoEnum.tNO
v_udoMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO
v_udoMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
v_udoMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
v_udoMD.CanLog = LogOption
v_udoMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tYES
v_udoMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES
v_udoMD.Code = UDOCode
v_udoMD.Name = UDOName
v_udoMD.TableName = parentTableName
If LogOption = SAPbobsCOM.BoYesNoEnum.tYES Then
v_udoMD.LogTableName = "A" & parentTableName
End If
v_udoMD.ObjectType = UDOType
For i As Int16 = 0 To findAliasNDescription.GetLength(0) - 1
If i > 0 Then v_udoMD.FindColumns.Add()
v_udoMD.FindColumns.ColumnAlias = findAliasNDescription(i, 0)
v_udoMD.FindColumns.ColumnDescription = findAliasNDescription(i, 1)
Next
If childTable1 <> "" Then
v_udoMD.ChildTables.TableName = childTable1
v_udoMD.ChildTables.Add()
End If
If childTable2 <> "" Then
v_udoMD.ChildTables.TableName = childTable2
v_udoMD.ChildTables.Add()
End If
If childTable3 <> "" Then
v_udoMD.ChildTables.TableName = childTable3
v_udoMD.ChildTables.Add()
End If
If v_udoMD.Add() = 0 Then
registerUDO = True
objMain.objApplication.StatusBar.SetText("Successfully Registered UDO >" & UDOCode & ">" & UDOName & " >" & objMain.objCompany.GetLastErrorDescription, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
Else
objMain.objApplication.StatusBar.SetText("Failed to Register UDO >" & UDOCode & ">" & UDOName & " >" & objMain.objCompany.GetLastErrorDescription, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
registerUDO = False
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(v_udoMD)
v_udoMD = Nothing
GC.Collect()
Catch ex As Exception
End Try
End Function
This is a code for registration of table that will create CFL with mentioned fields.
Hope help this
By
firos.C
Edited by: firoz101 on Aug 18, 2009 6:07 AM
Edited by: firoz101 on Aug 18, 2009 6:08 AM
Edited by: firoz101 on Aug 18, 2009 6:08 AM -
Not able to figure out the table index for Edit table User Properties Dialo
Studio Edition Version 11.1.1.0.0
Build JDEVADF_MAIN.D5PRIME_GENERIC_080403.0915.4920
I'm trying to automate the various features in Jdeveloper dialogs. At one point I got struck with table in Edit Table Dialog.
Right Click on New -> Database Tier-> Select APPS: Import to offline database Objects. Step 1- Step5 dialogs comes up. Click on Next till finish button comes up. After that one table along with xdf file will be shown in the Jdeveloper Tree Menu. Right click on Table, Go to Properties. Then Select User Properties in the Left Pane. On Right Side table will be shown. I want to know what is the index for this table and also I need to input certain text and select some drop downs from this table.
Automation Tool: JFCUnit
Could you please tell how can I put values in some of the fields and select the values from the drop downs.
Kindly let me know if you need any more Information for the same.Hi,
if you are from Oracle, please use an internal forum. If not, the JDeveloper 11 forum is at: JDeveloper and OC4J 11g Technology Preview
Frank -
User Datastore for multiple tables and columns!
Hi,
I hop so much, someone can help me.
I've made a user datastore to index multiple columns of multiple tables.
Now, the Documentation of Oracle explains the idexing of one table.
I have multiple tables, which have all, the columns descr and tagnr. I want to make a query sth like this:
select table1.column, table2.columnd... where contains(indexed field,'gas within descr',1)>0
is it possible to index 4 seperate tables, without having a collective key? I dont want to make a Concatenated Datastore.
I have wrote this code.
But it doesn't work. It's been compiled fine. But I don't get any result with my queries.
create or replace
procedure My_Proc_Wide
Must be in ctxsys schema.
In a full-scale example, this would be a wrapper
for a proc in the user schema.
rid in rowid,
tlob in out NOCOPY clob /* NOCOPY instructs Oracle to pass
this argument as fast as possible */
is
v_descr varchar2(80);
v_tagnr varchar2(30);
v_descr_name constant varchar2(20) := 'descr';
v_descr_start_tag constant varchar2(20) := '<' || v_descr_name || '>';
v_descr_end_tag constant varchar2(20) := '</' || v_descr_name || '>';
v_tagnr_name constant varchar2(20) := 'tagnr';
v_tagnr_start_tag constant varchar2(20) := '<' || v_tagnr_name || '>';
v_tagnr_end_tag constant varchar2(20) := '</' || v_tagnr_name || '>';
v_buffer varchar2(4000);
v_length integer;
begin
/* verify the env which called this */
if Dbms_Lob.Istemporary ( tlob ) <> 1
then
raise_application_error ( -20000,
'"IN OUT" tlob isn''t temporary' );
end if;
/* the real logic */
/* first tabel to be indexed */
select t1.tagnr, t1.descr
into v_tagnr, v_descr
from tweb.pdp_positions t1
where t1.rowid = rid;
v_buffer := v_tagnr_start_tag ||
v_tagnr ||
v_tagnr_end_tag ||
v_descr_start_tag ||
v_descr ||
v_descr_end_tag;
v_length := length ( v_buffer );
Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
/* second table to be indexed */
select t2.tagnr, t2.descr
into v_tagnr, v_descr
from tweb.pdp_schema_equ t2
where t2.rowid = rid;
v_buffer := v_tagnr_start_tag ||
v_tagnr ||
v_tagnr_end_tag ||
v_descr_start_tag ||
v_descr ||
v_descr_end_tag;
v_length := length ( v_buffer );
Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
/*third table to be indexed */
select t3.tagnr, t3.descr
into v_tagnr, v_descr
from tweb.pdp_equipment t3
where t3.rowid = rid;
v_buffer := v_tagnr_start_tag ||
v_tagnr ||
v_tagnr_end_tag ||
v_descr_start_tag ||
v_descr ||
v_descr_end_tag;
v_length := length ( v_buffer );
Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
/* fourth table to be indexed */
select t4.tagnr, t4.descr
into v_tagnr, v_descr
from tweb.pdp_Projcode t4
where t4.rowid = rid;
v_buffer := v_tagnr_start_tag ||
v_tagnr ||
v_tagnr_end_tag ||
v_descr_start_tag ||
v_descr ||
v_descr_end_tag;
v_length := length ( v_buffer );
Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
end My_Proc_Wide;
what have I to do, to make this work?
Any Help would be appriciated!!
Kind Regards,
ArsinehArsineh,
I realise that it has been quite some time since you posted this question but I thought I'd reply just in case you never did manage to get your user datastore working.
The reason your procedure will not work is simple. A user datastore procedure accepts a rowid input parameter. The rowid is the ID of the row that Oracle Text is currently trying to index. In the example you have given, you are attempting to use the supplied rowid as the primary key for multiple tables, this will simply never work as the rowid's across multiple tables will never correspond.
The best way to achieve your goal is to create the index on a master table which contains the common primary keys for each of your four tables e.g.
MASTER_TABLE
COL:COMMON_KEY (NUMBER(n))
COL:USER_INDEX_COLUMN (VARCHAR2(1))
If you create the user datastore index on the MASTER_TABLE.USER_UNDEX_COLUMN column your stored proc simply needs to read the correct row from the MASTER_TABLE (SELECT t.common_key into v_CommonKey FROM master_table t WHERE t.rowid = rid) and issue subsequent queries to extract the relavant data from the t1..t4 tables using the common key e.g.
SELECT t1.tagnr, t1.descr into v_tagnr, v_descr FROM t1 WHERE t1.[PRIMARY_KEY_FIELD] = v_CommonKey;
SELECT t2.tagnr, t2.descr into v_tagnr, v_descr FROM t2 WHERE t2.[PRIMARY_KEY_FIELD] = v_CommonKey;
and so on...
Hope this helps
Dean -
Authorization scheme for users stored in a database table?
Hello!
I'm trying to find out how to make an authorization scheme for database users.
I first made an authentication scheme for my current application, I named it "Authentication for database accounts", and the scheme type is "Database Accounts".
A word of explanation:_
I have a table in my database, named "USERS". Inside this table, I have the following columns:
- USERID (NUMBER)
- USERNAME (VARCHAR2(50))
- PASSWORD (VARCHAR2(50))
- EMAIL (VARCHAR2(200))
For this question, I'll take an example user. The username is USER and the password is USER. Email and UserID don't matter here, but let's just say the UserID is 1.
What I want:_
When you go to the application, and you are requested to log in (page 101), then I want a user to be able to log in with the data that has been stored in the USERS table.
So, on the login page, the user will enter USER as username, and USER as password. The authorization scheme then needs to check whether or not this username and password match the data in the USERS table. If it does, then it must sign the user in with the credentials the user entered (those being USER and USER).
I also want the UserID to be stored somewhere in the application (if possible, in an application item).
How do I do this? I've never made an authorization scheme before... I'm not too good with PL/SQL either, but I'm working on that part.
Any help is greatly appreciated.I'm trying to find out how to make an authorization scheme for database users. I think there may be some confusion here. An authorization scheme gives the user access to different parts of an Apex Application. Database users are the users that you use to login to the database, for example with sqlplus.
From the rest of your post it sounds like you need a custom authentication scheme to validate users against a custom table. For this you need to create a custom authentication scheme and select use my custom function to authenticate. Exactly how you set up the authentication scheme depends on the version of Apex you are using. But an example of validate user function you could use is given below:
function validate_login (
p_username in varchar2
, p_password in varchar2) return boolean
is
v_result varchar2(1);
begin
select null into v_result
from USERS
where userid = p_username
and password = p_password;
return true;
when no_data_found then return false;
end validate_login;Once the user has successfully logged on the userid will be in the APP_USER apex substitution string.
And for Application Express Account Credentials, does this mean an admin must make each new user by hand?If you using Apex account credentials the user details are stored within the Apex tables. You can create users using the Apex admin application or by using the APEX_UTIL.create_user api.
Rod West
Maybe you are looking for
-
The title says itself. It's almost instant. I click on Numbers, and the crash report appears immediately: Process: Numbers [667] Path: /Applications/iWork '09/Numbers.app/Contents/MacOS/Numbers Identifier: com.apple.iWork.Numbers Version: ??? (???) B
-
I've tried this once before, where I got a text message from a person, whom I would like to add to my contacts. Even though I tried it several times I did not succeed. Has anyone an idea of why and how to solve this? Best regards Steen
-
Why won't the TV Signal setting stay as I set it?
I asked this question somewhere on this site a while back about my iPhone on iOS 4 but can't find the original posting... so this time I'm going to try on the iPad thread instead. So... I plug in my composite video lead. I go to the TV Out options an
-
Hi, I would like to know if its possible to get a report each day that shows the successful or unsuccessful status of the Software Update Point. I can see it in the console under Monitoring, but I really need an email sent to me on a daily basis tha
-
Installing Int Pio DVR-110 Drive -recognition/bootability ?s
Visiting mother in WY. Her CD has not worked in long tiime. I hooked up Firewire DC ext. drive to boot from for maintenance, etc., but now want to iinstall Tiger and iLife 6 etc. . I'm on vacation and nervous about the installation. Can anyone direct