Order of Columns in Excel
Hi,
I have a report that are grouped by first name, middle name, and last name; and for each group there are about 6 fields. In pdf or web, the first name, middle name, and last name are grouped and appear on top of the 6 fields. However in Excel, because there are no concept of grouping, the fields appear in the following order:
first name, the 6 fields, middle name, last name.
Is there a way to make it so that the first, middle, and last name appear before the 6 fields?
Thanks in advance.
I think for this you will have to change the layout of your report.
Right now you are using master-detail or group-above change it to tabular or whatever its called in newer version.
HTH
Ghulam
Similar Messages
-
Specifying the order of column in Excel file
How to specify the order of the columns in excel when data is exported from a table to excel.For eg. I have 2 columns in a table i.e. Base Location and Employee Number.When I export this data to the excel file the columns are displayed according to the alphabetical order i.e. Base Location first and then Employee Number. Whereas I want Employee Number column to be displayed first and then the Base Location column.
Can anyone help me on this?Hi Sowmya,
when you refer to my Excel Export tutorial on SDN: <a href="https://wiki.sdn.sap.com/wiki/x/0mQ">Exporting Table Data Using On-Demand Streams - SAP NetWeaver 7.0</a>:
use <b>LinkedHashMap</b> instead of <i>HashMap</i>:
private Map getProductColumnInfos() {
Map columnInfosMap = new LinkedHashMap();
columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.QUANTITY, "Quantity");
columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.ARTICLE, "Article");
columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.COLOR, "Color");
columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.PRICE, "Price in EURO");
columnInfosMap.put(
IPrivateTableCompBasketView.IProductsElement.TOTAL__PER__ARTICLE,
"Total Per Article In Euro");
return columnInfosMap;
This keeps the order of key-displaytext-pairs passed by the client (table component) to the service (excel export component) stable.
Regards, Bertram -
Matrix report data with summary column in excel format
Hi ,
I want to display output of matrix report with summary column in excel format.
I have tried using spreadsheet but column header and actual data is displaying in proper order.
Please tell me the way how to do this ASAP.
Thanks in advance.Hi ,
I want to display output of matrix report with summary column in excel format.
I have tried using spreadsheet but column header and actual data is displaying in proper order.
Please tell me the way how to do this ASAP.
Thanks in advance. -
I am unable to get order by column name in oracle report parameter form
i created query like following in query builder
SELECT CASE_NO, COURT_ID, CASE_TYPE,
INITCAP(PLAINTIFF) PLAINTIFF,INITCAP( DEFENDENT) DEFENDENT,
INITCAP(COUNSEL) COUNSEL, START_DATE, PREVIOUS_HEARING_DATE,
NEXT_HEARING_DATE,INITCAP( DESCRIPTION) DESCRIPTION,
INITCAP(RELIEF) RELIEF,INITCAP(EXTENT) EXTENT,
DECREE_DATE,INITCAP(STATUS) STATUS,INITCAP( LOCATION) LOCATION,
LEGAL_FILE_NO, MSNO
FROM L_CASE_MASTER_MAIN
WHERE to_char(NEXT_HEARING_DATE,'DD-MON-YYYY')=:P_NHD ORDER BY :P_COL
and i created parameter form for these two bind variables :P_NHD,:P_COL
in,:P_COL i wrote lov as Select trim(COLUMN_NAME) from user_tab_columns where table_name='L_CASE_MASTER_MAIN' to get all the columns.
in parameter form i am able to get all the columns but when i am generating report it is not giving results as per my ordered column.
kindly let me know the solution
Report Version :Oracle Reports 11g
Db Version:Oracle 11gHi,
Ordering the column first takes place from the Data Model Itself.
Please Check your column ordering in the report data model. If it is not ordered in a right way then Rearrange it.
Remove your order by in query...
If any issues... let me know
Regards,
Soofi -
Change the order of columns in a report
hi all.
i can't change the order of columns in a report not just by altering the select statement. where can i change it?
thanks.hi master
sir i use 6i report i see full report but i culd not found
report region and report attributes
sir please give me step or idea or tree where report region and report attrinutes"
thanking you
aamir -
Make few columns of Excel file read only when downloaded
Hi Experts,
Is there any way we can set few of the columns in excel sheet as read only when downloaded from SAP.
We have requirement where a program will generate a report and download it into an excel file on desktop. When the file is downloaded, two of its columns should be non editable.
I know complete sheet of excel can be protected using OLE, can we protect few columns also using OLE?
any idea how can it be done?Hi Swapnil,
check this
Re: OLE EXCEL : how to block cells ?
hope it is useful to you.
Thanks -
How to get Number of Column in Excel file
Hi All,
My requirment is to get Number of Column in Excel file which i want to upload,
so please suggest if there is any possible way to get this functionality.
Thanks
AnirudhUse FM "ALSM_EXCEL_TO_INTERNAL_TABLE".
Adjust the values of i_begin_col & i_end_col parameters in this FM.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME =
I_BEGIN_COL =
I_BEGIN_ROW =
I_END_COL =
I_END_ROW =
TABLES
INTERN =
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
BBR. -
In Lion 10.7.5 when viewing files/folders in column view, if I select arrange by name it does not sort the names alphabetically. Is this a bug or is there a way to view files in alphabetical order in column view?
I've been using Column View for years and have it set to None:
It has always shown in alphabetical order automatically. -
How do I change the order of columns in the responses table?
How do i change the order of columns in the responses table in FormsCentral? The default setting puts them in reverse order!
Hi,
The issue with the default ordering of columns in the response table is something that we hope to address in the next update to FormsCentral. In the meantime, you can reorder the columns by selecting them then click/drag using the gray area above the column name. As shown below, an orange marker will show you where the columns will be placed when you release the mouse button.
Sorry for the inconvenience.
Regards,
Brian -
Dynamic ordering ambiguous column issue
I'm working on a stored procedure that will accept a column name from a web application. The stored procedure will use the @SortColumn to sort the results of the query. I'm receiving ambiguous column errors when the column values are passed in
to the query. The original query is written using dynamic sql but I created a simple query to reproduce the issue. Can someone review the sample below and let me know if there is a way to resolve the error.
In the example below, the Over(Order by Emp_ID) section is causing the error. The order by is expecting e.Emp_ID as the order by value. Is there anyway for me to rewrite the logic to allow the correct column alias to be using in the order by statement?
Ultimately, I would like to pass in a paramter for the order by column. Ex. Over(Order by ' + @SortColunm + '
SELECT RowNum
,Emp_ID
,First_Name
,Last_Name
From (Select Distinct ROW_NUMBER() OVER(Order by Emp_ID) as RowNum,
e.Emp_ID as Emp_ID
,e.First_Name as First_Name
,e.Last_Name as Last_Name
FROM Employee e
LEFT OUTER JOIN Team t ON e.team_id = t.team_Id AND e.Emp_id = t.Emp_Id
LEFT OUTER JOIN AccrualType at ON e.Accrual_Type = at.Type
LEFT OUTER JOIN ClosingProcess cp ON e.Emp_id = cp.Emp_ID
where Last_Name like 's%'
) As Employees
order by Emp_IDI've updated my query to use a cte and also included the Row_Number logic. I'm now receiving "Invalid column name 'RowNum". Can anyone explain what I'm doing wrong in the code below? I'm trying to create a stored procedure
that accepts a parameter to handle paging and sorting. The dynamic sql is needed for the SortExpression.
declare @SortExpression varchar(50) = 'Last_Name';
declare @DynSql varchar(max)='';
declare @Emp_ID NVARCHAR(50) = NULL
declare @First_Name VARCHAR(50) = NULL
declare @Last_Name VARCHAR(50) = 's'
declare @StartIndex INT
declare @MaximumRows INT
set @DynSql=
With Employees as
( Select Distinct
e.Emp_ID as Emp_ID
,First_Name
,Last_Name
FROM Employee e
LEFT OUTER JOIN Team t ON e.team_id = t.team_Id AND e.Emp_id = t.Emp_Id
LEFT OUTER JOIN AccrualType at ON e.Accrual_Type = at.Type
LEFT OUTER JOIN ClosingProcess cp ON e.Emp_id = cp.Emp_ID
SELECT ROW_NUMBER() Over (Order By ' + @SortExpression + ') As RowNum,
Emp_ID
,First_Name
,Last_Name
FROM Employees
WHERE RowNum BETWEEN ' + CAST(@StartIndex as varchar(10)) + ' AND ' + '(' + CAST(@StartIndex as varchar(10))+ CAST(@MaximumRows as varchar(10))+ ') - 1 '
If @Emp_ID is not null
Set @DynSql = @DynSql + ' And (Emp_ID = @Emp_ID)'
If @First_Name is not null
Set @DynSql = @DynSql + ' And (First_Name = @First_Name)'
If @Last_Name is not null
Set @DynSql = @DynSql + ' And (Last_Name = @Last_Name)'
exec (@DynSql) -
Alignment of Columns in Excel when sent as an attachement
Hi,
I am using below code to send the output of ALV via email as an attachment.
data : lv_variant type sy-slset value 'VARIANT',
lt_list type table of abaplist,
lt_0167_body type standard table of soli,
ls_body_raw type soli,
lt_txt type soli_tab.
data: ls_string type text2048,
lt_objbin type soli_tab,"Attachment of EMail
lt_objbinx type solix_tab,"Attachment of EMail
lv_dlist type so_obj_nam,
lv_bdate type char10,
lv_edate type char10,
lv_title type char40.
submit ztest using selection-set lv_variant exporting list to memory and return.
call function 'LIST_FROM_MEMORY'
tables
listobject = lt_list "Binary data
exceptions
not_found = 1.
call function 'LIST_TO_TXT'
tables
listtxt = lt_txt
listobject = lt_list
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
move 'test' to ls_body_raw.
append ls_body_raw to lt_0167_body.
lt_0167_body[] = lt_0167_body[].
data :
l_hex type solix,
conv type ref to cl_abap_conv_out_ce,
l_buffer type xstring,
l_hexa(510) type x.
loop at lt_txt into ls_string.
conv = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' endian = 'B').
call method conv->write( data = ls_string ).
l_buffer = conv->get_buffer( ).
move l_buffer to l_hexa.
move l_hexa to l_hex-line.
append l_hex to lt_objbinx.
endloop.
call method ztest=>send_mail
exporting
it_errormessages = lt_0167_body
iv_type = 'RAW'
iv_dist_list = 'DLIST' "distribution list
iv_subject = 'test'
lv_attachment_type = 'XLS'
lv_attachment = lt_objbinx
lv_attachment_name = 'Test'
exceptions
bcs_fault = 1
tvarv_not_maintained = 2
others = 3
here my custom method send_mail is working properly it is sending whatever is coming in lt_objbinx as excel, only problem in the excel columns and column values are not aligned properly.
please suggest how can i align columns inside excel using abap code, send mail is actaully using cl_bcs and related classes for sending e-mail.
Thanks,
kranthi.Hi change the below sample as per your requirement.
<unreadable code removed by moderator>
Regards
chitra
Moderator message: please post only relevant code parts, your posts must contain less than 5000 characters to preserve readable formatting.
Edited by: Thomas Zloch on Nov 15, 2011 1:03 PM -
Is there any performance difference in the order of columns referencing index?
I wish to find out if there is any performance difference or efficiency in specifying those columns referencing index(es) first in the WHERE clause of SQL statements. That is, whether the order of columns referencing the index is important???.
E.g. id is the column that is indexed
SELECT * FROM a where a.id='1' and a.name='John';
SELECT * FROM a where a.name='John' and a.id='1';
Is there any differences in terms of efficiency of the 2 statements??
Please advise. Thanks.There is no difference between the two statements under either the RBO or the CBO.
sql>create table a as select * from all_objects;
Table created.
sql>create index a_index on a(object_id);
Index created.
sql>analyze table a compute statistics;
Table analyzed.
sql>select count(*)
2 from a
3 where object_id = 1
4 and object_name = 'x';
COUNT(*)
0
1 row selected.
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1 Bytes=29)
1 0 SORT (AGGREGATE)
2 1 TABLE ACCESS (BY INDEX ROWID) OF 'A' (Cost=1 Card=1 Bytes=29)
3 2 INDEX (RANGE SCAN) OF 'A_INDEX' (NON-UNIQUE) (Cost=1 Card=1)
sql>select count(*)
2 from a
3 where object_name = 'x'
4 and object_id = 1;
COUNT(*)
0
1 row selected.
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1 Bytes=29)
1 0 SORT (AGGREGATE)
2 1 TABLE ACCESS (BY INDEX ROWID) OF 'A' (Cost=1 Card=1 Bytes=29)
3 2 INDEX (RANGE SCAN) OF 'A_INDEX' (NON-UNIQUE) (Cost=1 Card=1) -
Hi all, I have a pair of statements connected by a UNION, where I need to sort the final result according to columns not appearing in any column list:
SELECT REF(d) FROM DOCUMENT_TABLE d
WHERE d.header$.parentKey = ?
UNION
SELECT REF(d) FROM DOCUMENT_TABLE d, CROSS_TABLE k
WHERE k.doc = d.key$ AND k.folder = ?
ORDER BY d.header$.name
this fails saying that d.header$.name is an invalid identifier (ORA-904), like being out of scope.
Both union branches succeed when run alone (select + order by).
How can I sort by colums without having them to be returned ?
In all examples I found columns are also retrieved and referenced by either alias or by position.
Thanks.Hi,
In a UNION query, you can only ORDER BY columns in the SELECT clause.
You can do the UNION in a sub-query, then do the ORDER BY in the main query, where you can ORDER BY anything:
WITH union_results AS
SELECT REF (d) AS ref_d
, name
FROM DOCUMENT_TABLE d
WHERE d.header$.parentKey = ?
UNION
SELECT REF (d) AS ref_d
, name
FROM DOCUMENT_TABLE d
, CROSS_TABLE k
WHERE k.doc = d.key$
AND k.folder = ?
SELECT REF_D
FROM union_results
ORDER BY name
;Your front end may be able to hide specified columns, so you could do this without a sub-query.
For example, in SQL*Plus you can say:
COLUMN name NOPRINT
SELECT REF (d) AS ref_d
, name
FROM DOCUMENT_TABLE d
WHERE d.header$.parentKey = ?
UNION
SELECT REF (d) AS ref_d
, name
FROM DOCUMENT_TABLE d
, CROSS_TABLE k
WHERE k.doc = d.key$
AND k.folder = ?
ORDER BY name
;The result set actually contains two columns, but SQL*Plus will only display one. -
Finder - changing sort order in column view
Anyone know a way to change the sort order when using the COLUMN view in Finder? It's defaulting to alpha and I'd like to change it so when I'm viewing a particular folder the contents are displayed by Date Modified like I can when using the other views.
THANKS!Hi VFRJOEY,
there is no way to change the sort order in column-view. This was under discussion since the very first release of MacOS X but never made it into any one of the releases.
If this answered your question please consider granting some stars: Why reward points? -
Does the order of columns in an index matter?
Hi,
I have a table having composite index, five columns. (col1,col2,col3,col4,col5)
Currently , my index is beginning with the column which having low distinct values and so on.
( in my case the first column have 1 distinct values due to functional behavior ). the second column have 3 distinct values , the third column have many distinct value ( half of the table).
There are many DML queries on this table with different clauses.
Examples:
query 1 : where col1 =val1 and col2 = val2
query 2 : where (col3,col4) in ( select col1,col2 from another_table ) ( for this we can add col1 =val1 and col2 = val2)
My question is : what this best way to create index on this case ?
The order of columns on index depends on its distinct values?
ThanksBIJGA wrote:
Hi,
I have a table having composite index, five columns. (col1,col2,col3,col4,col5)
Currently , my index is beginning with the column which having low distinct values and so on.
( in my case the first column have 1 distinct values due to functional behavior ). the second column have 3 distinct values , the third column have many distinct value ( half of the table).
There are many DML queries on this table with different clauses.
Examples:
query 1 : where col1 =val1 and col2 = val2
query 2 : where (col3,col4) in ( select col1,col2 from another_table ) ( for this we can add col1 =val1 and col2 = val2)
My question is : what this best way to create index on this case ?CREATE INDEX
The order of columns on index depends on its distinct values? yes
Handle: BIJGA
Status Level: Newbie (5)
Registered: Aug 24, 2009
Total Posts: 66
Total Questions: 18 (14 unresolved)
I extend my condolences to you since you rarely get answers to your questions.
Maybe you are looking for
-
Your role no longer valid error message and cannot edit page
Unfortunately I don't have access to the file, am asking on behalf of a friend who is skittish about his skills navigating a forum. His question is: When I open contribute, and select the website I want to edit..there is a yellow bar across the top o
-
How to copy the ringtone of my second pc to iPhone?
Hello, I tried to copy the ringtone of my pc to my friend's iPhone. But when I try to sync, message appeared that if I perform this, all ringtones of my friend's iPhone will be replaced with my pc's ringtone. There are already many ringtones in my fr
-
Style won't apply to text in Preview or Publish
I set up a character style to apply to section titles in my topics. The style is included in the .css file with the appropriate attributes. On the WYSIWYG pane, all appears perfect, but on the preview and after I publish, the style is gone. I checked
-
Photo resolution on new computer
I have noticed that the photo resolution on my new system is much smaller than on my old G4 iBook. The original size of the photos was in 1-2 meg size with great resolution. Now they are 40-50K. When I export them to a digital photo frame they are re
-
Several folder shares on Windows Server 2003 R2
I have serious problems at one of our clients. They just switched from PC's to iMac's and MacBook Pro's. The backup platform is a server running Microsoft Windows Server 2003 R2 and there are several shares on this server. Some of these shares should