Downloading of ALV output to excel by asking the password
Hi all,
I need to down load the ALV output into the excel sheet. But the thing is that before going to download the output into excel sheet, the system has to prompt for password.once it happens then the user will enter the password and it should validate. if the validation is successful then the output should download to the excel sheet. This is the requirement, can anybody help me out regarding this.Please provide the function module names and sample code.
Thanks & Regards.
Laxman.P
B'lore.
Hi,
Check this thread,
Make excel sheet password protected through ABAP codeu0085
Regards,
Omkar.
Similar Messages
-
Download ALV output to excel with formatting
Hi All,
i want to download ALV output to excel sheet and the uneditable fields in ALV oputput should be locked (uneditable) in excel also.
Can you please tell me approach to achieve this functionality?
Thanks in advance.Thanks Vamsi. Your Suggestion was helpful.
I have used excel integration and used SET PROPERTY OF (COLUMN) 'LOCKED' = 1.
For more details refer below mentioned link.
http://webcache.googleusercontent.com/search?q=cache:SoY6hFC17PoJ:wiki.sdn.sap.com/wiki/display/Snippets/Download%2BData%2Binto%2BMultiple%2BSheet%2BExcel%2BDocument%2Bwith%2BNon%2BEditable%2BColumns%2B(Password%2Bprotected)%2BUsing%2BABAP%2BOLESetPropertynoteditableexcelsapABAP&cd=1&hl=en&ct=clnk&gl=in&source=www.google.co.in (http://webcache.googleusercontent.com/search?q=cache:SoY6hFC17PoJ:wiki.sdn.sap.com/wiki/display/Snippets/Download%2BData%2Binto%2BMultiple%2BSheet%2BExcel%2BDocument%2Bwith%2BNon%2BEditable%2BColumns%2B%28Password%2Bprotected%29%2BUsing%2BABAP%2BOLESetPropertynoteditableexcelsapABAP&cd=1&hl=en&ct=clnk&gl=in&source=www.google.co.in -
Download colored ALV output in to EXCEL sheet
Hi ,
I want to download colored ALV output to Excel sheet with color.
one of the field in ALV is with 4 colors depending on condition.
i am unable to download the color using download option(that field is comming with out color).
Please help me by providing the solution.
Thanks in advance.
Regards
sarathHi Srini,
thanks for the reply.
i am using standard download function only.
if i use download->local file->HTML Format only the font is appearing in colors.in case of spread sheet no color comming.
but my requirement is to download into excel and background also with color(green...) font in black like that.
(exactly appearing in the ALV)
Thanks
sarath -
Alv output to Excel with numeric fields as numeric fields only and not char
Hi,
When we download the alv output to excel format in the locat file using the toolbar button provided in the ALV, the numeric fields get converted to character format. Is there any other way or settings in ALV so that the numeric fields will be get saved as numeric fields only and not character?
Rgds,
MAdhuriany idea for above problem is welcome
-
Issue in Excel download from ALV output
Dear Experts,
I have generated an ALV Output using FM "REUSE_ALV_GRID_DISPLAY". When i try to download the ALV Output in Excel spreadsheet, I am not getting the data in Excel sheet. Kindly help me in this regard.
Thanks in advance,
Regards,
Ramesh Manoharanhi ramesh,
Please try below options.
after getting the ALV disply , Go to Menu LIST->Export->Spreadsheet.or microsoft excel view (Cntrl + Shift + F7)
It will give some options to see the data in spread sheet format, hope you can save this to local desktop also.
or
please check the extension, it should be .XLS not .XLSX .some times .XLSX format wont be supported
regards,
pradeep
Edited by: Pradeep Kandgal on Aug 4, 2010 6:54 PM
Edited by: Pradeep Kandgal on Aug 4, 2010 6:54 PM -
Hi gurus,
Cany anybody explain what is the procedure to download the alv output to EXCEL sheet?
Marks will be awarded
Thanks in Advance
RaviHi
when display the ALV . select from PF-STATUS menu bar select download option then SPEADSHEET. Thats all.
Reward all the helpful answers..
With Regards
Navin Khedikar -
Getting ERROR when downloading alv output to Excel
Hello All,
I get a error message when I try to use the standard funtionality to download the alv output to excel.
The current statement only supports character-type data objects.
What happened?
The current ABAP/4 program "SAPLKKBL " had to be terminated because
one of the statements could not be executed.
This is probably due to an error in the ABAP/4 program.
Error analysis
In statement
"STRLEN( obj )..."
the argument "obj" can only take a character-type data object.
Source code extract
038620 * ansonsten entspricht sich min. Ausgabelänge und Ausprägungslänge
038630 else.
038640 if gs_fc-tech_form ne 99.
> gs_out-hlplen = strlen( ).
038660 endif.
038670 endif.
In this case, the operand "obj" has the non-character type "I".
Please can anyone put some light on this. It is veru difficult to go through the whole std functionality to download.
Thanks for all support guys!
Sri.Hi srikanth,
This error comes because the values present in any one of the displayed coloums containing special character like * present before or after the number.... i.e instead of 4 ...**4.
While displaying in the screen it is of no problem. since both *4 are converted into char format (internally) and gets displayed.
But while you download the same throu the EXCEL functionality SAP will intenally convert the same into NUMERIC format. Since 4 is number.
So in that case *4 will cause dump.
*So find out the place in which the value appearing like this *4 and try to correct it.
*Surely it is of Field LENGTH problem. Try to increase the length of the field 4.
It Should WORK.!!!.. else post ur query here.
REWARD POINTS IF USEFUL
~Lakshmiraj~ -
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... -
How to download a smartform output as excel file WITH EXACT LAYOUT.
Hi,
I have searched the forum but could not found any satisfactory answer. I have a smartform with a table, some texts and a logo. I have to write a code which will save the smartform output as excel file in the system keeping the layout of the smartform output EXACT.
i.e., the excel file will contain the output with EXACTLY THE SAME layout as would have been for a pdf file (if the smartform output is converted to a pdf file) and the client can then edit the fields of the table in the excel file. How can I achieve this? Please give a suggestion.. Thanks in advance.Hi Anirban,
Your Requirement is to download a smartform to microsoft Excel .
Well unfortunately we can only download data into excel which is in a tabular format i.e stored in internal tables we have function modules to do the same even u can do that using OLE2.
If u try to download a smartform to Excel only format supported will be ASCII, if u will continue with that the smartforms text's will get downloaded to excel but whole data would be downloaded in a single Cell.
Code to do the same is -
>>>>
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
i_language = v_language
i_application = 'SAPDEFAULT'
IMPORTING
e_devtype = v_e_devtype.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = w_form
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = w_fmname
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE E002(zcpm) WITH 'Smartform call fails'.
ENDIF.
wa_outopt-tdprinter = v_e_devtype.
wa_ctrlop-no_dialog = 'X'.
wa_ctrlop-getotf = 'X'.
CALL FUNCTION w_fmname "'/1BCDWB/SF00000025'
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = WA_CTRLOP
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
OUTPUT_OPTIONS = WA_OUTOPT
* USER_SETTINGS = ' '
IMPORTING
* DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = T_OTFDATA
* JOB_OUTPUT_OPTIONS =
* document_output_info = st_document_output_info
* job_output_info = st_job_output_info
* job_output_options = st_job_output_options
TABLES
T_FINAL = T_FINAL
T_ZSDT_WAGONS = T_ZSDT_WAGONS_1
T_QTY = T_QTY
T_QTY1 = T_QTY1
T_CON1 = T_CON1
T_CON2 = T_CON2
"T_ZTMM_OUTWB_TXN = T_ZTMM_OUTWB_TXN
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
T_OTF[] = T_OTFDATA-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'ASCII'
max_linewidth = 132
* ARCHIVE_INDEX = ' '
IMPORTING
bin_filesize = w_bin_filesize
TABLES
otf = t_otf
lines = t_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if tabix_m = 1.
*CALL METHOD cl_gui_frontend_services=>file_save_dialog
*CHANGING
*filename = w_FILE_NAME
*path = w_FILE_PATH
*fullpath = w_FULL_PATH
** USER_ACTION =
** FILE_ENCODING =
*EXCEPTIONS
*CNTL_ERROR = 1
*ERROR_NO_GUI = 2
*NOT_SUPPORTED_BY_GUI = 3
*others = 4
*IF sy-subrc <> 0.
*MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
CALL function 'TMP_GUI_BROWSE_FOR_FOLDER'
EXPORTING
WINDOW_TITLE = 'Select A File Folder'
INITIAL_FOLDER = 'C:\'
IMPORTING
SELECTED_FOLDER = W_PATH.
endif.
CONDENSE W_PATH.
concatenate W_PATH '\' wa_final-vbeln '.XLS' into w_FULL_PATH.
****************************************************************************Saving the PDF file on to Application server************************
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = w_bin_filesize
FILENAME = w_FULL_PATH
FILETYPE = 'BIN'
* 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 = ' '
IMPORTING
FILELENGTH = w_filesize
TABLES
DATA_TAB = t_pdf_tab
* 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
As u said ,u want to download a smartform to Excel it could be done but only if u r using a internal table and exactly printing line by line values in the smartform, But if u are performing calculation in between, using multiple internal table Work areas, structures, etc i.e if whole smartform is developed with many distributed windows , unfortunately it wont be possible to download a smartform to excel in such cases, because the whole output comes from multiple internal tables, calculations, etc all the data is not printed in a tabular manner so in such a case it would be just impossible to download the smartform to excel.
But we definitely have a workaround which could be done to download the data into excel.
you can develop a ALV report with a header and footer u can define the header and footer of the alv according to the smartform and the middle portion would contain the tabular kind of data which u must be using as Smartform table to print the same.
So if u have a similar kind of smartform with some header data, tabular data, and some footer data, then u can use ALV to do the same thing , advantage with ALV would be that u can easily download the same into excel.
Other alternative is that u can Convert and download the smartform to PDF and copy the same to an Excel wooksheet.
These are all the possibilities with which u can do the same.
Regards,
Akash Rana -
Displaying alv output into excel with delimeter
Hai,
am downloading alv output to excel :
1. in that output one field is long text field with # delimeter at the end of sting .
while exporting this outout to excel it is not showing # and one empty column is adding after that field.Hi Satya,
Can you try out this piece of code below. It creates a demo Internal table to store some string with '#' as the final delimiter.
TYPES : BEGIN OF l_ty_demo,
data TYPE string,
END OF l_ty_demo.
DATA : l_i_demo TYPE STANDARD TABLE OF l_ty_demo.
DATA : l_wa_demo TYPE l_ty_demo.
DATA : l_v_i TYPE sy-tabix.
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
TABLES: spfli.
DATA h TYPE i.
WHILE l_v_i < 10.
l_wa_demo-data = 'Welcome to the world of computers#'.
APPEND l_wa_demo TO l_i_demo.
l_v_i = l_v_i + 1.
ENDWHILE.
* start Excel
CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
PERFORM err_hdl.
SET PROPERTY OF h_excel 'Visible' = 1.
PERFORM err_hdl.
* 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.
LOOP AT l_i_demo INTO l_wa_demo.
h = sy-tabix + 1.
PERFORM fill_cell USING h 1 0 l_wa_demo-data.
ENDLOOP.
*& Form FILL_CELL
* text
* -->I text
* -->J text
* -->BOLD text
* -->VAL text
FORM fill_cell USING i j bold 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.
ENDFORM. "FILL_CELL
*& Form ERR_HDL
* text
FORM err_hdl.
IF sy-subrc <> 0.
WRITE: / 'Fehler bei OLE-Automation:'(010), sy-subrc.
STOP.
ENDIF.
ENDFORM. "ERR_HDL
Please refer to the following Demo ABAP Code for a complete reference.
RSDEMO01.
Hope this helps.
Thanks,
Samantak. -
Please Vote if you find this to be helpful!
App-V PowerShell: Script to Query XenApp Servers for App-V Publishing Errors and Output an Excel Document with the Results
Just posted this to the wiki:
http://social.technet.microsoft.com/wiki/contents/articles/25323.app-v-powershell-script-to-query-xenapp-servers-for-app-v-publishing-errors-and-output-an-excel-document-with-the-results.aspxHi petro_jemes,
Just a little claritification, you need to add the value to the variable "[string]$ou", and also change the language in the variable "$emailbody" in the function "Get-ADUserPasswordExpirationDate".
I hope this helps. -
Hello! I change my ID Apple and now when I try to make an update, Iphone show me my old ID and ask the password. Why is that? Why the phone don't see my new ID Apple? I can not make any update because the old Apple ID don't work any more. I check and I have my new user all over in my phone. Help me please!
All apps are tied to the Apple ID that downloaded them.
They can not be transferred to a new Apple ID.
You will have to use the Apple ID and password used to download them.
If you do not wish to do so, erase them and download them under the new ID. This will wipe any data in the app and you will have to pay for them again. -
hello guys ..when i try to update any applecation..it puts the first user a ccount and it ask the password which i dont know it cause im not the first user of this i pad ,,,,so how can i changebit to update apps dute to my account name and password???
please answer meDelete all apps that were purchased with the former ID and renown load or purchase them with your ID.
-
Hello,
Trousseau session asks the password many times in a day.
What to do to change this problem? Mfrance
iMac, Mac OS X (10.7.3)...I wonder how your question solved their question.
-
Regarding ALV output to Excel file download
Hi all,
i had a requirement when downloading the ALV output to the Excel file it should ask for the password.if the user enters the password then this pass word shuld be assigned to the Excel file that was downloaded.
Can i know how this can be implementedHi,
Using EXCEL_OLE_STANDARD_DAT you can specify the PASSWORD & PASSWORD OPTION.
Regards,
Sharat
Maybe you are looking for
-
I have tried updating the driver, deleting the existing driver first, but when I try to reinstall the newly downloaded driver I get the following error: Windows cannot load the device driver for this hardware. The driver may be corrupted or missing.
-
How long does it take to get my X61 checked from water spill?
Hi, I had spilled some water into my X61 yesterday. Though I instantly shut it down and try to clean, I was too stupid to try to boot it in ten minutes. Not sure if it is "OK" right now.... Does anyone have the same experience? Could you share how lo
-
So. I had a splitter DVI to VGA/DVI. I had one end into my monitor in one room(DVI) and the other(VGA) through the wall to the back of my HDTV in the other room. Problem, obviously was, if both were connected to the splitter, you could see the com
-
Purchasing Ability to Exceed Message/Attachment Size Limit
Is it possible to purchase the ability to exceed the message/attachment size limit on iCloud? I keep running into it when I need to send out PDF image files.
-
Transaction attributes and isolation not working as expected why ? !
I have three beans participating in a TX SeatBean ---- entity (BMP) Res --------entity (BMP) AgentBean --- session (SFSB) AgentBean has bookSeat (seatNumber, amount) method that is being called by the client. The Agent bean bookSeat (seatNumber, amou