Convert ls -l output to html [solved]
My ISP's webserver which I am using as a repo doesn't allow live dir listings. In other words, if a user simply browses to the site root in a browser, a message comes up telling them the pages doesn't exist.
The structure of my site is trivial:
/i686
/x86_64
I'd like a nice script that simply converts the output of an "ls -l" to html with basic click-able links for the files and simply prints the date/time stamp and file size.
Example:
file1 Jan 15 16:55 25M
file2 Jan 15 16:55 25M
file3 Jan 15 16:55 25M
I was thinking about something like:
#!/bin/bash
date >> /dev/shm/ls.html
echo "<br>" >> /dev/shm/ls.html
for i in * ; do
#echo item: $i
echo "$i" "<br>" >> /dev/shm/ls.html
done
Is there something out there that's pre-made and more visually appealing? If not, how can I store and parse the output of an ls -lh to the following format (for each item):
filename datestamp size
EDIT: From what I'm finding via google, perl is probably the right scripting language (not bash) to accomplish this task. I know 0 about perl
Last edited by graysky (2011-01-23 20:43:17)
GNU stat would work just fine for this. Do not parse ls.
exec > /path/to/output.html
printf '<html>\n<head>\n<body>\n<table>\n'
for file in *; do
stat "$file" -c '<td>%A</td><td>%U</td><td>%G</td><td>%B</td><td>%y</td><td>%n</td>'
done
printf '</table>\n</body>\n</head>\n</html>\n
This should get you started.
Last edited by falconindy (2011-01-23 15:11:04)
Similar Messages
-
Convert pdf and output to html
I need help!
If I have a pdf file and I want to upload to iFS, should I convert it to html or test format and save to database with iFS feature? Or it's better to save as a pdf file and output as html with iFS feature.
Also, if I a some images in the pdf file, what should I do?
Thank you so much in advance.
Hong
nullTry to use filterDocumnet() and getFilteredDocument() in oracle.ifs.beans.Document. It helps to generate the PDF into HTML format.
null -
Hello,
I want to convert smartform output to html and send the output in an email body. I have followed the blog Sending HTML Email from SAP CRM/ERP and got the output in outlook but its not formatted correctly in other email clients. If any body else had same issues and was able to resolve, please suggest. Also I am trying to convert form spool output to html and send it but I am not able to use LIST_FROM_MEMORY Fm , its not returning the abap list table. So is there a way to convert form spool output to abap list?HI friend,
I am not having the exact solution for your requirement but i think this will help you a bit.
See this white paper in SND for sending mails in HTML format.
Link: [Sending mail with HTML attachment|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e009f97e-ee5d-2e10-31ba-9c9509e5925c?QuickLink=index&overridelayout=true]
I think this will help you. If you have any doubt in that white paper please revert back to me i will help you.
Thanks,
Sri Hari -
Convert Graphics2D Output to HTML
Hello,
Does anybody know of a library that converts Graphics2D output to HTML text?
ThanksHello,
Does anybody know of a library that converts Graphics2D output to HTML text?
Thanks -
Japanies characters are converting to # in output file in open dataset
Hi Experts,
I am trying to transfer data from my internal table to application server. When i use
Open Dataset e_file for output in text mode encoding NON-UNICODE ignoring convertion errors.
All Japanies and chines characters(double byte characters) are converting to "#" in output file. I have used set locale language commend also.Still same problem is there.
Could you please any one help me on this.
Thanks
Srinivashi
problem exporting text in hebrew
Similar kind of problem has been solved here.. check that link first
Use the class CL_ABAP_CONV_OUT_CE and use it to convert file from unicode to ascii.
After that you should call OPEN DATASET IN LEGACY MODE and write the file.
you have to find the Code Page format for japanese here..
Is your system Unicode enables, if not please check whether you have japanese installed on your system.
Run the program RSCINST in SE38 which throws a pop up if u work on a Unicode system and also shows what are the language packs currently installed on ur system.... if u dont have Japanese installed then u need to contact Basis People for installion of that language pack -
PDF output to HTML - Payment Instruction Register - JAVA Conurrent Program
Hi All,
Environment
Realse 12 EBS on linux.
Description
We need to convert few reports to HTML / TEXT output in R12 EBS.
These are seeded oracle reports which use executable type as JAVA CONCURRENT PROGRAM and the output format of the conurrrent program is PDF. In XML Publisher Administrator the ttemplate attached to this report is *.rtf.
Problem
When the output format of the concurrent program is changed to HTML/TEXT the reports executes sucessfully without error but when we click on the View Outpu(B) no output is displayed (Page Cannot be Displayed will be appeared)
Reports: Payment Instruction Register and Send Seprate Remmitance Advices are the reports that need to be convereted in to HTML/TEXT.
Please let me know is there any way/ideas to workout.
Also, I'm was able to extract the XML for this reports and designed new templates and these are working if the output is in PDF only.
Let Me know if you need any other information.
Thanks & Reagrds,
Janu
Edited by: Janu on Feb 25, 2009 6:51 PMHi Tarmenel,
No, I don't want a custom report if the seeded report can be displayed as HTML/TEXT output.
As you said,I know that it is a java concurrent program which gives the XML structure and i Have used the XML to design a new template. But even for the new template i was not able produce the output in HTML / TEXT.
So the problem is not about extracting the data, but how can i display the output in HTML/TEXT format.
Thanks for your time.
Thanks & Regards,
Janu
Edited by: Janu on Feb 26, 2009 5:00 PM -
Can I convert the optical output to analog via a converter for zone 2 audio? I would continue using the HDMI for the main zone. Can I use both of these simultaneously? Zone 2 only supports analog on this receiver.
These will probably help.
[http://www.jsresources.org/examples/audio_conversion.html] -
Adobe Bridge CS6, Output to HTML Gallery coding issue.
Adobe Bridge CS6, Output to HTML Gallery coding issue.
I have created the html, JavaScript, css file using the output function in Bridge CS6, which nicely generates the coding, pages, folders and files. I can edit the html files such as gallery title, name, etc., in Dreamweaver CS6 just fine and preview them in a selected browser (both chrome and IE) and everything works fine.
When I ftp upload the files and directories into my hosting account (Go Daddy), the images do not show up. The file table appears but the thumbs images does not appear and when selected to preview the larger image, it does not appear either. I have not altered the file structure at all. Go Daddy says it is a coding issue, but I cannot fine any errors.
Have you seen this issue before? All Adobe help research have failed. Any suggestions??Have you asked on Go Daddy site for help in uploading Adobe Bridge script? Just to say it is coding is not helpful.
-
Converting simple report output to PDF print layout issue
Hi all,
I am converted one report output to PDF format, it is working fine in one DEV sever, but when we moved it to other server the layout of output preview & font size is not coming properly (as same in DEV server) in the new server. I am using the below code, please check & correct me if anything is wrong.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
copies = '1'
cover_page = space
destination = 'LOCL'
expiration = '1'
immediately = space
mode = space
new_list_id = 'X'
no_dialog = 'X'
user = sy-uname
line_size = 200
line_count = 65
* layout = 'Z_65_230'
layout = 'X_58_170'
sap_cover_page = 'X'
IMPORTING
out_parameters = mstr_print_parms
valid = mc_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc EQ 0.
**--Creating Spool Request.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_job_name
IMPORTING
jobcount = lv_job_count
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 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.
ELSE.
**--Submitting the Report & Get the Output.
SUBMIT zpsr_submit_prcng WITH SELECTION-TABLE t_ebeln TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS mstr_print_parms
USER sy-uname " User for runtime authorizations
VIA JOB lv_job_name
NUMBER lv_job_count
AND RETURN.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_job_count
jobname = lv_job_name
strtimmed = 'X'
IMPORTING
job_was_released = lv_job_released.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Thanks & Regards
Avish
Moderator Message: Please use code tags when pasting code snippets. Also paste relevant portions of the code
Edited by: Suhas Saha on Jul 13, 2011 3:05 PMDear Alexander,
Thanks for the reply.
In this I am using the FM 'CONVERT_ABAPSPOOLJOB_2_PDF'. I have checked the settings from SPAD that is also same in both servers for particular output device. But the patches are diffrennt in both the servers, the server from which layout is not coming properly having the high level patches in compare to the other server(which is working fine). -
How can I put an output stream (HTML) from a remote process on my JSF page
Hello,
I've a question if someone could help.
I have a jsf application that need to execute some remote stuff on a different process (it is a SAS application). This remote process produces in output an html table that I want to display in my jsf page.
So I use a socket SAS class for setting up a server socket in a separate thread. The primary use of this class is to setup a socket listener, submit a command to a remote process (such as SAS) to generate a data stream (such as HTML or graphics) back to the listening socket, and then write the contents of the stream back to the servlet stream.
Now the problem is that I loose my jsf page at all. I need a suggestion if some one would help, to understand how can I use this html datastream without writing on my Servlet output stream.
Thank you in advance
A.
Just if you want to look at the details .....
// Create the remote model
com.sas.sasserver.submit.SubmitInterface si =
(com.sas.sasserver.submit.SubmitInterface)
rocf.newInstance(com.sas.sasserver.submit.SubmitInterface.class, connection);
// Create a work dataset
String stmt = "data work.foo;input field1 $ field2 $;cards;\na b\nc d\n;run;";
si.setProgramText(stmt);
// Setup our socket listener and get the port that it is bound to
com.sas.servlet.util.SocketListener socket =
new com.sas.servlet.util.SocketListener();
int port = socket.setup();
socket.start();
// Get the localhost name
String localhost = (java.net.InetAddress.getLocalHost()).getHostAddress();
stmt = "filename sock SOCKET '" + localhost + ":" + port + "';";
si.setProgramText(stmt);
// Setup the ods options
stmt = "ods html body=sock style=brick;";
si.setProgramText(stmt);
// Print the dataset
stmt = "proc print data=work.foo;run;";
si.setProgramText(stmt);
// Close
stmt = "ods html close;run;";
si.setProgramText(stmt);
// get my output stream
context = FacesContext.getCurrentInstance();
HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();
ServletOutputStream out = response.getOutputStream();
// Write the data from the socket to the response
socket.write(out);
// Close the socket listener
socket.close();The system exec function is on the Communication palette. Its for executing system commands. On my Win2K system, the help for FTP is:
"Ftp
Transfers files to and from a computer running an FTP server service (sometimes called a daemon). Ftp can be used interactively. Click ftp commands in the Related Topics list for a description of available ftp subcommands. This command is available only if the TCP/IP protocol has been installed. Ftp is a service, that, once started, creates a sub-environment in which you can use ftp commands, and from which you can return to the Windows 2000 command prompt by typing the quit subcommand. When the ftp sub-environment is running, it is indicated by the ftp command prompt.
ftp [-v] [-n] [-i] [-d] [-g]
[-s:filename] [-a] [-w:windowsize] [computer]
Parameters
-v
Suppresses display of remote server responses.
-n
Suppresses autologin upon initial connection.
-i
Turns off interactive prompting during multiple file transfers.
-d
Enables debugging, displaying all ftp commands passed between the client and server.
-g
Disables file name globbing, which permits the use of wildcard characters (* and ?) in local file and path names. (See the glob command in the online Command Reference.)
-s:filename
Specifies a text file containing ftp commands; the commands automatically run after ftp starts. No spaces are allowed in this parameter. Use this switch instead of redirection (>).
-a
Use any local interface when binding data connection.
-w:windowsize
Overrides the default transfer buffer size of 4096.
computer
Specifies the computer name or IP address of the remote computer to connect to. The computer, if specified, must be the last paramete
r on the line."
I use tftp all of the time to transfer files in a similar manner. Test the transfer from the Windows command line and copy it into a VI. Pass the command line to system exec and wait until it's done. -
Dear all ,
I want to take smartform output in html format . the logos are not coming as well as the header template the records are coming in next line not side by side .my code is :
gs_output_options-xsfcmode = 'X'.
gs_output_options-xsf = 'X'.
gs_output_options-xsfoutmode = 'A'.
gs_output_options-xsfformat = 'X'.
xsfparam_line-name = 'GRAPHICS'.
xsfparam_line-value = 'EXTRACT'.
APPEND xsfparam_line TO gs_output_options-xsfpars.
xsfparam_line-name = 'GRAPHICS-DIRECTORY'.
xsfparam_line-value = c_gr_dir.
APPEND xsfparam_line TO gs_output_options-xsfpars.
xsfparam_line-name = 'CONTENT-ID'.
xsfparam_line-value = 'ENABLE'.
APPEND xsfparam_line TO gs_output_options-xsfpars.
CALL FUNCTION fm_name
EXPORTING
control_parameters = gs_ssfctrlop
output_options = gs_output_options
p_graphics[] = gs_job_output_info-xmloutput-xsfgr[].
p_html = gs_job_output_info-xmloutput-trfresult
CONCATENATE 'C:\TEST\TC1_' p_vbeln '.html' INTO p_file.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = html_len
filename = p_file
filetype = 'BIN'"'ASC'
trunc_trailing_blanks = 'X'
TABLES
data_tab = p_html-content
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
document = p_fileThis question (logos and html smartform output) has been discussed several times related to email sending. Try searching the forum. You may find some relevant info in other posts. Have you tried reaching the url that's generated for the logo?
-
Bridge CS6 Output to HTML Gallery - images not showing up
Bridge CS6 Output to HTML Gallery issue - my images are not showing up. The files look the same on the local and remote files. The images populate on the local and not on the remote. Is this a JavaScript problem.
Any help is appreciated.
I've done a work around solution by using Lightroom, creating a quick collection for a custom order HTML web gallery. I would much prefer to stay within Bridge CS6 and have its HTML gallery actually work...Hi AlbiDan,
Its possible that it might be a Javascript issue. I see that javascript is used in the HTML gallery. Did you upload through Bridge or from an FTP client? Do you have the URL for a broken gallery?
-Dave -
Report output in HTML not as in PDF
I have developed a report in Report builder 10g when i get its output in HTML in browser from application, it does not show its format as like in PDF for example heading background colors, fields background colors and frame lines not showing in HTML format but in PDF there is no problem.
Thanks in Advance.Unfortunately those are HTML restrictions.
From the Reports Builder Online Help you can see the following for HTML output
- The only drawn object supported in HTML is a solid, black, horizontal line. The line width specified in the report may be honored depending upon the browser. All other drawn objects (for example, rectangles or circles) in the report layout will not show up in the HTML output. Space for these drawn objects is reserved, but there is no visible representation in the HTML output.
- Background (fill) and border (line) colors/patterns for text are not available in HTML. Bold, italic, underline, and foreground (text) color are supported if the browser supports them
====
Hope it helps -
Hi All!
is it possible to get the report output in HTML based output?
if yes, can anyone send me the details?
thanks in advance
AlankaarHi,
Yes it is possible to do that.
You can go thru the program below. Hope it could help you.
REPORT ZSS_CODE_2_HTML LINE-SIZE 300 .
TABLES: D010INC.
Tabelle für die aufzunehmenden ABAP-Texte
DATA: BEGIN OF SOURCECODE OCCURS 0,
LINE(200),
END OF SOURCECODE.
Tabelle für den erzeugten HTMLCode
DATA: BEGIN OF HTMLCODE OCCURS 5000,
LINE(256),
END OF HTMLCODE.
DATA: BEGIN OF INCLUDETAB OCCURS 0,
NAME LIKE D010INC-INCLUDE,
END OF INCLUDETAB.
DATA: TEXTELEMENTETAB LIKE TEXTPOOL OCCURS 50 WITH HEADER LINE.
DATA: EINRUECK TYPE I, " Soweit im HTML einrücken
CHAR2(2).
Selektionsbild und Verarbeitung -
SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME.
PARAMETERS: PROGNAME LIKE D010SINF-PROG
DEFAULT 'ZSS_CODE_2_HTML'.
PARAMETERS: HTMLFILE LIKE RLGRAP-FILENAME
DEFAULT 'c: emp est.html'.
PARAMETERS: MITINCLD AS CHECKBOX DEFAULT 'X',
MITTEXTL AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK BL1.
SELECTION-SCREEN BEGIN OF BLOCK BL2 WITH FRAME.
PARAMETERS: MITZEILE AS CHECKBOX DEFAULT 'X',
ONSCREEN AS CHECKBOX DEFAULT 'X',
SAPINCLD AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK BL2.
Ein subtrivialer Tests
AT SELECTION-SCREEN.
READ REPORT PROGNAME INTO SOURCECODE.
IF SY-SUBRC <> 0.
MESSAGE E159(AT) WITH 'Programm konnte nicht eingelesen werden'.
ENDIF.
Programmanfang -
END-OF-SELECTION.
In der Tabelle sourcecode sollte hier schon der Quelltext stehen.
PERFORM ERZEUGE_KOPF.
PERFORM WRITE_SOURCE.
Includes falls erwünscht
IF MITINCLD = 'X'.
PERFORM WRITE_INCLUDES.
ENDIF.
Textelemente falls erwünscht
Includes falls erwünscht
IF MITTEXTL = 'X'.
PERFORM WRITE_TEXTELEMENTE.
ENDIF.
Und abschließen des Files
PERFORM ERZEUGE_SCHWANZ.
PERFORM ABSPEICHERN TABLES HTMLCODE
USING HTMLFILE.
Unterroutinen -
INCLUDE ZCD_SS_DEBUGROUTINEN.
FORM ABSPEICHERN *
--> FILENAME *
FORM ABSPEICHERN TABLES TEXT_ZU_SCHREIBEN
USING FILENAME LIKE RLGRAP-FILENAME.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
CODEPAGE = 'IBM'
FILENAME = HTMLFILE
FILETYPE = 'ASC'
MODE = ' '
TABLES
DATA_TAB = TEXT_ZU_SCHREIBEN
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
GUI_REFUSE_FILETRANSFER = 8
OTHERS = 9.
IF ONSCREEN = 'X'.
LOOP AT TEXT_ZU_SCHREIBEN.
PERFORM SHOW_ANY_STRUC USING TEXT_ZU_SCHREIBEN.NEW-LINE.
ENDLOOP.
ENDIF.
ENDFORM.
*& Form ERZEUGE_KOPF
Erzeugt einen HTML-Rumpf bis zum Body
FORM ERZEUGE_KOPF.
HTMLCODE-LINE = ''.APPEND HTMLCODE.
HTMLCODE-LINE = ' '.APPEND HTMLCODE.
HTMLCODE-LINE = '
CLEAR HTMLCODE-LINE.
HTMLCODE-LINE+3 = PROGNAME.APPEND HTMLCODE.
HTMLCODE-LINE = ' '.APPEND HTMLCODE.
HTMLCODE-LINE = ' '.APPEND HTMLCODE.
CLEAR HTMLCODE-LINE.APPEND HTMLCODE.
HTMLCODE-LINE = ''.APPEND HTMLCODE.
EINRUECK = 2.
ENDFORM. " ERZEUGE_KOPF
*& Form ERZEUGE_SCHWANZ
Erzeugt die abschließenden HTML-Befehle
FORM ERZEUGE_SCHWANZ.
HTMLCODE-LINE = ' </body>'.APPEND HTMLCODE.
HTMLCODE-LINE = '</html>'.APPEND HTMLCODE.
ENDFORM. " ERZEUGE_SCHWANZ
*& Form WRITE_SOURCE
Schreibt den Sourcecode
FORM WRITE_SOURCE.
DATA: ROT.
Erstmal die Überschrift hinstellen
PERFORM ADDZEILE USING '>+' '
PERFORM ZEILEUMB USING '' PROGNAME.
PERFORM ADDZEILE USING '->' '
CLEAR HTMLCODE-LINE.APPEND HTMLCODE.
Link auf Includes
IF MITINCLD = 'X'.
PERFORM ADDZEILE USING '>+' '
PERFORM ZEILEUMB USING '' '[Includes | #Includes]'.
PERFORM ADDZEILE USING '->' '
ENDIF.
Link auf Textelemente
IF MITTEXTL = 'X'.
PERFORM ADDZEILE USING '>+' '
PERFORM ZEILEUMB USING ''
'[Textelemente | #Textelemente]'.
PERFORM ADDZEILE USING '->' '
ENDIF.
Und Linie zum Trennen gegen den Quellcode
PERFORM ADDZEILE USING '>+' ''.
Und jetzt der Quellcode
PERFORM CODELINES.
ENDFORM. " WRITE_SOURCE
*& Form ADDZEILE
Fügt eine Zeile in den HTML-Code ein und korrigiert Einrücktiefe
FORM ADDZEILE USING VALUE(EINRUECKEN) LIKE CHAR2
VALUE(TEXT).
DATA: ER.
ER = EINRUECKEN(1).
IF ER = '+'.
EINRUECK = EINRUECK + 1.
ELSEIF ER = '-'.
EINRUECK = EINRUECK - 1.
ENDIF.
CLEAR HTMLCODE.
HTMLCODE+EINRUECK = TEXT.
APPEND HTMLCODE.
ER = EINRUECKEN+1(1).
IF ER = '+'.
EINRUECK = EINRUECK + 1.
ELSEIF ER = '-'.
EINRUECK = EINRUECK - 1.
ENDIF.
ENDFORM. " ADDZEILE
*& Form SONDERZEICHEN
Sonderzeichen in HTML darstellen
FORM SONDERZEICHEN CHANGING ZEILE.
DATA: S LIKE SY-SUBRC,
LASTHIT LIKE SY-FDPOS,
DUMMY(256).
LASTHIT = 0.
DO.
DUMMY = ZEILE+LASTHIT.
IF DUMMY CA '&'.
REPLACE '&' WITH '&' INTO DUMMY.
ZEILE+LASTHIT = DUMMY.
LASTHIT = SY-FDPOS + LASTHIT + 1.
ELSE.
EXIT.
ENDIF.
ENDDO.
ÄÖÜäöüß<>"
DO.
S = 1.
REPLACE 'Ä' WITH 'Ä' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'Ö' WITH 'Ö' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'Ü' WITH 'Ü' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'ä' WITH 'ä' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'ö' WITH 'ö' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'ü' WITH 'ü' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'ß' WITH 'ß' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE '<' WITH '<' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE '>' WITH '>' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE '"' WITH '"' INTO ZEILE. S = S * SY-SUBRC / 4.
IF S = 1.EXIT.ENDIF.
ENDDO.
ENDFORM. " SONDERZEICHEN
*& Form ZEILEUMB
text
FORM ZEILEUMB USING VALUE(EINRUECKEN) LIKE CHAR2
VALUE(TEXT).
CONCATENATE TEXT '
' INTO TEXT.
PERFORM ADDZEILE USING EINRUECKEN TEXT.
ENDFORM. " ZEILEUMB
*& Form CODELINES
Schiebt die Zeilen aus sourcecode ins HTML-Format
FORM CODELINES.
DATA ZEILE(5).
PERFORM ADDZEILE USING '>+' '
LOOP AT SOURCECODE.
Erst mal die Sonderzeichen ersetzen
PERFORM SONDERZEICHEN CHANGING SOURCECODE-LINE.
Bei einem Kommentar diesen Rot und kursiv darstellen
IF SOURCECODE-LINE(1) = '*'. " roter Kommentar
CONCATENATE '+'
SOURCECODE-LINE
'+'
INTO SOURCECODE-LINE.
ENDIF.
Bei Zeilennummerierung diese in dunkelblau dazustellen
IF MITZEILE = 'X'.
ZEILE = SY-TABIX.
SHIFT SOURCECODE-LINE RIGHT BY 35 PLACES.
CONCATENATE ''
ZEILE
INTO SOURCECODE-LINE(35).
ENDIF.
PERFORM ADDZEILE USING '' SOURCECODE-LINE.
ENDLOOP.
PERFORM ADDZEILE USING '->' '
ENDFORM. " CODELINES
*& Form WRITE_INCLUDES
Die ganzen Includesources anfügen
FORM WRITE_INCLUDES.
DATA: FIRSTTIME.
FIRSTTIME = 'X'.
SELECT * FROM D010INC WHERE MASTER = PROGNAME.
IF SAPINCLD = 'X'
AND D010INC-INCLUDE(1) = '<'.
CONTINUE.
ENDIF.
IF FIRSTTIME = 'X'.
PERFORM ADD_INCLUDES_HEADER.
CLEAR FIRSTTIME.
ENDIF.
Die Namen der Includes merken und nacher am Anfang in den Quellcode
als Navigationspunkte hinzufügen
APPEND D010INC-INCLUDE TO INCLUDETAB.
Namen und Quelltext schreiben
PERFORM ADD_INCLUDE_NAME USING D010INC.
READ REPORT D010INC-INCLUDE INTO SOURCECODE.
PERFORM CODELINES.
ENDSELECT.
ENDFORM. " WRITE_INCLUDES
*& Form ADD_INCLUDES_HEADER
Für den 1. Include eine kleine Sonderbehandlung
FORM ADD_INCLUDES_HEADER.
HTMLCODE-LINE = ''. APPEND HTMLCODE.
ENDFORM. " ADD_INCLUDES_HEADER
FORM ADD_INCLUDE_NAME *
--> UEBERGABE *
FORM ADD_INCLUDE_NAME USING UEBERGABE LIKE D010INC.
HTMLCODE-LINE = ' '. APPEND HTMLCODE.
ENDFORM. " ADD_INCLUDE_NAME
*& Form WRITE_TEXTELEMENTE
Textelemente des Hauptprogramms auch noch ausgeben
FORM WRITE_TEXTELEMENTE.
PERFORM TEXTELEMENTE_HEADER.
READ TEXTPOOL PROGNAME INTO TEXTELEMENTETAB.
PERFORM HTML_TEXTELEMENTE USING 'im Hauptprogramm'.
LOOP AT INCLUDETAB.
READ TEXTPOOL INCLUDETAB-NAME INTO TEXTELEMENTETAB.
CHECK SY-SUBRC = 0.
PERFORM HTML_TEXTELEMENTE USING INCLUDETAB-NAME.
ENDLOOP.
ENDFORM. " WRITE_TEXTELEMENTE
*& Form TEXTELEMENTE_HEADER
FORM TEXTELEMENTE_HEADER.
HTMLCODE-LINE = ''. APPEND HTMLCODE.
ENDFORM. " TEXTELEMENTE_HEADER
*& Form HTML_TEXTELEMENTE
text
FORM HTML_TEXTELEMENTE USING WOHER.
DATA: WOHERNAME(80),
TID(80),
TKEY(80),
TENTRY(80).
WOHERNAME = WOHER.
PERFORM SONDERZEICHEN CHANGING WOHERNAME.
Das Ganze als Tabelle rauswerfen
HTMLCODE-LINE = '
'.APPEND HTMLCODE.
CONCATENATE '
' WOHERNAME '' INTO HTMLCODE-LINE.APPEND HTMLCODE.
HTMLCODE-LINE = '
'.APPEND HTMLCODE.
LOOP AT TEXTELEMENTETAB.
TID = TEXTELEMENTETAB-ID.
TKEY = TEXTELEMENTETAB-KEY.
TENTRY = TEXTELEMENTETAB-ENTRY.
und HTML-Sonderzeichen ersetzen
PERFORM SONDERZEICHEN CHANGING TID.
PERFORM SONDERZEICHEN CHANGING TKEY.
PERFORM SONDERZEICHEN CHANGING TENTRY.
HTMLCODE-LINE = ''.APPEND HTMLCODE.
CONCATENATE '' INTO HTMLCODE-LINE.
APPEND HTMLCODE.
CONCATENATE '' INTO HTMLCODE-LINE.
APPEND HTMLCODE.
CONCATENATE '' INTO HTMLCODE-LINE.
APPEND HTMLCODE.
HTMLCODE-LINE = ''.APPEND HTMLCODE.
ENDLOOP.
HTMLCODE-LINE = '
' TID '
' TKEY '
' TENTRY '
'.APPEND HTMLCODE.
HTMLCODE-LINE = '
'.APPEND HTMLCODE.
ENDFORM. " HTML_TEXTELEMENTE
Regards
Rakesh -
Capturing cursor output in HTML format
Hi,
I want to capture Cursor's output in html format.
following is the current query which is giving me output as mentioned below it
Query:-
declare
v_msgtext varchar(4000);
cursor c_query IS
select emp_no,emp_name,salary
from employees
where dept_id = 100;
begin
for v_query in c_query LOOP
v_msgtext = v_msgtext ||
'empno:'|| v_query.emp_no||','||
'emp_name:'||v_query.emp_name||'.'||
'emp_salary:'||'v_query.salary'||
char(13)||char(10);
END LOOP;
utl_mail.send(v_sender, v_recipient, NULL, NULL, v_subject, v_msgText, 'text/html; charset=windows-1250', NULL);
end;
o/p:-
empno: 123,emp_name:sagar,emp_salary:10,000
empno: 124,emp_name:neeraj,emp_salary:20.000
empno: 125,emp_name:ashish,emp_salary:18.000
empno: 126,emp_name:ramesh,emp_salary:5.000
empno: 127,emp_name:suresh,emp_salary:30.000
I want to generate the output as HTML report in tabular format with the below columns
(empno,emp_name,salary) and send this html file via email to user.
Can anybody please suggest a solution ASAP.
Thanks in advance.Hi ,
Please follow the below link may it will be useful for you.It shows how to generate a HTML format output through the query.
oracle - Within a PL/SQL procedure, wrap a query or refcursor in HTML table - Stack Overflow
Maybe you are looking for
-
Grouping PO Lines according to Tax Codes
Hi All, I have a query,in my report when i pass the po_number,it prints the po details and line details.For each line i have taxes also. For Example if i have 5 lines (1,2,3,4,5). For 1st,2nd and 3rd line's have a,b,c,d as the taxes and for 4th and 5
-
HT201317 shared photostream appears to have stopped updating
My shared photostream appears to have stopped updating to other users, any thoughts as to why this may have happened? It has worked for the last 3 weeks with no problems, I still have 4.8gb of iCloud storage and I have only uploaded 83 pictures.
-
Message that resolution is not optimal
I have not had a problem with iPhoto until this evening when the following message appeared: "The current screen resolution is not optimal for iPhoto." I haven't changed any settings on my MBPro and have not seen this message before. How can I correc
-
Trying to use a Rotating Banner Script
Hi All, I know that some of you are very well versed in iWeb '08 so I thought my question could be answered here. I would like to use a rotating banner script on each of the pages on my iWeb made website on the .mac server. I'm not sure how to do thi
-
HT201210 do you have a link to reset I pod I don't have a pc
I need a link to reset and updat my ipod touch