Sending ALV result as Excel file in email and in background mode
Hello,
My need was to developp a generic program to send ALV result in a Excel file by email (as we have already a program to send any spool in PDF format).
I found package SALV_EXPORT which contains very interesting things.
I have done a program with following selection-screen parameters:
- Name of a program to call
- execution variant linked to this program
- several output options (mail, save as local file, save on application server...)
data: g_guid type guid_32.
data : l_xxml_data type xstring.
g_guid = cl_salv_export_db_storage=>create_guid( ).
export l_mode = 'M' to memory id 'ALV_EXTRACT_MODE'.
export l_guid = g_guid to memory id 'ALV_EXTRACT_GUID'.
* call the program with its variant
submit (p_prog)
using selection-set p_vari
and return.
* Get back the data
l_xxml_data = cl_salv_export_db_storage=>import_xmlstring( guid = g_guid ).
Here, we have a XML data (ALVXML or XML for Excel, i don't know) which is the ALV result with the layout applied (either the alv layout specified on selection-screen of called program or default layout).
This solution is so simple that i wonder that it's not documented (or i haven't found the documentation).
If anybody knows any problem with this solution, has anyu remarks or want to add some enhancement, don't hesitate to post..
Hope this help
Christophe
A review of comments in ALV driver code shows references to "Mendocino" which I believe is now called 'Duet". It's part of SAP and Microsoft Office integration suite:
http://www.sap.com/solutions/duet/index.epx
I have used this method of extracting ALV reports in the past but I don't think it's released for general use.
Thanks,
Abdul Rouhi
Washington, DC
Similar Messages
-
Sending an excel file in email
Hello all!
I need a help, please someone helps me...
I always send pdf by email without problems, nor i need to send an excel file by email i am using demo mail package, can anyone give an example please???
THank you!I am sending by the same way of pdf but its showing the message error - ora 21560
CREATE OR REPLACE PROCEDURE P_Envia_Nybot (V_REPORT IN VARCHAR2,V_CAMINHO_REPORT VARCHAR2) IS
p_sender VARCHAR2(100);
p_recipients VARCHAR2(4000);
p_subject VARCHAR2(100) := 'Transaction Confirmation';
p_filename VARCHAR2(5000);
p_blob blob;
V_NOME_ARQUIVO VARCHAR(50);
conn utl_smtp.connection;
i NUMBER;
len NUMBER;
vFlob BFILE;
vBlob BLOB;
v_arquivo2 VARCHAR2(500);
v_report_novo VARCHAR2(200);
BEGIN
UPDATE CIMASTER SET arquivo_NYBOT = (EMPTY_BLOB())
RETURN arquivo_NYBOT INTO vBlob;
VFlob := BFILENAME('ORALOADNYBOT',RTRIM(v_report));
DBMS_LOB.FILEOPEN(vFlob,DBMS_LOB.FILE_READONLY);
DBMS_LOB.LOADFROMFILE(vBlob,vFlob,DBMS_LOB.GETLENGTH(vFlob));
DBMS_LOB.FILECLOSE(vFlob);
SELECT ARQUIVO_NYBOT INTO P_BLOB FROM CIMASTER;
SELECT SENDER INTO P_SENDER FROM CIMASTER_EMAIL;
conn := Demo_Mail.begin_mail(
sender => p_sender,
recipients => '[email protected]',
subject => 'Transaction Confirmations',
mime_type => Demo_Mail.MULTIPART_MIME_TYPE);
Demo_Mail.begin_attachment(
conn => conn,
mime_type => 'TEXT/PLAIN',
inline => TRUE,
filename => v_REPORT,
transfer_enc => 'base64');
-- split the Base64 encoded attachment into multiple lines
i := 1;
len := DBMS_LOB.getLength(p_blob);
WHILE (i < len) LOOP
IF(i + Demo_Mail.MAX_BASE64_LINE_WIDTH < len)THEN
UTL_SMTP.Write_Raw_Data (conn
, UTL_ENCODE.Base64_Encode(
DBMS_LOB.SUBSTR(p_blob, Demo_Mail.MAX_BASE64_LINE_WIDTH, i)));
ELSE
UTL_SMTP.Write_Raw_Data (conn
, UTL_ENCODE.Base64_Encode(
DBMS_LOB.SUBSTR(p_blob, (len - i)+1, i)));
END IF;
UTL_SMTP.Write_Data(conn, UTL_TCP.CRLF);
i := i + Demo_Mail.MAX_BASE64_LINE_WIDTH;
END LOOP;
Demo_Mail.end_attachment(conn => conn);
Demo_Mail.attach_text(
conn => conn,
data => NULL,
mime_type => 'text/html');
Demo_Mail.end_mail( conn => conn );
i := 1;
len := DBMS_LOB.getLength(p_blob);
WHILE (i < len) LOOP
IF(i + Demo_Mail.MAX_BASE64_LINE_WIDTH < len)THEN
UTL_SMTP.Write_Raw_Data (conn
, UTL_ENCODE.Base64_Encode(
DBMS_LOB.SUBSTR(p_blob, Demo_Mail.MAX_BASE64_LINE_WIDTH, i)));
ELSE
UTL_SMTP.Write_Raw_Data (conn
, UTL_ENCODE.Base64_Encode(
DBMS_LOB.SUBSTR(p_blob, (len - i)+1, i)));
END IF;
UTL_SMTP.Write_Data(conn, UTL_TCP.CRLF);
i := i + Demo_Mail.MAX_BASE64_LINE_WIDTH;
END LOOP;
Demo_Mail.end_attachment(conn => conn);
Demo_Mail.attach_text(
conn => conn,
data => NULL,
mime_type => 'text/html');
Demo_Mail.end_mail( conn => conn );
END;
/ -
How to send ALV Report in excel format from SAP
Hi Gurus,
We are using SAP 4.7 and using different SAP reports.Now I want to send SAP ALV report in excel format directly from SAP in background.Now we send these reports in background weekly by using autimetic scheduling but this is PDF format.Now I want to change this pdf format to excel format.In SCOT T.Code I am able to find any excel format.Please help me out.
I am waiting for your reply.
Advance Thanks
NirmalHi Nirmal,
I have done the same in my previous organisation.For this particular solution you need to ask your basis guys to upgrade the support package so that BCS classes could be available in the system.
API interafces five some problem with attachemnts and SAP has recommended to use BCS classes.
Currently BCS classes won't be availbale in 4.7.
Once the BCS classes are available
use below code
CONSTANTS:
lc_tab TYPE c VALUE cl_bcs_convert=>gc_tab,
lc_crlf TYPE c VALUE cl_bcs_convert=>gc_crlf,
lc_codepage TYPE abap_encod VALUE '4103',
data :
lv_string TYPE string,
binary_content TYPE solix_tab,
size TYPE so_obj_len,
*" Set Heading of Excel File
CONCATENATE 'Employee DATA'
lc_crlf lc_crlf
INTO lv_string.
*" Set Header for Excel Fields
CONCATENATE lv_string
lc_header1 lc_tab
lc_header2 lc_tab
lc_header3 lc_tab
lc_header4 lc_tab
lc_header5 lc_tab
lc_header6 lc_tab
lc_header7 lc_tab
lc_header8 lc_tab
lc_header9 lc_tab
lc_header10 lc_crlf
INTO lv_string.
"lc_header1 to 10 could be your field headers
"Move Internal table data
LOOP AT gt_final1 INTO gwa_final1.
CONCATENATE lv_string
gwa_final1-field1 lc_tab
gwa_final1-field2 lc_tab
gwa_final1-field3 lc_crlf
INTO lv_string.
ENDLOOP.
*" convert the text string into UTF-16LE binary data including
*" byte-order-mark. Mircosoft Excel prefers these settings
*" all this is done by new class cl_bcs_convert (see note 1151257)
TRY.
cl_bcs_convert=>string_to_solix(
EXPORTING
iv_string = lv_string
iv_codepage = lc_codepage "suitable for MS Excel, leave empty
iv_add_bom = abap_true "for other doc types
IMPORTING
et_solix = binary_content
ev_size = size ).
CATCH cx_bcs.
MESSAGE e445(so).
ENDTRY.
TRY.
*" create persistent send request
send_request = cl_bcs=>create_persistent( ).
document = cl_document_bcs=>create_document(
i_type = lc_doc
i_text = main_text
i_subject = lc_sub ).
document->add_attachment(
i_attachment_type = lc_attach "#EC NOTEXT
i_attachment_subject = lc_sub "#EC NOTEXT
i_attachment_size = size
i_att_content_hex = binary_content ).
send_request->set_document( document ).
recipient = cl_cam_address_bcs=>create_internet_address( email ).
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient.
IF recipient IS NOT INITIAL.
sent_to_all = send_request->send( i_with_error_screen = abap_true ).
COMMIT WORK.
* MESSAGE text-014 TYPE gc_succ .
ENDIF.
CATCH cx_bcs INTO bcs_exception.
MESSAGE i865(so) WITH bcs_exception->error_type.
ENDTRY.
For BCS decalartion u can go to se 38 and see program BCS_EXAMPLE_1 to BCS_EXAMPLE_7.
Rewrads if helpful.
Cheers
Ramesh Bhatt -
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.MHi,
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 -
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 -
My mac is converting Word and Excel files into Pages and Numbers files when I click to open them from an email. Downloading them and opening them doesn't help. How do I make this stop? I don't use iLife and don't want to; my clients are using Office and it's easier for me, except when I have to copy and paste everything they send me from an iLife file back to Word and Excel. Help!!! It's like Apple has become Microsoft, forcing us to use their apps.
Do you have Word & Excel installed, if yes, navigate in the finder to an example of each, right click and select 'Get Info' scroll down to 'Open With' and select the appropriate program, check the box that says 'Change All'
-
Hi All,
I am downloading the ALV output to Excel file.I am making use of LIST--->EXPORT--->SPREADSHEET option.
My list is having Header, Footer, sub totals and totals.When i transfer the list i am facing following problems
1.Even i am getting the empty columns betweeen my output.
2.In the Place of sub totals i am getting astericks
3.On the top of the records downloaded,"DYNAMIC LIST DISPLAY" is found.I want to avoid this text on the top
Thanks,
Ravee...Hello Vinod,
1.I am getting the empty columns betweeen my output.
I am having 16 columns in the ALV output,but i got 19 columns in my excel file.
2.In the Place of sub totals i am getting astericks.
Generally there is no possibility to download the sub totals.i am using LIST->EXPORT->SPREADSHEET.
I am having the sub totals in my output.
*You would have noticed the' * ' for sub total and ' ** ' for grand totals values.*These sub total & total values are not downloaded but these asterisks are carried to excel file.
3.On the top of the records downloaded,"DYNAMIC LIST DISPLAY" is found.I want to avoid this text on the top.
I am using the application tool bar icon only.Still i am getting the same.
Thanks,
Ravee... -
Save alv report as excel file directly from program
Hello guys,
I require this in my work.
I want to save the ALV report tat is to be generated in the filepath that is given in the selection screen (want to save it locally eg: my windows desktop) and in the layout which is also given in the selection screen.
your comments will be very much appreciated.
Thanks in Advance,
JohnyHi Johny,
Actually we have an option to download report output in ALV but it does not download the specified on Selection-screen. For this Create on button for Excell download by setting PF status. and use USER_COMMAND event to trigger when u click on the button and download data to specified path.
1.
declare events table like this.
data :
i_events type slis_t_event,
w_events like line of i_events.
2.
Build events table .
w_events-name = 'USER_COMMAND' .
w_events-form = 'USER_COMMAND' .
append w_events to i_events.
clear w_events.
w_events-name = 'PF_STATUS_SET' .
w_events-form = 'PF_STATUS_SET' .
append w_events to i_events.
clear w_events.
3.
pass this events table through REUSE_ALV_GRID_DISPLAY.
4.
USER_COMMAND and PF_STATUS_SET call back subroutines should be like this in your case. These are nowhere called using PERFORM statement in ur program.
5.
PF_STATUS_SET' subroutine should be like this.
*& Form pf_status_set
form pf_status_set using extab type slis_t_extab.
set pf-status 'STATUS1' excluding g_extab.
"If you write like above Standard status will be gone.
"For that u have to copy standard status of any ALV program which has standard status.
"1. goto SE41 tcode. give program SAPLKKBL and status :STANDARD_FULLSCREEN .
2.Click on the Copy status button below program is ur program and status ur program status.
3. After that create your own button for Excel downlod.
endform. "pf_status_set
6.
USER_COMMAND subroutine should be like this.
*& Form user_command
form user_command using ucomm like sy-ucomm
selfield type slis_selfield.
case ucomm .
when 'XLS_DOWN'.
perform download_to_xls.
endcase.
endform. "user_command
Here is the sample program to download data into Excel file with header and Columns..
Check this program by running.
*& Report ZVENKAT_DOWNLOAD_XLS_WITH_HEAD
REPORT zvenkat_download_xls_with_head.
" Data retrieval related declarations
TYPES:
BEGIN OF t_emp_dat,
pernr TYPE pa0001-pernr,
persg TYPE pa0001-persg,
persk TYPE pa0001-persk,
plans TYPE pa0001-plans,
stell TYPE pa0001-stell,
END OF t_emp_dat,
t_attachment TYPE solisti1.
DATA:
w_emp_data TYPE t_emp_dat,
w_attachment TYPE t_attachment.
DATA:
i_emp_data TYPE STANDARD TABLE OF t_emp_dat,
i_attachment TYPE STANDARD TABLE OF t_attachment.
PARAMETERS: p_file TYPE string DEFAULT 'c:\tmp\test.xls'.
"Start-of-selection.
START-OF-SELECTION.
PERFORM get_data.
PERFORM build_xls_data_and_download.
"Form get_data from PA0001
FORM get_data.
SELECT pernr
persg
persk
plans
stell
FROM pa0001
INTO CORRESPONDING FIELDS OF TABLE i_emp_data
UP TO 4 ROWS.
ENDFORM. " get_data
"Form build_xls_data_and_download
FORM build_xls_data_and_download.
"If you have Unicode check active in program attributes then
"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.
DATA :l_lines TYPE char10.
DESCRIBE TABLE i_emp_data LINES l_lines.
CONCATENATE 'Total no of records:' l_lines
INTO w_attachment
SEPARATED BY con_tab.
CONCATENATE con_cret
w_attachment
INTO w_attachment.
APPEND w_attachment TO i_attachment.
CLEAR w_attachment.
CONCATENATE 'PERNR' 'PERSG' 'PERSK' 'PLANS' 'STELL'
INTO w_attachment
SEPARATED BY con_tab.
CONCATENATE con_cret
w_attachment
INTO w_attachment.
APPEND w_attachment TO i_attachment.
CLEAR w_attachment.
LOOP AT i_emp_data INTO w_emp_data.
CONCATENATE w_emp_data-pernr
w_emp_data-persg
w_emp_data-persk
w_emp_data-plans
w_emp_data-stell
INTO w_attachment
SEPARATED BY con_tab.
CONCATENATE con_cret w_attachment
INTO w_attachment.
APPEND w_attachment TO i_attachment.
CLEAR w_attachment.
ENDLOOP.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = p_file
write_field_separator = con_tab
TABLES
data_tab = i_attachment.
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. "build_xls_data_and_download
I hope that it helps u .
Regards,
Venkat.O -
Send query results to a file using Toad
Hello,
I have a select statement that generates xml rows, and I need to send the results to a file. I am using TOAD VI. The rows generate ok but when I right click and choose the save as option all I end up with is an empty file.
Is there a way I can just send the results directly to a file instead of to the screen?
Thanks.user11293056 wrote:
Would you happen to know of a website that shows how to create an xml file using SQL*Plus?
Thanks.A search of asktom.oracle.com for the following phrase found a couple interesting pages:
table(xmlsequence(cursor
On such page is this one:
http://asktom.oracle.com/pls/asktom/f?p=100:11:1074646661177911::::P11_QUESTION_ID:4061080732051
As an experiment, you might take a look at the output of the following (replace SELECT * FROM MY_TABLE_HERE with your SQL statement):
SELECT
FROM
TABLE(XMLSEQUENCE(CURSOR(
SELECT
FROM
MY_TABLE_HERE
)));Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. -
How to save query result in excel file
Hi all,
How to save query result in excel file from sql*plus tool.
thank youDo you really need an Excel file (binary) or a simple CSV?
If you just need a CSV then search for DUMP_CSV at http://asktom.oracle.com or at this forum
If you need formatting and/or multiple worksheets then you can use free tools like
https://xml-spreadsheet.samplecode.oracle.com/ or https://exceldocumenttype.samplecode.oracle.com/
Regards
Marcus -
Excel Files become "Broken" and cannot be opened
Our environment is as follows:
SharePoint 2013 server, web application running in 2010 mode. Our users are primarily on thin clients in a 64-bit Citrix environment running Office 2013 applications. We use a redirected desktop/my documents on a network drive so that users will
have their documents and settings on any computer they log into.
The issue we've run into is that sometimes one of the Excel files becomes "broken" and will no longer open. This seems to be related to when a user has the file open for long periods of time and loses connectivity or if the user's Excel /
session crashes. When the file becomes broken, the symptoms are:
Open document from SharePoint and Excel splash screen reads:
1. Starting...
2. Contacting the Server For Information. (This message lasts ~2 min)
Then an error message in Excel states:
"Microsoft Excel is waiting for another application to complete an OLE action."
OK
"Could not open 'https://sharepointurl/site/subsite/documentlibrary/document name.xlsx'."
OK
Microsoft Excel cannot access the file
'SameFilePathAsAbove'. There are several possible reasons:
The file name or path does not exist.
The file is being used by another program.
The workbook you are trying to save has the same name as a currently open workbook.
OK
Empty workbook
We've had problems determining "who" broke it, but the result is the same - nobody is able to open it, whether using Excel2013, Excel2010, or the Excel Services thru the SharePoint "view in browser" option.
Our terminal servers reboot nightly, we've tried rebooting the 2 SharePoint application servers and the SharePoint SQL server to no avail. It seems like the file is stuck waiting for itself. In some cases, we've found that older versions of the
file can be restored (generally a few versions back) but when versioning is not enabled then that possibility is out.
We cannot seem to resolve where the issue lies at it's core or how to resolve it. This happens much more frequently for the documents that users keep open for long periods of time making modifications to them, but we suspect that's because they are
just more likely to have a SharePoint document open if their computer or Excel client crashes.They don't want us (the dealers) to edit the spreadsheet, but they do want us to read it. It's their pricelist, they wouldn't sell a lot of equipment if we couldn't see how much it costs! The point is that Numbers won't even open a spreadsheet that is edit protected, not read protected. This is a major issue, it should at the very least tell me I can open or import the sheet as a read only.
Excel will always open the spreadsheet, it just can't make changes to it.
For right now, when I need to get information from the pricelist in Excel, I have to copy and paste the info from the edit protected page to another blank sheet. This is a royal PITA because the Excel pricelist has 50 plus pages. I have been officially told to do that by my manufacturer. But they won't give anyone the password to unprotect the edit function of the sheet. Go figure. -
I saved an Excel file yesterday afternoon, and when I opened it today, all the formatting was lost.
See:
*[[/questions/894442]] OWA 2010/Firefox 8 and ASHX Attachments
*[[/questions/895024]] -
How to convert a file of emails and the attachments to pdf?
In adobe pro XI, how do you convert a file of emails AND their attachments to pdf?
Unfortunately, that did not work either. I am thinking this may not be possible (at least with 10.1.3.4). What I was hoping for was that I could audit the presentation catalog groups and users. I want to be able to get a list of all the users and the groups they are listed in. Again, this would be helpful so we do not need to keep an external record. If we are removing access to a user or updating the group, we want to make sure we remove them from all applicable groups (Settings>Administration>Manage Presentation Catalog Groups and Users)
-
Loop through the excel files in folder and sub folder
hi all
I need to loop through all the excel fies in a folder and its sub folder which contain excel files
actually, my excel files contain a column with sdate and it contain different dates in which has to get the max date my query is
"select * from @[User::filename] where sdate=(select max(sdate) asi from @[User::filename] )"
loop all the excel file in folder and its sub folderTake a look at the Foreach Loop.
Here is an article about it.
Andy Tauber
Data Architect
The Vancouver Clinic
Website | LinkedIn
This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
"Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread. -
How to store files in shared-folder in background mode
Hello All,
My requirement seems to be simple but I have tried many ways in achieving this, but failed. So require the help in accomplishing this task.
Requirement
I have to create a program in SE38 which will create a internal table with data in it in .XML format(which I can achieve).
My requirement is this .XML file needs to be placed in a shared-folder in "BACKGROUND MODE".
I have tried using GUI_DOWNLOAD function module, but this FM only runs in Foreground mode and fails in Background mode. I have tried convincing my client that I will keep the file in Application Server as it is achievable using OPEN DATASET statements, but they are not willing to accept this.
So can you please help me in achieving this task as I am not getting any solution how to keep the file in Shared-folder in BACKGROUND mode itself(not Foreground).
Best Regards,
TousifHi Sanjeev,
I have just used normal GUI_DOWNLOAD FM. Please find my sample code below
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = 'D:\Users\baigtomx\Desktop\TOUSIF.XML'
* FILETYPE = 'ASC'
* APPEND = ' '
* WRITE_FIELD_SEPARATOR = ' '
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
* SHOW_TRANSFER_STATUS = ABAP_TRUE
* VIRUS_SCAN_PROFILE = '/SCET/GUI_DOWNLOAD'
* IMPORTING
* FILELENGTH =
TABLES
data_tab = lt_wo
* FIELDNAMES =
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* OTHERS = 22
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
When I run this program in foreground mode, the file gets saved(here in the above example I have just used my desktop path. but the actual requirement is to store file in shared-folder i-e Network Drive).
But when i run the same program in background mode, No file is getting stored.
Regards,
Maybe you are looking for
-
Cool previews works in Explorer but not in ALL Firefox locations.
Cool previews works on all of my I.E websites. Cool previews works on some website but not all. On AIRNAV.COM, it works sometimes on the Procedure links but mostly it does not work. It worked last year.
-
Remote VPN between ASA5505 and Netscreen SSG140
Dears, I'm trying to set up a VPN between an ASA 5505 and SSG40Juniper and the VPN keep flaping: Nov 27 04:47:27 [IKEv1 DEBUG]Group = 89.XXX, IP = 89.XXX, NP encrypt rule look up for crypto map TEST 1 matching ACL ACL_VPN: returned cs_id=cd2e0998; e
-
More Airport 101, I'm afraid
I just ordered airport express. I have iMac connected to Hughes.net (satellite). The first question is pretty stupid; the second is maybe a good question... iMac has built in Airport card. Want to be able to bring home work Dell and access internet.
-
IP Resource Errors While Building a Windows Failover Cluster on Azure
I have setup a failover cluster in Microsoft Azure on four VMs. I have two nodes in one subnet/region, one node in another subnet/region and a final node in a third subnet/region. The cluster passed the validation wizard and was successfully built, b
-
Allowing special characters in bw
Hello Friendz, I have loaded transaction data in psa and infocube. For some values in R/3 its showing following error. <b>Value '0000cj1000 ' (Hex ' ') of char. 0REF_DOC_NO contains unauthorized characters.</b> I tried to solve this using rskc,but st