How to convert alv list into excel file?
Hi Experts,
i have created one report for Due Date Analysis.
Now My output is displaying in ALV list. But I need to convert the data which in alv list into Excel File. then only i have to send the Excel File to the Customer Thro Email.
So i need the Function Module to Convert the Data into Excel File.
Thanks,
Neptune.M
Hi,
U can use function module gui_download.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = 'C:\Transportaionlane.XLS'
filetype = 'DAT'
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TABLES
ata_tab = t_trans_lane_dis[]
OTHERS = 22
if u want with header then pass the header.
regards
Ahasan
Similar Messages
-
How to Download colours of ALV outout into Excel file ?
Hi All,
I have a requirement, Download ALV output into Excel file
but the ALV output contains colors,
I need to download as it is ALV output into Excel,
Please guide me, how to do ?
If it is not possible, Pls provide any other solution for this ?
Appreciate your valuable answers,
Thanks.
Regards,
Prasad.Hi,
Instead of ALV, ucan directly write the output to EXCEL along with the required attributes. Find the below sample code. This might solve ur problem.
Venkat.
*& Report Y_ALV_OLE
REPORT YALV_OLE.
this report demonstrates how to send some ABAP data to an
EXCEL sheet using OLE automation.
include ole2incl.
handles for OLE objects
data: h_excel type ole2_object, " Excel object
h_mapl type ole2_object, " list of workbooks
h_map type ole2_object, " workbook
h_zl type ole2_object, " cell
h_f type ole2_object, " font
h_c type ole2_object. " color
DATA: FILENAME LIKE RLGRAP-FILENAME.
tables: spfli.
data h type i.
table of flights
data: it_t100 like T100 occurs 10 with header line.
*& Event START-OF-SELECTION
start-of-selection.
read flights
select *
from t100
up to 100 rows
into table it_t100
where SPRSL = sy-langu .
tell user what is going on
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
PERCENTAGE = 0
text = text-007
exceptions
others = 1.
start Excel
create object h_excel 'EXCEL.APPLICATION'.
PERFORM ERR_HDL.
set property of h_excel 'Visible' = 1.
CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 =
*'c:\kis_excel.xls' .
PERFORM ERR_HDL.
tell user what is going on
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
PERCENTAGE = 0
text = text-008
exceptions
others = 1.
get list of workbooks, initially empty
call method of h_excel 'Workbooks' = h_mapl.
perform err_hdl.
add a new workbook
call method of h_mapl 'Add' = h_map.
perform err_hdl.
tell user what is going on
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
PERCENTAGE = 0
text = text-009
exceptions
others = 1.
output column headings to active Excel sheet
perform fill_cell using 1 1 1 200 'Language Key'.
perform fill_cell using 1 2 1 200 'Application Area'.
perform fill_cell using 1 3 1 200 'Message number'.
perform fill_cell using 1 4 1 200 'Message text'.
perform fill_cell using 1 5 1 200 'Dep. Time'.
loop at it_t100.
copy flights to active EXCEL sheet
h = sy-tabix + 1.
perform fill_cell using h 1 0 000145000 it_t100-SPRSL.
perform fill_cell using h 2 0 246156138 it_t100-ARBGB.
perform fill_cell using h 3 0 111230222 it_t100-MSGNR.
perform fill_cell using h 4 0 130230230 it_t100-text.
perform fill_cell using h 5 0 115115105 it_spfli-deptime.
endloop.
EXCEL FILENAME
CONCATENATE SY-REPID '_' SY-DATUM6(2) '_' SY-DATUM4(2) '_'
SY-DATUM(4) '_' SY-UZEIT '.XLS' INTO FILENAME.
CALL METHOD OF H_MAP 'SAVEAS' EXPORTING #1 = FILENAME.
free object h_excel.
perform err_hdl.
FORM FILL_CELL *
sets cell at coordinates i,j to value val boldtype bold *
form fill_cell using i j bold col val.
call method of h_excel 'Cells' = h_zl
exporting
#1 = i
#2 = j.
perform err_hdl.
set property of h_zl 'Value' = val .
perform err_hdl.
get property of h_zl 'Font' = h_f.
perform err_hdl.
set property of h_f 'Bold' = bold .
perform err_hdl.
set property of h_f 'Color' = col.
perform err_hdl.
endform. "FILL_CELL
*& Form ERR_HDL
outputs OLE error if any *
--> p1 text
<-- p2 text
form err_hdl.
if sy-subrc <> 0.
write: / 'OLE-Automation Error:'(010), sy-subrc.
stop.
endif.
endform. " ERR_HDL -
How to convert database table into xml file
Hi.
How to convert database table into XML file in Oracle HTML DB.
Please let me know.
Thanks.This not really a specific APEX question... but I search the database forum and found this thread which I think will help
Exporting Oracle table to XML
If it does not I suggest looking at the database forum or have a look at this document on using the XML toolkit
http://download-east.oracle.com/docs/html/B12146_01/c_xml.htm
Hope this helps
Chris -
How to convert ALV report to Excel ??
Hi,
My requirement is to show ALV report in the excel .
I have 2 radio buttons in Selection screen :
1) ALV format 2) Excel.
If excel is selected then user will give a path : C :\newexcelreport.xls
I knew that there is a way to download report through ALV report using download into local file. But the requirement is to create a report in Excel same like ALV report .
I tried using GUI_Download . But it is displaying some fields wrongly, ex : Date , Time, without header .
Date is showing year month date format in the excel .
time is showing in a numeric format.
But the ALV report is showing correct report . When I download into local then the report is showing correct results .
Is there any function module to download exact ALV report into excel .??
Thanks & Regards,
VarmaUse the FM - ALV_XXL_CALL. here is the sample -
REPORT ZSKC_ALV_XXL.
TYPE-POOLS : KKBLO.
DATA : ITAB LIKE T100 OCCURS 0,
T_FCAT_LVC TYPE LVC_S_FCAT OCCURS 0 WITH HEADER LINE,
T_FCAT_KKB TYPE KKBLO_T_FIELDCAT.
START-OF-SELECTION.
Get data.
SELECT * UP TO 20 ROWS
FROM T100
INTO TABLE ITAB
WHERE SPRSL = SY-LANGU.
CHECK SY-SUBRC EQ 0.
Create the field catalog.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = 'T100'
CHANGING
CT_FIELDCAT = T_FCAT_LVC[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
CHECK SY-SUBRC EQ 0.
make sure you pass the correct internal table name in the field catalog.
t_fcat_lvC-tabname = 'ITAB'.
MODIFY T_FCAT_LVC TRANSPORTING TABNAME WHERE TABNAME NE SPACE.
Transfer to KKBLO format.
CALL FUNCTION 'LVC_TRANSFER_TO_KKBLO'
EXPORTING
IT_FIELDCAT_LVC = T_FCAT_LVC[]
IMPORTING
ET_FIELDCAT_KKBLO = T_FCAT_KKB
EXCEPTIONS
IT_DATA_MISSING = 1
IT_FIELDCAT_LVC_MISSING = 2
OTHERS = 3.
CHECK SY-SUBRC EQ 0.
Call XXL.
CALL FUNCTION 'ALV_XXL_CALL'
EXPORTING
I_TABNAME = 'ITAB'
IT_FIELDCAT = T_FCAT_KKB
TABLES
IT_OUTTAB = ITAB[]
EXCEPTIONS
FATAL_ERROR = 1
NO_DISPLAY_POSSIBLE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
ENDIF. -
Problem in saving the spool list into Excel file.
Hello Friends,
I run a background process for a report, and storing the resulting list into Excel format file. But the result is column values jumbled, it means columns values are not sitting in the right place in excel sheet.
I also tried saving as unconverted text file and then open it using excel still the same result.
Cheers,
SenthilHi,
Use the FM 'EXCEL_OLE_STANDARD_DAT'.
In this FM populate the tables parameter 'fieldnames' to get each cloumn below the heading correctly. -
Convert report output into excel file
hiii,
Can we convert output of report into excel file format?
Plz tell me the.
Thanks in advanceHello,
http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b13895/orbr_paptoexcel.htm
29 Building a Report for Spreadsheet Output
Regards -
How to convert Oracle reports into excel?
How can we convert Oracle reports into excel.
i know there was a thread on this topic which i am not able to find.
give the link / help.I found Std Oracle Report output to Excel Sheet has some suggestions. Not being a Reports person anymore I am not in a position to vouch for them.
How did I find this thread? By not using the forum search tool but using Google instead.
Cheers, APC -
How to Downlaod Data from Alv List to Excel File
Hi,
I have a Requirement like While download data from ALV to Excel File .After Download data into Excel we will not allow user to edit the Excel data..
Plz help me to complete this scenario.
Thanks & Regards,
Kumaran Duraiswamy.hi,
try these following fm's
MS_EXCEL_OLE_STANDARD_DAT
EXCEL_OLE_STANDARD_DAT
CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
EXPORTING
file_name = 'Your Path' " enter your path to save the file.
CREATE_PIVOT = 0
* DATA_SHEET_NAME = ' '
* PIVOT_SHEET_NAME = ' '
* PASSWORD = ' '
* PASSWORD_OPTION = 0
VISIBLE = '0'
No_DIALOG = 'X'
TABLES
* PIVOT_FIELD_TAB =
DATA_TAB = t_deli_final
* FIELDNAMES =
EXCEPTIONS
FILE_NOT_EXIST = 1
FILENAME_EXPECTED = 2
COMMUNICATION_ERROR = 3
OLE_OBJECT_METHOD_ERROR = 4
OLE_OBJECT_PROPERTY_ERROR = 5
INVALID_FILENAME = 6
INVALID_PIVOT_FIELDS = 7
DOWNLOAD_PROBLEM = 8
OTHERS = 9
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2nd fm
CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'
EXPORTING
FILE_NAME = 'Your Path' "path to save your file
DATA_SHEET_NAME = V_SHEET_NAME
TABLES
DATA_TAB = TLX
EXCEPTIONS
FILE_NOT_EXIST = 1
FILENAME_EXPECTED = 2
COMMUNICATION_ERROR = 3
OLE_OBJECT_METHOD_ERROR = 4
OLE_OBJECT_PROPERTY_ERROR = 5
INVALID_FILENAME = 6
INVALID_PIVOT_FIELDS = 7
DOWNLOAD_PROBLEM = 8
OTHERS = 9.
IF SY-SUBRC NE 0.
WRITE:/ 'ERROR OPENING EXCEL'.
ENDIF.
ELSE.
WRITE:/ 'ERROR OR NO DATA'.
ENDIF. -
Converting alv list to excel and send to sapoffice or mail in batch mode
Hi every one.
I have the alv list and then I can send to sapoffice or mail in batch mode.
If I open the list in Sapoffice I can save the list in XLS format or if I open the list by mail, I can select all the content (because is a html file), select the copy option and then open EXCEL and paste the content.
Can I use an option to convert the alv list to an excel format and then send to mail or sapconnect in batch mode?if your requirement is to send a Excel sheet by Email then use this sample program.
*& Report ZEMAIL_ATTACH *
*& Example of sending external email via SAPCONNECT *
REPORT ZEMAIL_ATTACH .
TABLES: ekko.
PARAMETERS: p_email TYPE somlreci1-receiver
DEFAULT '[email protected]'.
TYPES: BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
wa_ekpo TYPE t_ekpo.
TYPES: BEGIN OF t_charekpo,
ebeln(10) TYPE c,
ebelp(5) TYPE c,
aedat(8) TYPE c,
matnr(18) TYPE c,
END OF t_charekpo.
DATA: wa_charekpo TYPE t_charekpo.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
*START_OF_SELECTION
START-OF-SELECTION.
Retrieve sample data from table ekpo
PERFORM data_retrieval.
Populate table with detaisl to be entered into .xls file
PERFORM build_xls_data_table.
*END-OF-SELECTION
END-OF-SELECTION.
Populate message body text
perform populate_email_message_body.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_message
it_attach
using p_email
'Example .xls documnet attachment'
'XLS'
'filename'
changing gd_error
gd_reciever.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp aedat matnr
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekpo.
ENDFORM. " DATA_RETRIEVAL
*& Form BUILD_XLS_DATA_TABLE
Build data table for .xls document
FORM build_xls_data_table.
CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
*constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF.
CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
LOOP AT it_ekpo INTO wa_charekpo.
CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
wa_charekpo-aedat wa_charekpo-matnr
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
ENDLOOP.
ENDFORM. " BUILD_XLS_DATA_TABLE
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables pit_message
pit_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
Populate message body text
form populate_email_message_body.
REFRESH it_message.
it_message = 'Please find attached a list test ekpo records'.
APPEND it_message.
endform. " POPULATE_EMAIL_MESSAGE_BODY
- Guru -
How to export report output into excel file
hi friends,
i would like to get the solution from you for how to export the report output into a .xls file. i know how to convert it into .rtf and .txt files but i think it's difficult to do this .xls way, could you help me to comeover this problem?
thankyou very much.The official answer is "delimited", which
generates adequate comma or other delimited
text. No formatting, and without extra
effort no support for non-ASCII characters.
Might be sufficient for you.
Note that Excel can read html files - we
built programs to generate html files with
name of "blah.xls" and some Excel-ish
extensions, so Excel is automatically opened
and the document is all nice and pretty.
(Oracle html output has some odd logic about
choosing number of columns, we didn't use
it.)
-- Allan Plum -
How to convert ALV output into XML format.
Hi all,
I just want to know how to convert an ALV output into a XML format, this is really urgent.
regards,
Ruchika sainiThis program exports an internal table to an XML file. *----
Report ZPRUEBA_MML_13 *
Export an internal table to XML document *
NO BORRAR ESTE CODIGO *
REPORT ZPRUEBA_MML_13.
PANTALLA SELECCION *
PARAMETERS: GK_RUTA TYPE RLGRAP-FILENAME.
PANTALLA SELECCION *
TYPE TURNOS *
TYPES: BEGIN OF TURNOS,
LU LIKE T552A-TPR01,
MA LIKE T552A-TPR01,
MI LIKE T552A-TPR01,
JU LIKE T552A-TPR01,
VI LIKE T552A-TPR01,
SA LIKE T552A-TPR01,
DO LIKE T552A-TPR01,
END OF TURNOS.
TYPE TURNOS *
TYPE SOCIO *
TYPES: BEGIN OF SOCIO,
NUMERO LIKE PERNR-PERNR,
REPOSICION LIKE PA0050-ZAUVE,
NOMBRE LIKE PA0002-VORNA,
TURNOS TYPE TURNOS,
END OF SOCIO.
TYPE SOCIO *
ESTRUCTURA ACCESOS *
DATA: BEGIN OF ACCESOS OCCURS 0,
SOCIO TYPE SOCIO,
END OF ACCESOS.
ESTRUCTURA ACCESOS *
START OF SELECTION *
START-OF-SELECTION.
PERFORM LLENA_ACCESOS.
PERFORM DESCARGA_XML.
END-OF-SELECTION.
END OF SELECTION *
FORM LLENA_ACCESOS *
FORM LLENA_ACCESOS.
REFRESH ACCESOS.
CLEAR ACCESOS.
MOVE: '45050' TO ACCESOS-SOCIO-NUMERO,
'MOISES MORENO' TO ACCESOS-SOCIO-NOMBRE,
'0' TO ACCESOS-SOCIO-REPOSICION,
'T1' TO ACCESOS-SOCIO-TURNOS-LU,
'T2' TO ACCESOS-SOCIO-TURNOS-MA,
'T3' TO ACCESOS-SOCIO-TURNOS-MI,
'T4' TO ACCESOS-SOCIO-TURNOS-JU,
'T5' TO ACCESOS-SOCIO-TURNOS-VI,
'T6' TO ACCESOS-SOCIO-TURNOS-SA,
'T7' TO ACCESOS-SOCIO-TURNOS-DO.
APPEND ACCESOS.
CLEAR ACCESOS.
MOVE: '45051' TO ACCESOS-SOCIO-NUMERO,
'RUTH PEÑA' TO ACCESOS-SOCIO-NOMBRE,
'0' TO ACCESOS-SOCIO-REPOSICION,
'T1' TO ACCESOS-SOCIO-TURNOS-LU,
'T2' TO ACCESOS-SOCIO-TURNOS-MA,
'T3' TO ACCESOS-SOCIO-TURNOS-MI,
'T4' TO ACCESOS-SOCIO-TURNOS-JU,
'T5' TO ACCESOS-SOCIO-TURNOS-VI,
'T6' TO ACCESOS-SOCIO-TURNOS-SA,
'T7' TO ACCESOS-SOCIO-TURNOS-DO.
APPEND ACCESOS.
ENDFORM.
FORM LLENA_ACCESOS *
FORM DESCARGA_XML *
FORM DESCARGA_XML.
DATA: L_DOM TYPE REF TO IF_IXML_ELEMENT,
M_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
G_IXML TYPE REF TO IF_IXML,
W_STRING TYPE XSTRING,
W_SIZE TYPE I,
W_RESULT TYPE I,
W_LINE TYPE STRING,
IT_XML TYPE DCXMLLINES,
S_XML LIKE LINE OF IT_XML,
W_RC LIKE SY-SUBRC.
DATA: XML TYPE DCXMLLINES.
DATA: RC TYPE SY-SUBRC,
BEGIN OF XML_TAB OCCURS 0,
D LIKE LINE OF XML,
END OF XML_TAB.
CLASS CL_IXML DEFINITION LOAD.
G_IXML = CL_IXML=>CREATE( ).
CHECK NOT G_IXML IS INITIAL.
M_DOCUMENT = G_IXML->CREATE_DOCUMENT( ).
CHECK NOT M_DOCUMENT IS INITIAL.
WRITE: / 'Converting DATA TO DOM 1:'.
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
EXPORTING
NAME = 'ACCESOS'
DATAOBJECT = ACCESOS[]
IMPORTING
DATA_AS_DOM = L_DOM
CHANGING
DOCUMENT = M_DOCUMENT
EXCEPTIONS
ILLEGAL_NAME = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
SY-SUBRC.
ENDIF.
CHECK NOT L_DOM IS INITIAL.
W_RC = M_DOCUMENT->APPEND_CHILD( NEW_CHILD = L_DOM ).
IF W_RC IS INITIAL.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
W_RC.
ENDIF.
CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
DOCUMENT = M_DOCUMENT
IMPORTING
XML_AS_STRING = W_STRING
SIZE = W_SIZE
TABLES
XML_AS_TABLE = IT_XML
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
SY-SUBRC.
ENDIF.
LOOP AT IT_XML INTO XML_TAB-D.
APPEND XML_TAB.
ENDLOOP.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_SIZE
FILENAME = GK_RUTA
FILETYPE = 'BIN'
TABLES
DATA_TAB = XML_TAB
EXCEPTIONS
OTHERS = 10.
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.
Message was edited by:
Hymavathi Oruganti -
Alv report into excel file.
Hello experts,
I have alv report , and i want to export this alv to excel file, how can i do this ?
Thanks for your help.
Avi.Hi Avi,
U can download to any format by using ctrlshiftF9 or using the button to 'Local File'. Then apopup appears as:
In which format should the list
be saved ?
And some radio buttons. U select the 'SPreadsheet' option for excel.
And click enter.Then it will prompt for the Directory and filename for saving.
Keerthi -
Converting ALV grid into PDF file
Hi,
I have searched for a way to convert my ALV output into a PDF file, and then e-mail it, but I haven't succeeded in using what I found so far:
CONVERT_OTFSPOOLJOB_2_PDF - I don't want it to work only when I run the report in the background.
CONVERT_OTF - I don't have a sapscript input to provide the function with.
What are the options available for me? I am forced to use any of these alternatives, eventually ?
Thanks
AvrahamHello,
You can make use of the param IS_PRINT. But if you read the long text, it will create the spool but not display the ALV.
A small code snippet for your ready reference:
TYPE-POOLS slis.
DATA: itab TYPE STANDARD TABLE OF t001,
v_repid TYPE sy-repid,
st_print TYPE slis_print_alv,
v_spono TYPE rspoid.
v_repid = sy-repid.
st_print-print = 'X'. "Will create a spool req. but not diplay the ALV
SELECT * FROM t001 INTO TABLE itab UP TO 20 ROWS.
IF sy-subrc = 0.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_structure_name = 'T001'
is_print = st_print
TABLES
t_outtab = itab
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.
v_spono = sy-msgv1. "You have the Spool No., create the PDF :-)
CLEAR st_print.
* As the previous call will not display ALV, call the FM again
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_structure_name = 'T001'
is_print = st_print
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc = 0.
* So Nothing
ENDIF.
ENDIF.
ENDIF. -
How to convert 2 or more Excel files as tables in One Application
Hi
I have created one application according to apex demo using excel spreedsheet in which copying data is converted to table then when run application form and reports are produced.
Now i created file in a similar way but it is taking only one sheet as a table in one application. So How to add few other pages from spreedsheet converting to a table and run in the same application.
Also i have a workspace created in html.oracle.com in that when i want to upload excel file or copy data from excel i am getting error as......
ORA-20001: create_table error: ORA-20001: Excel load run ddl error: ORA-01658: unable to create INITIAL extent for segment in tablespace FLOW_6868
Can anybody help me? Thank in Advance!!!!
Tnx
VijayaAlso i have a workspace created in html.oracle.com in that when i want to upload excel file or copy data from excel i am getting error as......
ORA-20001: create_table error: ORA-20001: Excel load run ddl error: ORA-01658: unable to create INITIAL extent for segment in tablespace FLOW_6868Looks like the data you're trying to load will exceed your workspace quota (2MB small, 5MB medium). Try loading fewer rows. -
How to convert jpeg images into video file of any ext using JMF
I want to convert the Jpeg files into video clip with the help of JMF
any one can help me?
Plz reply me at [email protected]
or [email protected]I'm not sure of his/her reasoning behind this, but I have yet to find a way to record video with mmapi on j2me. So with that restriction, I can see how one could make it so that it just records a lot of jpegs, and then makes it a movie.
I would be interested finding a workaround for this too. Either if someone would explain how to record video with mmapi or how to make recorded images into a video. Thanks!
Maybe you are looking for
-
Can't install a 32 bit driver on my new 64 bit server
I have a windows 2008 R2 server runing the print server. I have a HP Laserjet 4345 MFP Printer and can't install the 32 bit driver. I have installed the 64 bit but when I try to add the 32 bit driver is states that it is not the correct driver? I hav
-
I have redeemed a code a few months back and bought some music. I have credit left but am still being asked for a redemption code. I no longer have the code, but according to apples help topics I do not need it. How do I purchase without the code?
-
Hello, I am using the Adobe Captivate 5 DEMO. I am trying to record about one hour worth of screen shot, in full motion video. I am recording an application which streams live stock market prices onto a chart. I have tried this repeatedly and have fo
-
Where is the GEO location info?
I cannot seem to find where the geo location info is located on a pic. It is not showing up under picture information in iPhoto, or on the iPhone. Any help? Thanks
-
Pb for printing elements values
This modified sample code for printing elements values doesn't seems to work ? an idea ? VALUE is always empty ! -- prints elements in a document procedure printElements(doc xmldom.DOMDocument) is nl xmldom.DOMNodeList; len number; n xmldom.DOMNode;