DI Sever for User Defined Table
Hai Guys,
I am using B1WS web service. I want to post values to User Defined Table (EX: @TableName) using web services,is there any services for User Defined Table in Web Services
please give me a solution for this..
Hello madhu,
B1WS is unable to access UDT. But DI Server can access UDT with RecordSet
SOAP Request Message:
<?xml version="1.0" encoding="UTF-16"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<SessionID>4FFCFAA3-5493-456A-BC89-410B35AF096C</SessionID>
</env:Header>
<env:Body>
<dis:ExecuteSQL xmlns:dis="http://www.sap.com/SBO/DIS">
<DoQuery>SELECT OCRD.CardCode, OCRD.CardName, OCPR.Name FROM OCRD
JOIN OCPR ON OCRD.CardCode = OCPR.CardCode
WHERE OCRD.CardCode IN (SELECT DISTINCT ORDN.CardCode FROM ORDN)</DoQuery>
</dis:ExecuteSQL>
</env:Body>
</env:Envelope>
SOAP Response Message:
<?xml version="1.0"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body><ExecuteSQLResponse xmlns="http://www.sap.com/SBO/DIS"><BOM><BO><AdmInfo><Object>oRecordset</Object></AdmInfo>
<OCRD><row><CardCode>C002</CardCode><CardName>SAP</CardName><Name>2</Name></row><row><CardCode>C002</CardCode>
<CardName>SAP</CardName><Name>l</Name></row><row><CardCode>C002</CardCode><CardName>SAP</CardName><Name>Z</Name>
</row></OCRD></BO></BOM></ExecuteSQLResponse></env:Body></env:Envelope>
Kind Regards
-Yatsea
Similar Messages
-
What is the Object Type for User Define table ?
Dear All Experts,
I create one of the User Define Table with no. of UDF's
I already register User Define Table with Unique ID.
As per my knowledge, Unique ID is our Object type for that User Define Table.
I want to add Transaction Notification Code for created Used Define Table.
This Transaction Notification prevents user to must enter name in that form.
IF (@object_type = 'Z_Roto' AND (@TRANSACTION_TYPE = 'A' or @TRANSACTION_TYPE = 'U'))
BEGIN
If not Exists (Select T0.DocEntry from [@Z_ROTO] T0 Where ( T0.Name is null OR T0.Name = ' ' ) AND T0.Code = @list_of_cols_val_tab_del )
begin
SET @error = 1
SET @error_message = 'Name is NULL then So, Please enter ZERO Value i.e. 0 in Filed_Name'
End
End
Please help me for this problem.
Thanks & Regards,
Nishit MakadiaHi All,
Thanks for your replay.
Below code is working for User Define Table's Transaction Notification
IF (@transaction_type = 'A' OR @transaction_type = 'U') AND @object_type = 'Z_Roto'
BEGIN
If Exists (Select T0.Code from [@Z_ROTO] T0 Where ( T0.Name is null OR T0.Name = ' ' ) AND T0.Code = @list_of_cols_val_tab_del)
begin
select @error = 10
select @error_message = 'Name is NULL then So, Please enter ZERO Value i.e. 0 in Filed_Name'
End
End
Necessary to Remember 4 Things. That are mentioned below.
1) Register User Define Table (UDT) with using "Object Registration Wizard". For Example : @object_type = 'Z_Roto'
2) When you define selection criteria then it must be compulsory for use Code Field. For Example : Select T0.Code from [@Z_Roto]
3) When you define selection criteria then it must be compulsory for use Code for @list_of_cols_val_tab_del.
4) Use error code as 10 Number
Thanks & Regards,
Nishit Makadia -
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 -
User-Defined Table Types - Where is it in SQL Server 2008?
I am having 2 issues:
1. I don't see a folder for 'User-Defined Table Types' under programmability-->Types
2. When I execute the following code to create a Type; I get an error 'Incorrect syntax near the keyword 'AS'.'
USE Locations;
GO
/* Create a user-defined table type */
CREATE TYPE LocationTableType AS TABLE
( LocationName VARCHAR(50)
, CostRate INT );
GOHi Shayann,
The user-defined table type is a new
feature from SQL Server 2008. If you want to use it you have to upgrade your database to SQL Server 2008 or above.
In you scenario(SQL Server 2005),as a workaround, you can use the local temporary table instead.
--in SQL Server 2005
CREATE TABLE tblType(id INT,name VARCHAR(99))
GO
CREATE PROC proc1
AS
BEGIN
SELECT * FROM #temp;
END
GO
SELECT * INTO #temp FROM tblType; -- the #temp name is fixed
INSERT INTO #temp VALUES(1,'Eric');
EXEC proc1
--In SQL Server 2008 or above
CREATE TYPE LocationTableType AS TABLE
( id INT,
name VARCHAR(99) );
GO
CREATE PROC proc1 @t LocationTableType READONLY
AS
BEGIN
SELECT * FROM @t
END
GO
DECLARE @t LocationTableType;
INSERT INTO @t VALUES(1,'Eric');
EXEC proc1 @t
I still suggest you upgrade to higher SQL Server.
If you have any question, feel free to let me know.
Best regards,
Eric -
How to pop-up a text box for a grid item on a user defined table?
Hello,
I have a user defined table with a grid & one of the columns is for comments. What I'm trying to do is to pop up a text box when double clicking in the column field. This would be the same as the Item Details column in the Sales Order ittems grid.
Thanks,
RonPlease post your question on SDK forum. Only SDK could meet your need.
Thanks,
Gordon -
Help needed for data updation in User Defined Tables
Hello Experts,
I am developing one add-on in SAP B1 8.8 to input data in a User Defined Table described as under
Table Name
DriverMst UDT Type is No Object
Description
Stores the Driver master data which are used to get reference in Sale Delivery Form and Driver data management activity
User defined fields
Data Name
Data source
Size
Pane Level
Description
Driver Code
Code
Alphanumeric
0
No object table fixed field
System Name
Name
Alphanumeric
30
0
No object table fixed field
Full Name
FullName
Text
50
0
Father Name
FatherName
Text
50
0
Birth Date
BirthDate
Date
0
Phone Number
PhoneNo
Alphanumeric
50
0
Mobile No
MobileNo
Alphanumeric
13
0
I have created one form using screen painter displaying text boxes and bind them to the table.
This form is working absolutely fine when there are some data in table (i.e. Browse using navigation)
My problem is, when I click add button from tool bar the "OK" button turn to "Add" that means the form is set to Add mode, but when I click "Add" button after entering some data nothing happens and input data is not stored in Table. The same "OK" Button turned to "Update" when I do changes in loaded data, but my changes are not reflected to table after I click "Update".Thanks Nagarajan,
None.
There is no such query. The table fields is directly linked to Edit Box or Combo Box in form.
From the examples I learned that I have to do something like this to get my table updated
Dim oUsrTbl As SAPbobsCOM.UserTable
Dim Res As Integer
oUsrTbl = oCompany.UserTables.Item("DRIVERMST")
oUsrTbl.Code = oBPC.Value 'Item Specific of Driver Code Edit Box
oUsrTbl.Name = Left(oBPN.Value, 30) 'Item Specific of Name Edit Box
oUsrTbl.UserFields.Fields.Item("U_FullName").Value = oMFN.Value
oUsrTbl.UserFields.Fields.Item("U_FatherName").Value = oFTHN.Value
oUsrTbl.UserFields.Fields.Item("U_BirthDate").Value = oDOB.Value
oUsrTbl.UserFields.Fields.Item("U_PhoneNo").Value = oPHN.Value
(Similar For rest ofthe fields)
Res = oUsrTbl.Add()
Just let me know that is this necessary to do like above.. To be frank there are few more fields and matrices on the form which I didn't mentioned. I am just trying to get recovered from first step to proceed further.
Regards -
Use SP Transaction Notification for trigger on user defined table
Hi i need some help. I have a user defined table in sap (@LAU_ACCT) .
I need way to catch the event on the table (update , delete , add).
I heard about SP Transaction Notification , but how use it with udt ?
Thanks!Hi Pavel,
it is only possible if the UDT is registered as part of an object ( UDO ) - further info http://scn.sap.com/thread/3277846 . So for pure UDT actions you have to find another way ( SQL trigger, UI API, periodic query ).
regards,
Maik -
Print Layout to User Defined Table
Hello guyz..
I want a make preprinted for my user query from user defined table where the header information is from another query.
I guess, the base template User Report (system) can only show the repetitve data from one query but the header area is not,
could you help, showing the header information from another query ??
Thanks RegardsRia
The word is that you cannot use the PLD with user defined tables (i wish it was possible). So in any case to do that you have to use third party tools such as Crystal Reports and Reporting Services -
How to fill the records from a User Define Table to PO item Grid
Hi To all,
I need to fill data from User Define table records into Purchase Order Item Grid.
I created an UDF Filed in PO - Header Part - "PRS"(Filed Name)
By using Formatted Search in itemcode column, i called a query,
"Select itemcode, qty from (@user define tablename) where PRS = $http://OPOR.U_PRS"
For eg:
Output from querry
ItemCode Qty
ABC 1
DEF 2
DFG 7
SDGD 9
By using formatted search it is filling only first data in to itemcode column in PO Grid.
Please help, how can i fill ALL the data in to my PO Grid?
Thanks in Advance
SAGARThe easisest way is to create datasource and the result bind to grid.
Datasource:
oDBDataSource = oForm.DataSources.DBDataSources.Add("@usertablename")
Dim xoConditions As SAPbouiCOM.Conditions
Dim xoCondition As SAPbouiCOM.Condition
xoConditions = New SAPbouiCOM.Conditions
xoCondition = xoConditions.Add
xoCondition.BracketOpenNum = 1
xoCondition.Alias = "u_zn"
xoCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
xoCondition.CondVal = "cond"
xoCondition.BracketCloseNum = 1
oDBDataSource.Query(xoConditions)
binding (example for matrix, in grid is simillar)
oMatrix.Clear()
Dim cols As SAPbouiCOM.Columns
Dim column As SAPbouiCOM.Column
cols = oMatrix.Columns
column = cols.Item("colX")
column.DataBind.SetBound(True, "@usertable", "u_x")
oMatrix.LoadFromDataSource()
hoep it helps
Petr -
Error creating user defined tables: Ref count (-1120)
Hi all !
I have to create user defined tables per code, so I wrote <b>2 main functions</b>, first <i>to create a table</i> (with TableName,TableType and TableDescription properties)and and <i>second to add fields</i> (to a certain table which is sent as parameter).
I call these functions to create multiple tables. For the first 6 tables it works totally ok. But beginning from the 7th table it gives that "<b>Ref count for this object is higher then 0.</b> " (-1120) error. All parameters are ok just as the first 6 tables.
Found such an explanation like below in help files.
<i>The DI API allows only one instance of a meta data object at a time. This maintains data integrity by preventing any manipulation of a business object while modifying the object's user fields. Therefore, verify that no other DI object is active except the meta data object.</i>
But why do I get such an error after sixth call of the function (but not beginning from the second table )?Gül,
Have you tried doing some grbage collection?
Search for a topic: "Add Usertables and Fields while having a recordset"
HTH
Juha -
Error while adding records in user defined table
Dear all,
I am adding a record in user defined table using .add() method. the code is given below. while adding it raises the following error
"-1[Microsoft] [SQL Native Client] [SQL Server] Conversion failed when converting the nvarchar value '-3 @BG_MAILSETTINGS' to data type int. (CINF). "
All the fields are varchar date type.
Dim oUDT As SAPbobsCOM.UserTable
oUDT = oCompany.UserTables.Item("BG_MAILSETTINGS")
With oForm.DataSources.UserDataSources
oUDT.Code = "1"
oUDT.Name = "SMTPSERVER"
oUDT.UserFields.Fields.Item("U_SERVER").Value = .Item("EDTSMTPSVR").ValueEx
oUDT.UserFields.Fields.Item("U_EMAIL").Value = .Item("EDTFEMAIL").ValueEx
oUDT.UserFields.Fields.Item("U_PORT").Value = .Item("EDTSMTPPRT").ValueEx
oUDT.UserFields.Fields.Item("U_USERNAME").Value = .Item("EDTSMTPUSR").ValueEx
oUDT.UserFields.Fields.Item("U_PASSWORD").Value = .Item("EDTSMTPPWD").ValueEx
oUDT.UserFields.Fields.Item("U_AUTHENT").Value = .Item("CMBSMTPAUT").ValueEx
K = oUDT.Add
If K <> 0 Then
oCompany.GetLastError(iErrCode, sErrMsg)
MsgBox(CStr(iErrCode) & "-" & sErrMsg, vbCritical, "Error")
Exit Sub
End If
End with
Could any one please say the solution for this.
Many thanks,
Manikandan.
Edited by: Rui Pereira on Dec 23, 2008 3:49 PMDear Manikandan P,
Is there any change and check in stored procedure SBO_SP_TransactionNotification?
Best Regards
Jane Jing
SAP Business One Forums team
Edited by: Rui Pereira on Dec 23, 2008 3:56 PM -
Creating user defined table in SBO-COMMON
Hello experts,
I'd like to create a user defined table in SBO-COMMON. I'll tell you why:
I have successfully created a SAP B1 addon which adds freight costs to an order if the total amount is under a certain threshold. We have 2 administrations running, a live one and a test administration. We have put the connectionstring to determine the expense code of the freight costs in the exe.config-file of the addon.
We want to be able to point the addon from one administration to the other by modifying only one value, a centralized value, independent of SAP administration. The most proper way to do that in my opinion is to put it in SBO-COMMON and the only logical way to do that is a user defined table in SBO-COMMON.
Is there such a way?
My alternative is to abuse another database on the server and just add the info there, but I'd prefer to store it in SBO-COMMON.
Thanks for your time!
VincentUDT cannot be created in sbo-common. You may create new db and work with table in this db (but it will be not UDT, but standard sql table), or create new company db only for this purposes and create UDT there.
-
Error while linking user defined table to user defined field using vb6.0
Hi,
I am creating a userdefined field on a SAPB1 table(PDN1) using vb 6.0
I am trying to link this field to a user defined table.
When i do that i get the following error:
"The field 'Related table' should consist of 8 alphanumeric chracters with no valid or default values"
When i try to do the same thing from SAPB1(not using code) there is no such problem.
My vb code is as follows:
Set oUserFieldsMD = oCmp.GetBusinessObject(oUserFields)
oUserFieldsMD.TableName = "PDN1"
oUserFieldsMD.Name = "OB_Locn"
oUserFieldsMD.Description = "WH Location"
oUserFieldsMD.Type = db_Alpha
oUserFieldsMD.EditSize = 30
lRetCode = oUserFieldsMD.Add
If lRetCode <> 0 Then
oCmp.GetLastError lErrCode, sErrMsg
MsgBox sErrMsg
GoTo Err_
End If
If Not oUserFieldsMD.GetByKey("PDN1", 0) Then
MsgBox "Error"
GoTo Err_
End If
oUserFieldsMD.LinkedTable = "OB_TEST"
lRetCode = oUserFieldsMD.Update
Your help will be much appreciated.
Thanks.Great Sébastien!
Looks like we could not survive here one day without your contribution
Best regards,
Frank
PS: For readers of this thread who don't understand why
EditSize
must be "8":
This is the size of the
Code
field in the user-defined table to which the new field OB_Locn (in the DB it will be U_OB_Locn) is linked to...
So, it should be preferrably of the same size. -
User defined table types sometimes show up a unknown data type in Profiler
A couple of our users have a problem when using user defined table types. Calls are made using UDTT as variables and these are then passed to a stored procedure as parameters. Sometimes the application returns a timeout. In such situations a Profiler-Trace
shows the following:
declare @p4 unknown
whereas the correct trace (that is sometimes displayed) should be:
declare @p4 dbo.ReportFilterTableType
ReportFilterTableType is a UDTT. The users do have correct permissions for the UDTT (otherwise they would never be usable for the user). What could be the reason that the data types for the variable
@p4 in the example are sometimes returned as unknown and at other times are returned correctly as
ReportFilterTableType? Could this possibly be a network related issue?
Thank you.
Graham Goodwin Email: [email protected]I know this is a old post, but i am also facing the same issue that too in my production server. Did you find any workarround for this issue. Please do reply. Critical problem we are facing.
Alka, Is your problem timeouts when passing TVP parameters, or is it that a Profiler Trace shows type "unknown" for the TVP data type name?
If your problem is timeouts, be aware that TVPs do not have statistics so the optimizer might not be able to generate an optimal plan for non-trivial queries. Declaring a primary key or unique constraint on the table type may help since that will provide
useful cardinality information. You may need to resort to hints in some cases.
I suggest you start a new thread with details of your specific situation if the information in this thread doesn't help.
Dan Guzman, SQL Server MVP, http://www.dbdelta.com
Maybe you are looking for
-
How can I transfer all my files and songs on my iPod to my computer?
I recently got a new computer and all my old files and songs were lost with this new computer. I still have everything saved onto my iPod, but I'd like to take all these files and songs and save them into my computer, or atleast my iPod library. Is t
-
Multiple contract creation in ECC from a single GOA
Hi Experts, I am working on a solution regarding to GOA in SRM - Contract in ECC creation and i am wondering about the following scenario: Create 1 GOA in SRM 5.0 for a central/global purchasing organization and when the appropriate BADI going to tra
-
B2B 11g: Getting File Name in inbound integration and passing it to SOA
Hi, I am Reading a EDI x12 file in inbound B2B .I am checking the 'preserve File Name' check Box at Listening channel properties.....Then Integrating B2B to soa using AQ Adapter.But I couldn't find any property where I can pass the file name which I
-
Song download grayed out in iTunes-- plays on iPhone
I recently pre-ordered an album on iTunes. One track was supposed to be instantly downloaded. I hit check for available downloads and the song showed up in my iTunes library, but grayed out with a dotted circle to its left. However, I just looked
-
i tried cleaning my disk and reinstalling audition to a different hard drive