Error displaying data in Excel Layout of ALV
Hi,
I am trying to display ALV data in a Excel layout. After changing the layout i am not able to view the data, rather the excel template is alone displayed.
Is there setting that i am supposed. I did not try this on a custom report but i used SE16 to display data.
Any help will be really appreciated!!!
Thanks in advance,
Kathirvel
Hi,
Please make sure that you have made a <b>global</b>
<b>declaration</b> for the ALV Grid control.If not try
with this
Please reward points if this explanation is useful.
Regards,
Siva
Similar Messages
-
Hi, I have program which display data in Excel layout of ALV loaded from internal table..
It means that in sap i received excel sheet with all its functionality.
The problem is that sometimes there are missed some rows with data.
Did someone meet with similar situation?
Regards,
JoannaHI
DATA: v_file LIKE rlgrap-filename,
v_filename TYPE string.
REFRESH i_matcontrol.
CLEAR i_matcontrol.
TRANSLATE v_exten TO UPPER CASE.
IF v_exten = 'XLS'.
v_file = p_p_file.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
i_tab_raw_data = ws_rawdata
i_filename = v_file
TABLES
i_tab_converted_data = i_data.
ELSEIF v_exten = 'TXT'.
v_filename = p_p_file.
File upload
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_filename
filetype = 'ASC'
has_field_separator = 'T'
TABLES
data_tab = i_data
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
CASE sy-subrc.
WHEN 1.
MESSAGE e001(00) WITH text-001.
STOP.
WHEN 2.
MESSAGE e001(00) WITH text-002.
STOP.
WHEN 0.
IF i_data IS INITIAL.
MESSAGE s001(00) WITH text-008.
ENDIF.
ENDCASE.
ENDIF.
DELETE i_data WHERE matnr IS INITIAL AND
werks IS INITIAL. -
Editable data in excel view of alv grid
hi friends..
now i am displaying the data in alv grid..
my requirement is i want to display the data in excel format.. (not in seperate excel..)
i want to display the excel sheet with data within the screen itself.
for this
i tried this scenario by fallowing steps
in layout->view tab->microsoft excel..
(layout button in the application toolbar i.e pf-status)
it show excel sheet within report and data with excel sheet.
now i got data in excel sheet.
but my requirement is if i made any changes in data in excel means
i want those updated or edited data in the another internal table..
this scenario is work in the case of abap list viewer (instead of microsoft excel)
for this i use one button in the pf-status (UPDATE).
after made changes in grid data i export those modified data to abap memory and download to another internal table..
how can i get the same scenario in micosoft excelHi,
Please make sure that you have made a <b>global</b>
<b>declaration</b> for the ALV Grid control.If not try
with this
Please reward points if this explanation is useful.
Regards,
Siva -
Manipulating data in Excel inplace via ALV grids
Hi everybody,
I want to create a report which displays data in an Excel file (Excel inplace).
To solve the problem I have created a custom layout and uplodaded it via the report BCALV_BDS_MAINTENANCE to the BDS. The written report loads the data into an ALV grid, opens Excel inplace and displays the data in the custom layout. This works fine but for one exception: You can only upload an internal table to the ALV grid, consequently no additional information about the selected data itself (e.g. given by a custom selection screen) can be presented in the grid. What I need is a way which adds strings to the excel file not in an internal table.
Is there a way to to this? Is this possible with ALV grids or do I have to use OLE?
Thanks in advance.
Greetings, DanielDaniel,
Its the TOP_OF_PAGE. See below.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid <<<
i_callback_top_of_page = 'TOP-OF-PAGE' <<<
TABLES
EXCEPTIONS
program_error = 1
OTHERS = 2.
And then for the call back form.
FORM top-of-page.
ALV Header declarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader.
wa_header-typ = 'S'.
wa_header-info = 'Text goes in here'. <<<<<
APPEND wa_header TO t_header.
CLEAR wa_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
ENDFORM.
This will add header to your ALV.
Execute the program again and open the same in excel. you will now see the strings/text in the layout.
Hope this helps.
Ravi.
Message was edited by: Ravi Gopan -
Error in web interface excel Layout
Hi ,
I have an excel layout in the web interface, which is designed to enter plan data manually. It is working fine when we enter some data and save. But it is giving following error when clicked on'Refresh' button of web interface .However it is working fine with other ALV layouts in the same interface.This is the FM : API_SEMBPS_REFRESH calling from the 'refresh' button.
Short text -
There is no instance of the planning processor for handle 74C1F787C20AC345B12ACA8EF2361C8D
message number -
UPP_PP_K051
we are on BW 3.5 & SP 16. and front end GUI 6.4 and excel 2003.
Any light on this is very much appreciated.
Best Regards,
RameshHi,
Seems the problem is with your ITS server. Contact your basis team.
Regards -
Problem displaying data in Excel with Jsp
HI,
For some reason when i save data from jsp to excel, my Excel dont display data.This code was working fine from past 3 years all of sudden it starts givin this problem.
However When i open my .xls file in notepad i see data there. The problem is because of XML declaration (<?xml version="1.0" encoding="UTF-8"?> which parsed generate. If i remove this it works fine.
Out put in file looks like this
<?xml version="1.0" encoding="UTF-8"?>
<table border=1 width="100%">
<tr>
<TH>Name</TH>
<TH>Last Name</TH>
<TH>state</TH>
<TH>Country</TH>
<TH>Currency</TH>
</tr>
<tr>
<TD class="odd">John</TD>
<TD class="odd">Hayden</TD>
<TD class="odd">IL</TD>
<TD class="odd">USA</TD>
<TD class="odd">USD</TD>
</tr>
<tr>
<tr>
<TD class="odd">Ricky</TD>
<TD class="odd">Ponting</TD>
<TD class="odd">IL</TD>
<TD class="odd">USA</TD>
<TD class="odd">EUR</TD>
</tr>
</tr>
</table>
Jsp Code
String rptHTML = (String)session.getAttribute("ReportStrHTML");
System.out.println(rptHTML);
response.setHeader("Content-Disposition","attachment;filename=Test.xls");
response.setContentType("application/vnd.ms-excel");
ThanksIn Excel, Tools > Macro > security > medicum and Trusted tab check To access VB.
-
Display data in pivot format in ALV
Hi Experts,
I got some problem with data display in ALV. I had my internal table full of data, but I want it to be displayed in ALV in a special way. For example, I had the internal table of 3 fields: A,B, Ca & Cb with data like A1, B1....
A
B
Ca
Cb
A1
B1
C1
Cat
A1
B1
C2
Cry
A2
B2
C1
Cat
A2
B2
C2
Cry
A3
B3
C3
Car
Can they be displayed in ALV in a pivotal form like below
A
B
Cat
Cry
Car
A1
B1
C1
C2
A2
B2
C1
C2
A3
B3
C3
Appreciate any kind of help provided. Many thanks in advance.HI,
PERFORM change_headings
USING
*.. Table name
'?' "put your table name i here!!
*.. Fieldname
'M112005'
*.. Short...
'NOV 2005'
*.. Long
'November 2005'
*.. Medium
'November 2005'
*.. Dictionary Heading
'November 2005'.
*& Form change_headings
Changes the short, long, medium and and dictionary heading
fields for a given output field.
-->us_fieldname name of field to deal with
-->us_short text for short heading
-->us_long text for long heading
-->us_medium text for medium heading
-->us_heading text for dictionary heading
FORM change_headings
USING
us_tabname TYPE tabname
us_fieldname TYPE fieldname
us_short TYPE scrtext_s
us_long TYPE scrtext_l
us_medium TYPE scrtext_m
us_heading TYPE reptext.
*.. Short...
PERFORM set_fieldcat_attribute
USING
us_tabname
us_fieldname
'seltext_S'
us_short
t_fieldcat.
*.. Long
PERFORM set_fieldcat_attribute
USING
us_tabname
us_fieldname
'seltext_L'
us_long
t_fieldcat.
*.. Medium
PERFORM set_fieldcat_attribute
USING
us_tabname
us_fieldname
'seltext_M'
us_medium
t_fieldcat.
*.. Dictionary Heading
PERFORM set_fieldcat_attribute
USING
us_tabname
us_fieldname
'reptext_ddic'
us_heading
t_fieldcat.
ENDFORM. " change_headings
*& Form SET_fieldCAT_attribute
sets a fieldcat attribute,
e.g. can hide a field in ALV output, change title, etc
-->pv_table table name
-->pv_field field name
-->pv_attrib name of attribute to be changed
-->pv_newval new value to be put in attribute
-->pt_fieldcat field catlog
FORM set_fieldcat_attribute
USING pv_table TYPE tabname
pv_field TYPE fieldname
pv_attrib TYPE fieldname
pv_newval TYPE any
pt_fieldcat TYPE slis_t_fieldcat_alv
FIELD-SYMBOLS: <attrib>,
<fieldcat> TYPE slis_fieldcat_alv.
ensure working in upper case
TRANSLATE pv_table TO UPPER CASE.
ensure working in upper case
TRANSLATE pv_field TO UPPER CASE.
find the entry matching the input fieldname
READ TABLE pt_fieldcat ASSIGNING <fieldcat>
WITH KEY fieldname = pv_field tabname = pv_table.
if found..
IF sy-subrc = 0.
*.. set up the full name of field
CONCATENATE '<FIELDCAT>-' pv_attrib INTO w_field_name.
*.. point a field-symbol to it
ASSIGN (w_field_name) TO <attrib>.
*.. fill it with the input new value
<attrib> = pv_newval.
ENDIF.
ENDFORM. " set_fieldcat_attribute
assume itab-date1 = M112005
assume itab-date2 = M112004
assume itab-date3 = M122005
assume itab-date4 = M112004
data : begin of itab1 occurs 0,
mon(2) type c, " example 11
mon_desc(15) type c, "example november
end of itab1.
loop at itab.
l_mon1 = itab-date1+1(2).
l_year1 = itab-date1+3(4).
itab1-mon = l_mon1.
append itab1.
clear itab1.
l_mon2 = itab-date2+1(2).
l_year2 = itab-date2+3(4).
itab1-mon = l_mon2.
append itab1.
clear itab1.
l_mon3 = itab-date3+1(2).
l_year3 = itab-date3+3(4).
itab1-mon = l_mon3.
append itab1.
clear itab1.
l_mon4 = itab-date4+1(2).
l_year4 = itab-date4+3(4).
itab1-mon = l_mon3.
append itab1.
clear itab1.
delete adjacent duplicates from itab1 comparing mon.
write one perform here to get month description for given month using CASE statement and store in itab1-mon_desc.
loop at itab1.
if l_mon_desc1 is initial.
l_mon_desc1 = itab1-mon_desc.
else.
l_mon_desc2 = itab1-mon_desc.
endif.
endloop.
write : 'material description' ,l_mon_desc1 , l_mon_desc2.
write : l_year1 ,l_year2 ,l_year3 ,l_year4 .
just assuming the layout what u had given
PLS: AWARD POINTS .
SRI -
Displaying data in Two line in ALV report
Hi,
I want to know how to display the data in alv in two lines for Fild name as well as for fild value
like in below case
wa_fieldcata-fieldname = 'WRBTR'.
wa_fieldcata-seltext_l = 'AMOUNT IN DOCUMENT CURRENCY'.
wa_fieldcata-outputlen = 18.
wa_fieldcata-DO_SUM = 'X'.
APPEND wa_fieldcata TO it_fieldcat.
CLEAR wa_fieldcata.
by this on alv COLUMN headig is coming as 'AMOUNT IN DOCUMENT CURRENCY' in one linw i want to display 'AMOUNT IN ' in first line and then 'DOCUMENT CURRENCY' below that
'AMOUNT IN
DOCUMENT CURRENCY' ***
similarly how to display value of three fidls in one column
like for a vendor I have one column Vandor name in that column i want to display from table LFA1,
NAME1
NAME2
NAME3
NAME4,
in one column only how to do it.
regards,
zafarHi,
Ref . early reply can u help me how to uset his in ALV code and can u give some example for this how to display it in two lines as my column heading is of 60 characters 5 word i want to display it in two line in one column only .
How to use : SLIS_EV_AFTER_LINE_OUTPUT
to get this.
or is there any other method.
regards,
zafar -
Error exporting data to excel file
Hello,
I have written a macro to export some channels into an excel file, skipping the excel wizard by using the following code:
EXCELChnCount = intChannels - 1
For i = 1 To intChannels
ExcelExpChn(i) = ChannelList(i - 1)
Next
Call EXCELExport ("c:\test.xls","data",0,"")
No file is created, but when I output EXCELStat / EXCELStatTex it contains the error code 100 "a general error occured".
The strange thing is, if I run the wizard once (by changing the 0 to a 1), and just press "finish", the wizard-less export works flawlessly afterwards.
Has anybody an idea what is wrong? Do I have so set some more variables in order to make it work without using the wizard?
Using a STP configuration file, as I've read in some other postings isn't an option, as the name and the numbers of the exported channels change constantly.
Thanks for your help, and best regards!
SamHi Sam,
I did not try your script out, but I often receive the mysterious "error 100" when Excel already has the file open - Excel is very protective of its open files. Sometimes Excel will crash too, but checking your Task Manager will reveal it is still running...
Julia -
How to export only the displayed data to excel
Hello, APEX experts:
Currently, APEX export to excel functionality can export all data defined by the report query, no matter they are displayed on screen or not.
Is there a way to export the displayed portion only?
Thank you.
shiofanHi! Thanks for the reply.
From what I see, the include in export and show in report are independent since I can export columns which are not shown in the report and also some displayed columns are not included in the export.
Let me restate what I'm facing:
I'm using APEX 3.2 with standard report.
Let's say my report query returns 50,000 rows, but display only 500 rows per page. I'm using one of the APEX built in pagination scheme.
The default Export to Excel functionality will export all the 50,000 rows to an excel file. But my customer says, he does not want so many rows there. He want only the rows displayed on current page be exported. In other word, if the report is currently displaying rows from 501 to 1000, then the exported excel file should contain only the rows from 501 to 1000.
As you may says, why not just add another data filter to limit the output size? I agree, that should be the normal practice. But my customer want no more query conditions but export only the portion he see on the screen.
More idea?
Thanks a lot.
Shiofan -
Problem while displaying data in spool using oops alv
Hi,
I have created a oops alv, in which iam displaying 2 ALV's on 2 containers..
Iam able to display the data which i need when i execute the program in foreground , But when i execute the program in background iam not able to see the 2nd ALV in the spool....
The ALV displays one below the other.
How i can i correct it..?
VishwaHi,
The container created in ALV will work only in foreground as this is the framework the background cannnot initiate the container object and assign the ALV to the container.
Hence you cannot create the container object and assign the same to the ALV screen in background. Instead you need to use the factory method/ALV FM to display in background mode.
For background ALV processing, don't use OOPS! U can use this fm : REUSE_ALV_GRID_DISPLAY.
You can also refer below threads:
Re: ALV: Foreground Vs Background
Re: OO ALV in background job
Regards
Shiva -
How to display data in alv through double click
Hello Friends,
I am new to this community,please tell me if I make any mistake while posting.
Friends I had written this code. ALV is displayed at first time but when I am double clicking on the row then error is coming related to mismatch of actual and formal paramaters while calling function 'USER_COMMAND'. I am unable to locate where the error is. Please help me out.
REPORT ZALV12.
TYPE-POOLS SLIS.
DATA: it_vbak type standard table of VBAK,
it_vbap type table of VBAP.
DATA: wa_vbak like line of it_vbak,
wa_vbap like line of it_vbap.
DATA syrepid like sy-repid.
DATA:fld_vbak type SLIS_T_FIELDCAT_ALV,
fld_vbap type SLIS_T_FIELDCAT_ALV.
DATA:fld_wa_vbak type SLIS_FIELDCAT_ALV,
fld_wa_vbap type SLIS_FIELDCAT_ALV.
DATA:vevent type SLIS_T_EVENT,
waevent type SLIS_ALV_EVENT.
DATA:LST_HEADR type SLIS_T_LISTHEADER.
DATA title_alv type LVC_TITLE value 'LIST FOR VBAK'.
INITIALIZATION.
syrepid = sy-repid.
perform get_event.
perform populate_event.
perform set_list_headr using LST_HEADR.
perform field_cat.
START-OF-SELECTION.
..... "code for displaying data from table VBAK in ALV.
form USER_COMMAND using R_UCOMM type SY-UCOMM. "error is in this function.
data r_selfield type SLIS_SELFIELD.
case R_UCOMM.
when '&IC1'.
read table it_vbak into wa_vbak index r_selfield-TABINDEX.
perform data_select.
perform list_heading using LST_HEADR.
perform event_get.
perform build_event.
perform alv_display.
endcase.
endform.
form data_select.
select * from VBAP into table it_vbap up to 20 rows.
endform.
form list_heading using i_lst type SLIS_T_LISTHEADER.
data HLINE type SLIS_LISTHEADER.
HLINE-TYP = 'H'.
HLINE-INFO = 'FOR VBAP'.
append HLINE to i_lst.
endform.
form alv_display.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = syrepid
I_STRUCTURE_NAME = 'VBAP'
I_GRID_TITLE = 'SCREEN2_VBAP'
TABLES
T_OUTTAB = it_vbap
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
form event_get.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = vevent
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
form build_event.
read table vevent into waevent with key name = 'TOP_OF_PAGE'.
if sy-subrc = 0.
waevent-form = 'F_TOP_OF_PAGE'.
modify vevent from waevent transporting form
where name = 'TOP_OF_PAGE'.
endif.
endform.
form F_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = LST_HEADR
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
endform.You missed one paramete in user_command form
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Regards,
Raymond -
Problem in changing layout of ALV to excel
Hello everyone,
I have developed an ALV program, wherein I need to show the graphs for the same.
For this, I need my data in excel format, so that I can write some macros ,and do the further processing on it(I am using an appraoch I found on SDN, "Report with graph").
I got to know, that I need <b>SAP R/3: Add On:Interactive Excel</b>.
I asked the BASIS guys to install it, but even after installing it, I am unable to view the data in Excel layout, when I do Change LAyout->View->Microsoft Excel.
Could anyone let me know if there is any other setting which is required to view the data in excel?On the excel side, we can change the security level(Tools->Macro->Security) to either low, medium or high.
Is there any such provision in SAP?
Kindly suggest your answers, as it is important for me to get the data in excel.
Points will be rewarded.
Thanks and regards,
PrernaHi,
I have already tried what you have just mentioned.
I searched the entire SDN, for this, and this was one of the replies
But still we don't get the data(Even you didn't get it, right?).
when we change the layout to excel(Excel Inplace), there are 2 sheets by default:-
Rawheader and Rawdata.The data comes in RAwheader sheet.
But there is some setting on the BASIS side, which need to be done, in order for it to work.
I have asked my BASIS colleagues and some of my senior consultants to look into the same.
They will let me know.
I would also suggest you try your program on another PC.
I will let you know as soon as I get any replies from my colleagues.
Thanks and regards,
Prerna -
Display data column wise in alv
my problem is i want to display data in column wise in alv grid display
for example it will display
Name1 Amount
GTS 12000
TSL 8970
MJB 4678
but i want like:
GTS TSL MJB
12000 8970 4678
Edited by: jadav_avani on Nov 15, 2010 8:33 AM
Moderator Message: Search for available information.
Edited by: kishan P on Nov 15, 2010 1:50 PMmy problem is i want to display data in column wise in alv grid display
for example it will display
Name1 Amount
GTS 12000
TSL 8970
MJB 4678
but i want like:
GTS TSL MJB
12000 8970 4678
Edited by: jadav_avani on Nov 15, 2010 8:33 AM
Moderator Message: Search for available information.
Edited by: kishan P on Nov 15, 2010 1:50 PM -
Error
[Load data from excel file [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There
may be error message
I am using BIDS Microsoft Visual Studio 2008 and running the package to load the data from excel .
My machine has 32 bit excel hence have set property to RUN64BITRUNTIME AS FALSE.
But the error still occurs .
I checked on Google and many have used Delay validation property at Data flow task level to true but even using it at both excel connection manager and DFT level it doesnt work
MudassarThats my connection string
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\SrcData\Feeds\Utilization.xlsx;Extended Properties="Excel 12.0;HDR=NO";
Excel 2010 installed and its 32 bit edition
Are you referring to install this component -AccessDatabaseEngine_x64.exe?
http://www.microsoft.com/en-us/download/details.aspx?id=13255
Mudassar
You can try an OLEDB provider in that case
see
http://dataintegrity.wordpress.com/2009/10/16/xlsx/
you might need to download and install ms access redistributable
http://www.microsoft.com/en-in/download/details.aspx?id=13255
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
Maybe you are looking for
-
I am having a problem with copying and pasting text into the Safari search bar.
For example, when I copy and paste "Organic Chemistry: A Short Course" it will change to Organic%20Chemistry:%20A%20Short%20Course" It will then tell me it has failed to open page, even though my interenet is otherwise working. How can I fix this?
-
How do you make an itunes feature suggestion to Apple?
I'm trying to find a place to make an itunes feature suuggestion to Apple, but all I seem to be able to find is a "request music" link... If this is the only place, then here is my suggestion... I am a video editor and I use itunes to play my music,
-
I want to create auto number forms where I would assign a range of numbers and once a number in the list was used it would expire and unable to be used twice.
-
Help transferring photos and video from broke phone!!!!
I have a Siii that was recently dropped in the toilet by my 2 year old. I am trying to get my pictures and video off of it. My screen doesn't let me swipe it. I have been using svoice to make calls and texts till my new devices comes in from Asurion.
-
Imovie still images only stretched to 60seconds
To all quite new to imovie and using 08, but when i put music to a still image, the still image can only be stretched to 60 seconds. it doesn't seem like its a problem to copy the image and make a second image for a second 60 second length, creating