Excel download problem.
Hi,
i have developed a report using Dynamic ALV, when i used to save the output to excel, data in the output is matched with the excel. while executing the report in SAP screen it works fine. i have used REUSE_ALV_GRID.for this.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_bypassing_buffer = 'X'
i_buffer_active = ' '
i_callback_program = lv_repid
is_layout = gs_layout
it_fieldcat = gt_fieldcat
it_sort = gt_sort[]
it_events = gt_event
TABLES
t_outtab = <dyn_table>
EXCEPTIONS
program_error = 0
OTHERS = 0.
is there any settings to be done in the excel or should we add any additional parameters for local file?
pointers for this will be helpful.
Regards,
Dinesh
Hi,
What is your problem ?
If you don't see anything in Excel after download :
In Excel
first step
- Menu : Tools ->Macros->scurity
go to tab Trusted Publishers and flag Trust acces to Visual Basic Project
second step
allow execution of macro
- Menu : Tools ->Macros->scurity
go to tab security Level and choise medium or Low
Rgds
Similar Messages
-
ALV Excel Download problem ( Special Character)
Hi,
I am unable to download completely in XLS format from ALV grid. When i tried in couple of ways there is a special character( " ) in one of the filed. Due to the same Excel download has some problem. I tested by removing those and it worked fine,
Please suggest me to solve the issue.
Thanks,
Bhanu Gattu,Data strings with special characters can not be downloaded into XLS format from ALV grid. In my case, I replaced the special character " with space and I could download the data into excel.
-
Hi,
I am trying to download ALV report to excel but the columns in the o/p is appearing in two rows.
THe ALV report has 82 columns in o/p.Is there any restriction on the no of columns that can be downloaded in excel.Please help.
Thanks,
Sutapa.Hi Sutapa,
Kindly go through this link below for ALV Excel Download:
Re: how to view alv grid output in excel format(not downloading to pc)
Hope it helps
Regrds
Mansi -
Excel Download problem - Urgent please
Hi All,
I am using 4.6C version.
The user is downloading the ALV output to excel from the output menu
List > Save > File > Spreadsheet >
User tried saving a file to the Local drive and got a "Disk is full" error.
User realized that the export didn't complete (Partial download)
because there wasn't enough disk space to export the report.
User stated that if he had received an error message of some sort, he might have realized the problem.
He didn't receive any kind of errors.
User would like some kind of error message to come up in those situations.
Without an error message, he assumes the reports are acurate and trusts them.
<b>I have analysied and found a exit EXIT_SAPLGRAP_001 which triggres after the popup asking the file path. However this exit doesnot give me the file path</b>.
After this i think i can make use of the class CL_GUI_FRONTEND_SERVICES and method GET_FREE_SPACE_FOR_DRIVE and FILE_GET_SIZE to check for disk space full.
Kindly let me know how to get the file path given in the popup to get it in the exit EXIT_SAPLGRAP_001. Also there was no parameter id for the field.
Thanks for your help.
SenthilSenthil,
"However in this case the sap didnot uses GUI_DOWNLOAD to download instead it uses download FM. "
What "download FM" is 4.6 using then?
The GUI_DOWNLOAD does check for a disk_full situation... I find it hard to believe that SAP made an oversight here.
I believe that the user is not telling the truth to you... or something else happened in that they have not conveyed to you. -
Hi Experts,
I display around 15 fields(columns) in ALV output. When I download it to Excel, it downloads exactly.
Then dynamically, when I increase the number of fields to be displayed in ALV it is displaying correctly. But when I download
to excel, half of the fields are coming in one line of excel sheet and remaining fields are coming in the second line of excel.
Why am I not getting all the fields in one line itself in the excel sheet?
Is it a problem in standard ALV?
I am using cl_gui_alv_grid class to display ALV output.
Thanks and regards,
Venkat.Hi!
Which function module you are using for downloading? -
ALV to excel download problem through standard tool bar
I am downloading data into excel from ALV , When there are 128 column data in execl coming as 2 row for 1 row of data in alv. This problem is not there for 78 columns report.
Kindly suggest some solution.i think there is a limit to the number of columns for ALV and which is i think 92 ..this can be the cause of the issue
amit -
ALv to excel download problems
HI friends,
Probelm I'm facing while saving an ALV report to Excel Sheet by clicking
on the 'Save as File Icon' button on the ALV output.=0D
Here data is going into a new Line after 65 columns.I've used Function
Module 'RSAQ_ALV'.This function module is ultimately using
'REUSE_ALV_GRID_DISPLAY' and 'REUSE_ALV_LIST_DISPLAY' function
modules.ALV output I'm getting correctly but when I save this ALV output
to Excel,columns are getting wrapped and going into 2nd row after 65
columns.=0D
Could anybody tell me what could be the reason ?=0D
Thanks,
Sreekanth.G
Moderator message: duplicate post locked.
Edited by: Thomas Zloch on Jul 9, 2010 12:36 PMch_alv_layout-info_fieldname = 'COLOR'. "infofield for listoutput
ch_alv_layout-colwidth_optimize = 'X'.
try commenting the above values.and also check the Fieldcatlog.
Check the issue similar issue was resolve by checking catalog and layout:
[ALV Issue solution|Re: Problem when export ALV.]
Regards,
Gurpreet -
Excel download problem :--- Header data duplicating in unexpected columns
Guys,
I am able to download the data onto Excel with Header data but the Header data duplicating in unexpected columns RHS upto all the line item columns below....Below is partial excerpt...
Please help....
DATA:
BEGIN OF excel_wa,
posnr TYPE vbap-posnr, "Line Item
matnr TYPE vbap-matnr, "Mat#
pmatn TYPE vbap-pmatn, "Pric Mat
zansicat TYPE zmarall-zansicat, "AnsiCat#
zansigrd TYPE zmarall-zansigrd, "Grade
zcurrvaltnarea TYPE zco002-zcurrvaltnarea,"Val Area
zcurrcstusd TYPE zco002-zcurrcstusd, "Cost$
zzbrndnm TYPE mara-zzbrndnm, "Brand
zqedscgrp TYPE zglbprc-zqedscgrp, "QE Disc Grp
mstav TYPE mara-mstav, "Status
prodh TYPE vbap-prodh, "Prod Heir
kwmeng TYPE vbap-kwmeng, "Qty
lprc TYPE konv-kbetr, "List Price ZBP1
sprc TYPE konv-kbetr, "Std Pric ZNAA,ZNAX
netpr TYPE vbap-netpr, "Quot price
mrgn TYPE konv-kbetr, "margin%
END OF excel_wa,
BEGIN OF sema_wa,
posnr LIKE ws-xxlt VALUE 'STRDFT',
matnr LIKE ws-xxlt VALUE 'STRDFT',
pmatn LIKE ws-xxlt VALUE 'STRDFT',
zansicat LIKE ws-xxlt VALUE 'STRDFT',
zansigrd LIKE ws-xxlt VALUE 'STRDFT',
zcurrvaltnarea LIKE ws-xxlt VALUE 'STRDFT',
zcurrcstusd LIKE ws-xxlt VALUE 'STRDFT',
zzbrndnm LIKE ws-xxlt VALUE 'STRDFT',
zqedscgrp LIKE ws-xxlt VALUE 'STRDFT',
mstav LIKE ws-xxlt VALUE 'STRDFT',
prodh LIKE ws-xxlt VALUE 'STRDFT',
kwmeng LIKE ws-xxlt VALUE 'N00ADD',
lprc LIKE ws-xxlt VALUE 'N02ADD',
sprc LIKE ws-xxlt VALUE 'N03ADD',
netpr LIKE ws-xxlt VALUE 'N02ADD',
mrgn LIKE ws-xxlt VALUE 'N00ADD',
END OF sema_wa,
BEGIN OF clhd_wa,
posnr LIKE ws-xxlt VALUE 'LineItem#',
matnr LIKE ws-xxlt VALUE 'Mat#',
pmatn LIKE ws-xxlt VALUE 'VC Mat#',
zansicat LIKE ws-xxlt VALUE 'AnsiCat',
zansigrd LIKE ws-xxlt VALUE 'Grade',
zcurrvaltnarea LIKE ws-xxlt VALUE 'ValnArea',
zcurrcstusd LIKE ws-xxlt VALUE 'Currency',
zzbrndnm LIKE ws-xxlt VALUE 'Brand',
zqedscgrp LIKE ws-xxlt VALUE 'QE disc',
mstav LIKE ws-xxlt VALUE 'Status',
prodh LIKE ws-xxlt VALUE 'Prod Heir',
kwmeng LIKE ws-xxlt VALUE 'Qty',
lprc LIKE ws-xxlt VALUE 'List Pric',
sprc LIKE ws-xxlt VALUE 'St.Disc',
netpr LIKE ws-xxlt VALUE 'Quote Price',
mrgn LIKE ws-xxlt VALUE 'Margin%',
END OF clhd_wa,
BEGIN OF hdtxt1_wa,
vbeln LIKE ws-xxlt VALUE 'Quotation#',
kunnr LIKE ws-xxlt VALUE 'Quote Date',
kvgr3 LIKE ws-xxlt VALUE 'Rep Date',
pltyp LIKE ws-xxlt VALUE 'Pric List Typ & Currency',
waers LIKE ws-xxlt VALUE 'Sold To',
knuma LIKE ws-xxlt VALUE 'Ship To',
datab LIKE ws-xxlt VALUE 'Top Parent',
datbi LIKE ws-xxlt VALUE 'Sales Org/Sales Dist/CPA',
note LIKE ws-xxlt VALUE 'Net Sales',
END OF hdtxt1_wa,
BEGIN OF hdtxt2_wa,
vbeln LIKE ws-xxlt VALUE '',"Quotation#',
kunnr LIKE ws-xxlt VALUE '',"Quote Date',
kvgr3 LIKE ws-xxlt VALUE '',"Rep Date',
pltyp LIKE ws-xxlt VALUE '',"Pric List Typ & Currency',
waers LIKE ws-xxlt VALUE '',"Sold To',
knuma LIKE ws-xxlt VALUE '',"Ship To',
datab LIKE ws-xxlt VALUE '',"Top Parent',
datbi LIKE ws-xxlt VALUE '',"Sales Org/Sales Dist/CPA',
note LIKE ws-xxlt VALUE '',"Net Sales',
END OF hdtxt2_wa.
DATA:
ivbap LIKE STANDARD TABLE OF ivbap_wa,
imat LIKE STANDARD TABLE OF mat_wa,
icurr LIKE STANDARD TABLE OF curr_wa,
ikonv LIKE STANDARD TABLE OF konv_wa,
ivbpa LIKE STANDARD TABLE OF ivbpa_wa,
ikna1 LIKE STANDARD TABLE OF kna1_wa,
iresult LIKE STANDARD TABLE OF result_wa,
*Excel tables
iexcel LIKE STANDARD TABLE OF excel_wa,
isema_wa LIKE gxxlt_s,
it_sema LIKE STANDARD TABLE OF gxxlt_s,
ihkey_wa LIKE gxxlt_h,
it_hkey LIKE STANDARD TABLE OF gxxlt_h,
iotxt_wa LIKE gxxlt_o,
it_otext LIKE STANDARD TABLE OF gxxlt_o,
iptxt_wa LIKE gxxlt_p,
it_ptext LIKE STANDARD TABLE OF gxxlt_p,
ivkey_wa LIKE gxxlt_v,
it_vkey LIKE STANDARD TABLE OF gxxlt_v.
*Field-Symbols
FIELD-SYMBOLS:
<vbap> LIKE ivbap_wa,
<vbpa> LIKE ivbpa_wa,
<mat> LIKE mat_wa,
<sema_wa>,
<clhd_wa>,
<hdtxt1_wa>,
<hdtxt2_wa>.
*Constants
CONSTANTS:
c_auart TYPE vbak-auart VALUE 'AG', "AG = Quotn
c_parvw1 TYPE vbpa-parvw VALUE 'AG',
c_parvw2 TYPE vbpa-parvw VALUE 'WE',
c_parvw3 TYPE vbpa-parvw VALUE 'ZT',
c_kappl TYPE konv-kappl VALUE 'V',
c_kschl1 TYPE konv-kschl VALUE 'ZBP1',
c_kschl2 TYPE konv-kschl VALUE 'ZNAX',
c_kschl3 TYPE konv-kschl VALUE 'ZNAA',
c_psize TYPE i VALUE 65535.
*& SELECTION-SCREEN.
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
SELECT-OPTIONS:
s_vbeln FOR ws-vbeln NO INTERVALS NO-EXTENSION OBLIGATORY.
SELECTION-SCREEN END OF BLOCK a.
*& AT SELECTION-SCREEN.
AT SELECTION-SCREEN.
PERFORM validate_screen_entries.
START-OF-SELECTION.
PERFORM gather_quot_data.
PERFORM gather_mat_data.
PERFORM gather_ansi_data.
PERFORM gather_customer_data.
PERFORM gather_price_data.
PERFORM process_consolidate_data.
TOP-OF-PAGE.
PERFORM write_header_data.
PERFORM write_column_heading.
END-OF-SELECTION.
SET PF-STATUS 'XLS'.
PERFORM display_output.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'XLS'.
LOOP AT iresult INTO result_wa.
CLEAR excel_wa.
excel_wa-posnr = result_wa-posnr.
excel_wa-matnr = result_wa-matnr.
excel_wa-pmatn = result_wa-pmatn.
excel_wa-zansicat = result_wa-zansicat.
excel_wa-zansigrd = result_wa-zansigrd.
excel_wa-zcurrvaltnarea = result_wa-zcurrvaltnarea.
excel_wa-zcurrcstusd = result_wa-zcurrcstusd.
excel_wa-zzbrndnm = result_wa-zzbrndnm.
excel_wa-zqedscgrp = result_wa-zqedscgrp.
excel_wa-mstav = result_wa-mstav.
excel_wa-prodh = result_wa-prodh.
excel_wa-kwmeng = result_wa-kwmeng.
excel_wa-lprc = result_wa-lprc.
excel_wa-sprc = result_wa-sprc.
excel_wa-netpr = result_wa-netpr.
excel_wa-mrgn = result_wa-mrgn.
APPEND excel_wa TO iexcel.
ENDLOOP.
PERFORM set_up_xxl_structures.
PERFORM download_xxl.
WHEN OTHERS.
ENDCASE.
FREE: ivbpa, imat, ikna1, ivbap, ikonv, iresult, ws.
*& Form set_up_xxl_structures
text
FORM set_up_xxl_structures.
REFRESH: it_otext, it_sema, it_hkey, it_vkey.
CLEAR: result_wa, ivbpa_wa, it_otext, ws.
MOVE sy-repid TO ws-title-repid.
MOVE 'Section' TO ws-title-reppart.
WRITE sy-uzeit TO ws-title-uzeit USING EDIT MASK '__:__'.
MOVE ws-title TO ws-xxl-title.
READ TABLE iresult INTO result_wa
WITH KEY vbeln = s_vbeln-low.
READ TABLE ivbpa INTO ivbpa_wa
WITH KEY vbeln = s_vbeln-low
parvw = 'AG'.
CONCATENATE ivbpa_wa-kunnr '/'
ivbpa_wa-name1 INTO ws-soldto.
CLEAR ivbpa_wa.
READ TABLE ivbpa INTO ivbpa_wa
WITH KEY vbeln = s_vbeln-low
parvw = 'WE'.
CONCATENATE ivbpa_wa-kunnr '/'
ivbpa_wa-name1 INTO ws-shipto.
CLEAR ivbpa_wa.
READ TABLE ivbpa INTO ivbpa_wa
WITH KEY vbeln = s_vbeln-low
parvw = 'ZT'.
IF ivbpa_wa-kunnr EQ space.
CLEAR ivbpa_wa.
READ TABLE ivbpa INTO ivbpa_wa
WITH KEY vbeln = s_vbeln-low
parvw = 'AG'.
ENDIF.
CONCATENATE ivbpa_wa-kunnr '/'
ivbpa_wa-name1 INTO ws-tparent.
DO.
CLEAR: isema_wa, ihkey_wa, iotxt_wa, iptxt_wa, ivkey_wa.
ASSIGN COMPONENT sy-index OF STRUCTURE hdtxt1_wa TO <hdtxt1_wa>.
ASSIGN COMPONENT sy-index OF STRUCTURE hdtxt2_wa TO <hdtxt2_wa>.
IF sy-subrc <> 0.
EXIT.
ENDIF.
CASE <hdtxt1_wa>.
WHEN 'Quotation#'.
<hdtxt2_wa> = 'Quotation#'.
WHEN 'Quote Date'.
<hdtxt2_wa> = 'Quote Date'.
WHEN 'Rep Date'.
<hdtxt2_wa> = 'Rep Date'.
WHEN 'Pric List Typ & Currency'.
<hdtxt2_wa> = 'Pric List Typ & Currency'.
WHEN 'Sold To'.
<hdtxt2_wa> = 'Sold To'.
WHEN 'Ship To'.
<hdtxt2_wa> = 'Ship To'.
WHEN 'Top Parent'.
<hdtxt2_wa> = 'Top Parent'.
WHEN 'Sales Org/Sales Dist/CPA'.
<hdtxt2_wa> = 'Sales Org/Sales Dist/CPA'.
WHEN 'Net Sales'.
<hdtxt2_wa> = 'Net Sales'.
ENDCASE.
MOVE : 1 TO ihkey_wa-col_no,
sy-index TO ihkey_wa-row_no,
<hdtxt2_wa> TO ihkey_wa-col_name.
APPEND ihkey_wa TO it_hkey.
CLEAR ihkey_wa.
CASE <hdtxt1_wa>.
WHEN 'Quotation#'.
<hdtxt2_wa> = result_wa-vbeln.
WHEN 'Quote Date'.
WRITE result_wa-erdat TO ws-dat1.
<hdtxt2_wa> = ws-dat1.
WHEN 'Rep Date'.
WRITE result_wa-repdt TO ws-dat2.
<hdtxt2_wa> = ws-dat2.
WHEN 'Pric List Typ & Currency'.
CONCATENATE result_wa-pltyp '/'
result_wa-waers INTO <hdtxt2_wa>.
WHEN 'Sold To'.
<hdtxt2_wa> = ws-soldto.
WHEN 'Ship To'.
<hdtxt2_wa> = ws-shipto.
WHEN 'Top Parent'.
<hdtxt2_wa> = ws-tparent.
WHEN 'Sales Org/Sales Dist/CPA'.
CONCATENATE result_wa-vkorg '/'
result_wa-bzirk '/'
ivbpa_wa-kvgr3
INTO <hdtxt2_wa>.
WHEN 'Net Sales'.
<hdtxt2_wa> = result_wa-netwr.
ENDCASE.
MOVE : 2 TO ihkey_wa-col_no,
sy-index TO ihkey_wa-row_no,
<hdtxt2_wa> TO ihkey_wa-col_name.
APPEND ihkey_wa TO it_hkey.
ENDDO.
DO.
CLEAR: isema_wa, ihkey_wa, iotxt_wa, iptxt_wa, ivkey_wa.
ASSIGN COMPONENT sy-index OF STRUCTURE sema_wa TO <sema_wa>.
IF sy-subrc NE 0.
ASSIGN COMPONENT sy-index OF STRUCTURE clhd_wa TO <clhd_wa>.
IF sy-subrc EQ 0.
MESSAGE e193 WITH 'OFIL Structures out of synch-Contact IT'.
ENDIF.
EXIT.
ENDIF.
ASSIGN COMPONENT sy-index OF STRUCTURE clhd_wa TO <clhd_wa>.
IF NOT <sema_wa> EQ 'NOSHOW'.
ADD 1 TO ws-xxl-tabix.
MOVE: ws-xxl-tabix TO isema_wa-col_no,
<sema_wa>(3) TO isema_wa-col_typ,
<sema_wa>+3(3) TO isema_wa-col_ops,
ws-xxl-tabix TO isema_wa-col_src.
APPEND isema_wa TO it_sema.
IF ws-xxl-tabix LE ws-xxl-vrtkeys.
MOVE: ws-xxl-tabix TO ivkey_wa-col_no,
<clhd_wa> TO ivkey_wa-col_name.
APPEND ivkey_wa TO it_vkey.
ELSE.
ADD 1 TO ws-xxl-attcols.
MOVE: ws-xxl-attcols TO ihkey_wa-col_no,
10 TO ihkey_wa-row_no,
<clhd_wa> TO ihkey_wa-col_name.
APPEND ihkey_wa TO it_hkey.
ENDIF.
ENDIF.
ENDDO.
ENDFORM. " set_up_xxl_structures
*& Form download_xxl
text
-->P_IHQEXCEL text
FORM download_xxl. "TABLES iexcel STRUCTURE excel_wa.
DESCRIBE TABLE iexcel LINES ws-xxl-count.
ws-xxl-from = 1.
ws-xxl-to = c_psize.
DO.
IF ws-xxl-from GT ws-xxl-count.
EXIT.
ENDIF.
IF ws-xxl-to GT ws-xxl-count.
MOVE ws-xxl-count TO ws-xxl-to.
ENDIF.
ADD 1 TO ws-xxl-suffix.
MOVE ws-xxl-suffix TO: ws-xxl-name+6(2),
ws-xxl-title+36(2).
CALL FUNCTION 'XXL_FULL_API'
EXPORTING
n_vrt_keys = ws-xxl-vrtkeys
n_att_cols = ws-xxl-attcols
n_hrz_keys = ws-xxl-hrzkeys
data_starting_at = ws-xxl-from
data_ending_at = ws-xxl-to
filename = ws-xxl-name
header_1 = space
sema_type = 'X'
so_title = ws-xxl-title
TABLES
data = iexcel
hkey = it_hkey
online_text = it_otext
print_text = it_ptext
sema = it_sema
vkey = it_vkey
EXCEPTIONS
data_too_big = 1
file_open_error = 2
file_write_error = 3
inv_winsys = 4
inv_xxl = 5.
CASE sy-subrc.
WHEN 1.
MESSAGE e193 WITH 'dim_mismatch_data'.
WHEN 2.
MESSAGE e193 WITH 'file_open_error'.
WHEN 3.
MESSAGE e193 WITH 'file_write_error'.
WHEN 4.
MESSAGE e193 WITH 'inv_winsys'.
WHEN 5.
MESSAGE e193 WITH 'inv_xxl'.
ENDCASE.
ADD c_psize TO: ws-xxl-from,
ws-xxl-to.
ENDDO.
ENDFORM. " download_xxlHello Friend,
You can use GUI_DOWNLOAD FM to get the excel header if that's the only specific requirement.
[Download Excel including header |Download Excel including header;
Hope this helps.
BR,
Suhas -
hi,
i am trying to download my report'soutput to excel sheet which is not usual Microsoft excel buit it is OPEN OFFICE.the date format in report is DDMMYY but when downloading to OPEN OFFICE its taking as MMDDYY.so what can be done to retain the date format?
Thanks in advance.hi,
before coming to output change the date format in program dd.mm.yy, so you can down load that.
Regards,
Arjun. -
Problem in ALV to Excel Download
Good Morning Experts,
I am facing one issue related ALV to excel Download.
I Developed one custom report the output is correct displaying.
the output is like for example i am taking 3 columns (plant, material, amt).
plant material amt
1001 aaa 1000
1001 bbb 2000
while downloading to excel
it displaying like
plant
material
amt
1001
aaa
1000
1001
bbb
2000
I dont know why its coming like that.
this is my code
DEFINE field_cat.
wa_field-row_pos = &1.
wa_field-fieldname = &2.
wa_field-tabname = &3.
wa_field-seltext_m = &4.
wa_field-outputlen = &5.
wa_field-currency = &6.
wa_field-ref_fieldname = &7.
wa_field-ref_tabname = &8.
APPEND wa_field to it_field.
clear wa_field.
END-OF-DEFINITION.
field_cat '1' 'BUKRS' 'IT_FINAL' 'Company Code' '6' '' '' ''.
field_cat '2' 'BUTXT' 'IT_FINAL' 'Comp Descrip' '25' '' '' ''.
field_cat '3' 'LIFNR' 'IT_FINAL' 'Vendor No' '10' '' '' ''.
field_cat '4' 'NAME1' 'IT_FINAL' 'Vendor Name' '35' '' '' ''.
field_cat '5' 'STRAS' 'IT_FINAL' 'Vendor Addres' '35' '' '' ''.
field_cat '6' 'FDGRV' 'IT_FINAL' 'Nature Of Work' '30' '' '' ''.
field_cat '7' 'DMBTR' 'IT_FINAL' 'Net Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
field_cat '8' 'QBSHB' 'IT_FINAL' 'TDS Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
field_cat '9' 'TOTAL' 'IT_FINAL' 'Total Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
it_layout-zebra = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IS_LAYOUT = it_layout
IT_FIELDCAT = it_field
I_SAVE = 'X'
TABLES
t_outtab = it_final
EXCEPTIONS
PROGRAM_ERROR = 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. " DISPLAY_ALV
FORM TOP_OF_PAGE.
REFRESH it_head. CLEAR it_head.
wa_head-typ = 'H'.
wa_head-info = 'Vendorwise Expense Details'.
APPEND wa_head to it_head.
wa_head-typ = 'S'.
IF NOT s_MONAT-high is INITIAL.
CONCATENATE 'Period : ' p_gjahr '.' s_MONAT-low ' to ' p_gjahr '.' s_MONAT-high INTO wa_head-info.
ELSE.
CONCATENATE 'Period : ' p_gjahr '.' s_MONAT-low INTO wa_head-info.
ENDIF.
APPEND wa_head to it_head.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_head.
ENDFORM.
Regards,
Dhina..Hi,
You can also try in this way
in the output screen
click List (in app tool bar) -> Export -> Spreadsheet
and save at your desired location.
(It will be save in .mhtml format , just rightclick on it and you can open it with excel )
Then you will be able to view in your required format.
Regards,
koolspy. -
Excel download feature in Web Dynpro Abap using OAOR document
Hi Friends,
I am facing an issue in implementing excel download feature in Web Dynpro.
Problem: I have stored an excel document in OAOR. I am displaying data on screen using ALV display in WDA.
I will provide a button to download excel in toolbar of ALV. When user clicks on this button i need to pick the document from OAOR and fill that with my screen values and download it to users desktop.
Please help me in this. Problem is when i am calling these classes c_oi_container_control_creator=>get_container_control and cl_gui_custom_container from my View's method they are returning error.
Thanks & Regards,
SaudHI,
You cannot use GUI classes and methods in web dynpro . That will dump.
Instead you can use file down load UI element or..
If you have the content in xstring format use ATTACH_FILE_TO_RESPONSE method of CL_WD_RUNTIME_SERVICES class.
Regards,
Madhu -
Dump while running a program with OLE Excel download facility in ITS
Hi,
Because of some complex requirment, I had created a report program which will download the data to an Excel sheet using SAP OLE Automation Controller. For this report i had created a tcode too.
The report which i developed is perfectly working fine in SAPGUI. But if i access the same report throught SAP ITS serice. I am getting a dump. Please find below the dump details. I am not able to figure it out why the dump is not coming in SAPGUI.
Runtime Errors MESSAGE_TYPE_X
Date and Time 09.03.2010 05:35:41
Short text
The current application triggered a termination with a short dump.
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
|
Error analysis
Short text of error message:
Control Framework : Error processing control
Long text of error message:
Diagnosis
An error occurred when the system tried to process the commands
from the Automation Queue on the presentation server.
There are several possible reasons for this:
- The installation of the SAP GUI on the presentation server is
faulty or obsolete.
- There is an error in the application program
- There is an error in the SAPGUI or an integrated control
Procedure
1. Make sure that you have imported the appropriate Support
Package, the current kernel, and GUI patch for the release of your
system
2. Check whether the error occurs locally on one or a few PCs, or
generally on all PCs. Note whether the error only occurs for some
users, for example because of a specific Customizing setting.
If it only occurs locally, this suggests an installation problem
with the PC. Check the installation; if necessary, reinstall the
software. In the dump, search for the SY-MSGLI field, since it may
point to the cause of the error.
3. Activate the Automation Trace (in accordance with SAP Note
158985).
4.Start the transaction and continue until the screen immediately
before the dump.
5. From the System -> Utilities menu, choose Autom. Queue,
Synchronous Processing.
The status bar of the GUI displays the text:
"Automation synchron flush mode on"
6. If you now proceed with the application, the short dump will
display the ABAP call that caused the error; the Automation Trace
will contain the error on the presentation server.
7. If necessary, load the short dump and trace files on to
sapservX, so that SAP can analyze them.
Technical information about the message:
Message class....... "CNDP"
Number.............. 006
Variable 1.......... " "
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
How to correct the error
Probably the only way to eliminate the error is to correct the program.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"MESSAGE_TYPE_X" " "
"SAPLOLEA" or "LOLEAU02"
"AC_SYSTEM_FLUSH"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
User and Transaction
Client.............. 120
User................ "XXXXXX"
Language Key........ "E"
Transaction......... "ZGA_BEACON_SOX_RPT "
Transactions ID..... "4B95E2560EB62F9AE10000000A241C33"
Program............. "SAPLOLEA"
Screen.............. "ZGA_REP_BEACON_SOX_REPORT 9000"
Screen Line......... 0
Information on Caller ofr "HTTP" Connection:
Plug-in Type.......... "HTTP"
Caller IP............. "10.36.28.52"
Caller Port........... 8000
Universal Resource Id. "/sap/bc/gui/sap/its/webgui/~flNUQVRFPTIzNzIxLjAxNC4wNC4
wNA=="Hi All,
FYI.....
As I said because of my complex requirement, i am using OLE excel download facilities to download the data. ITS wont support this OLE download facility. This can be done only through local SAP GUI.
The reason for this is that, when i am using this download facility through SAP GUI, OLE object thats used in my report program will directly talk to the Local OLE excel objects (i.e. the local installed Excell application) and download the data. But if it's through ITS, my program wont be able to communicate with the local excel OLE objects because of this i am getting a DUMP.
Thank You all for the support. All the best in future.
Regards
Maneesh Chandran -
Excel download truncated characters
Hi,
I have a strange problem. I am trying to download an ALV report in a excel format to the work station and the last character of one of the many fields,Vendor Number, gets truncated. Strangely this problem is confined to quality and production environments, and the same excel download works fine in the development environment.
I have searched for replies in the forum that suggest program corrections but I would like to know how the same report download works correctly in development.Hi,
The issue is due to fieldcatalog not being populated properly and in the Layout - Column width optimize is checked. In this case the contents are display till the heading ( For ex: if the heading is 'Vendor' ) the conents will be displayed with a maximum length of 6 characters instead of 10 with ".." at the end truncating the output.
The reason why its working in development and not in Quality or production is that the maximum vendor number in development is less than or equal to 6 digits where as in quality or production its more. Please check.
Solution: If you are populating the field catalog manuallly, populate the ref_field and ref_table ( For ex: wth 'LIFNR' and 'LFA1' respectively ).
Edited by: Suman Jagu on May 9, 2011 11:48 AM -
Excel download from ALV not working inproduction
Hi all,
I am using "set_table_for_first_display" for alv display. the excel download from alv is woking fine in development and quality stystem but in production only first 3-4 rows are getting downloaded. Other rows donot appear in excel.
Any Idea !!!
Thanks
MadhuHi Experts,
I have noticed that same problem is occuring in development system also with same set of data . The ascii file created has some missing rows. I guess its due to some special characters though i am not able to see any special character . Any solution for this.
Regs
madhu -
No excel downloading icon is available in alv report
hi,
i m facing a strange problem, my alv report not showing any excel download or local file down load icon or submenu. but it is working fine in other login.
please assist me for the same.
thanks and regards
vijay dwivedi
marks will b sure for any helpfull answer*Hi,
steps to consider :
-check you authorization using SU53
-is there any parameters are set under your login check it using su3 or su01
regards,
kaushal
Maybe you are looking for
-
Mid 2010 macbook pro panic kernel
hi, i just bought a used mid 2010 pro and the day after i bought it it began rebooting after a mouse click and giving me a panic kernel. this is the log from the most recent reboot: Sat May 4 23:03:10 2013 panic(cpu 3 caller 0xffffff7f9ff61c85): NV
-
dear all, I should control 2 DC servo motors with labviw. currently i have Labview 7.1 and PCI-6221 M-Series DAQ card. what i need is to implement a control algorithm to control the motors at each millisecond. i actually have a profile of motion and
-
Cross company incoming payment
we use F-28 to process inter-company USD incoming payment, (customer is in another company code, but both two company use same local currency JPY), the problem is when we enter cash discount, it will generate line item and defaulted to discount accou
-
How do i remove the 17 errors that come with the pricing userexit manual at
how do i remove the 17 errors that come with the pricing userexit manual attached code...
-
Hi, can anyone tell me where I can find a good stopwatch & countdown timer application for my N81? I'm looking for something which I could use for sport and I prefer it to be free Click on the Kudos Star, if you find my post helpful!