Order a datasource to load a binded matrix
Hello,
I want to load a matrix from a datasource. The problem is that I need the datasource ordered in a specific way.
¿Is it possible?
Thanks in advance
Hi,
anything loaded from DBDataSource into matrix is ordered by Code. No matter what you do, it is loaded into matrix by primary key...
There's possibility, to create similiar userTable, with similiar userFields, and when loading the matrix, remove all items from it, and put there new items, which will be shown.
be carefull when creating the "code" column, because the matrix will be ordered by it ... so the entry with code 10, will be before 9, and so on ...
it's wise, to format Code in insert to more characters 8, and insert there zeroes ... thus 00000009 will be shown before 00000010 ...
... and ofcourse, when handling bigger tables, it is kinda slow
...and don't forget to change "source" table, instead the one, which is "shown" in matrix ...
Regards,
Jaro
Similar Messages
-
Can any one tell me How to load data in matrix from user table
Hi,
we need to load data to matrix when page loads. After loading data we should add row to that matrix and update the values in database without effecting previous data. It should have functionality like UDO Default Form. Can any help me out in this issue.
Regards,Hi Souji,
try this,
SAPbouiCOM.Form oForm;
SAPbouiCOM.DataTable DBTable;
SAPbouiCOM.DBDataSource dbDatasource;
string strqry;
oForm = SBO_Application.Forms.Item("FormUID");
int i;
SAPbouiCOM.Item oitem;
oitem = oForm.Items.Item("ItemUID");
objMatrix = (SAPbouiCOM.Matrix)oitem.Specific;
objMatrix.AddRow(1, objMatrix.RowCount + 1);
dbDatasource = (SAPbouiCOM.DBDataSourceoForm.DataSources.DBDataSources.Item("TableName");
DBTable= oForm.DataSources.DataTables.Add("UniqueName");
strqry = "paste Query that you want to fetch";
DBTableActivity.ExecuteQuery(strqry);
for (i = 0; i <= DBTable.Rows.Count - 1; i++)
objMatrix.FlushToDataSource();
dbDatasource.SetValue("column1(name)", i, System.Convert.ToString(DBTable.GetValue(0, i)));
dbDatasource.SetValue("column2(name)", i, System.Convert.ToString(DBTable.GetValue(1, i)));
dbDatasource.SetValue("column3(name)", i, System.Convert.ToString(DBTable.GetValue(2, i)));
dbDatasource.InsertRecord(i + 1);
objMatrix.LoadFromDataSource();
If it helps you, give me the reward points.
Thanks
Sravan Kumar Pothu -
How to create generic text datasource to load text data?
met issue in generic master data load
Hi,
please see above link for detail infomation regarding the attribute data load. now the language and description column of the infoobject s_saled is empty. i need to create a generic text datasource to load data from R3 to BW. the table which i use to extract attribute data is VBAK, but i don't find any filed relate to language and description.
met issue in generic master data load
can anyone tell me how to load the text data?
thanks very much.
Eileenhi eileen,
go to transactio rso2 in your source system ie r/3.
there u have three three fields for transaction data
attributes.
text.
choose text and proceed as u did for trancsaction data load.
thank u,
reward if helpful. -
Hi,
I have around 300 tables in a database, and I need to load these tables with data. For this I need to know the order of tables to be loaded. Please help me if you have any script or solution that would tell me the order of tables be loaded.
Thanks in advanceIt's doable. The complexity is mainly in how much or little you know ahead of time about what you are loading. The referential integrity relations between tables is within Oracle so you can know what tables are dependent on table A, and what tables are dependent on those tables, etc., etc. Once you've got that then you can load the data in the proper order (and you might want to put the whole thing in a transaction so other users don't see partial updates). So if you load table A and associated tables once per week or something then you've got the script and can keep re-using it, just changing the data files.
If you are going to have random tables to load then you'll have to do the same thing for every new table to load. Sure, you can probably create a script to do it all totally driven off of the table to load, but it all depends on how flexible you need to be. -
Correct DataSource to load data into 0EMPLOYEE InfoProvider.
Hi Experts,
I am implementing BW (7.0) - HCM (ECC 6.0). We are implementing functional areas such as OM, PA, PY, Leave, Time, Work Pattern Management, EHS, LSO and Comeptencies. We are implementing using standard BCT (Business Content).
The most important InfoProvider I've noticed that would be used across almost all the functional areas is 0EMPLOYEE. Now I have noted that there are a couple of Standard DataSources that load data (mostly Full Updates) into 0EMPLOYEE as below:
Techinca Name - Description
1) 0EMPLOYEE_ATTR - Employee
2) 0EMPLOYEE_0077_ATTR - Employee - additional person data
3) 0EMPLOYEE_0016_ATTR - Employee - contract elements
4) 0EMPLOYEE_0763_ATTR - Long-Term Incentives Participant Data
5) 0EMPLOYEE_ID_ATTR - Employee - personnel ID
6) 0EMPLOYEE_USER_ATTR - Employee - system user name
7) 0HR_PA_0 - Employee
8) 0EMPLOYEE_TEXT - Employee (This is not a concern)
Points to be noted are:
1) All the DataSources have PERNR (Personnel Number) in common that maps into 0EMPLOYEE (Employee Number) in BW along with various fields which makes sense.
2) Most of the InfoPackages have Full Update.
My question is... which DataSources am I supposed to use to load 0EMPLOYEE? If all the DataSources, then in which sequence should I use the DataSources during Go-Live so that it is best suited for the project? Does this also mean that the PERNR field comes from only one table in ECC so that I don't have to bother about the Full Updates in various InfoPackages for different DataSources?
Also, are there any DataSources that I might have missed for 0EMPLOYEE?
Any help is much appreciated. Thanks in advance.
Regards,
ChanduHi,
Commonly I use 0employee_attr to get all data from HR infotypes, because when I want to add additionnal fields in 0employee_attr, I prefer focus on one datasource rather than managing several datasource.
But you can use any other datasources mentionned in your post to update data to 0employee infoobject.
In the HR BCT, 0employee is the main datasource that provide data from HR infotypes, but this datasource is only a full type.
You have 2 options :
1°) If your HCM manages alot of employee, you can face performance loading problems. So, most of the time people don't use 0employee_attr datasource, but create one customer datasource per infotype (delta enable via enddate). You will thus manage one DSO perdatasource to load the target infocube.
2°) If your HCM manages a range of employee which performance are OK, you can use 0employee_attr, and then use the standard BCT.
Load your data and check the performance.
The reason why performance of 0employee_attr is poor according to me is that the module function that extract data manage the "PROVIDE" function that align data from the several infotype according to begin and end date.
Form a BCT point of view you can use 0PAPA_C02 for headcount analysis and/or 0PA_C01 for heacount and action analysis. You can use these cubes and add addditionnal fields regarding to addintionnal information from your HR infotypes. In both cases, they build a historical view per month of employee situtation, that is very insteristing in HR reporting.
Feel free to ask questions. -
How do load system form matrix -Inventory-Goods Issue through SDK UI &DI
While I am accessing system form matrix -Inventory Goods Issue/ Goods Receipt, the matrix object is not accessible.
Error is coming stating "Item 13 is invalid, where 13 is item uid for matrix.
So,How do load system form matrix -Inventory-Goods Issue(FORM 720/-720) through SDK UI &DIAPI.
Form Type: -720
How to get reference of System form matrix object -Inventory-GoodsIssue.
Some thing similar to CopyFrom functionality for -Inventory-Goods Issue.
Currently my client requirement is as follows.
I created a UDF ((U_ILC) Incoming Log Challan) for marketing documents. And, this field is added in the header level of Goods Reciept, Goods Issue documents.
1. Through Inventory->Goods Receipt (ILCNo.10), items are received. Assume, M00001, M00002 are the items received with qty, price, whse, account values.
2. Through Inventory->Goods Issue, item should be issued. In this Goods Issue Form, after entering U_ILC value as 10, pressing Tab, the GoodsIssue matrix should be loaded with the values of GoodsReceipt(IGN1 for U_ILC:10) document i.e. M00001,M00002 along with the same values as in GoodsReceipt of ILC:10.
The code is as follows:
If (( ( pVal.FormType = "-720" or pVal.FormType = 720) And pVal.EventType <> SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And (pVal.Before_Action = False)) Then
'// get the event sending form
oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
If pVal.ItemUID = "U_ILCNo" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS And pVal.Before_Action = False Then
SBO_Application.MessageBox("ILC No. Lost Focus")
oMatrix = oForm.Items.Item("13").Specific
oColumn = oForm.Columns.Item("1")
oEditItmCode = oColumn.Cells.Item(1).Specific
oEditItmCode.Value = "07215090x606"
oItem = oForm.Items.Item("U_ILCNo")
oEdit = oItem.Specific
SBO_Application.MessageBox(oEdit.String)
End If
End If
3. The code
oMatrix = oForm.Items.Item("13").Specific
is raising error. I have used Event Logger and breakpoints to see where the code is halting.
Help me, how to access the matrix of Goods Receipt/ Goods Issue and load based on the existing data.
Thanks in advanceHI
If your code is in the SBO_Application_ItemEvent then try using this line
oForm = SBO_Application.Forms.Item(strFormUID)
instead of
oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount) -
How to save data for Binded Matrix in Sqlserver200(DB)
hai all,
i created a Form by using Udo form generator.
in that i bind the matrix with Userdatsources. its successfully binded to the matrix. but when i press "Add" Button the Sqlserver tables are not saved.
if i enter values manually without binding the udo matrix, all rows are getting saved in sqlserver successfully.
plz help me how to save the rows in the binded matrix to the tables in Sqlserver.
Regards,
Nagababu.Since you are using UserDataSources, you have to construct a function that loops through the columns, and by name and or alias you construct the INSERT and/or UPDATE query (assuming the destination table is User Defined).
Check out this link
Re: Matrix Processing
Hope it helps -
When i load mini dvd's they wont load in order of scenes they load randomly
when i load mini dvds they wont load in order of scenes they load randomly
Apple - Mac OS X - Feedback
-
Trying to Bind Matrix to DBDatasource
Hi,
I cannot seem to get my matrix bound to a system datasource (POR1)
The Error I get is "Data Source - Not A User Datasource"
This occurs when trying to bind the first column.
( colItem.DataBind.SetBound(True, "POR1", "ItemCode" )
I am trying to do this in a new tab in the purchase order form (142)
odbs is a variable with class scope.
Please help :
odbs = oform.DataSources.DBDataSources.Add("POR1")
oNewItem = oform.Items.Add("Lmat", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
oItem = oform.Items.Item("38")
oNewItem.Left = oitem.Left
oNewItem.Width = oItem.Width
oNewItem.Top = oitem.Top
oNewItem.Height = oitem.Height
oNewItem.AffectsFormMode = False
oNewItem.FromPane = 15
oNewItem.ToPane = 15
omat = oNewItem.Specific
Dim colItem As SAPbouiCOM.Column
Dim colItemD As SAPbouiCOM.Column
Dim colQty As SAPbouiCOM.Column
Dim colQtyO As SAPbouiCOM.Column
Dim colSO As SAPbouiCOM.Column
Dim l As SAPbouiCOM.LinkedButton
Dim l2 As SAPbouiCOM.LinkedButton
colItem = omat.Columns.Add("colItem", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
colItem.Width = "125"
colItem.TitleObject.Caption = "Item"
colItem.DataBind.SetBound(True, "POR1", "ItemCode")
colItem.Visible = True
l = colItem.ExtendedObject
l.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_Items
colItemD = omat.Columns.Add("colItemTxt", SAPbouiCOM.BoFormItemTypes.it_EDIT)
colItemD.Width = "225"
colItemD.TitleObject.Caption = "Item Name"
colItemD.DataBind.SetBound(True, "POR1", "Dscription")
colItemD.Visible = True
colQty = omat.Columns.Add("colQty", SAPbouiCOM.BoFormItemTypes.it_EDIT)
colQty.Width = "75"
colQty.TitleObject.Caption = "Qty"
colQty.DataBind.SetBound(True, "POR1", "Quantity")
colQty.Visible = True
colQtyO = omat.Columns.Add("colQtyO", SAPbouiCOM.BoFormItemTypes.it_EDIT)
colQtyO.Width = "75"
colQtyO.TitleObject.Caption = "Qty"
colQtyO.DataBind.SetBound(True, "POR1", "OpenQty")
colQtyO.Visible = True
colSO = omat.Columns.Add("colSO", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
colSO.Width = "125"
colSO.TitleObject.Caption = "Sales Order"
colSO.DataBind.SetBound(True, "POR1", "U_SONumber")
colSO.Visible = True
l2 = colSO.ExtendedObject
l2.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_OrderNick,
Yes, you can add link button in grid column. There are 4 type of GridColumn, CheckBoxColumn, ComboBoxColumn, EditTextColumn, PictureColumn objects. And you can set the linkobjecttype for EditTextColumn
Please refer to BoGridColumnType for more info.
sample code:
oItem = oItems.Add("My_Grid", SAPbouiCOM.BoFormItemTypes.it_GRID)
oItem.Top = 30
oItem.Left = 10
oItem.Width = 200
oItem.Height = 100
Dim oGrid As SAPbouiCOM.Grid = oItem.Specific
Dim oDataTable = oForm.DataSources.DataTables.Add("POLines")
oGrid.DataTable = oDataTable
oDataTable.ExecuteQuery("SELECT ItemCode AS 'Item Code', Dscription AS 'Item Name', Quantity FROM POR1 WHERE DocEntry = 1")
Dim colItemCode As SAPbouiCOM.GridColumn = oGrid.Columns.Item(0)
colItemCode.Type = SAPbouiCOM.BoGridColumnType.gct_EditText
Dim editColItemCode As SAPbouiCOM.EditTextColumn = CType(colItemCode, SAPbouiCOM.EditTextColumn)
editColItemCode.LinkedObjectType = 4
Regards, Yatsea -
Binding matrix - picture column - datatables
Hi,
I have matrix with column type picture as
oColumn = oColumns.Add("Pict", SAPbouiCOM.BoFormItemTypes.it_PICTURE)
oColumn.TitleObject.Caption = "Pict"
oColumn.Editable = False
I have usertable with userfield type image as
oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
oUserFieldsMD.SubType = SAPbobsCOM.BoFldSubTypes.st_Image
When I bind the table to matrix through datasource as
oDBDataSource = oOrderForm.DataSources.DBDataSources.Add("@SKIL_ATTACH")
oConditions = New SAPbouiCOM.Conditions
oDBDataSource.Query(oConditions)
and bind as
oColumn = oColumns.Item("pict")
oColumn.DataBind.SetBound(True, "@SKIL_ATTACH", "U_pict")
The image is shown in matrix directly in proper column.
Problem is, that I must use datatables because i must implement sorting. When I create datatable and bound it to column as
Dim odbtable As SAPbouiCOM.DataTable
Dim sql As String
odbtable = oOrderForm.DataSources.DataTables.Add("VEP")
sql = "SELECT u_path, u_pict from [dbo].[@skil_attach]"
odbtable.ExecuteQuery(sql)
oColumn = oColumns.Item("Pict")
oColumn.DataBind.Bind("VEP", "U_PATH")
The matrix is bounded, no error shown and in result the image is not shown in matrix. Does anybody experiences with binding datatables to matrix with type image?
Thanks a lot for help or idea.
PetrI found it. I dont know why, but through datatables it accept only jpg files and not gif files as in datasources...
-
Internal Order Status in delta loads
We are using the standard BW delta extractor for Internal Orders (Data Source :0COORDER_ATTR). We have enhanced the data source to bring in a couple of extra fields including System Status. We find that a Status change in the Internal Order (e.g. from REL TO BUDG) does not trigger a delta & subsequently records with Status changes are not brought into BW. Any suggestions on how to handle Internal Order & WBS Status Changes.
The delta datasource will not be able to pick-up changes in the extra enhanced fields that you might have appended. What I have seen being done in situations like this is to convert the loading from delta to full load. This will take longer but will solve your problem.
If the data volume is very high, then you could keep the existing load as delta, but create another datasource having just the order number and the status for which you can do a full load into 0COORDER master data. -
DataSource-class pool-JNDI-bind-lookup
Hi,
I am a beginner in this subject and it is confused. I read that
the best way to use the connections is from a DataSource. There
are 2 ways to configure it:
1- From the data-source.xml file
2- Or using InitialContext, Context and bind method from a java
program loaded in the startup.
If so, which one is better?
On the other hand, there are some classes I can use, for
instance:
1- OracleConnectionCacheImpl
2- OracleConnectionPoolDataSource
etc.
which one is better?
Thank you very much for any comment.
Andres.Hi:
upon further research, i find that the data
that was used in State class at binding does not change on any update,
like via foll -
State s = (State)ic.lookup(JNDINAME);
s.addHashtableEntry (key, val); or
s.setDesc ("new desc");
next time i lookup State class the hashtable entry is missing and desc is
old and not "new desc".
any help appreciated.
thanks
rajans
Rajan Sadasivan wrote:
Hi:
I am using jdk1.3, weblogic6.0
I am binding a state class like ->
public class State implements Serializable {
private String desc;
private Hashtable sessions;
onto the JNDI tree. Binding is done like initialCxt.bind (name,
_state);
and state's sessions has one entry in it and state's desc is set.
I then use another client to do _initialCxt.lookup (name) on same
weblogic JVM.
The _state object is returned with correct value of desc; but the
sessions
hashtable is empty and the single entry is gone. I do see also the the
State's finialize () method is called.
Can anyone explain why i am losing hashtable information ?
How do I make this work in weblogic jndi with hashtable info ?
thanks
rajans -
Hello,
I try to show a matrix in a system form (the sales opportunities) in a new folder that i've created. The program just crash when i bind the DBDataSource to the Column... Any idea ?
oDBDataSource = oForm.DataSources.DBDataSources.Add("OOPR");
oItem = oForm.Items.Add("Matrix1", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
oItem.Left = 10;
oItem.Top = 160;
oItem.Width = 430;
oItem.Height = 150;
oItem.FromPane = 9;
oItem.ToPane = 9;
oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
oColumns = oMatrix.Columns;
oColumn = oColumns.Add("Code", SAPbouiCOM.BoFormItemTypes.it_EDIT);
oColumn.TitleObject.Caption = "Code";
oColumn.Width = 40;
oColumn.Editable = true;
oColumn.DataBind.SetBound(true, "OOPR", "CardCode");
The last instruction crash the program.Hi Lee,
here is snippet of code how i band hope it works for u,
Dim MyUsrDs1 As SAPbouiCOM.UserDataSource
Dim MyDbDs1 As SAPbouiCOM.DBDataSource
MyUsrDs1 = MyForm.DataSources.UserDataSources.Add("Check", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
MyMatrix.Columns.Item("Col3").DataBind.SetBound(True, "", "Check")
MyDbDs1 = MyForm.DataSources.DBDataSources.Add("OCRD")
MyDbDs1.Query(SQL)
MyMatrix.LoadFromDataSource() -
Open Purchase Order Conversion Script (Data Loader)
Hi All,
Hope you all are doing well.
I need a Quick help from anyone of you peole. Does anyone having Data Loader script for Open Purchase Order.
I need it badly. My client is using 12.1.3 version.
Please help.
Regards,
AdityaHi All,
Hope you all are doing well.
I need a Quick help from anyone of you peole. Does anyone having Data Loader script for Open Purchase Order.
I need it badly. My client is using 12.1.3 version.
Please help.
Regards,
Aditya -
Can I edit the rpt file & change the datasource before loading the report?
We are an ISV and our application has a lot of reports. Our reports use a SQL Server database as the data source and each SQL Server at our customer sites has a different name.
In our testing we have determined that ReportDocument.Load tries to connect to the SQL Server that is saved in the RPT. If it can't fine the SQL Server saved in the RPT the load take about 60 seconds while it is waiting for the SQL Server Connection to time out.
We are using the Visual Studio 2008 version of Crystal Reports. This did not seem to be a problem with VB6/CR8.5.
We would like to edit the RPT and change the data source to the appropriate SQL Server before we call ReportDocument.Load.
Is it possible to edit the rpt file and change the data source before loading the report?
Or is there some way to tell Crystal not to try connecting to the DB
during the report.load?
In our case we will NEVER use the data source that is saved in the RPT, we will always change the data source using ApplyLogOnInfo.
ThanksHI Todd,
You Can Not edit the report document before ReportDocument.Load() because if you dont load the report then you dont have anything to Edit
But as far as changing the datasource is concerned you can change that at runtime.
For changing the datasource following code will help you if both databases have a same schema :
Code for changing the database
ConnectionInfo crConnectionInfo = new ConnectionInfo();
crConnectionInfo.ServerName = "SERVER";
crConnectionInfo.DatabaseName = "DATABASE";
crConnectionInfo.UserID = "USERID";
crConnectionInfo.Password = "PASSWORD";
// Loop through the ReportObjects in a report and find all the subreports
foreach(ReportObject crReportObject in crReportDocument.ReportDefinition.ReportObjects)
// Check the kind of the ReportObject, if it is a subreport
// proceed. If not skip.
if(crReportObject.Kind == ReportObjectKind.SubreportObject)
// Get the SubReport in the form of a ReportDocument
string sSubreportName = ((SubreportObject)crReportObject).SubreportName;
ReportDocument crSubReportDocument = crReportDocument.OpenSubreport(sSubreportName);
// Use a loop to go through all the tables in the main report
foreach(Table crTable in crSubReportDocument.Database.Tables)
// Get the TableLogOnInfo from the Table and then set the new
// ConnectionInfo values.
TableLogOnInfo crLogOnInfo = crTable.LogOnInfo;
crLogOnInfo.ConnectionInfo = crConnectionInfo;
// Apply the TableLogOnInfo
crTable.ApplyLogOnInfo(crLogOnInfo);
// Set the location of the database. This value will vary from database to
// database.
crTable.Location = "DATABASE.OWNER.TABLENAME" or crTable.Locations;
The sample for doing this is available on support site.
Thanks,
Prasad
Maybe you are looking for
-
Trying to instll iCloud on a new Toshiba laptop so I can sync contacts, calendars, email with my iPhone and iPad. Get error message HRRESULT:OX8007OBC9, says installer encountered errors before iCloud Control Panel 2.0 could be configured. Have the s
-
So some songs that i buy from itunes work fine others however dont. They show up on my phone but i cant get them to play. How can i fix this?
-
Plese help! Stuck on some basic Java homework...
I am taking this introduction to java class and we were given 3 homework assignments and I am really stuck on 2 of them. One of the assignments asks to make a index.html page that will connect to a mysql database for coffee/suppliers. The first part
-
Hi all, There is a standard screen (Tcode: QM01), in which there are some captions and field inputs in a tab control. I want to encapsulate them all in a frame. I took access key of the screen number,but inspite of getting in change mode, i am unable
-
i don't have any edit button on my contacts so i can delete