Getting Sort parameters(order,columns) from DatabaseFilter.
Hi all,
Could anyone guide me on how to get the Columns that are being selected for sorting
and the sorting order itself from the DatabaseFilter. We have our own class which
takes in the column names and sort order and generates the SQL(similar to the
DataBaseFilter). Therefore, I need to get the selected columns from DataBase Filter.
I have tried :
//sort..first get sortFilterService
sortFilterService = SortFilterService.getInstance(getRequest());
//get associated sort filter
DatabaseFilter uiFilter=sortFilterService.getDatabaseFilter(getGridName());
//get SQL params..
String sortClauseFromUI=uiFilter.getOrderByClause().getSQL();
SQLParameter[] params=uiFilter.getOrderByClause().getParameters();
Whenever i try this, the params[] is always empty..but the String sortClauseFromUI
contains "ORDER BY "COLUMN1"..."COLUMN2"...DESC" etc. Could anyone shed some light?
Thanks.
Vik.
It all depends on how much data you need to delete from the database.
If all you need is the id, and you generate that id into the checkboxes, it becomes fairly simple
String[] idsToDelete = request.getParameterValues("checkbox");
This will give you an array of the values of all the selected checkboxes. - ie a String[] of all the ids you need to delete.
String[] idsToDelete = request.getParameterValues("checkbox");
for(int i=0; i<idsToDelete.length; i++){
deleteRecord(Integer.parseInt(idsToDelete));
The hashtable method comes in useful when you need to call on the object itself to delete itself. That might not be necessary in this case.
Hope this helps,
evnafets
Similar Messages
-
How to get master sales order number from delivery number
Hi All,
I need logic for getting master sales order number from available Delivery number.
Note: There can be many SO's in diffrent levels.
Finally i need to pick up master sales order no.
Thanks in advance.
Thanks,
Deep.Hi,
I have a outbound delivery[VL03N] 'X' in my system .
Then for getting sales order no i am writing below code:
SELECT single vbelv vbeln
from vbfa
INTO (vbelv, vbeln)
where vbeln EQ p_vbeln AND
vbtyp_n EQ 'J'.
Then vbelv i need to pick up master sales order no.
SELECT vbelv vbeln
from vbfa
INTO TABLE i_so
where vbeln EQ l_vbelv AND
vbtyp_n EQ 'C'.
If i write code as above it is giving four sales orders which one of them is master sales order no!
Thanks,
Deep. -
How to get a single row column from a viewobject in java?
I have a class file that goes out and gets a viewobject and sets its where clause
this is it:
vcRow = vc.createViewCriteriaRow();
vcRow.setAttribute("LogonId", "='" + strPcis_Login.toUpperCase() + "'");
vc.addElement(vcRow);
vo.applyViewCriteria(vc);
vo.executeQuery();
I know this working cause I can watch it in debug..
but now the problem.
I've looked in the docs and don't see how one can pull the value of the row it found and place it in a uix page in a textinput area
how can I get a single row column, in this case the UserName that is in the view object to a string and then place it into my
uix page? I've looked and looked and don't see a method for this.
is there a way to take the oracle.cabo.servlet.Page and set a textinput with a viewobject get method?
what way do you do this and where is it documented?is there a way to take the oracle.cabo.servlet.Page and set a textinput with a viewobject get method?
what way do you do this and where is it documented? What you can do is get the value from your VO and set it somewhere that UIX can data bind to -- as a Page proprety, on HttpSession, etc. This is documented in Chapters 4 (Data Binding) and 5 (Controller) of the UIX Developer's Guide.
To set a property, you use Page.setProperty(String key, String value). Then, in your UIX file, to make a textInput that has the value pulled from a given page property, use:
<textInput data:text="key@ctrl:page" />
-brian
Team UIX -
Get the Sales Order number from Service Notification
Hi Experts,
Please let me know if there are any BAPI's or standard Function modules to get the Sales order for a given Service Notification number.
Thanks a lotHi Ashish,
Hope the listed BAPI's let you solve the issue:
BAPI_SERVNOT_CLOSE Complete service notification
BAPI_SERVNOT_CREATE Create service notification
BAPI_SERVNOT_DEL_DATA Delete Items, Causes, Activities, Tasks, Partners of the service notif.
BAPI_SERVNOT_GET_DETAIL Get details about a service notification
BAPI_SERVNOT_MODIFY_DATA Modify a service notification or associated subdata
BAPI_SERVNOT_POSTPONE Postpone service notification
BAPI_SERVNOT_PUTINPROGRESS Put in process a service notification
BAPI_SERVNOT_SAVE Save service notification
BAPI_SERVICENOTIFICAT_CREATE Create service notification
BAPI_SERVICENOTIFICAT_GETLIST Select service notifications according to customer or contact person
BAPI_SERVNOT_CHANGEUSRSTAT Change the user status of a service notification
Regards,
Soundarya. -
Get the sales order text from ITS and save it in SAP.
Hi,
I have created an application to create sales order from ITS. In this app i'm having a text field to fet the header text for the order. & after that I'm calling an RFC which has a BAPI to create the sales order.
Now, when i enter the text for header texts in frontend (separated by ENTER), then it saves only the first line of the text.
I've tried using :
SPLIT ordernotes AT cl_abap_char_utilities=>cr_lf INTO TABLE t_ordnotes.
and using FM: CREATE_TEXT,
but still, it is saving only the first line.
Can anyone please help me with this ?????
Its urgent.
Thanks in advance,
Hemant.Hi
See the sample BDC program that is used to upload the Material LONG Texts into SAP using MM01 Tcode
check this may be helpful
REPORT zmm_longtext
NO STANDARD PAGE HEADING
LINE-SIZE 255.
Internal Table for Upload of Long Texts Data
DATA: BEGIN OF itab1 OCCURS 0,
matnr LIKE mara-matnr, " Material
text LIKE tline-tdline, " Long Text
END OF itab1.
Internal Table for Upload of Long Texts Data
DATA: BEGIN OF itab OCCURS 0,
matnr LIKE mara-matnr, " Material
text LIKE tline-tdline, " Long Text
END OF itab.
To create Long Text lines for CREATE_TEXT function module
DATA:BEGIN OF dt_lines OCCURS 0.
INCLUDE STRUCTURE tline. " Long Text
DATA:END OF dt_lines.
Variable declarations for CREATE_TEXT function module
DATA : dl_name TYPE thead-tdname, " Object Name
dl_lan TYPE thead-tdspras, " Language
gv_matnr TYPE matnr.
Constants
CONSTANTS:
Object ID for Long Text of Material Basic Data 1
c_best TYPE thead-tdid VALUE 'GRUN',
c_material TYPE thead-tdobject VALUE 'MATERIAL'. " Object
Parameters
PARAMETERS p_file LIKE rlgrap-filename.
At selection-screen on Value Request for file Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Get the F4 Values for the File
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
Start Of Selection
START-OF-SELECTION.
*To Upload Flat file
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = itab1
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
SORT itab1 BY matnr.
LOOP AT itab1.
CLEAR gv_matnr.
SELECT SINGLE matnr INTO gv_matnr
FROM mara WHERE bismt = itab1-matnr.
IF itab1-text NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text.
APPEND itab.
ENDIF.
CLEAR itab.
ENDLOOP.
DELETE itab WHERE matnr EQ ' '.
Upload the Texts
SORT itab BY matnr.
LOOP AT itab.
dt_lines-tdformat = 'ST'.
dt_lines-tdline = itab-text.
APPEND dt_lines.
dl_lan = sy-langu.
dl_name = itab-matnr.
Call the Function Module to Create Text
CALL FUNCTION 'CREATE_TEXT'
EXPORTING
fid = c_best
flanguage = dl_lan
fname = dl_name
fobject = c_material
save_direct = 'X'
fformat = '*'
TABLES
flines = dt_lines
EXCEPTIONS
no_init = 1
no_save = 2
OTHERS = 3.
IF sy-subrc <> 0.
WRITE:/ 'Long Text Creation failed for Material'(001),
itab-matnr.
ELSE.
WRITE:/ 'Long Text Created Successfully for Material'(002),
itab-matnr.
ENDIF.
AT END OF matnr.
REFRESH dt_lines.
ENDAT.
ENDLOOP.
<b>Reward points for useful Answers</b>
Regards
Anji -
How to remove Sorting of the columns from Advance TAB
Hello Experts,
I have a simple question -
Have a report which produces results from values selected from prompt. The data in report is correct, however the ffirst 2 columns in the Report are being grouped by. So when a user downloads the Report in EXCEL, they see that the fiirst 2 columns are not populated in all the cells of the Excel and they have to populated them manually.
I have tried to remove the sort order in the Advance SQL tab, but without any luck. I have tried to rearrange the columns of the reports as well, but no luck as well
Any quick fix for this behaviour ?
Regards
SamYour subject shouldn't be that.. ;), if you are looking for repeating values for all the cells for that particular column
go to first 2 column properties > Column Format .
In "Value suppression" section, you'll find repeat option radio button. check that and click ok. Now test your report -
How to get the value of column from previous row to current row?
Hi All,
I am facing a critical problem in SQL query (for reporting purpose (COGNOS)). please reply to my query.
REQUIREMENT: i want to retrive value of a column (this is not a table column, this will be calculated based expression) from previous row to current row.
EXAMPLE:
TABLE NAME: i have to join multiple tables. so, i am not mentioning table names here.
DISPLAY COLUMNS in the report: item, loc, sku, beginval (not table column), endval (not table column, this will calculated based on some expressions), etc. Here, first time the value of BEGINVAL will be taken from some x column name of x table. ENDVAL will calculated based on the expression. For the next row onwards, BEGINVAL will become the value of ENDVAL and the value of ENDVAL will be calculated based on the expression and this expression uses the value of BEGINVAL.
my report will look like below.
ITEM LOC SKU BEGINVAL ENDVAL
1 HYD 1-HYD 10 10+1+2 (13)
2 HYD 2-HYD 13 13+1+2 (16)
3 SEC 3-SEC 16 16+1+2 (19)
4 SEC 4-SEC 19 19+1+2 (22)
etc....
in the above output, BEGINVAL and ENDVAL columns are not part of any table. they are alias column names.if you observe intially BEGINVAL will be assigned to some value, but from subsequent rows, BEGINVAL will become the ENDVAL of previous row.
Please help me on how to write this query?Hi, please find the detail description of the problom.
DDL (table scripts)
ITEM
CREATE TABLE ITEM
ITEM VARCHAR2(50 CHAR) NOT NULL,
DESCR VARCHAR2(50 CHAR) DEFAULT ' ' NOT NULL,
UOM VARCHAR2(50 CHAR)
SKU
CREATE TABLE SKU
ITEM VARCHAR2(50 CHAR) NOT NULL,
LOC VARCHAR2(50 CHAR) NOT NULL,
OH float
SKUPROJSTATIC
CREATE TABLE SKUPROJSTATIC
ITEM VARCHAR2(50 CHAR) NOT NULL,
LOC VARCHAR2(50 CHAR) NOT NULL,
STARTDATE DATE
VehicleLoad
CREATE TABLE VEHICLELOAD
LOADID VARCHAR2(50 CHAR) NOT NULL,
DESCR VARCHAR2(50 CHAR) DEFAULT ' ' NOT NULL,
SHIPDATE DATE DEFAULT TO_DATE('01/01/1970','MM/DD/YYYY') NOT NULL,
ARRIVDATE DATE
VEHICLELOADLINE
CREATE TABLE VEHICLELOADLINE
LOADID VARCHAR2(50 CHAR) NOT NULL,
ITEM VARCHAR2(50 CHAR) NOT NULL,
QTY float(126)
DML scripts
I can't provide the the DML scripts, because its very huge data.
Main QUERY is below.
below is the query which i have to write and execute.
select
i.item,
i.descr,
i.unitsperpallet,
sp.loc,
sp.startdate,
'Crucial_IND',
LAG (EndBal,1,0) OVER (ORDER BY STARTDATE) BeginBal,
SP.FCSTCUSTORDERS CustOrders,
SP.COMMITINTRANSOUT,
SP.RECARRIV,
SP.TOTINTRANSIN,
(BeginBal - sp.FCSTCUSTORDERS - sp.COMMITINTRANSOUT + sp.TOTINTRANSIN ) EndBal,
'CuttingQty',
VLL.QTY,
vl.source,
vl.arrivdate,
vl.shipdate,
vl.loadid,
s.oh
from item i, skuprojstatic sp, sku s, VehicleLoad vl, VehicleLoadLine vll
where sp.item = i.item
and s.item=i.item
and sp.item =s.item (+)
and sp.loc = s.loc (+)
and vll.item = s.item
and vll.loadid = vl.loadid
and to_char(sp.startdate ,'mm/dd/yyyy') = to_char(vl.arrivdate,'mm/dd/yyyy')
and sp.loc = vl.dest (+)
order by sp.startdate
problem description: in the above query, BeginBal and EndBal is what i am looking for. when i execute this query, oracle throwing an error saying that alias names can't be used as expressions. For the first row, the BeginBal should be the value sku.OH and for the subsequent rows, this value will be the previous row value of EndBal. -
Is there any function module to get the purchase order conditions from EONP
Hi,
I want to get the EONP and EONH table details for the purchase orders with the help of function module. Can anyone tell me any function module name which would give me those details.
Thanks,
AtanuHi
Check with BAPI function module BAPI_PO_GETDETAIL and BAPI_PO_GETDETAIL1.
Regards
Srilaxmi -
How to get only selected table columns from a DB table to be display in pag
hi i have some 18 columns in my database table, but i need to add only the selected columns to be added to my table component. How can i do it. any idea regarding this. Please help me out to solve this problem.
Thank You in Adavnce.This is an ambiguous question but I will give 2 answers for 2 interpretations
1 In the Outline window, right-click the rowset in the Session bean (or whatever bean you put the rowset in, by default it is the session bean). In the top pane, select or clear the checkboxes to determine which columns are obtained by the query.
2 Right click the Table component and choose Table Layout, move the columns you don't want to the left panel
Resources: http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/databoundcomponents.html
If you meant a different question, please clarify -
Getting sum of each column in 2D array
hi,
i want to get sum of each column from 2D array. i did public static void main(String[] args) {
double sum=0.0;
int[][] arr={
{1,2,8},
{2,2,3},
{2,2,5},
{1,2,8},
{1,1,9},
{2,2}
int i=0,j=0;
int len=arr.length;
while(j!=len){
sum=0;
for(i=0;i<arr.length;i++){
sum+=arr[i][j];
System.out.println("sum is:" +sum);
j++;
}but it doesnot work for jagged array...somebody please help!
thankxStop assuming the rows in your matrix are all the same length. Arrays know how long they are. Use that information to determine if the current column exists in that row.
-
'Sort order column' doesn't work for prompt with function
I turned on the 'sort order column property' in repository for a logic column 'school year', so when I get school year from prompt, it shows desc order. It works fine if th colume in prompt is a simple prompt. But when I add function in the column in prompt (means edit Fx with a case statement), when school year prompt shows in dashboard, it is not sorted in desc order any more, it went back to acs.
Am I missing something, or this is a bug?
Another question, when I turn on 'sort order column property' in repository for a logic column, can I choose to desc on another column? I couldn't do it, and had to create another sorting column.
Thanks,
AmyCant you create this logic in the rpd and then apply order there and use the newly created column in your prompt..
-
Is there a way to get the correct order from the dependent types of a sche
Hi ,
I have a CT facing the following problem:
When trying to built a SQL script to create all the object types within a schema using the DBMS_METADATA packages.
Did insert in a table the names of the types that will be exported following a concrete order, next loop into the table and call the DBMS_METADATA package for each row.
These type are depedent between them, there are some type attributes calling other types and here the issue
First : try to generate the order by created column of dba_objects and when the generated SQL script is launched a lot of type appearing as incomplete state due to the order isn't correct.
Second : try to insert the table ordering by object_id colums of dba_tables view, it appears incomplete types too.
Currently want to insert the table using a recursive query with connect by against the dba_type_attrs starting with the rows when ATTR_TYPE_NAME is not null (the types that are called by other types), but this way has a issue dificult to resolve: the roots of hierarchy are the rows when ATTR_TYPE_NAME is not null and we've dependencies between roots nodes
The question is is there a way to get the correct order from the dependent types of a schema?
Platform: IBM SP AIX
DB version: 9.2.0.7
Any help will be appreciated .
Thanks in advance.The xxx_dependencies view should give you the dependencies betwee nthe various types. I would look at something along the lines of:
SELECT object_name, referenced_name
FROM (SELECT o.object_name, d.referenced_name
FROM user_objects o, user_dependencies d
WHERE o.object_name = d.name(+) and
o.object_type = d.type(+) and
d.referenced_type(+) = 'TYPE' and
o.object_type = 'TYPE')
START WITH referenced_name IS NULL
CONNECT BY PRIOR object_name = referenced_nameThe outer join between user_objects and user_dependencies is required to generate the names of types which are not dependent on other types, or do not have other types dependent on them.
HTH
John -
How to Sort Dimension in Pivot Table via Order Column which is changing like Factual values
Hi,
Recently in of our product offerings we got stuck on this following question:
How to Sort Dimension based on the Order Value which Keeps Changing with Factual Values??
We have a data source laid out as (example)
In the above the “Order” columns are changing per
Company/(DimensionA) for DimesnsionB.
Instead what we want is: (But only if we can get the following result without putting the “Order” Column in the “Values” Section.
If there are any configurations that we can make to our power pivot model for the similar data set so that the
DimesnionB in this case can be sorted by the Order column, would be greatly helpful to us.
Sample File:
http://tms.managility.com.au/query_example.xlsx
Thanks
AmolHi Amol,
According to your description, you need to sort dimension members in Pivot Table via order column, and you don't want the order column show on the Pivot table, right?
Based on my research, we can sort the data on the Pivot table based on one of the columns in that table, and we cannot sort the data based on the columns that not existed on the Pivot table. So in your scenario, to achieve your requirement, you can
add the column to pivot table and hide it.
https://support.office.com/en-gb/article/Sort-data-in-a-PivotTable-or-a-PivotChart-report-49efc50a-c8d9-4d34-a254-632794ff1e6e
Regards,
Charlie Liao
TechNet Community Support -
I can't get photos sorted in order, please help
Hi,
As the title says when I sync my photos to my iphone (and ipad) they are not in the same order as on my Mac. I've done a bit of research and I've found out that the iDevices sort photos by date rather than by name if you sync from a folder. However, I've also seen that the iDevices should mirror the way they appear in iphoto if you sync from this. Well I created all new folders in iphoto on my mac and synced with that but the photos are still out of order. Is there any way I can get them in order?
Cheers.Try removing the Adobe DLM from your extensions in firefox. It will ask you to restart firefox. After restarting the pdf files should show in your browser as usual. This worked for me.
-
Sort order column with a between filter
Hi all,
[using OBI-EE version 10.1.3.3.1]
I've got a column 'BLOCK_ROW' which contains values A,B,C....AA,AB,AC...BA,BB...FK,FL
Alphabetically this orders A,AA,AB.... which is incorrect. The order should be A,B,C...
To be able to sort correctly we added a column 'ROW_SORT' to our model, which is numeric. This column is set as the 'sort order column' in the repository and makes sure the sorting is done correctly.
So far, so good...
Now, I want to be able to use a 'between' filter on this column, e.g. between 'A' and 'C'. Unfortunately this returns A,B,C,AA,AB... while I want it to return A,B,C.
Is this possible?
Thanks,
Elio
Generated SQL:
select distinct T91353.BLOCK_ROW as c1,
T91353.ROW_SORT as c2
from
<table_name> T91353
where ( T91353.BLOCK_ROW between 'A' and 'C' )
order by c2
--> Sorting handled based on ROW_SORT, between filter not :(That will only do the trick in this particular example. Between 'A' and 'AA' will fail again and only returns A and AA while it should return A..Z and AA.
Using extra filters is always possible but I'm looking for a more robust solution, which also allows for dashboard 'between' prompts based on this column.
A workaround I came up with is to add a calculated field which concats an '_' in front of the single 'digit' values. This results in: A,B,_C,.....,AA,AB....FL. This set can be ordered alphabetically and this will work for now.
In the future, however, it might happen that the order of the letters will completely change. In the datamodel this can be achieved by changing the order of the numbers in ROW_SORT.
Example dataset:
BLOCK_ROW | ROW_SORT
Q | 1
D | 2
F | 3
AA | 4
A | 5
The filter 'between D and AA' should then result in D,F,AA.
Any suggestions?
Thanks,
Elio
Maybe you are looking for
-
Bt infinity downstairs and upstairs
Good morning i have an engineer coming around next week to install my bt infinity he is going to install it downstairs. However we have sky and a console upstairs that we want wired. Is there a way that the engineer can install another router upstair
-
Variable Values in BEX Analyzer 3.5
Hello, I have a query that has a user input variable for a country. The first time I run the query I select GB. I run the query again and select FR. All fine so far. The third time I run the query I notice that the variable value has changed back to
-
Biometric device is not showing up in the control panel
hello, i'm using elitebook 8440p. earlier i was using win 8, my biometric device was runnig fine. But when i begant use win 7, it started showing unavailable in the control panel. So I reinstalled it, now it is not showing up in the control panel to
-
itunes could not back up the iphone becasue the backup was corrupt or not compatiable with the iphone... what do i do please
-
Save downloads into user drive without prompting.
Hi I am doing selenium webdriver test in java for a web application. It involves downloadable links for which I have to automate, such that the downloadable content just saves to default download directory without any "File Download" - Dialog box ,