REUSE_ALV_GRID_DISPLAY (column headings from ALV to EXCEL) Max please help
Hi Max,
If you remember in one of my last post I asked for changing the column headings in ALV display for example from 'Material' to 'Material used'.
I am using
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = repid
IT_FIELDCAT = field_body
I_SAVE = g_save
IS_VARIANT = g_variant
IT_EVENTS = events
TABLES
T_OUTTAB = itab.
And you suggested me the following way....
loop at field_body into field_wa.
case field_wa-fieldname.
when 'Material'.
field_wa-seltext_l = 'Material used'.
field_wa-seltext_m = 'Material used'.
field_wa-seltext_s = 'Material used'.
endcase.
modify field_body from field_wa.
endloop.
It is working well. In ALV display the column heading is changed to what I wanted. But the question is when I export the displayed ALV to Excel using ALV functionality, Export->Spreadsheet... I see that <b>I dont get the Column Heading into Excel as it was in the ALV display.</b>
I get in the Excel as 'Material u' or 'Mat. Used'. But when I add this line in the code.....
when 'Material'.
field_wa-seltext_l = 'Material used'.
field_wa-seltext_m = 'Material used'.
field_wa-seltext_s = 'Material used'.
<b> field_wa-outputlen = 20.</b>
Then I see that I get the complete heading in the Excel. But this way the columns with outputlen 20 are taking much space in ALV display.
Is there any fix for this. May be not mentioning the outputlen but still get the column headings into Excel as it was in ALV display.
Anyone with ideas please respond. Waiting for replies. Thanks
Hi
The labels have a fixed size:
seltext_l is long text: 20 char
seltext_m is medium text: 15 char
seltext_s is short text: 10 char
The text 'Material used' is long 13 char so you should write:
field_wa-seltext_l = 'Material used'.
field_wa-seltext_m = 'Material used'.
field_wa-seltext_s = 'Mat. used'.
You can try to set the field colwidth_optimize of parameter IT_LAYOUT.
This field should optimize the width of the colunm
So
data layout type SLIS_LAYOUT_ALV.
layout-colwidth_optimize = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = repid
IT_LAYOUT = layout
IT_FIELDCAT = field_body
I_SAVE = g_save
IS_VARIANT = g_variant
IT_EVENTS = events
TABLES
T_OUTTAB = itab.
and you can decide which label has to be used:
field_wa-seltext_l = 'Material used'.
field_wa-seltext_m = 'Material used'.
field_wa-seltext_s = 'Mat. used'.
If you want to set the short text
field_wa-ddictxt = 'S'.
...medium
field_wa-ddictxt = 'M'.
...long
field_wa-ddictxt = 'L'.
Max
Similar Messages
-
Download ICONS from ALV to EXCEL
Dear Friends,
IS there a way of downloading the ICON image exactly
from alv to EXCEL,right now,when the icon is downloaded
from alv to the excel,i can only see ascii characters in
the icon column in the excel.
kind regards
kaushik hegdeHi Jeff,
Please check if following analysis is helpful to you.
Analysis/Solution:
When we export ALV data to excel worksheet, as sap notes say the maximum lenght allowed is 1023 charaters and the max no of columns supported is 90.
(I never faced any issue related to no of columns as it worked fine for columns >90 too)
Issue occured when row size of exported data gets more than 1023 character.
Therefore the row data must not exceed 1023 character, otherwise column splits and moves to next row.
One additional aspect generally missed is that:
When data in any particular column changes it's length, alv header also changes its lengh (short text, medium text, long text; depending on the length of of the longest cell in the column)
therefore even if you have total length of row less than 1023 character, there might be cases when your ALV header size exceeds this length.
Reducing the header size (by forcing to use short text or specifying own header names) should resolve the issue.
Regards,
Parveen -
Export from ALV to Excel - problem with numeric values
hi folks,
when exporting from alv to excel and we have negative values (and using an u.s.a. setting where . and , are different to r/3) negetive values are not shown correctly in excel.
when changing in win nt the regional settings to europe one's (e.g. germany) everything works fine.
any hints welcome,
kind regards
oliverI guess this has something to do with the excel settings. In the control panel you have regional settings.try some options there. It might work.
Regards
Sudhi -
The data type DEC while downloading from ALV to EXCEL
The data type DEC while downloading from ALV to EXCEL is giving some invalid data .
Ex : In ALV field is the time difference in hours:minutes
if the value is :23 in Excel it will be 22:59 .
Please Suggest immediatelyHi ....
I have the similar problem. My coumns are not in any sequence when I download it to excel sheet.
How do I fix it.
Neha -
Problrn when downloas from ALV to excel
Hi All.
I am trying to download data from ALV to excel file, but only last pages are downloaded and not from frist pages?
Can anyone tell me wht it is happening and what is the solution?
Thanks.Hi PKB,
My initial analysis of your query is as follows.
You can test the same by debugging the report after pressing the send to excel report. See the internal table is gettting deleted anywhere in between. If yes analyse it is happening and correct it if possible.
Let me know if any further help is required by providing further details.
Regards,
Gowri -
Hi,
I've created an enhancement request to allow displayed column headings from ref_cursor output to be copied.
This is still not possible (4.0 EA3)
The ref cursor data can be copied, but not the headings..
See July 2012 discussion of problem in comments at
http://www.thatjeffsmith.com/archive/2011/12/sql-developer-tip-viewing-refcursor-output/Hi,
I think you're out of luck... except if you're on 11g where you can use DBMS_SQL.TO_CURSOR_NUMBER to convert the REF CURSOR to a DBMS_SQL cursor, and then benefit from the DBMS_SQL package to get column details.
http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_sql.htm#CHDJDGDG -
Can not select from my own MV. Please help.
Hello Gurus,
I have created a MV with following clauses
CREATE or REPLACE MATERIALIZED VIEW "OWNER_NAME1"."MV_Name1"
BUILD IMMEDIATE
USING INDEX
REFRESH COMPLETE
AS
SELECT column1, column2 .... from table1,table2
where .....
I have logged in to DB with the 'owner_name1' schema itself which is the owner of the MV.
But, when I try to select from the above MV. It gives error "Ora-00942 table or view does not exist"
I can see the same under 'user_objects' view as an object of owner_name1 schema.
Could you please help me in understanding where I have gone wrong?
DB - Oracle 9i on unix platform.
Thanks in advance!
Abhijit.Oh! I missed to mention the exact steps followed by me which created error for me,
viz.
1) I have 2 Database and their users as follows
bq. i) DB1 in local server - 'localUser'
bq. ii) DB2 in remote server - 'RemoteUser1' and 'RemoteUser2'
2) 'RemoteUser2' user in DB2 has 'select' privilage on table 'RemoteTable1' of 'RemoteUser1' ( both are remote DB's users ! )
i.e. select * from RemoteUser1.RemoteTable1; --works okay when logged into RemoteUser2. no synonyms are created hence using schema_name.table_name convention.
3) Logged in to 'localUser' in DB1.
4) Created a DB link 'local_to_remote2' in 'localUser' schema ( in DB1) to 'RemoteUser2' schema (in DB2)
i.e.
create database link local_to_remote2 connect to RemoteUser2 identified by password using 'connection_string';
DBLink was created successfully.
5) I could select from the tables of 'RemoteUser2' using DB Link. (by logging in to 'localUser')
i.e. select * from RemoteUser1.RemoteTable1@local_to_remote2 ; --- gives me expected output. no issues!
6) Now, I created below MV in 'localUser' ( no need to tell in 'DB1' )
the exact syntax I used is as follows,
CREATE or REPLACE MATERIALIZED VIEW "localUser"."MV_Name1"
BUILD IMMEDIATE
USING INDEX
REFRESH COMPLETE
AS
SELECT column1, column2
From RemoteUser1.RemoteTable1@local_to_remote2
where condition1
and condition2;
The MV was created successfully, and I could see it as an 'Valid' object of 'localUser' schema.
i.e. select * from user_objects where object_name ='MV_NAME1' and status ='VALID' --- tells that above create MV is an object of owner 'localUser'
But, when I try to select from the said MV. it gives me error "Ora-00942 table or view does not exist"
i.e. select * from MV_Name1; ---- neither this
select * from localUser.MV_Name1; ---- nor this works :(
Even when I try to drop the same MV it gives me same error. :(
Could you please suggest me anything so that I will be able to select from MY OWN MV ?
Please help Gurus. -
Since uninstalling / reinstalling iTunes I am not able to sync iPhotos with my Apple TV with the following warning message stating that this is due to a 'problem on your computer. The disk could not be read from or written to'. Please help!
Welcome to Apple Discussions!
Is all the software on your computer up to date?
iTunes
iPod Updater
Also, try The Five R's
btabz -
I have macbook pro 13" I want to know how to copy files from my mac to the external Toshiba Hard Drive. I can't even delete files from my external hard drive. please help me my macbook HD is almost full and I have to copy my images to the Toshiba HD
To delete files from your external HDD, attach it to your MBP and drag the unwanted files to trash and then empty trash.
Then you select the files that you want to transfer by 'drag and drop' to the external HDD and trash the files on your MBP.
Ciao. -
Iv just introduced midi into my studio im running logic9 and have brought Midiman Aniversary 4in 4 out to my set up midi is running well but i cannot seem to mute or solo midi regions an isolate them from the audio can someone please help me Murray.
Hi Charlotte,
You don't say what your version of Windows you have. Assuming XP, go to Start | Run, type DXDIAG and click OK. Click the Sound tab and run the tests to eliminate a hardware problem first of all. If you don't hear anything, check your cables first of all. Also make sure "Mute" isn't checkmarked in your sound setup. You'll find that in Windows Control Panel.
Which browser do you use? If you have Firefox 4, sign up to the HTML5 trial @ http://www.youtube.com/html5
HTML5 is the latest video standard and doesn't require Flash player. Google is in the process of converting all its files to work with the new format. It may solve you problem. If you don't have Firefox 4, you can get it from here: http://www.mozilla.com/en-US/firefox/fx/
IE8 doesn't support HTML5.
To clean out your temp files, go to Start | Run, type: CLEANMGR and click OK. Click OK again to start the utility. Tick all the boxes except "Compress old files" because the latter takes too long, and then click OK. You can run this utility any time you wish by the way.
The above steps will hopefully fix your problem. If not, post here again please. -
HT2604 I can't instal software from applications instal DVD! please help me!
I can't instal software from applications instal DVD! please help me!
hi, i face the same problem and appreciate your help. I delted iphone and the library. I reinstalled iphoto from the original application install DVD and when trying to open it I get a failure message. My mac version is 10.8.5 and the install disc is 10.6.6. I got a big text from the error message what would you need to help me?
Thanks so much -
I am living in Pakistan, Lahore. I have purchased an Apple Iphone 5S online from apple store. I am facing water damage problem and there is no apple store here in Pakistan, How can I repair my phone from apple service center? Please help me
Take it to an authorized service center or Apple Store in the country where the phone originated. Apple does not sell iPhones in Pakistan, nor will they ship them to Pakistan.
-
As I was installing the Windows 7 on my Imacwith the bootcamp and stated how I wanted to divide the drive I put 160, but I want to add more space because of the adobe software it will not install two of them, so how can I add more on the drive space to from 160 to 250? please help thank you.
I'm not sure this is what you're looking for, but it might help:
"If you made the Windows partition too small
First, back up all the information on your Windows partition. Then run Boot Camp
Assistant to restore your disk to a single volume. Restart your computer and use Boot
Camp Assistant to partition the disk again and reinstall Windows. Don’t forget to install
the Boot Camp drivers after installing Windows."
(from Bootcamp Assistant Manual see pg 22) -
My new ipad2 wifi often crashes from the day I bought.please help me resolve
My new ipad2 wifi often crashes from the day I bought.please help me resolve
Is it still within the 1 year warranty period?
Not normal. Take it to an Apple Store for evaluation.
Make a Genius Bar Reservation
http://www.apple.com/retail/geniusbar/
Cheers, Tom -
I'm in syria and they blocked me from using any VPN service please help without VPN i can't open the store help please ( using iphone 5 version 9.1.4 )
There is nothing that anyone here on a user forum can do to help you. If it is a local issue in Syria, then you need to take it up with your phone company or authorities there who have prevented you from using VPN.
Nobody here can help you.
Maybe you are looking for
-
I cant seem to open itunes on my windows based PC. When I link on the desktop icon it simply circle whirls and then does nothing. this means I cant back up info on my PC which i prefer to do rather than using the cloud. What do i need to do?
-
My ipad is "stuck on the above mentioned message! I hit ok, but nothing happens!! I can even turn it off... or use it!!!! What do I need to do????
-
I'm trying to move some files off my old PCI PowerMac.
But I've discovered that every time I try to copy to or from the flash drive, the system hangs on Mac OS 9.1 (the last officially supported version for this Mac) and I have to reboot, which is getting me nowhere. I can't network two Macs together; I
-
What about tracking tags? Anyone have experience with them?
-
I have a dual 1.25GHz MDD G4 Mac (originally dual 1.0GHz) and a BFG GeForce 7800GS with the copper heatsink. I flashed the card with the ROM from themacelite.com described as "GeForce 7800 GS generic (nvflash, gotoh), tmeperature sensor removed for G