Excel sheet upload from alv report.
hi friends,
we created one report which will display about sales from vender,. we created it as hirarical alv report.
we all know when we downloaded the data which is shown on report to excel sheet standard report will run. but when i saw my excel file most of rows are exported finly but some of rows are clubed into another row colum. how it is happening. the data is passed to excel sheet by standard report how this prablem is happening.
plz guide me
thanq,
rajesh.k
hi
use code below to upload excel.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
EXPORTING
FILENAME = 'exccel Worksheet.txt'
FILETYPE = '.XLS'
HAS_FIELD_SEPARATOR = '#'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = SPACE
CODEPAGE = SPACE
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
VIRUS_SCAN_PROFILE =
IMPORTING
FILELENGTH =
HEADER =
CHANGING
DATA_TAB = <fs_dict>
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
NOT_SUPPORTED_BY_GUI = 17
ERROR_NO_GUI = 18
others = 19
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
Similar Messages
-
Hi Gurus,
is der any way to download data from ALV report to excel sheet depending on layout set dyanmically.
I mean to say that if I choose a layout then data has to transfer to excel sheet according to layout fields automaticaly.I think this can be done by oops ALV , are u using reusealv F.M to call output in ALV ?
Try the below kind of ALV
IN PBO -
>
SET PF-STATUS 'PROJREP'.
SET TITLEBAR text-046.
DATA: g_container TYPE scrfname VALUE 'ALV',
g_grid1 TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container. (Name of the container )
CREATE OBJECT g_grid1
EXPORTING i_parent = g_custom_container.
PERFORM create_field_catalog_ce
CALL METHOD g_grid1->set_frontend_fieldcatalog
EXPORTING
it_fieldcatalog = t_fcat_ce.
ALL METHOD g_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'ST_DISPLAY'
CHANGING
it_outtab = t_display_io
it_fieldcatalog = t_fcat_ce.
->Create Object to receive events and link them to handler methods.
When the ALV Control raises the event for the specified instance
the corresponding method is automatically called.
CREATE OBJECT g_event_receiver.
SET HANDLER g_event_receiver->handle_double_click FOR g_grid1.
ENDIF.
CALL METHOD cl_gui_control=>set_focus
EXPORTING
control = g_grid1.
IN PAI -->
CALL METHOD cl_gui_cfw=>dispatch. -
Exporting data from ALV Report...
Dear All,
While I am exporting data from ALV report to any other Format (Excel, Txt, HTML) it only export the data of last column, but the heading is comming properly and also the column heading is displaying properly.
So how to rectify it. (the report is Object Oriented).
Regards,
DahrmeshHi Davabap,
Refer this sample program "BCALV_GRID_VERIFY" . I hope it is problem with structure mismatching.
Otherwise can you paste your code ?
Regards,
Vicky
PS: Award points if helpful -
Read and write excel sheet data from uploded file in sharepoint site programmatically 2013
hi team,
I am working on sharepoint 2013.I want to read and write data in excel sheet (micrsoft excel) from stored file in shrepoint docoumnt library .please suggest me
vijayHi
Vijay,
check those links
http://www.sharepointwithattitude.com/archives/61
https://social.technet.microsoft.com/Forums/en-US/e760051b-a92f-473c-9ec9-0f0c36c99e40/read-and-write-excel-sheet-data-from-uploded-file-in-sharepoint-site-programmatically-2013?forum=sharepointdevelopment
Kind Regards, John Naguib Technical Consultant/Architect MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation. Please remember to mark the reply as answer if it helps. -
Call tcode from alv report and passing group of values
hi all .
i want to call tcode from alv report and passing an internal table or group of values to a selection option of that t code ? how
ex. passing group of GL to fbl3n and display the detials of all .
thank youDear,
You have done a small mistake
--> rspar_line-option = 'EQ'.
rspar_line-HIGH = PDATE-HIGH.
u r passing "high" value and in "option u r passing "EQ" so how it will work!!!
So if u r passing only 1 date or more dates like 01.01.2010 , 15.02.2010 , 10.03.2010 then pass
rspar_line-selname = 'SO_BUDAT'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'EQ'.
rspar_line-LOW = PDATE-HIGH.
APPEND rspar_line TO rspar_tab.
or if u r passing low & high date means in range like 01.01.2010 to 30.01.2010, then pass
rspar_line-selname = 'SO_BUDAT'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'BT''.
rspar_line-LOW = PDATE-LOW.
rspar_line-HIGH = PDATE-HIGH.
APPEND rspar_line TO rspar_tab.
try above code , hope it helps...
i think u cannot use "call transaction using bdcdata" in ur case bcoz as u said in ur 1st post u want to display the details of all but still if u want to use then u should pass all parameters in loop.
PROGRAM
DYNPRO
DYNBEGIN
FNAM
FVAL
ex:-
LOOP AT GT_TEMP INTO GS_TEMP.
CLEAR bdcdata_wa.
bdcdata_PROGRAM = 'SAPXXXX'.
bdcdata_DYNPRO = '1000'.
bdcdata_DYNBEGIN = 'X'.
bdcdata_wa-fnam = '''.
bdcdata_wa-fval = ''.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_PROGRAM = ''.
bdcdata_DYNPRO = ''.
bdcdata_DYNBEGIN = ''.
bdcdata_wa-fnam = 'SD_SAKNR'.
bdcdata_wa-fval = GS_TEMP-GLACCOUNT.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_PROGRAM = ''.
bdcdata_DYNPRO = ''.
bdcdata_DYNBEGIN = ''.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = 'XXX'.
APPEND bdcdata_wa TO bdcdata_tab.
ENDLOOP.
try above code if u r using call transaction...
Edited by: mihir6666 on Jul 9, 2011 3:10 PM
Edited by: mihir6666 on Jul 9, 2011 3:11 PM
Edited by: mihir6666 on Jul 9, 2011 3:13 PM -
Jump from alv report to qa03 screen based on PRUEFLOS field
Hi experts,
I developed one alv report ,in that one field name is PRUEFLOS (inspection lot number).I want to jump from alv report
to QA03 screen based on PRUEFLOS field.I wrote in this way but i didn't get.
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD.
CASE SELFIELD-FIELDNAME.
WHEN 'PRUEFLOS'.
READ TABLE T_FINAL INDEX SELFIELD-TABINDEX.
SET PARAMETER ID 'QLS' FIELD T_FINAL-PRUEFLOS.
CALL TRANSACTION 'QA03' AND SKIP FIRST SCREEN.
ENDCASE.
ENDFORM.
what is the problem ?pls help me in this.Hi Ram,
Recheck:
1) You have passed 'FORM USER_COMMAND' in 'I_CALLBACK_USER_COMMAND' while calling f.m. for ALV displa, and
2) You have checked the value of user command, i.e.
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD.
CASE SY-UCOMM.
WHEN '&IC1'.
CASE SELFIELD-FIELDNAME.
WHEN 'PRUEFLOS'.
READ TABLE T_FINAL INDEX SELFIELD-TABINDEX.
SET PARAMETER ID 'QLS' FIELD T_FINAL-PRUEFLOS.
CALL TRANSACTION 'QA03' AND SKIP FIRST SCREEN.
ENDCASE.
ENDCASE.
ENDFORM.
Regards,
Birendra -
Jump from alv report to cor2 screen
Hi experts,
I develop one alv report ..i want to jump from alv report to COR2 screen when click on order number(field name is AUFNR).
i wrote code in this way.
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD
CASE SELFIELD-FIELDNAME.
WHEN 'AUFNR'.
READ TABLE T_FINAL INDEX SELFIELD-TABINDEX.
SET PARAMETER ID 'AUF' FIELD T_FINAL-AUFNR.
CALL TRANSACTION 'COR2' AND SKIP FIRST SCREEN.
ENDCASE.
ENDFORM.
but it is not working properly,when u click on any order number it is going only the same order number(in cor2 screen).
what is the problem? set par id (AUF) EXIST IN TPARA table compulsalory or it is created automatically?
pls help me in this . If possible pls send the code.Hi,
I have already mentioned both ways, but ok, once again.
A. how I found parameter ID ANR:
1.) run transaction COR2
2.) set cursor to field "Process order"
3.) press F1 button
4.) performance assistant displays
5.) press "Technical Information"
6.) technical information displays
7.) in field "Parameter ID" you can see parameter ID assigned to a screen field
B. how I found parameter ID BR1:
1.) switch on debugger
2.) run transaction COR2
3.) put a breakpoint on "GET PARAMETER" statement
4.) debugger stops on every GET PARAMETER statement in PBO of COR2
5.) there you can see that BR1 is used for field AUFNR
Basically first mentioned way is sufficient, because system gets parameter value from parameter ID assigned to a screen element automatically. But in this case a value is overwritten by coding in PBO of COR2.
Hope it helps.
Regrds,
Adrian -
Can we call screen from ALV report
Hi All,
I am in the process of creating a stand alone application. However I have stuck up here.
Problem: Can we call any screen from ALV report? If yes then how??? Can anyone give some code snippet??
All your help appreciated.
Thanks,
JigneshHello Jignesh,
Here is an example, when you double click on a line, it pops with with another screen that holds details for the flight information.
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
METHODS:
handle_double_click FOR EVENT double_click
OF cl_gui_alv_grid
IMPORTING e_row
e_column.
ENDCLASS. "lcl_event_handler
CLASS lcl_event_handler IMPLEMENTATION.
METHOD handle_double_click.
READ TABLE it_flight INTO wa_flight INDEX e_row-index.
IF sy-subrc EQ 0.
SELECT * FROM sbook
INTO TABLE it_book
WHERE carrid EQ wa_flight-carrid AND
connid EQ wa_flight-connid.
CALL SCREEN 101 STARTING AT 10 10.
ENDIF.
ENDMETHOD. "HANDLE_DOUBLE_CLICK
ENDCLASS. "LCL_EVENT_HANDLER
MODULE status_0101 OUTPUT.
Variant to save the layout
gv_repid = sy-repid.
IF g_custom_container2 IS INITIAL.
Create an instance for Custom Container 'ALV_GRID'
CREATE OBJECT g_custom_container2
EXPORTING container_name = gs_container2.
Create an instance for ALV Grid
CREATE OBJECT g_grid2
EXPORTING i_parent = g_custom_container2.
Variant to save the layout
gs_layout-grid_title = 'Flight Bookings'.
CALL METHOD g_grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'SBOOK'
is_layout = gs_layout
CHANGING
it_outtab = it_book[].
ELSE.
CALL METHOD g_grid2->refresh_table_display.
ENDIF. "IF grid2 IS INITIAL.
Setting focus for created grid control
CALL METHOD cl_gui_control=>set_focus
EXPORTING
control = g_grid2.
CALL METHOD cl_gui_cfw=>flush.
ENDMODULE. " status_0101 OUTPUT
Refer to BC_ALV_GRID04 for ALV data declarations used in the above piece of code. -
How to Get the excel sheet formula from the server side into the j2me app?
How to Get the excel sheet formula from the server side into the j2me application?
Here the excel sheet is in server side.i want to do get the excel sheet values (only some part of the excel sheet based on some conditions) from server side into j2me.In j2me I want to done some client side validation based on the formula of excel sheet.Then i resend the new updated data to the server.
But here deosn't know any mehtod to get the excel sheet formula from server side.So kindly help me to get the excel sheet formula from the server.
So how to get the excel sheet formula frome the server side into j2me Application...
Plz guide me to solve this issue...
thanks & regards, Sivakumar.JYou should not post a thread more than once. You've crossposted this question to another forum. I have deleted that one.
-
Regarding downloading from alv report o/p to excel sheet
Hi gurus,
When i am trying to download the alv output to excel sheet it is downloading only titles, No data is getting displayed in it.No data is getting downloaded.
Thnaks in advance.Hi,
What are the steps you do to download ALV to excel? We need to replicate the case in order to find answer.
Regards,
Teddy Kurniawan -
Field value is truncated while downloading to excel sheet from ALV report
Hi All,
I developed ALV report and displaying output.
In that output i had a filed VBRP-PRODH filed.
In the output it is coming correctly but while i click downlaod to excel the valus is truncted.
for Example the value for VBRP-PRODH is 03322764170100201
while downlaoding this one to excel it is showing 3322764170100200
Any inputs please..
Regards
JaiWrong forum..post in ABAP
-
Error while Exporting to Excel from ALV Report
Dear Experts,
When I am exporting my report output to an Excel Sheet directly some of the headers are appearing in Row No 1 and some are displaying in Row No. 2. Hence the corresponding values are also showing in the same manner.
I want to show all the Rows in a single row in row No 1. I am unable to find the solution for this.
But when I am exporting the same report into the MHTML Excel format the Report Headings are showing correctly in a single row and hence the respective values are also showing correctly in a single row. And if I save the same MHTML Excel as normal EXCEL(97-2003) format then also it is showing correctly.
The problem comes only when I as exporting it directly into EXCEL(97-2003) format.
Plz help.Hi,
This is the Technical limitation of ABAP list export to local file.
ALV grid greater than 1023 characters per line will be split into 2 lines.
To prevent a line break occuring when you download the list as a local spreadsheet file, you must reduce the width of the list in ALV. You can do this either by hiding columns or by changing the column widths in the ALV. Take care that the column heading characters also dont exceed 1023 characters. This will work.
Thanks
LG -
Regarding excel download from ALV report tree
Hi Experts,
I have a ALV report tree program. In that i need the functionality to download report output in excel file.
Can any body suggest how can i achieve download to excel functionality in it.
Any useful suggestion will be appreciated.
Thanks in advance,
AkashThe data for the tree exist in the NODE table in a different format. So, even you download that table, it will not be downloaded in the TREE format. So, the user will not be able to understand the data unlike the case of a ALV GRID.
Whether it is a TREE / GRID, ultimately its the data of a internal table, that gets downloaded. But in case a TREE, we don't have the data in a straight forward way . i thnk it is not possible . i am not sure too for this . -
Data missing when Exporting or print preview from ALV report
Hi
I have a alv report which is showing fine but when i try to export it to say excel sheet or do print preview some of the data is missing. Can anyone tell me how to fix this. or at least point to some document that discuss this problem.
Here is my ALV CODE
* CALL_ALV
form call_alv.
* v_repid = sy-repid.
perform build_field_catalog using field_tab[].
perform build_eventtab using events[].
perform comment_build using header_alv[].
perform build_sorttab using gt_sort[].
* perform build_layout.
* v_variant-variant = '/TEST3'.
* Call ABAP List Viewer
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = v_repid
i_callback_user_command = ''
i_structure_name = 'REC'
it_fieldcat = field_tab[]
it_special_groups = gt_sp_group[]
it_sort = gt_sort[]
i_save = v_save
is_variant = v_variant
it_events = events[]
* is_layout = gd_layout
tables
t_outtab = REC
exceptions
program_error = 1
others = 2.
endform.
From my Catalog this data is missing
* BUILD_FIELD_CATALOG
form build_field_catalog USING pt_fieldcat type
slis_t_fieldcat_alv.
data: ls_fieldcat type slis_fieldcat_alv.
clear: fieldcat, pt_fieldcat[].
ls_fieldcat-tabname = 'REC'.
ls_fieldcat-edit = ' '.
ls_fieldcat-fieldname = 'PERNR'.
ls_fieldcat-seltext_s = 'Employee # '.
ls_fieldcat-seltext_m = 'Employee # '.
ls_fieldcat-seltext_l = 'Employee # '.
ls_fieldcat-datatype = 'C'.
append ls_fieldcat to pt_fieldcat.
There r coupole that's missing
But there couple that show's up like this one
ls_fieldcat-fieldname = 'STIME'.
ls_fieldcat-seltext_s = 'ST '.
ls_fieldcat-seltext_m = 'St Tm '.
ls_fieldcat-seltext_l = 'Start Time '.
ls_fieldcat-datatype = 'C'.
append ls_fieldcat to pt_fieldcat.
ls_fieldcat-fieldname = 'ETIME'.
ls_fieldcat-seltext_s = 'ET '.
ls_fieldcat-seltext_m = 'Et Tm '.
ls_fieldcat-seltext_l = 'End Time '.
append ls_fieldcat to pt_fieldcat.
I always reward points.
Thankshi Anwarul,
Try the following code:
* CALL_ALV
form call_alv.
* v_repid = sy-repid.
perform build_field_catalog using field_tab[].
perform build_eventtab using events[].
perform comment_build using header_alv[].
perform build_sorttab using gt_sort[].
* perform build_layout.
* v_variant-variant = '/TEST3'.
* Call ABAP List Viewer
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = v_repid
i_callback_user_command = ''
i_structure_name = 'REC'
it_fieldcat = field_tab[]
it_special_groups = gt_sp_group[]
it_sort = gt_sort[]
i_save = v_save
is_variant = v_variant
it_events = events[]
* is_layout = gd_layout
tables
t_outtab = REC
exceptions
program_error = 1
others = 2.
endform.
form build_field_catalog USING pt_fieldcat type
slis_t_fieldcat_alv.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
I_PROGRAM_NAME = sy-repid
I_STRUCTURE_NAME = 'REC'
changing
CT_FIELDCAT = pt_fieldcat.
When you export to excel, the character fields and numeric columns gets re-arranged, but all the fields will be displayed in this case.
hope this helps. -
How can i take an excel sheet input into my report
Hi
I am having one report.In this the program should take an excel file as input.How can I implement logic for this.
Ex: It will take external customer number u201CABCu201D as input from excel sheet and give as output as SAP customer number u201C1000000"
Please let me know.hi use GUI_UPLOAD with filename frm parameters
DATA:
lv_tabix LIKE sy-tabix,
lv_filet TYPE string.
* LV_FILET LIKE rlgrap-filename.
lv_filet = p_file.
* Upload data file into internal table
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lv_filet
filetype = 'ASC'
has_field_separator = 'X'
read_by_line = 'X'
dat_mode = ' '
TABLES
data_tab = gi_upload
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.
IF sy-subrc <> 0.
* Data in P_FILE could not be uploaded.
MESSAGE i010 WITH p_file.
LEAVE LIST-PROCESSING.
ENDIF.
Maybe you are looking for
-
Normal double clicking or apple O, does not open certain mp3's
I have a few mp3's that no matter what route I go, i.e. drag and drop, manual import through file menu, or double clicking on iTunes mp3's, does not seem to open certain mp3 files. It seems to be random as I can click ten and only one will not open i
-
Transformation in SAP BI 7.0 routine
Hi together, if got the following problem I don't understand. I've got a transformation between 2 DSO's. Some characteristics in the target-ods are filled with routines. The code for one of the characteristics: Global Part of the routine: $$ begin of
-
Hi! I think my question might be simple to answer, so please if you read this give it a try... I just bought a new laptop with windows 7 on it. Adobe Reader 9 was allready installed. I wanted to open simple pdf files, but I got the message "Adobe Rea
-
Downloading Acrobat Reader Sharon Avisar - 02:18pm Jan 19, 2009 Pacific Good Evening, I've been tried to download "acrobat reader 9" so many times without success. In addition, I've tried few weeks ago to download this program to another computer. Pl
-
I need to transfer files and folders from my macbook air to my boss's external HDD but I keep getting error messages. Anyone out there, please help me. Most of the answers here kept saying erase data then copy; not possible for me because this HDD is