Featching Data From The Data Base Using DI API in Matrix
Hi
All of u i am shahid i faced a problem when i retrive
the selected data from the data base using matrix plz.
Healp me!.
Thanks
Mohd Shahid.
SAP Techinical Consultent
Option Strict Off
Option Explicit On
Friend Class UseMatrix
'// This parameter will use us to manipulate the
'// SAP Business One Application
Private WithEvents SBO_Application As SAPbouiCOM.Application
Private oForm As SAPbouiCOM.Form
Private oMatrix As SAPbouiCOM.Matrix
Private oColumns As SAPbouiCOM.Columns
Private oColumn As SAPbouiCOM.Column
'// declareing a DB data source for all the Data binded columns
Private oDBDataSource As SAPbouiCOM.DBDataSource
'// declaring a User data source for the "Remarks" Column
Private oUserDataSource As SAPbouiCOM.UserDataSource
' This Function is called automatically when an instance
' of the class is created.
' Indise this function
Public Sub New()
MyBase.New()
'// set SBO_Application with an initialized application object
SetApplication()
'// Create the UI
CreateFormWithMatrix()
'// Add Data Sources to the Form
AddDataSourceToForm()
'// Bind the Form's items with the desired data source
BindDataToForm()
'// Load date to matrix
GetDataFromDataSource()
'// Make the form visible
oForm.Visible = True
End Sub
Private Sub SetApplication()
'// Use an SboGuiApi object to establish connection
'// with the SAP Business One application and return an
'// initialized appliction object
Dim SboGuiApi As SAPbouiCOM.SboGuiApi
Dim sConnectionString As String
SboGuiApi = New SAPbouiCOM.SboGuiApi
'// by following the steps specified above, the following
'// statment should be suficient for either development or run mode
sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
'// connect to a running SBO Application
Try ' If there's no active application the connection will fail
SboGuiApi.Connect(sConnectionString)
Catch ' Connection failed
System.Windows.Forms.MessageBox.Show("No SAP Business One Application was found")
End
End Try
'// get an initialized application object
SBO_Application = SboGuiApi.GetApplication()
'SBO_Application.MessageBox("Hello World")
End Sub
Private Sub SBO_Application_AppEvent(ByVal EventType As SAPbouiCOM.BoAppEventTypes) Handles SBO_Application.AppEvent
Select Case EventType
Case SAPbouiCOM.BoAppEventTypes.aet_ShutDown
SBO_Application.MessageBox("A Shut Down Event has been caught" & _
Environment.NewLine() & "Terminating 'Add Menu Item' Add On...")
'// terminating the Add On
System.Windows.Forms.Application.Exit()
End Select
End Sub
Private Sub CreateFormWithMatrix()
'// Don't Forget:
'// it is much more efficient to load a form from xml.
'// use code only to create your form.
'// once you have created it save it as XML.
'// see "WorkingWithXML" sample project
'// we will use the following object to add items to our form
Dim oItem As SAPbouiCOM.Item
'// we will use the following objects to set
'// the specific values of every item
'// we add.
'// this is the best way to do so
Dim oButton As SAPbouiCOM.Button
Dim oStaticText As SAPbouiCOM.StaticText
Dim oEditText As SAPbouiCOM.EditText
'// The following object is needed to create our form
Dim creationPackage
creationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
creationPackage.UniqueID = "UidFrmMatrix14"
creationPackage.FormType = "TypeFrmMatrix14"
'// Add our form to the SBO application
oForm = SBO_Application.Forms.AddEx(creationPackage)
'// Set the form properties
oForm.Title = "Quality Check"
oForm.Left = 336
oForm.ClientWidth = 620
oForm.Top = 44
oForm.ClientHeight = 200
'// Adding Items to the form
'// and setting their properties
'// Adding an Ok button
'// We get automatic event handling for
'// the Ok and Cancel Buttons by setting
'// their UIDs to 1 and 2 respectively
oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
oItem.Left = 5
oItem.Width = 65
oItem.Top = 170
oItem.Height = 19
oButton = oItem.Specific
oButton.Caption = "Ok"
'// Adding a Cancel button
oItem = oForm.Items.Add("2", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
oItem.Left = 75
oItem.Width = 65
oItem.Top = 170
oItem.Height = 19
oButton = oItem.Specific
oButton.Caption = "Cancel"
'// Adding a Text Edit item
'oItem = oForm.Items.Add("txtPhone", SAPbouiCOM.BoFormItemTypes.it_EDIT)
' oItem.Left = 265
'oItem.Width = 163
'oItem.Top = 172
'oItem.Height = 14
'// Adding an Add Phone prefix column button
' oItem = oForm.Items.Add("BtnPhone", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
' oItem.Left = 160
' oItem.Width = 100
' oItem.Top = 170
' oItem.Height = 19
' oButton = oItem.Specific
' oButton.Caption = "Add Phone prefix"
'// Add the matrix to the form
AddMatrixToForm()
End Sub
Private Sub AddMatrixToForm()
'// we will use the following object to add items to our form
Dim oItem As SAPbouiCOM.Item
'// we will use the following object to set a linked button
Dim oLink As SAPbouiCOM.LinkedButton
'// Adding a Matrix item
oItem = oForm.Items.Add("Matrix1", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
oItem.Left = 5
oItem.Width = 500
oItem.Top = 5
oItem.Height = 150
oMatrix = oItem.Specific
oColumns = oMatrix.Columns
'// Adding Culomn items to the matrix
oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = "#"
oColumn.Width = 30
oColumn.Editable = False
'// Add a column for Item Code
oColumn = oColumns.Add("DSItemCode", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
oColumn.TitleObject.Caption = "Item Code"
oColumn.Width = 40
oColumn.Editable = True
'// Link the column to the ITEM master data system form
oLink = oColumn.ExtendedObject
oLink.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_Items
oColumn = oColumns.Add("DSItemName", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = "Item Name"
oColumn.Width = 80
oColumn.Editable = True
'// Add a column for BP Card Phone
oColumn = oColumns.Add("DSWhs", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = "Ware House"
oColumn.Width = 40
oColumn.Editable = True
'// Add a column for BP Card Phone
oColumn = oColumns.Add("DSQuantity", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = "Quantity"
oColumn.Width = 40
oColumn.Editable = True
'// Add a column for Combo Box
oColumn = oColumns.Add("DSQuality", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
oColumn.TitleObject.Caption = "Quality"
' oColumn.ValidValues.Add("OK", "")
'oColumn.ValidValues.Add("NOT OK", "")
oColumn.Width = 40
oColumn.Editable = True
oColumn = oColumns.Add("DSReport", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = "Remarks"
' oColumn.ValidValues.Add("OK", "")
'oColumn.ValidValues.Add("NOT OK", "")
oColumn.Width = 40
oColumn.Editable = True
'// Add a column for BP Card Phone
' oColumn = oColumns.Add("DSPhoneInt", SAPbouiCOM.BoFormItemTypes.it_EDIT)
' oColumn.TitleObject.Caption = "Int. Phone"
'oColumn.Width = 40
'oColumn.Editable = True
End Sub
Public Sub AddDataSourceToForm()
'// every item must be binded to a Data Source
'// prior of binding the data we must add Data sources to the form
'// Add user data sources to the "International Phone" column in the matrix
' oUserDataSource = oForm.DataSources.UserDataSources.Add("IntPhone", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
'// Add DB data sources for the DB bound columns in the matrix
oDBDataSource = oForm.DataSources.DBDataSources.Add("OITW")
End Sub
Public Sub BindDataToForm()
'// getting the matrix column by the UID
oColumn = oColumns.Item("DSItemCode")
'oColumn.DataBind.SetBound(True, "", "DSCardCode")
oColumn.DataBind.SetBound(True, "OITW", "ItemCode")
'oColumn = oColumns.Item("DSItemName")
'oColumn.DataBind.SetBound(True, "OITW", "ItemName")
oColumn = oColumns.Item("DSWhs")
oColumn.DataBind.SetBound(True, "OITW", "WhsCode")
oColumn = oColumns.Item("DSQuantity")
oColumn.DataBind.SetBound(True, "OITW", "U_QCStock")
'// to Data Bind an item with a user Data source
'// the table name value should be an empty string
' oColumn = oColumns.Item("DSPhoneInt")
'oColumn.DataBind.SetBound(True, "", "IntPhone")
End Sub
Public Sub GetDataFromDataSource()
'// Ready Matrix to populate data
oMatrix.Clear()
oMatrix.AutoResizeColumns()
'// Querying the DB Data source
oDBDataSource.Query()
'// setting the user data source data
'oUserDataSource.Value = "Phone with prefix"
oMatrix.LoadFromDataSource()
End Sub
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
If (pVal.FormUid = "UidFrmMatrix") Then
If ((pVal.itemUID = "BtnPhone") And _
(pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) And _
(pVal.Before_Action = False)) Then
AddPrefix()
End If
If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And _
(pVal.Before_Action = False)) Then
SBO_Application.MessageBox("Form Unloaded, Addon will terminate")
System.Windows.Forms.Application.Exit()
End If
End If
End Sub
Public Sub AddPrefix()
Dim i As Integer
Dim PhoneExtCol As SAPbouiCOM.Column
Dim newPhone As String
Dim oItem As SAPbouiCOM.Item
Dim oEditTxt As SAPbouiCOM.EditText
'// Get the prefix edit text item
oItem = oForm.Items.Item("txtPhone")
oEditTxt = oItem.Specific
'// Flush user input into datasources
oMatrix.FlushToDataSource()
'// Get the DBdatasource we base the matrix on
oDBDataSource = oForm.DataSources.DBDataSources.Item("OCRD")
'// Iterate all the records and add a prefix to the phone
For i = 0 To oDBDataSource.Size - 1
newPhone = oDBDataSource.GetValue("phone1", i)
newPhone = newPhone.Trim(" ")
oDBDataSource.SetValue("phone1", i, oEditTxt.String + newPhone)
Next
'// Load data back to
oMatrix.LoadFromDataSource()
End Sub
End Class
Hi Shahid,
I am not sure what your question is. The code you pasted looks like the MatrixAndDataSources example that comes with the SDK. What are you trying to do?
Thanks,
Adele
Similar Messages
-
Regarding reading the data from the files without using Stremas
hai to all of u...
here i have a problem where i have to read the data from the files without using any streams.
please guide me how to do this one,if possible by giving with an example
Thanks & Regard
M.RamakrishnaSimply put, you can't.
By why do you need to? -
Powerpivot Error on Refresh -- "We couldn't get data from the data model..."
I'm using Excel 2013 and Windows 8.1. I have a spreadsheet I've been using for over a year, and I've just started getting this error message when I try to refresh the data.
"We couldn't get data from the Data Model. Here's the error message we got:
The 'attributeRelationship' with 'AttributeID' - 'PuttDistCat9' doesn't exist in the collection"
Any idea how I can fix this problem? I haven't changed anything related to that particular attribute. All the data is contained in separate sheets in the workbook, so there are no external sources of data.
Thanks.
JeanThanks for all the suggestions.
I found a slightly older version of the spreadsheet that still refreshes properly, so I don't think I have any issues with the version of Excel or Power Query. (I've had this same error before, and I believe I applied the hotfix at that time.)
I think this problem started after I updated a number of the date filters in the pivot tables. I haven't made any changes to the data model, and the only updates I've made were to add data (which I do all the time), and to change the date filters on
the pivot tables.
As suggested, I added a new pivot table querying one table (the table with the attribute that shows up in the error message), and it worked fine. I can also refresh this pivot table.
Then I tried adding a pivot table which went against several tables in the data model (including the table in question). The pivot table seemed to return that data properly. However, when I tried to refresh it, I got the same error message ("we
couldn't get data from the data model...").
Dany also suggested running the queries one at a time to see which one is in error. Without checking all the pivot tables, it appears that any which use the table "HolePlayedStrokes" generate the error (this is the table with the attribute
mentioned in the error message). Pivot Tables without that particular table seem to refresh OK. Unfortunately, that is the main table in my data model, so most of the pivot tables use it.
Any other suggestions? I'd be happy to send a copy of the spreadsheet.
Thanks for all the help.
Jean -
How can delete my iphone5 data from the date its restored?
how can delete my iphone5 data from the date its restored?
it's unclear what you mean
if you wish to remove your iphone5 data you connect it to iTunes on the computer and click the restore button and choose restore to factory defect -
How to dispaly datas from the table, base on the selection screen
hi there gurus,
im currently developing a stock aging report,
i have completed one program but it do not allow me to excutes the program althought the syntax is correct.
i would to get some ideas from you, regarding how to extract the datas from the tables?
my selction screen will be, mat number, date, and gl account.
and the out put datas are, mbew-matnr, makt-maktx, mbew-lbkum, mara_meins, mbew-salk3,and the consumptions for the past 12months and the values for it.
can u plz guide me with this,
thank you,.
this is kind of very urgent program that i need to finish , plz help me.here is the total code the i do
REPORT ZSTK_AGING_REP2.
*TABLES
TABLES: mseg,
mara,
makt,
SKAT,
SKA1,
MARV,
T001,
T030,
T149D,
AM07M,
MCMSEG,
T001K,
T001W,
T134M,
vbak,
mbew,
mcon, rmcb0, marc, t024w, mvke, v134w, t438a, propf, maprf, t000, t024e
, tvko.
DATA: BEGIN OF ta_material OCCURS 2,
werks LIKE mard-werks,
lgort LIKE mard-lgort,
matnr LIKE mard-matnr,
labst LIKE mard-labst,
umlme LIKE mard-umlme,
insme LIKE mard-insme,
einme LIKE mard-einme,
speme LIKE mard-speme,
retme LIKE mard-retme,
verpr LIKE mbew-verpr,
maktx LIKE makt-maktx,
meins LIKE mara-meins,
bukrs LIKE t001-bukrs,
konto LIKE t030-konts,
butxt LIKE t001-butxt,
txt50 LIKE skat-txt50,
MABTR LIKE MCMSEG-DMBTR,
SKBTR LIKE MCMSEG-DMBTR,
WAERS LIKE T001-WAERS,
WAER2 LIKE T001-WAERS,
BWKEY LIKE MBEW-BWKEY,
LBKUM LIKE MBEW-LBKUM,
MEINS LIKE MARA-MEINS,
SALK3 LIKE MBEW-SALK3,
WAERS1 LIKE T001-WAERS,
BUKRS1 LIKE T001-BUKRS,
KONTO1 LIKE T030-KONTS,
lbkum LIKE mbew-lbkum,
erdat LIKE vbak-erdat,
END OF ta_material.
DATA: BEGIN OF ta_mseg OCCURS 2,
mblnr LIKE mseg-mblnr,
*->Begin of KL02+ -
mjahr like mseg-mjahr,
zeile like mseg-zeile,
*->End of KL02+ -
meins LIKE mseg-meins,
menge LIKE mseg-menge,
werks LIKE mseg-werks,
lgort LIKE mseg-lgort,
matnr LIKE mseg-matnr,
budat LIKE mkpf-budat,
saknr LIKE SKA1-SAKNR,
END OF ta_mseg.
single recs based on MATNR
DATA: BEGIN OF i_matnr OCCURS 0,
werks LIKE mard-werks,
lgort LIKE mard-lgort,
matnr LIKE mard-matnr,
maktx LIKE makt-maktx,
mblnr LIKE mseg-mblnr,
verpr LIKE mbew-verpr,
labst LIKE mard-labst, "Valuated stock with
*unrestricted use
umlme LIKE mard-umlme, "Stock in transfer
*(from one storage location to another)
insme LIKE mard-insme, "Stock in quality
*inspection
einme LIKE mard-einme, "Total Stock of All
*Restricted Batches
speme LIKE mard-speme, "Blocked stock
retme LIKE mard-retme, "Blocked Stock Returns
meins LIKE mara-meins, "base unit
bukrs LIKE t001-bukrs,
konto LIKE t030-konts,
butxt LIKE t001-butxt,
txt50 LIKE skat-txt50,
MABTR LIKE MCMSEG-DMBTR,
SKBTR LIKE MCMSEG-DMBTR,
WAERS LIKE T001-WAERS,
WAER2 LIKE T001-WAERS,
BWKEY LIKE MBEW-BWKEY,
LBKUM LIKE MBEW-LBKUM,
MEINS LIKE MARA-MEINS,
SALK3 LIKE MBEW-SALK3,
WAERS1 LIKE T001-WAERS,
BUKRS1 LIKE T001-BUKRS,
KONTO1 LIKE T030-KONTS,
lbkum LIKE mbew-lbkum,
END OF i_matnr.
recs based on MBLNR
DATA: BEGIN OF i_mblnr OCCURS 0,
mblnr LIKE mseg-mblnr,
werks LIKE mseg-werks,
lgort LIKE mseg-lgort,
matnr LIKE mseg-matnr,
menge LIKE mseg-menge,
meint LIKE mseg-meins,
budat LIKE mkpf-budat,
bukrs LIKE t001-bukrs,
konts LIKE t030-konts,
butxt LIKE t001-butxt,
txt50 LIKE skat-txt50,
MABTR LIKE MCMSEG-DMBTR,
SKBTR LIKE MCMSEG-DMBTR,
WAERS LIKE T001-WAERS,
WAER2 LIKE T001-WAERS,
BWKEY LIKE MBEW-BWKEY,
LBKUM LIKE MBEW-LBKUM,
MEINS LIKE MARA-MEINS,
SALK3 LIKE MBEW-SALK3,
WAERS1 LIKE T001-WAERS,
BUKRS1 LIKE T001-BUKRS,
KONTO1 LIKE T030-KONTS,
END OF i_mblnr.
TYPES: BEGIN OF t_mat,
lgort LIKE mseg-lgort,
werks LIKE mseg-werks,
matnr LIKE mseg-matnr,
mblnr LIKE mseg-mblnr,
maktx LIKE makt-maktx,
meins LIKE mara-meins,
meng0 LIKE mbew-lbkum,
value0 LIKE mbew-salk3,
meng0 LIKE mard-labst, "0 to 10 days
value0 LIKE mseg-dmbtr,
meng1 LIKE mard-labst, "11 to 30 days
value1 LIKE mseg-dmbtr,
meng2 LIKE mard-labst, "31 to 60 days
value2 LIKE mseg-dmbtr,
meng3 LIKE mard-labst, "61-90
value3 LIKE mseg-dmbtr,
meng4 LIKE mard-labst, "90 days onwards
value4 LIKE mseg-dmbtr,
END OF t_mat.
DATA: i_mat2 TYPE t_mat OCCURS 0 WITH HEADER LINE.
TYPES: BEGIN OF t_mat2,
lgort LIKE mard-lgort, " storage location
cnt0(5),
cnt1(5),
cnt2(5),
cnt3(5),
cnt4(5),
meng0 LIKE mbew-lbkum,
value0 LIKE mbew-salk3,
meng0 LIKE mard-labst, "0 to 10 days
value0 LIKE mseg-dmbtr,
meng1 LIKE mard-labst, "11 to 30 days
value1 LIKE mseg-dmbtr,
meng2 LIKE mard-labst, "31 to 60 days
value2 LIKE mseg-dmbtr,
meng3 LIKE mard-labst, "61-90
value3 LIKE mseg-dmbtr,
meng4 LIKE mard-labst, "90 days onwards
value4 LIKE mseg-dmbtr,
END OF t_mat2.
DATA: i_matsum TYPE t_mat2 OCCURS 0 WITH HEADER LINE.
DATA: w_mengb TYPE mbew-lbkum,
w_workqyt TYPE mbew-lbkum,
w_index TYPE sy-tabix,
*DATA: w_mengb TYPE mard-labst, "tmp Balance qty
w_workqty TYPE mard-labst, "Work qty
w_index TYPE sy-tabix,
w_days(5) TYPE n, "duration difference (days)
w_mths(5) TYPE n, "duration difference (mths)
w_dat1 TYPE sy-datum, "date
w_dat2 TYPE sy-datum, "today's date
w_detl(1) TYPE c,
w_summ(1) TYPE c,
w_denom TYPE i,
w_numer TYPE i,
w_conv TYPE i,
w_ttlcnt TYPE i,
w_cnt TYPE i,
v_topofpage(1),
w_meng LIKE mard-labst,
w_meng LIKE mbew-lbkum,
*sapscript values
w_title(20) TYPE c. "Summary / Detail Report
DATA: lv_peinh LIKE mbew-peinh, "Price Unit
lv_verpr LIKE mbew-verpr. "Moving Price
proram comes here
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_werks FOR mseg-werks,
s_lgort FOR mseg-lgort,
s_matnr FOR mara-matnr,
s_saknr FOR ska1-saknr,
S_ERDAT FOR VBAK-ERDAT.
PARAMETERS: pck_detl RADIOBUTTON GROUP rep1,
pck_summ RADIOBUTTON GROUP rep1,
pck_dtsm RADIOBUTTON GROUP rep1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK blk1.
top of the page
TOP-OF-PAGE.
PERFORM f_top_of_page.
FORM f_top_of_page .
IF v_topofpage = 'D'.
*-->Report header for detail report
WRITE:/2 'Printed By :', sy-uname,
80 'Stock Aging Report - Detail',
180 'Printed on:', sy-datum, sy-timlo,
220 'Page:', sy-pagno.
WRITE:/,/,/.
WRITE:/2 'Storage',
10 'Matl ID',
22 'Matl Description',
61 'UOM',
78 '<--=<QTY ON THIS DATE -->',
78 '<-- =< 10 days -->',
112 '<--11 to 30 days -->',
148 '<--31 to 60 days -->',
181 '<--61 to 90 days -->',
216 '<-- > 90 days -->',
/2 'Location',
76 'Qty',
92 'Value'.
112 'Qty',
128 'Value',
148 'Qty',
164 'Value',
181 'Qty',
195 'Value',
216 'Qty',
231 'Value'.
WRITE:/2 sy-uline(235).
ELSE.
*-->Report header for Summary report
WRITE:/2 'Printed By :', sy-uname,
80 'Stock Aging Report - Summary',
180 'Printed on:', sy-datum, sy-timlo,
220 'Page:', sy-pagno.
WRITE:/,/,/.
WRITE:/2 'Storage',
10 'Matl ID',
22 'Matl Description',
61 'UOM',
78 '<--< QTY ON THIS DATE -->',
78 '<-- < 10 days -->',
112 '<--11 to 30 days -->',
148 '<--31 to 60 days -->',
181 '<--61 to 90 days -->',
216 '<-- > 90 days -->',
/2 'Location',
76 'Qty',
92 'Value'.
112 'Qty',
128 'Value',
148 'Qty',
164 'Value',
181 'Qty',
195 'Value',
216 'Qty',
231 'Value'.
WRITE:/2 sy-uline(235).
ENDIF.
ENDFORM. " f_top_of_page
*start-of-selection
*PERFOM f_data_selection.
FORM f_data_selection.
SELECT a~werks
a~lgort
a~matnr
a~saknr
a~lbkum
a~erdat
a~labst
a~umlme
a~insme
a~einme
a~speme
a~retme
b~verpr "this field no long been used
c~maktx
d~meins
INTO CORRESPONDING FIELDS OF TABLE ta_material
FROM mard AS a
INNER JOIN makt AS c ON amatnr = cmatnr
INNER JOIN mara AS d ON amatnr = dmatnr
WHERE a~matnr IN s_matnr
AND a~werks IN s_werks
AND a~lgort IN s_lgort
AND a~saknr IN s_saknr
AND a~erdat IN s_erdat
AND c~spras = 'EN'.
*--> SC01 - End of Insertion **
*-->Select material documents
SELECT a~mblnr
a~mjahr
a~zeile
a~meins
a~menge
a~werks
a~lgort
a~matnr
b~budat
INTO CORRESPONDING FIELDS OF TABLE ta_mseg
FROM mseg AS a INNER JOIN mkpf AS b
ON amblnr = bmblnr
AND amjahr = bmjahr
FOR ALL ENTRIES IN ta_material
WHERE matnr = ta_material-matnr
AND a~werks = ta_material-werks
AND a~lgort = ta_material-lgort
AND algort NE aumlgo
AND a~shkzg = 'S'
AND a~smbln EQ space
AND a~smblp EQ space.
*--> SC03 - Start of Insertion **
If MBLNR exist in MSEG-SMBLN and this
record's SHKZG = 'H'. Remove it from the table.
This is becuase this particular record has already been reverse.
LOOP AT ta_mseg.
SELECT SINGLE *
FROM mseg
WHERE smbln = ta_mseg-mblnr
*->Begin of KL02+ -
and SMBLP = ta_mseg-zeile.
AND shkzg = 'H'. "return. " KL02-
*->End of KL02+ -
IF sy-subrc = 0.
DELETE ta_mseg.
ENDIF.
ENDLOOP.
*--> SC03 - Enf of Insertion **
ENDFORM. " f_data_selection
*IMPORTANT , NEED TO CHECK LATER
FORM f_data_preparation.
*-->Append data for report details
LOOP AT ta_material.
DATA: ta_msegtemp LIKE ta_mseg OCCURS 2 WITH HEADER LINE.
*-->Loop at all material documents into a temp table
REFRESH ta_msegtemp. CLEAR ta_msegtemp.
LOOP AT ta_mseg WHERE matnr = ta_material-matnr AND
werks = ta_material-werks AND
lgort = ta_material-lgort.
ta_msegtemp = ta_mseg. APPEND ta_msegtemp.
ENDLOOP.
*-->Add up all the stock for the material
CLEAR w_mengb.
w_mengb = ta_material-labst +
ta_material-umlme +
ta_material-insme +
ta_material-einme +
ta_material-speme +
ta_material-retme.
IF w_mengb IS INITIAL.
CONTINUE.
ENDIF.
*-->sort msegtemp by posting date
SORT ta_msegtemp BY budat DESCENDING.
*-->get the values from the material documents into the report output
LOOP AT ta_msegtemp.
*->Begin of KL02- -
CALL FUNCTION 'HRCM_TIME_PERIOD_CALCULATE'
EXPORTING
begda = ta_msegtemp-budat
endda = sy-datum
IMPORTING
NOYRS =
nomns = w_mths
nodys = w_days
EXCEPTIONS
invalid_dates = 1
overflow = 2
OTHERS = 3
*->End of KL02- -
*->Begin of KL02+ -
*-->Get the days difference btw two dates
clear w_days.
w_days = sy-datum - ta_msegtemp-budat.
*--> Include today's date into calculation
w_days = w_days + 1.
*->End of KL02+ -
check base unit, do conversion
IF ta_material-meins <> ta_msegtemp-meins.
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = ta_material-matnr
i_in_me = ta_msegtemp-meins
i_out_me = ta_material-meins
i_menge = ta_msegtemp-menge
IMPORTING
e_menge = ta_msegtemp-menge
EXCEPTIONS
error_in_application = 1
error = 2
OTHERS = 3.
ENDIF.
*--> SC01 - Start of Insertion **
SELECT SINGLE peinh
verpr
INTO (lv_peinh,
lv_verpr)
FROM mbew
WHERE matnr = ta_material-matnr
AND bwkey = ta_material-werks.
IF sy-subrc = 0.
ta_material-verpr = lv_verpr.
ENDIF.
*--> SC01 - End of Insertion **
*-->check whether the mseg value is LE than the stock value
IF ta_msegtemp-menge LE w_mengb.
*-->Days < 10 days
IF w_days LE 1 AND w_days EQ 366.
i_mat2-meng0 = i_mat2-meng0 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value0 = ( i_mat2-meng0 / lv_peinh ) *
ta_material-verpr."+SC01
ENDIF.
**-->Days 11 - 30 days
ELSEIF w_days >= 11 AND w_days =< 30.
i_mat2-meng1 = i_mat2-meng1 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value1 = ( i_mat2-meng1 / lv_peinh ) *
*ta_material-verpr."+SC01
ENDIF.
**-->Days 31-60 days
ELSEIF w_days >= 31 AND w_days =< 60.
i_mat2-meng2 = i_mat2-meng2 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value2 = ( i_mat2-meng2 / lv_peinh ) *
*ta_material-verpr."+SC01
ENDIF.
**-->Days 61-90 days
ELSEIF w_days >= 61 AND w_days =< 90.
i_mat2-meng3 = i_mat2-meng3 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value3 = ( i_mat2-meng3 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
**-->Days > 90 days
ELSEIF w_days > 90.
i_mat2-meng4 = i_mat2-meng4 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value4 = ( i_mat2-meng4 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
ENDIF.
*->End of KL002+
w_mengb = w_mengb - ta_msegtemp-menge.
ELSE.
IF NOT w_mengb LE 0 .
IF NOT lv_peinh EQ 0.
**->End of KL001+
i_mat2-value0 = ( i_mat2-meng0 / lv_peinh )
*ta_material-verpr."+SC01
**->Begin of KL001+
ENDIF.
ELSEIF w_days GE 22.
i_mat2-meng3 = i_mat2-meng3 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value3 = ( i_mat2-meng3 / lv_peinh )
*ta_material-verpr.
ENDIF.
**->End of KL001+
ENDIF.
**--> SC02 - End of Insertioin **
ENDIF.
*->End of KL002-
*->Begin of KL002+
*--> < 10 days
IF w_days EQ 1 AND w_days LE 366.
i_mat2-meng0 = i_mat2-meng0 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value0 = ( i_mat2-meng0 / lv_peinh ) *
ta_material-verpr."+SC01
ENDIF.
ELSEIF w_days >= 11 AND w_days =< 30.
i_mat2-meng1 = i_mat2-meng1 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value1 = ( i_mat2-meng1 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
**--> 31 - 60 days
ELSEIF w_days >= 31 AND w_days =< 60.
i_mat2-meng2 = i_mat2-meng2 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value2 = ( i_mat2-meng2 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
**--> 61 - 90 days
ELSEIF w_days >= 61 AND w_days =< 90.
i_mat2-meng3 = i_mat2-meng3 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value3 = ( i_mat2-meng3 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
**--> > 90 days
ELSEIF w_days > 90.
i_mat2-meng4 = i_mat2-meng4 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value4 = ( i_mat2-meng4 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
ENDIF.
*->End of KL002+
w_mengb = 0.
ENDIF. " check stock value NE zero
ENDIF. "check Mat doc amount is LE than the stock value
ENDIF.
ENDLOOP. " msegtemp
*-->append i_mat2 values
i_mat2-werks = ta_material-werks.
i_mat2-lgort = ta_material-lgort.
i_mat2-matnr = ta_material-matnr.
i_mat2-maktx = ta_material-maktx.
i_mat2-meins = ta_material-meins.
APPEND i_mat2. CLEAR i_mat2.
ENDLOOP. " ta_material
*-->Append data for summary data
DATA: i_lgort LIKE i_mat2 OCCURS 2 WITH HEADER LINE.
i_lgort[] = i_mat2[].
SORT i_lgort BY werks lgort.
DELETE ADJACENT DUPLICATES FROM i_lgort COMPARING werks lgort.
DATA: v_cnt0(5), v_cnt1(5), v_cnt2(5), v_cnt3(5), v_cnt4(5),
v_value0 LIKE i_matsum-value0.
v_value1 LIKE i_matsum-value1,
v_value2 LIKE i_matsum-value2,
v_value3 LIKE i_matsum-value3,
v_value4 LIKE i_matsum-value4.
LOOP AT i_lgort.
CLEAR v_cnt0. CLEAR v_value0.
CLEAR v_cnt1. CLEAR v_value1.
CLEAR v_cnt2. CLEAR v_value2.
CLEAR v_cnt3. CLEAR v_value3.
CLEAR v_cnt4. CLEAR v_value4.
LOOP AT i_mat2 WHERE lgort = i_lgort-lgort AND
werks = i_lgort-werks.
IF NOT i_mat2-meng0 IS INITIAL.
v_cnt0 = v_cnt0 + 1.
v_value0 = v_value0 + i_mat2-value0.
ENDIF.
IF NOT i_mat2-meng1 IS INITIAL.
v_cnt1 = v_cnt1 + 1.
v_value1 = v_value1 + i_mat2-value1.
ENDIF.
IF NOT i_mat2-meng2 IS INITIAL.
v_cnt2 = v_cnt2 + 1.
v_value2 = v_value2 + i_mat2-value2.
ENDIF.
IF NOT i_mat2-meng3 IS INITIAL.
v_cnt3 = v_cnt3 + 1.
v_value3 = v_value3 + i_mat2-value3.
ENDIF.
IF NOT i_mat2-meng4 IS INITIAL.
v_cnt4 = v_cnt4 + 1.
v_value4 = v_value4 + i_mat2-value4.
ENDIF.
ENDLOOP.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt0 NE space.
i_matsum-cnt0 = v_cnt0.
i_matsum-value0 = v_value0.
APPEND i_matsum.
ENDIF.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt1 NE space.
i_matsum-cnt1 = v_cnt1.
i_matsum-value1 = v_value1.
APPEND i_matsum.
ENDIF.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt2 NE space.
i_matsum-cnt2 = v_cnt2.
i_matsum-value2 = v_value2.
APPEND i_matsum.
ENDIF.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt3 NE space.
i_matsum-cnt3 = v_cnt3.
i_matsum-value3 = v_value3.
APPEND i_matsum.
ENDIF.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt4 NE space.
i_matsum-cnt4 = v_cnt4.
i_matsum-value4 = v_value4.
APPEND i_matsum.
ENDIF.
ENDLOOP.
ENDFORM. "f_data_preparation
*IMPORTANT , NEED TO CHECK LATER
FORM f_display_data .
IF pck_dtsm = 'X'.
*-->Display detail
v_topofpage = 'D'.
PERFORM f_display_detail.
*-->display summary
v_topofpage = 'S'.
NEW-PAGE.
PERFORM f_display_summary.
ELSEIF pck_detl = 'X'.
*-->Display detail
v_topofpage = 'D'.
PERFORM f_display_detail.
ELSEIF pck_summ = 'X'.
*-->display summary
v_topofpage = 'S'.
PERFORM f_display_summary.
ENDIF.
ENDFORM. " f_display_data
FORM f_display_detail .
v_topofpage = 'D'.
SORT i_mat2 BY werks lgort.
*DATA: v_count(5),
DATA: v_count,
v_va1 LIKE i_mat2-value0.
v_va2 LIKE i_mat2-value0,
v_va3 LIKE i_mat2-value0,
v_va4 LIKE i_mat2-value0,
v_va5 LIKE i_mat2-value0.
LOOP AT i_mat2.
WRITE:/2 i_mat2-lgort,
10 i_mat2-matnr,
22 i_mat2-maktx(38),
61 i_mat2-meins,
64 i_mat2-meng0,
82 i_mat2-value0.
100 i_mat2-meng1,
118 i_mat2-value1,
136 i_mat2-meng2,
154 i_mat2-value2,
169 i_mat2-meng3,
186 i_mat2-value3,
204 i_mat2-meng4,
222 i_mat2-value4.
*-->Set counter and add up all values by lgort
v_count = v_count + 1.
v_va1 = v_va1 + i_mat2-value0.
v_va2 = v_va2 + i_mat2-value1.
v_va3 = v_va3 + i_mat2-value2.
v_va4 = v_va4 + i_mat2-value3.
v_va5 = v_va5 + i_mat2-value4.
AT END OF lgort.
WRITE:/10 'Cnt:',
15 v_count,
55 'Subtotal',
82 v_va1.
118 v_va2,
154 v_va3,
186 v_va4,
222 v_va5.
CLEAR v_count. CLEAR v_va1.
CLEAR v_va2. CLEAR v_va3. CLEAR v_va4. clear v_va5.
ENDAT.
ENDLOOP.
ENDFORM. " f_display_detail
FORM f_display_summary .
v_topofpage = 'S'.
LOOP AT i_matsum.
IF NOT i_matsum-cnt0 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:',15 i_matsum-cnt0,
82 i_matsum-value0.
ENDIF.
IF NOT i_matsum-cnt1 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:',15 i_matsum-cnt1,
118 i_matsum-value1.
ENDIF.
IF NOT i_matsum-cnt2 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:',15 i_matsum-cnt2,
154 i_matsum-value2.
ENDIF.
IF NOT i_matsum-cnt3 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:', 15 i_matsum-cnt3,
186 i_matsum-value3.
ENDIF.
IF NOT i_matsum-cnt4 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:', 15 i_matsum-cnt4,
222 i_matsum-value4.
ENDIF.
ENDLOOP.
ENDFORM. " f_display_summary -
How to read data from the excel file using java code.
Hi to all,
I am using below code to getting the data from the excel file but I can't get the corresponding data from the specific file. can anyone give me the correct code to do that... I will waiting for your usefull reply......
advance thanks....
import java.io.*;
import java.sql.*;
public class sample{
public static void main(String[] args){
Connection connection = null;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection( "jdbc:odbc:Mydsn","","" );
Statement st = con.createStatement();
ResultSet rs = st.executeQuery( "Select * from [Sheet1$]" );
System.out.println("sample:"+rs);
ResultSetMetaData rsmd = rs.getMetaData();
System.out.println("samplersd:"+rsmd);
int numberOfColumns = rsmd.getColumnCount();
System.out.println("numberOfColumns:"+numberOfColumns);
while (rs.next()) {
System.out.println("sample1:"+rs);
for (int i = 1; i <= numberOfColumns; i++) {
if (i > 1) System.out.print(", ");
String columnValue = rs.getString(i);
System.out.print(columnValue);
System.out.println("");
st.close();
con.close();
} catch(Exception ex) {
System.err.print("Exception: ");
System.err.println(ex.getMessage());
}1: What is the name of the excel sheet?
2: What is printed in this program? null ? anything?
error?Excel file name is "sample.xls" I set excel file connectivity in my JDBC driver(DSN). Here in my program I am not giving that excel file name. I am giving only that excel sheet name. that is followed
ResultSet rs = st.executeQuery( "Select * from [Sheet1$]" );The output of this program is given bellow.
sample:sun.jdbc.odbc.JdbcOdbcResultSet@1b67f74
samplersd:sun.jdbc.odbc.JdbcOdbcResultSetMetaData@530daa
numberOfColumns:2 -
How to read data from the data provider using javascript
Hi,
Please let me know how to read the data from the dataprovider using javascript(query assigned to the data provider).
My query has filter charateristics, free charateristics, charateristics in rows and key figure in column.
Thanks a lot for your kind help
Regards
KandasamyKandaswamy,
Assign an ID to your table item , then in JavaScript , you can use ID.innerHTML and you will get the HTML code within that table for the same , then you can find out how best to get the exact value you desire from the innerHTML value which is a string with the entire HTML from within the table item.
Arun
Hope it helps.... -
Fetch the data from the Data base based on selection criteria in ABAP
Hi
I am new to ABAP and working on the Screen where User Enters Company code from and to , Document no and to, I have defined as specified below
SELECT-OPTIONS Company FOR p_ccode.
SELECT-OPTIONS Document FOR p_fdocnr.
SELECT-OPTIONS Year FOR p_fyear.
When I debug in the pgm I get the values as
IBT11001100 (From and To Company Code)
IBT23234241002323424246 (From and To doc no)
IBT20092009 (From and To Year)
How can write a SQL select statement to fetch the data from the Database based on the above inputs
Thanks
PRModerator message:
Sorry - this isn't an ABAP training forum. Please press F1 on SELECT-OPTIONS and/or SELECT.
Thread locked.
Rob -
90days or 3months data from the date today
Hi,
I have problem on this query, I need to extract the customers that is on 90days or 3months in their subscription of the product from the date today. I know that the startdate field must be used on the condition but don't know the right formula. I have tried different condition but I'm not getting the exact data. I have tried this AND sysdate-startdate<=90 but this give me also customers with less 90 days into their subscription but I just need customers with exact 90days. While this one startdate=sysdate-90 doesn't give me results but there should be.
SELECT
c.id,
i.firstname||i.name as Name,
to_char(c.startdate,'MM/DD/YYYY') as start_date,
to_char(c.enddate,'MM/DD/YYYY') as expire_date,
to_char(c.canceldate,'MM/DD/YYYY') as cancellation_date
FROM customer c,
info i
WHERE i.id = s.id
AND sysdate-startdate<=90
AND c.enddate>=sysdate
AND c.cancellation_date >= sysdate
Thank you.As David says, there's a hell of a difference between 3 months ago and 90 days ago.
SQL> ed
Wrote file afiedt.buf
1 with t as (select trunc(sysdate,'YYYY') as start_date from dual)
2 ,x as (select rownum rn from dual connect by rownum <= trunc(add_months(sysdate,12),'YYYY')-trunc(sysdate,'YYYY'))
3 --
4 select start_date+rn-1 as dt
5 ,add_months(start_date+rn-1,-3) as "3_months_ago"
6 ,start_date+rn-1-90 as "90_days_ago"
7* from t,x
SQL> /
DT 3_months_ag 90_days_ago
01-Jan-2011 01-Oct-2010 03-Oct-2010
02-Jan-2011 02-Oct-2010 04-Oct-2010
03-Jan-2011 03-Oct-2010 05-Oct-2010
04-Jan-2011 04-Oct-2010 06-Oct-2010
05-Jan-2011 05-Oct-2010 07-Oct-2010
06-Jan-2011 06-Oct-2010 08-Oct-2010
07-Jan-2011 07-Oct-2010 09-Oct-2010
08-Jan-2011 08-Oct-2010 10-Oct-2010
09-Jan-2011 09-Oct-2010 11-Oct-2010
10-Jan-2011 10-Oct-2010 12-Oct-2010
11-Jan-2011 11-Oct-2010 13-Oct-2010
12-Jan-2011 12-Oct-2010 14-Oct-2010
13-Jan-2011 13-Oct-2010 15-Oct-2010
14-Jan-2011 14-Oct-2010 16-Oct-2010
15-Jan-2011 15-Oct-2010 17-Oct-2010
16-Jan-2011 16-Oct-2010 18-Oct-2010
17-Jan-2011 17-Oct-2010 19-Oct-2010
18-Jan-2011 18-Oct-2010 20-Oct-2010
19-Jan-2011 19-Oct-2010 21-Oct-2010
20-Jan-2011 20-Oct-2010 22-Oct-2010
21-Jan-2011 21-Oct-2010 23-Oct-2010
22-Jan-2011 22-Oct-2010 24-Oct-2010
23-Jan-2011 23-Oct-2010 25-Oct-2010
24-Jan-2011 24-Oct-2010 26-Oct-2010
25-Jan-2011 25-Oct-2010 27-Oct-2010
26-Jan-2011 26-Oct-2010 28-Oct-2010
27-Jan-2011 27-Oct-2010 29-Oct-2010
28-Jan-2011 28-Oct-2010 30-Oct-2010
29-Jan-2011 29-Oct-2010 31-Oct-2010
30-Jan-2011 30-Oct-2010 01-Nov-2010
31-Jan-2011 31-Oct-2010 02-Nov-2010
01-Feb-2011 01-Nov-2010 03-Nov-2010
02-Feb-2011 02-Nov-2010 04-Nov-2010
03-Feb-2011 03-Nov-2010 05-Nov-2010
04-Feb-2011 04-Nov-2010 06-Nov-2010
05-Feb-2011 05-Nov-2010 07-Nov-2010
06-Feb-2011 06-Nov-2010 08-Nov-2010
07-Feb-2011 07-Nov-2010 09-Nov-2010
08-Feb-2011 08-Nov-2010 10-Nov-2010
09-Feb-2011 09-Nov-2010 11-Nov-2010
10-Feb-2011 10-Nov-2010 12-Nov-2010
11-Feb-2011 11-Nov-2010 13-Nov-2010
12-Feb-2011 12-Nov-2010 14-Nov-2010
13-Feb-2011 13-Nov-2010 15-Nov-2010
14-Feb-2011 14-Nov-2010 16-Nov-2010
15-Feb-2011 15-Nov-2010 17-Nov-2010
16-Feb-2011 16-Nov-2010 18-Nov-2010
17-Feb-2011 17-Nov-2010 19-Nov-2010
18-Feb-2011 18-Nov-2010 20-Nov-2010
19-Feb-2011 19-Nov-2010 21-Nov-2010
20-Feb-2011 20-Nov-2010 22-Nov-2010
21-Feb-2011 21-Nov-2010 23-Nov-2010
22-Feb-2011 22-Nov-2010 24-Nov-2010
23-Feb-2011 23-Nov-2010 25-Nov-2010
24-Feb-2011 24-Nov-2010 26-Nov-2010
25-Feb-2011 25-Nov-2010 27-Nov-2010
26-Feb-2011 26-Nov-2010 28-Nov-2010
27-Feb-2011 27-Nov-2010 29-Nov-2010
28-Feb-2011 30-Nov-2010 30-Nov-2010
01-Mar-2011 01-Dec-2010 01-Dec-2010
02-Mar-2011 02-Dec-2010 02-Dec-2010
03-Mar-2011 03-Dec-2010 03-Dec-2010
04-Mar-2011 04-Dec-2010 04-Dec-2010
05-Mar-2011 05-Dec-2010 05-Dec-2010
06-Mar-2011 06-Dec-2010 06-Dec-2010
07-Mar-2011 07-Dec-2010 07-Dec-2010
08-Mar-2011 08-Dec-2010 08-Dec-2010
09-Mar-2011 09-Dec-2010 09-Dec-2010
10-Mar-2011 10-Dec-2010 10-Dec-2010
11-Mar-2011 11-Dec-2010 11-Dec-2010
12-Mar-2011 12-Dec-2010 12-Dec-2010
13-Mar-2011 13-Dec-2010 13-Dec-2010
14-Mar-2011 14-Dec-2010 14-Dec-2010
15-Mar-2011 15-Dec-2010 15-Dec-2010
16-Mar-2011 16-Dec-2010 16-Dec-2010
17-Mar-2011 17-Dec-2010 17-Dec-2010
18-Mar-2011 18-Dec-2010 18-Dec-2010
19-Mar-2011 19-Dec-2010 19-Dec-2010
20-Mar-2011 20-Dec-2010 20-Dec-2010
21-Mar-2011 21-Dec-2010 21-Dec-2010
22-Mar-2011 22-Dec-2010 22-Dec-2010
23-Mar-2011 23-Dec-2010 23-Dec-2010
24-Mar-2011 24-Dec-2010 24-Dec-2010
25-Mar-2011 25-Dec-2010 25-Dec-2010
26-Mar-2011 26-Dec-2010 26-Dec-2010
27-Mar-2011 27-Dec-2010 27-Dec-2010
28-Mar-2011 28-Dec-2010 28-Dec-2010
29-Mar-2011 29-Dec-2010 29-Dec-2010
30-Mar-2011 30-Dec-2010 30-Dec-2010
31-Mar-2011 31-Dec-2010 31-Dec-2010
01-Apr-2011 01-Jan-2011 01-Jan-2011
02-Apr-2011 02-Jan-2011 02-Jan-2011
03-Apr-2011 03-Jan-2011 03-Jan-2011
04-Apr-2011 04-Jan-2011 04-Jan-2011
05-Apr-2011 05-Jan-2011 05-Jan-2011
06-Apr-2011 06-Jan-2011 06-Jan-2011
07-Apr-2011 07-Jan-2011 07-Jan-2011
08-Apr-2011 08-Jan-2011 08-Jan-2011
09-Apr-2011 09-Jan-2011 09-Jan-2011
10-Apr-2011 10-Jan-2011 10-Jan-2011
11-Apr-2011 11-Jan-2011 11-Jan-2011
12-Apr-2011 12-Jan-2011 12-Jan-2011
13-Apr-2011 13-Jan-2011 13-Jan-2011
14-Apr-2011 14-Jan-2011 14-Jan-2011
15-Apr-2011 15-Jan-2011 15-Jan-2011
16-Apr-2011 16-Jan-2011 16-Jan-2011
17-Apr-2011 17-Jan-2011 17-Jan-2011
18-Apr-2011 18-Jan-2011 18-Jan-2011
19-Apr-2011 19-Jan-2011 19-Jan-2011
20-Apr-2011 20-Jan-2011 20-Jan-2011
21-Apr-2011 21-Jan-2011 21-Jan-2011
22-Apr-2011 22-Jan-2011 22-Jan-2011
23-Apr-2011 23-Jan-2011 23-Jan-2011
24-Apr-2011 24-Jan-2011 24-Jan-2011
25-Apr-2011 25-Jan-2011 25-Jan-2011
26-Apr-2011 26-Jan-2011 26-Jan-2011
27-Apr-2011 27-Jan-2011 27-Jan-2011
28-Apr-2011 28-Jan-2011 28-Jan-2011
29-Apr-2011 29-Jan-2011 29-Jan-2011
30-Apr-2011 31-Jan-2011 30-Jan-2011
01-May-2011 01-Feb-2011 31-Jan-2011
02-May-2011 02-Feb-2011 01-Feb-2011
03-May-2011 03-Feb-2011 02-Feb-2011
04-May-2011 04-Feb-2011 03-Feb-2011
05-May-2011 05-Feb-2011 04-Feb-2011
06-May-2011 06-Feb-2011 05-Feb-2011
07-May-2011 07-Feb-2011 06-Feb-2011
08-May-2011 08-Feb-2011 07-Feb-2011
09-May-2011 09-Feb-2011 08-Feb-2011
10-May-2011 10-Feb-2011 09-Feb-2011
11-May-2011 11-Feb-2011 10-Feb-2011
12-May-2011 12-Feb-2011 11-Feb-2011
13-May-2011 13-Feb-2011 12-Feb-2011
14-May-2011 14-Feb-2011 13-Feb-2011
15-May-2011 15-Feb-2011 14-Feb-2011
16-May-2011 16-Feb-2011 15-Feb-2011
17-May-2011 17-Feb-2011 16-Feb-2011
18-May-2011 18-Feb-2011 17-Feb-2011
19-May-2011 19-Feb-2011 18-Feb-2011
20-May-2011 20-Feb-2011 19-Feb-2011
21-May-2011 21-Feb-2011 20-Feb-2011
22-May-2011 22-Feb-2011 21-Feb-2011
23-May-2011 23-Feb-2011 22-Feb-2011
24-May-2011 24-Feb-2011 23-Feb-2011
25-May-2011 25-Feb-2011 24-Feb-2011
26-May-2011 26-Feb-2011 25-Feb-2011
27-May-2011 27-Feb-2011 26-Feb-2011
28-May-2011 28-Feb-2011 27-Feb-2011
29-May-2011 28-Feb-2011 28-Feb-2011
30-May-2011 28-Feb-2011 01-Mar-2011
31-May-2011 28-Feb-2011 02-Mar-2011
01-Jun-2011 01-Mar-2011 03-Mar-2011
02-Jun-2011 02-Mar-2011 04-Mar-2011
03-Jun-2011 03-Mar-2011 05-Mar-2011
04-Jun-2011 04-Mar-2011 06-Mar-2011
05-Jun-2011 05-Mar-2011 07-Mar-2011
06-Jun-2011 06-Mar-2011 08-Mar-2011
07-Jun-2011 07-Mar-2011 09-Mar-2011
08-Jun-2011 08-Mar-2011 10-Mar-2011
09-Jun-2011 09-Mar-2011 11-Mar-2011
10-Jun-2011 10-Mar-2011 12-Mar-2011
11-Jun-2011 11-Mar-2011 13-Mar-2011
12-Jun-2011 12-Mar-2011 14-Mar-2011
13-Jun-2011 13-Mar-2011 15-Mar-2011
14-Jun-2011 14-Mar-2011 16-Mar-2011
15-Jun-2011 15-Mar-2011 17-Mar-2011
16-Jun-2011 16-Mar-2011 18-Mar-2011
17-Jun-2011 17-Mar-2011 19-Mar-2011
18-Jun-2011 18-Mar-2011 20-Mar-2011
19-Jun-2011 19-Mar-2011 21-Mar-2011
20-Jun-2011 20-Mar-2011 22-Mar-2011
21-Jun-2011 21-Mar-2011 23-Mar-2011
22-Jun-2011 22-Mar-2011 24-Mar-2011
23-Jun-2011 23-Mar-2011 25-Mar-2011
24-Jun-2011 24-Mar-2011 26-Mar-2011
25-Jun-2011 25-Mar-2011 27-Mar-2011
26-Jun-2011 26-Mar-2011 28-Mar-2011
27-Jun-2011 27-Mar-2011 29-Mar-2011
28-Jun-2011 28-Mar-2011 30-Mar-2011
29-Jun-2011 29-Mar-2011 31-Mar-2011
30-Jun-2011 31-Mar-2011 01-Apr-2011
01-Jul-2011 01-Apr-2011 02-Apr-2011
02-Jul-2011 02-Apr-2011 03-Apr-2011
03-Jul-2011 03-Apr-2011 04-Apr-2011
04-Jul-2011 04-Apr-2011 05-Apr-2011
05-Jul-2011 05-Apr-2011 06-Apr-2011
06-Jul-2011 06-Apr-2011 07-Apr-2011
07-Jul-2011 07-Apr-2011 08-Apr-2011
08-Jul-2011 08-Apr-2011 09-Apr-2011
09-Jul-2011 09-Apr-2011 10-Apr-2011
10-Jul-2011 10-Apr-2011 11-Apr-2011
11-Jul-2011 11-Apr-2011 12-Apr-2011
12-Jul-2011 12-Apr-2011 13-Apr-2011
13-Jul-2011 13-Apr-2011 14-Apr-2011
14-Jul-2011 14-Apr-2011 15-Apr-2011
15-Jul-2011 15-Apr-2011 16-Apr-2011
16-Jul-2011 16-Apr-2011 17-Apr-2011
17-Jul-2011 17-Apr-2011 18-Apr-2011
18-Jul-2011 18-Apr-2011 19-Apr-2011
19-Jul-2011 19-Apr-2011 20-Apr-2011
20-Jul-2011 20-Apr-2011 21-Apr-2011
21-Jul-2011 21-Apr-2011 22-Apr-2011
22-Jul-2011 22-Apr-2011 23-Apr-2011
23-Jul-2011 23-Apr-2011 24-Apr-2011
24-Jul-2011 24-Apr-2011 25-Apr-2011
25-Jul-2011 25-Apr-2011 26-Apr-2011
26-Jul-2011 26-Apr-2011 27-Apr-2011
27-Jul-2011 27-Apr-2011 28-Apr-2011
28-Jul-2011 28-Apr-2011 29-Apr-2011
29-Jul-2011 29-Apr-2011 30-Apr-2011
30-Jul-2011 30-Apr-2011 01-May-2011
31-Jul-2011 30-Apr-2011 02-May-2011
01-Aug-2011 01-May-2011 03-May-2011
02-Aug-2011 02-May-2011 04-May-2011
03-Aug-2011 03-May-2011 05-May-2011
04-Aug-2011 04-May-2011 06-May-2011
05-Aug-2011 05-May-2011 07-May-2011
06-Aug-2011 06-May-2011 08-May-2011
07-Aug-2011 07-May-2011 09-May-2011
08-Aug-2011 08-May-2011 10-May-2011
09-Aug-2011 09-May-2011 11-May-2011
10-Aug-2011 10-May-2011 12-May-2011
11-Aug-2011 11-May-2011 13-May-2011
12-Aug-2011 12-May-2011 14-May-2011
13-Aug-2011 13-May-2011 15-May-2011
14-Aug-2011 14-May-2011 16-May-2011
15-Aug-2011 15-May-2011 17-May-2011
16-Aug-2011 16-May-2011 18-May-2011
17-Aug-2011 17-May-2011 19-May-2011
18-Aug-2011 18-May-2011 20-May-2011
19-Aug-2011 19-May-2011 21-May-2011
20-Aug-2011 20-May-2011 22-May-2011
21-Aug-2011 21-May-2011 23-May-2011
22-Aug-2011 22-May-2011 24-May-2011
23-Aug-2011 23-May-2011 25-May-2011
24-Aug-2011 24-May-2011 26-May-2011
25-Aug-2011 25-May-2011 27-May-2011
26-Aug-2011 26-May-2011 28-May-2011
27-Aug-2011 27-May-2011 29-May-2011
28-Aug-2011 28-May-2011 30-May-2011
29-Aug-2011 29-May-2011 31-May-2011
30-Aug-2011 30-May-2011 01-Jun-2011
31-Aug-2011 31-May-2011 02-Jun-2011
01-Sep-2011 01-Jun-2011 03-Jun-2011
02-Sep-2011 02-Jun-2011 04-Jun-2011
03-Sep-2011 03-Jun-2011 05-Jun-2011
04-Sep-2011 04-Jun-2011 06-Jun-2011
05-Sep-2011 05-Jun-2011 07-Jun-2011
06-Sep-2011 06-Jun-2011 08-Jun-2011
07-Sep-2011 07-Jun-2011 09-Jun-2011
08-Sep-2011 08-Jun-2011 10-Jun-2011
09-Sep-2011 09-Jun-2011 11-Jun-2011
10-Sep-2011 10-Jun-2011 12-Jun-2011
11-Sep-2011 11-Jun-2011 13-Jun-2011
12-Sep-2011 12-Jun-2011 14-Jun-2011
13-Sep-2011 13-Jun-2011 15-Jun-2011
14-Sep-2011 14-Jun-2011 16-Jun-2011
15-Sep-2011 15-Jun-2011 17-Jun-2011
16-Sep-2011 16-Jun-2011 18-Jun-2011
17-Sep-2011 17-Jun-2011 19-Jun-2011
18-Sep-2011 18-Jun-2011 20-Jun-2011
19-Sep-2011 19-Jun-2011 21-Jun-2011
20-Sep-2011 20-Jun-2011 22-Jun-2011
21-Sep-2011 21-Jun-2011 23-Jun-2011
22-Sep-2011 22-Jun-2011 24-Jun-2011
23-Sep-2011 23-Jun-2011 25-Jun-2011
24-Sep-2011 24-Jun-2011 26-Jun-2011
25-Sep-2011 25-Jun-2011 27-Jun-2011
26-Sep-2011 26-Jun-2011 28-Jun-2011
27-Sep-2011 27-Jun-2011 29-Jun-2011
28-Sep-2011 28-Jun-2011 30-Jun-2011
29-Sep-2011 29-Jun-2011 01-Jul-2011
30-Sep-2011 30-Jun-2011 02-Jul-2011
01-Oct-2011 01-Jul-2011 03-Jul-2011
02-Oct-2011 02-Jul-2011 04-Jul-2011
03-Oct-2011 03-Jul-2011 05-Jul-2011
04-Oct-2011 04-Jul-2011 06-Jul-2011
05-Oct-2011 05-Jul-2011 07-Jul-2011
06-Oct-2011 06-Jul-2011 08-Jul-2011
07-Oct-2011 07-Jul-2011 09-Jul-2011
08-Oct-2011 08-Jul-2011 10-Jul-2011
09-Oct-2011 09-Jul-2011 11-Jul-2011
10-Oct-2011 10-Jul-2011 12-Jul-2011
11-Oct-2011 11-Jul-2011 13-Jul-2011
12-Oct-2011 12-Jul-2011 14-Jul-2011
13-Oct-2011 13-Jul-2011 15-Jul-2011
14-Oct-2011 14-Jul-2011 16-Jul-2011
15-Oct-2011 15-Jul-2011 17-Jul-2011
16-Oct-2011 16-Jul-2011 18-Jul-2011
17-Oct-2011 17-Jul-2011 19-Jul-2011
18-Oct-2011 18-Jul-2011 20-Jul-2011
19-Oct-2011 19-Jul-2011 21-Jul-2011
20-Oct-2011 20-Jul-2011 22-Jul-2011
21-Oct-2011 21-Jul-2011 23-Jul-2011
22-Oct-2011 22-Jul-2011 24-Jul-2011
23-Oct-2011 23-Jul-2011 25-Jul-2011
24-Oct-2011 24-Jul-2011 26-Jul-2011
25-Oct-2011 25-Jul-2011 27-Jul-2011
26-Oct-2011 26-Jul-2011 28-Jul-2011
27-Oct-2011 27-Jul-2011 29-Jul-2011
28-Oct-2011 28-Jul-2011 30-Jul-2011
29-Oct-2011 29-Jul-2011 31-Jul-2011
30-Oct-2011 30-Jul-2011 01-Aug-2011
31-Oct-2011 31-Jul-2011 02-Aug-2011
01-Nov-2011 01-Aug-2011 03-Aug-2011
02-Nov-2011 02-Aug-2011 04-Aug-2011
03-Nov-2011 03-Aug-2011 05-Aug-2011
04-Nov-2011 04-Aug-2011 06-Aug-2011
05-Nov-2011 05-Aug-2011 07-Aug-2011
06-Nov-2011 06-Aug-2011 08-Aug-2011
07-Nov-2011 07-Aug-2011 09-Aug-2011
08-Nov-2011 08-Aug-2011 10-Aug-2011
09-Nov-2011 09-Aug-2011 11-Aug-2011
10-Nov-2011 10-Aug-2011 12-Aug-2011
11-Nov-2011 11-Aug-2011 13-Aug-2011
12-Nov-2011 12-Aug-2011 14-Aug-2011
13-Nov-2011 13-Aug-2011 15-Aug-2011
14-Nov-2011 14-Aug-2011 16-Aug-2011
15-Nov-2011 15-Aug-2011 17-Aug-2011
16-Nov-2011 16-Aug-2011 18-Aug-2011
17-Nov-2011 17-Aug-2011 19-Aug-2011
18-Nov-2011 18-Aug-2011 20-Aug-2011
19-Nov-2011 19-Aug-2011 21-Aug-2011
20-Nov-2011 20-Aug-2011 22-Aug-2011
21-Nov-2011 21-Aug-2011 23-Aug-2011
22-Nov-2011 22-Aug-2011 24-Aug-2011
23-Nov-2011 23-Aug-2011 25-Aug-2011
24-Nov-2011 24-Aug-2011 26-Aug-2011
25-Nov-2011 25-Aug-2011 27-Aug-2011
26-Nov-2011 26-Aug-2011 28-Aug-2011
27-Nov-2011 27-Aug-2011 29-Aug-2011
28-Nov-2011 28-Aug-2011 30-Aug-2011
29-Nov-2011 29-Aug-2011 31-Aug-2011
30-Nov-2011 31-Aug-2011 01-Sep-2011
01-Dec-2011 01-Sep-2011 02-Sep-2011
02-Dec-2011 02-Sep-2011 03-Sep-2011
03-Dec-2011 03-Sep-2011 04-Sep-2011
04-Dec-2011 04-Sep-2011 05-Sep-2011
05-Dec-2011 05-Sep-2011 06-Sep-2011
06-Dec-2011 06-Sep-2011 07-Sep-2011
07-Dec-2011 07-Sep-2011 08-Sep-2011
08-Dec-2011 08-Sep-2011 09-Sep-2011
09-Dec-2011 09-Sep-2011 10-Sep-2011
10-Dec-2011 10-Sep-2011 11-Sep-2011
11-Dec-2011 11-Sep-2011 12-Sep-2011
12-Dec-2011 12-Sep-2011 13-Sep-2011
13-Dec-2011 13-Sep-2011 14-Sep-2011
14-Dec-2011 14-Sep-2011 15-Sep-2011
15-Dec-2011 15-Sep-2011 16-Sep-2011
16-Dec-2011 16-Sep-2011 17-Sep-2011
17-Dec-2011 17-Sep-2011 18-Sep-2011
18-Dec-2011 18-Sep-2011 19-Sep-2011
19-Dec-2011 19-Sep-2011 20-Sep-2011
20-Dec-2011 20-Sep-2011 21-Sep-2011
21-Dec-2011 21-Sep-2011 22-Sep-2011
22-Dec-2011 22-Sep-2011 23-Sep-2011
23-Dec-2011 23-Sep-2011 24-Sep-2011
24-Dec-2011 24-Sep-2011 25-Sep-2011
25-Dec-2011 25-Sep-2011 26-Sep-2011
26-Dec-2011 26-Sep-2011 27-Sep-2011
27-Dec-2011 27-Sep-2011 28-Sep-2011
28-Dec-2011 28-Sep-2011 29-Sep-2011
29-Dec-2011 29-Sep-2011 30-Sep-2011
30-Dec-2011 30-Sep-2011 01-Oct-2011
31-Dec-2011 30-Sep-2011 02-Oct-2011
365 rows selected.
SQL>If you look at the dates around the end of May, 3 months ago stays at 28th Feb for 4 days, whilst 90 days ago is continually progressive.
Also, if you look at the dates around 29th and 30th November, then the 3 months ago misses the 30th August out (that's what David was talking about)
Depends what the actual requirements are, but if it's for a daily rolling window, I'd probably go for the 90 days version. If it's for months reports, I'd go for the monthly version.
Edited by: BluShadow on 11-Feb-2011 12:14 -
Service Level Tracking Reports show no data from the data warehouse db.
Hi, I have some Service Level Tracking reports that will only show data from the last few days. If I select last month as the time frame, there is no data displayed. All of these reports have previously worked fine. Nothing to my knowledge
has changed, and it appears that the data is still being collected in the data warehouse database. Any thoughts would be greatly appreciated.Is this meant for SCOM forum
https://social.technet.microsoft.com/Forums/systemcenter/en-US/home?category=systemcenteroperationsmanager
Gerry Hampson | Blog:
www.gerryhampsoncm.blogspot.ie | LinkedIn:
Gerry Hampson | Twitter:
@gerryhampson -
How to get data from the called program using SUBMIT in a background job?
Hi Experts,
I've a program which creates a background job using JOB_OPEN and JOB_CLOSE function modules.
Between the above function modules I need to call a program using SUBMIT VIA JOB statement.
My problem is, How do I fetch some data in an internal table in the called program to the calling program after the SUBMIT statement?
I tried to EXPORT and IMPORT the data, but they are giving a failed sy-subrc when using this background job.
Kindly let me know your inputs and valuable suggestions.Kumar,
When we execute a program as a background job then the output will be sent to Spool which needs to be fetched again.I guess we need to use Submit via spool as mentioned by Rajat.
Check these threads to get some idea
submit report to spool & import spool id
Re: Generate Spool for a report
K.Kiran. -
I created a calculated column "Expiration Date" in SharePoint 2010 with formula, =IF([Contingent Hire]=TRUE,(Created+90),(IF([Contingent Hire]=FALSE," ")))
This works in the SharePoint list but when I go to edit the Edit Form in Designer. I get the error specified in the title of this post. I'm trying to make it so the Expiration Date is blank when another column, "Contingent Hire" (a YES/No
column) is FALSE.
The Edit Form is essentially a DataViewWebpart. If I remove the " ", like so, "(IF([Contingent Hire]=FALSE,))" from the calc column, the error goes away; however, the Expiration Date field does not
remain blank like I want it to.
Does anyone have any suggestions? (Below is the error generated when I open Designer and then try to open the Edit form for the corresponding list containing the calc column)
JackSki123Hi Jack,
Could you provide a screenshot about this issue?
As Dimitri suggested, you can install the update for your SharePoint Designer and check again.
And you can also check if you can display "NA" instead of " " in your calculated column per the following post.
http://rajeshspillai.blogspot.in/2012/03/server-returned-non-specific-error-when.html
Thanks
Daniel Yang
TechNet Community Support -
How to read the hierarchy data from the same table using loop in AMDP method
Hi All,
We have a requirement to get the top partner from BUT050 table.
Here the Top parent is nothing but the top most in the hierarchy of the partners from BUT050.
Example:
For partner 1234 (BUT050-PARTNER1) there is partner 3523(BUT050-PARTNER2) one level above
For partner 3523(BUT050-PARTNER1) there is partner 4544 (BUT050-PARTNER2) last level .
so in this case for the partner 1234 the Top parent is 4544 .
I have created AMDP Procedure method to get the top-parnet and below given is the logic implemented in AMDP method.
Here i have implemented a recursive logic with the WHILE loop to get the top most hierarchy partner from the same table BUT050
IV_Parent is the input partner and ev_top_parent is the output value.
AMDP Procedure Method:
DECLARE lv_date VARCHAR(8) := TO_VARCHAR (current_date, 'YYYYMMDD');
DECLARE found INT := 1;
iv_partner1 = SELECT partner1 FROM but050
WHERE partner2 = iv_partner
AND reltyp = :iv_hierarchy
AND date_to >= :lv_date
AND date_from <= :lv_date;
WHILE found <> 0 do
select partner1 into ev_top_parent from :iv_partner1;
iv_partner1 = SELECT partner1 FROM but050
WHERE partner2 in ( select partner1 from :iv_partner1 where partner1 is not null)
AND reltyp = 'ZBP004'
AND date_to >= :lv_date
AND date_from <= :lv_date;
select COUNT ( partner1 ) INTO found FROM :IV_PARTNER1;
END WHILE;
This method is working fine, but here it is only taking one single partner and getting the top parent as output.
Now i would like to convert this mehtod so as to accept n number of partners (not one single partner) as input and should process each partner to get the top parent.
Could anyone guide me how can i handle the given AMDP method further so as to work some how it is within another loop from other AMDP method.
Thanks.
Regards,
Laxman.PHi
Go to SE11 and enter the hierarchy table name.
/BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
Thanks
TG -
Hi all.
I think that the problem I want to discuss is well-known, but still I got no answer whatever I tried ...
I installed the BIEE on Linux (32 bit, OEL 5 - to be more precise), the complete installation was not a big deal. After that I installed the Administration tool on my laptop and created the repository. So... my tnsnames.ora on the laptop looks like this:
TESTDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.5)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testdb)
And the tnsnames.ora on server, in its turn, looks like this:
TESTDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testdb.localdomain)
The database worked normally and I created and transferred the repository to the server and started it up.
It started without any errors, but when I tried to fetch the data via the representation services I got the error:
Odbc driver returned an error (SQLExecDirectW).
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred.
[nQSError: 16023] The ODBC function has returned an error. The database may not be available, or the network may be down. (HY000)
I discovered, that the ODBC on my laptop was named not correctly (it should have been identical to tnsnames entry) - so I corrected it, saved and replaced the repository on the server and restarted it... - and still got the same error.
Apparently, something is wrong with the data source. So let me put here some more information...
My user.sh looks like this:
ORACLE_HOME=/u01/app/ora/product/11.2.0/dbhome_1
export ORACLE_HOME
TNS_ADMIN=$ORACLE_HOME/network/admin
export TNS_ADMIN
PATH=$ORACLE_HOME/bin:/opt/bin:$PATH
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
and my odbc.ini looks like this:
[ODBC]
Trace=0
TraceFile=odbctrace.out
TraceDll=/u01/OracleBI/odbc/lib/odbctrac.so
InstallDir=/u01/OracleBI/odbc
UseCursorLib=0
IANAAppCodePage=4
[ODBC Data Sources]
AnalyticsWeb=Oracle BI Server
Cluster=Oracle BI Server
SSL_Sample=Oracle BI Server
TESTDB=Oracle BI Server
[TESTDB]
Driver=/u01/OracleBI/server/Bin/libnqsodbc.so
Description=Oracle BI Server
ServerMachine=local
Repository=SH
Catalog=
UID=
PWD=
Port=9703
[AnalyticsWeb]
Driver=/u01/OracleBI/server/Bin/libnqsodbc.so
Description=Oracle BI Server
ServerMachine=local
Repository=
Catalog=
UID=
PWD=
Port=9703
[Cluster]
Driver=/u01/OracleBI/server/Bin/libnqsodbc.so
Description=Oracle BI Server
ServerMachine=local
Repository=
FinalTimeOutForContactingCCS=60
InitialTimeOutForContactingPrimaryCCS=5
IsClusteredDSN=Yes
Catalog=SnowFlakeSales
UID=Administrator
PWD=
Port=9703
PrimaryCCS=
PrimaryCCSPort=9706
SecondaryCCS=
SecondaryCCSPort=9706
Regional=No
[SSL_Sample]
Driver=/u01/OracleBI/server/Bin/libnqsodbc.so
Description=Oracle BI Server
ServerMachine=localhost
Repository=
Catalog=SnowflakeSales
UID=
PWD=
Port=9703
SSL=Yes
SSLCertificateFile=/path/to/ssl/certificate.pem
SSLPrivateKeyFile=/path/to/ssl/privatekey.pem
SSLPassphraseFile=/path/to/ssl/passphrase.txt
SSLCipherList=
SSLVerifyPeer=No
SSLCACertificateDir=/path/to/ca/certificate/dir
SSLCACertificateFile=/path/to/ca/certificate/file.pem
SSLTrustedPeerDNs=
SSLCertVerificationDepth=9
Can anybody point a finger where the error line is? According to the documentation it should work fine.Maybe the driver name is wrong? What driver I need then?
Cause I can't find it.
I'm really sorry to bother, guys :) Let me know if you get some ideas about it (metalink didn't help).OK, several things wrong here. First the odbc.ini is not meant to be used for Oracle databases, that's not supported on Linux. On Linux you should OCI (Oracle native drivers) and nothing should be added on odbc.ini. Your user.sh seems to be pointing to your DB installation path. This is not correct. It should point to your Oracle client installation so you need to install the Oracle FULL client somewhere. Typically this is normally done with the same OS account as the one used for OBIEE whereas the DB normally runs with the oracle account. Once you got the client installed test it under the OBIEE account doing tnsping and sqlplus to your DB. Also the LD_LIBRARY_PATH should point to $ORACLE_HOME/lib32 not lib as the lib directory is the 64bits and OBIEE uses the 32bits libraries even in 64bits OSes. Finally change your RPD connection to use OCI. Make all those changes and you should be good.
-
How to retrieve the data from the data base,-- its urgent!
public class UserInfo extends GenericServlet
public void service(ServletRequest req,ServletResponse res)throws ServletException,IOException
res.setContentType("text/html");
PrintWriter out=res.getWriter();
Connection con=null;
PreparedStatement pst=null;
ResultSet rs=null;
try{
con=DriverManager.getConnection("jdbc:mysql://localhost/userdetails","mysql","xxxx");
pst=con.prepareStatement("select * from user_info where ufn=? and uln=? and ueid=? and uname=? and upass=? and urd=? and uage=? and sem=?; ");
rs=pst.executeQuery();
if (rs.next())
{out.println("first name"+rs.getString(1)+"Last name"+rs.getString(2)+"email ID"+rs.getString(3)+"Login name"+rs.getString(4)+"password: masked <br>Registration Date "+rs.getString(7)+"Users age"+rs.getString(8)+"Employed or not if yes 1 and for No 0"+rs.getString(6) );
return ;
catch(Exception e){out.println(e);}
finally{try{con.close();}catch(Exception e){out.println(e);}}
exception : is http method not found ......
please help me1) When you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read.
2) I don't know what you are saying is not found. More information would be helpful.
3) You had better think of binding some parameters to your PreparedStatement/.
4) Please close your ResultSets and Statements as well as your Connections.
Maybe you are looking for
-
Tax calculation in Pricing Procedure
Hi Guys, I have a pricing procedure setup to be modified for calculation of surcharge. The current pricing procedure calculates surcharge based on total price. Needs to change it to calculate on Unit price.How to achieve this? Current Setup Price
-
How can I tell which generation my iPod Classic is?
I have the box & manual but can't find which generation it is?
-
I try to go to this website but it says it was done loading and it is just a blank screen. == URL of affected sites == http://www.staplesrewardscenter.com or https://www.staplesrewardscenter.com
-
Obviously, Adobe is warning us of an April release of Flash. What exactly is happening with the software and when in APril is this happening? I'm still having problems with stuttering videos, out-of-sync sound, crashing, and error messages galore. On
-
I keep getting an error dialogue when running FireFox, it says "rappino.exe has encountered a problem and will close" What is rappino.exe, is it part of FireFox, should I worry" == This happened == A few times a week