How to Convert Variable containing HTML to be read as HTML in HTML region
To understand the question, I have a table storing generated HTML by user and report type:
USER | REPORT_TYPE | HTML_GENERATED
----------------------------------------------------------------------------------------|
TEST_USER | TEST | <HTML><head><title></title></head><BODY>TEST</BODY></HTML> |On the page exists a process using a PL/SQL anonymous block which is set to "On Load Before Header". Here is a portion of it:
SELECT HTML_GENERATED into :P2_HTML
from LN_DOCUMENT_LABELS
where USER = :app_user AND REPORT_TYPE = 'TEST';The idea is to generate all the HTML behind the scenes in another package.
There exists a single Item on the page to store the variable into:
P2_HTML (Hidden) Then I created an HTML region, and within that region I wanted to call in the item so I entered:
&P2_HTML.The result simply displays the HTML code:
<HTML><head><title></title></head><BODY>TEST</BODY></HTML>Is there a way to force it to be the result of HTML code when the page renders?
TEST
KylePN wrote:
To understand the question, I have a table storing generated HTML by user and report type:
USER | REPORT_TYPE | HTML_GENERATED
----------------------------------------------------------------------------------------|
TEST_USER | TEST | <HTML><head><title></title></head><BODY>TEST</BODY></HTML> |
Hopefully that's just poorly chosen sample HTML? APEX page templates already include those elements. Trying to output a complete HTML document inside an APEX page generally results in a mangled, inoperative mess.
On the page exists a process using a PL/SQL anonymous block which is set to "On Load Before Header". Here is a portion of it:
SELECT HTML_GENERATED into :P2_HTML
from LN_DOCUMENT_LABELS
where USER = :app_user AND REPORT_TYPE = 'TEST';The idea is to generate all the HTML behind the scenes in another package. In APEX it's not necessarily a good idea. Why use this approach rather than existing APEX features?
There exists a single Item on the page to store the variable into:
P2_HTML (Hidden) Then I created an HTML region, and within that region I wanted to call in the item so I entered:
&P2_HTML.The result simply displays the HTML code:
<HTML><head><title></title></head><BODY>TEST</BODY></HTML>Is there a way to force it to be the result of HTML code when the page renders?
TEST
Hidden page items these will always be escaped when referenced as static text substitution strings. (You may indeed have done this in previous versions of APEX at some point in the past, but there have been incremental restrictions introduced in several recent APEX versions.)
Instead of a hidden page item, use an application item, or a Display Only page item with display Condition set to Never.
Similar Messages
-
How to convert variables on program to shared variables?
Hi I want the controls and indicators of an already existing programs to be available on the Data Dashboard of a tablet/phone. What are the steps to follow if I want to convert them into shared variables so that I can send them to the dashboard. I just found results on how to create new shared variables.
Also the existing program is a state machine. So will the variables be available on the dashboard simulteneously or is it possible to visualise the controls in the form of multiples tabs on Dashboard, like it is on the original program?I don't know of any way to convert the controls to shared variables. You're going to have to create the shared variables fresh and wire them up in a way that makes sense for your application.
As for tabs...kind of. Each dashboard can be configured to have different screens and you can move between them. This is probably the guide you want to follow:
http://www.ni.com/white-paper/13757/en/ -
How to convert string containing comma seperated values to an array
my requirement is i have to first convert an comma seperated string to an array
after that i have to pass the array values to a for loop
eg:i have a string str=(456,457,487,465,478)
These values i have to put in an array.
i then i have to pass the array values to a for loopWe understand your ¿homeworks? We are helping you, but it seems like you want us to do it.
Try it yourself with some of the instructions.
Anyway if there aren´t homeworks, use dinamyc sql:
declare
varray := '(45,65,12,4)';
begin
execute immediate 'update table set ss=''uu'' where id in ' || varray;
end; -
How to convert .ase files to text or read .ase files
wondering if theres a way to open up my saved .ase files as a text file.
Use the open command on your text editor.
Not sure you can use this much as it is not like postscipt where you can read all the code, as much is in hexadecimal.
I opened this with textedit on mac. -
How to convert following ABAP routine into Java
Hi Experts
I m new to IPC
How to convert following ABAP routine int java
READ TABLE XKOMV INTO XKOMV_AUX WITH KEY
KSCHL = 'ZCU2'
KPOSN = komp-kposn.
IF SY-SUBRC EQ 0.
MOVE XKOMV_AUX-KWERT TO XKWERT.
MOVE XKOMV_AUX-KBETR TO XKOMV-KBETR.
w_kwert = xkomv_aux-kwert * -1.
DO any one has documentation on convertion of abap routines into java
Thanks & Regards
SowmyaHi sowmya,
download this document through this u can solveur problem
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/107adc1a-0501-0010-de8e-973e0fb4049b
Reward if helps
Regards
Manohar -
How to convert kindle files to read on iBook
I would like to read a book from Kindle on iBook on my iPad. Does anyone know how to convert a Kindle book file for reading using iBook?
Pogo is correct. The cloud for your kindle books maintained by amazon is good for multiple devices and can be accessed by the kindle reader on the app store. Pretty easy instructions on setup are included.
-
How to convert a Word document to text or html in an ABAP program
Hi,
At my client's site, for the recruitment system, they have the word processing system set to RTF, instead of SAP Script. This means that all the correspondence is in Word format. A standard SAP program takes the word letter, loads word, does the mail merge with the applicant's info and then sends the document to a printer.
The program name is RPAPRT05. The program creates a document proxy (interface I_OI_DOCUMENT_PROXY) and manipulates the document using the methods of the interface.
Now what we want to do is to instead of sending the document to a printer, we want to email the document contents to the applicant. But I don't know how to get the content from the Word document into text or html format so that I can make an email from it.
I know I can send an email with the word document as an attachment, but we'd prefer not to do that.
I would appreciate any help very much.
ThanksOk, here's what I ended up doing:
First of, in order to call FM 'CONVERT_RTF_TO_ITF' you need the RTF document in a table with line length 156. The document is returned from FM 'DP_CREATE_URL' in a table with line length 132. So first I convert the table:
Transform data table from 132 character lines to
256 character lines
LOOP AT data_table INTO dataline.
IF newrow = 'X'.
Add row to new table
APPEND INITIAL LINE TO xdatatab ASSIGNING .
newrow = space.
ENDIF.
Convert the raw line of old table to characters
ASSIGN dataline TO .
Check line lengths to determine how to add the
next line of old table
newlinelen = STRLEN( newline ).
ADD addspaces TO newlinelen.
linepos = linemax - newlinelen.
IF linepos > datalen.
Enough space available in new table line for all of old table line
newline+newlinelen = oldline.
oldlinelen = STRLEN( oldline ).
addspaces = datalen - oldlinelen.
CONTINUE.
ELSE.
Fill up new table line
newline+newlinelen(linepos) = oldline(linepos).
ASSIGN newline TO .
newrow = 'X'.
Save the remainder of old table to the new table line
IF linepos < datalen.
oldlinelen = STRLEN( oldline ).
addspaces = datalen - oldlinelen.
CLEAR newline.
newline = oldline+linepos.
ELSE.
CLEAR newline.
ENDIF.
ENDIF.
ENDLOOP.
Write the last line to the table
IF newrow = 'X'.
APPEND INITIAL LINE TO xdatatab ASSIGNING .
Next I call FM 'CONVERT_RTF_TO_ITF' to get the document in SAPScript format:
Convert the RTF format to SAPScript
CALL FUNCTION 'CONVERT_RTF_TO_ITF'
EXPORTING
header = dochead
x_datatab = xdatatab
x_size = xsize
IMPORTING
with_tab_e = withtab
TABLES
itf_lines = itf_table
EXCEPTIONS
invalid_tabletype = 1
missing_size = 2
OTHERS = 4.
This returns the document still containing the mail merge fields which needs to be filled in:
LOOP AT itf_table INTO itf_line.
WHILE itf_line CS '«'.
startpos = sy-fdpos + 1.
IF itf_line CS '»'.
tokenlength = sy-fdpos - startpos.
ENDIF.
token = itf_line+startpos(tokenlength).
REPLACE '_' IN token WITH '-'.
ASSIGN (token) TO .
ENDIF.
MODIFY itf_table FROM itf_line.
ENDWHILE.
ENDLOOP.
And finally I use FM 'CONVERT_ITF_TO_ASCII' to convert the SAPScript to text. I set the line lengths to 60, since that's a good length to format emails to.
Convert document to 60 char wide ascii document for emailing
CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
EXPORTING
formatwidth = 60
IMPORTING
c_datatab = asciidoctab
x_size = documentsize
TABLES
itf_lines = itf_table
EXCEPTIONS
invalid_tabletype = 1
OTHERS = 2.
And then the text document gets passed to FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' as the email body. -
How to convert table content into html format?
Hi,
Experts,
How to convert internal data into HTML format is there any function module or piece of code to download content into HTML.
Thank u,
Shabeer Ahmed.Then use this code....
REPORT ytest_table_html1.
* D A T A D E C L A R A T I O N
*-HTML Table
DATA:
t_html TYPE STANDARD TABLE OF w3html WITH HEADER LINE,
" Html Table
*- Declare Internal table and Fieldcatalog
it_flight TYPE STANDARD TABLE OF sflight WITH HEADER LINE,
" Flights Details
it_fcat TYPE lvc_t_fcat WITH HEADER LINE.
" Fieldcatalog
*-Variables
DATA:
v_lines TYPE i,
v_field(40).
*-Fieldsymbols
FIELD-SYMBOLS: <fs> TYPE ANY.
* S T A R T - O F - S E L E C T I O N
START-OF-SELECTION.
SELECT *
FROM sflight
INTO TABLE it_flight
UP TO 20 ROWS.
* E N D - O F - S E L E C T I O N
END-OF-SELECTION.
*-Fill the Column headings and Properties
* Field catalog is used to populate the Headings and Values of
* The table cells dynamically
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
ct_fieldcat = it_fcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
DELETE it_fcat WHERE fieldname = 'MANDT'.
t_html-line = '<html>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<thead>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<td><h1>Flights Details</h1></td>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '</thead>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<table border = "1">'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
*-Populate HTML columns from Filedcatalog
LOOP AT it_fcat.
CONCATENATE '<th bgcolor = "green" fgcolor = "black">'
it_fcat-scrtext_l
'</th>' INTO t_html-line.
APPEND t_html.
CLEAR t_html.
ENDLOOP.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
DESCRIBE TABLE it_fcat LINES v_lines.
*-Populate HTML table from Internal table data
LOOP AT it_flight.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
*-Populate entire row of HTML table Dynamically
*-With the Help of Fieldcatalog.
DO v_lines TIMES.
READ TABLE it_fcat INDEX sy-index.
CONCATENATE 'IT_FLIGHT-' it_fcat-fieldname INTO v_field.
ASSIGN (v_field) TO <fs>.
t_html-line = '<td>'.
APPEND t_html.
CLEAR t_html.
t_html-line = <fs>.
APPEND t_html.
CLEAR t_html.
t_html-line = '</td>'.
APPEND t_html.
CLEAR t_html.
CLEAR v_field.
UNASSIGN <fs>.
ENDDO.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
ENDLOOP.
t_html-line = '</table>'.
APPEND t_html.
CLEAR t_html.
*-Download the HTML into frontend
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\Flights.htm'
TABLES
data_tab = t_html
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.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*-Display the HTML file
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
document = 'C:\Flights.htm'
operation = 'OPEN'
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
synchronous_failed = 8
not_supported_by_gui = 9
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.
none of the above function modules r obsolete... -
How to convert xml to html?
Scenario -> There are two systems, one is SAP CRM and another is Non-SAP system. A log file is coming from non-sap system through proxy class and consumed into SAP CRM. This log file contains some xml format which is given below and the xml format need to be converted into html format.
Example ->
DataInstance types such as 'text', 'integer', 'datetime', 'date', 'time' and 'real' can be restricted to a "range" of available options for selection by a user. The value returned to the Web Service should always be a single value. If a list of range values is provided then the return value must be one of the listed range values.
XML view:
<DataInstance>
<Name>time_of_day</Name>
<Description>Is is morning or afternoon?</Description>
<Type>text</Type>
<Ranges>
<Range>
<Caption>morning</Caption>
<Value>morning</Value>
</Range>
<Range>
<Caption>afternoon</Caption>
<Value>afternoon</Value>
</Range>
</Ranges>
<Values>
<Value>morning</Value>
</Values>
</DataInstance>
HTML view:
Time of day
Is it morning or afternoon?
(.)morning
()afternoon
() -> It is a radio button.
Can you please suggest me how to do this conversion?You can read both an XML and a well defined HTML document, using an XML parser. Although some HTML docs aren't well defined, ie. they don't strictly have matching begin & end tags, so an XML parser might reject them.
Check out http://jakarta.apache.org/poi/ for Java interfaces to Ms Word functionality. It's basically a wrapper to the Ms Word COM objects.
regards,
Owen -
How to convert html file to master file in sharepoint branding
How to convert HTML file to master file in SharePoint branding Programmatically
Hi,
According to your post, my understanding is that you want to convert HTML file to master file.
You can use Design Manager to achieve it.
On STEP 4 Edit Master Pages and clicked on the option at the top to
Convert an HTML file to a SharePoint master page.
Once completed, make sure the Status is set to Conversion Successful
For more information, please refer to:
SharePoint 2013 – Design Manager – Convert HTML to Master Page
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Proc C - How to convert datetime variable in Proc C into C?
Hi,
Does anyone know how to convert a datetime variable in Pro C into C?
For Example,
Order_Table with OrderId and OrderDate fields.
How do I compare the OrderDate with the system datetime in Pro C or C?
Thank you.Maybe this will help:
http://asktom.oracle.com/~tkyte/Misc/CTime.html -
HOW TO CONVERT A XML FILE TO HTML FILE FORMAT IN WINDOWS APPLICATION
Hi iam a fresher iam working on a project in that i should convert the data in xml file to html file. I dont have any idea regarding this can anyone help me how to convert the xml file to a html file format. I just written the code till how to read the xml
file. Now i stucked how to write the code for converting to html format.
Thanks and Regards,
Dileep.Hi iam a fresher iam working on a project in that i should convert the data in xml file to html file. I dont have any idea regarding this can anyone help me how to convert the xml file to a html file format. I just written the code till how to read the xml
file. Now i stucked how to write the code for converting to html format.
Thanks and Regards,
Dileep.
Hello,
For converting xml file to html, we could refer to the way shared in the following thread which uses an XSLT stylesheet to transform the XML into another format using the
XslTransform class.
http://www.codeproject.com/Articles/12047/How-to-Convert-XML-Files-to-HTML
Regards.
Carl
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to convert an int variable into Number
Hi all,
I am using Jdeveloper 11.1.1.2
When I insert a row in a entity object I want to create another row in another entity object, but when I am setting the attribute for the new row I have a problem.
Here is the code:
int a = EO1Impl.paramA;
NameEO2Impl.setAttribute("Attribute1", a);
The error is that variable a is an int, while Attribute1 is a Number.
How can convert an int to a Number.
Thank you.Andrea9,
If a, as you say is an int, and assuming you mean an oracle.jbo.domain.Number,
NameEO2Impl.setAttribute("Attribute1", new oracle.jbo.domain.Number(a));works just fine.
John -
How to convert an int variable into String type
hi everybody
i want to know how to convert an interger variable into string variable
i have to implement a code which goes like this
Chioce ch;
for(int i=0;i<32;i++)
// here i need a code to convert the int variable i into a string variable
ch.add(String variable);
how do i convert that int variable i into a String type variable??
can anyone help me?Different methods:
int a;
string s=a+"";or
String.valueOf(int) is the better option because Int.toString() generated an intermediate object to get the endresult
Ema -
How to convert CLOB data (now it is in html format) to Normal text format
Hi,
Can anybody let me know the solution for how to convert CLOB data into normal Text.In my case the table column having CLOB datatype and the data is in html format.when i run the report the column is displaying html tags .Now i need to convert that html tags into normal text.
Pl. let me know if any one know the solution.
Regards,
Thulasi.KLONG has been depricated since 8i so I don't believe there is a general solution to go backwards short of reloading the data.
Justin
Maybe you are looking for
-
Error while sending FAX using FM
Hi All, I am trying to send fax using FM SO_NEW_DOCUMENT_SEND_API1. Fax number of format AANNNNNNNN(A-area code and N-Fax number) and passing country LAND field in receiver table AU. When program ran I can see the entry in SCOT under fax for wait
-
Cost of Goods Sold Accounts by Region
Hi Friends, While doiing the GL settings base on Item Groups, there is an option to set the Revenue Account based on Domestic.EU.Foreign. Bu why is there no Cost of Goods of Sold accounts based on that. Is Cost of Goods Sold account use for calculati
-
HOW TO: Open SQL Developer from a batch file with specific tables opened
I use SQL Developer daily as I develop database intensive programs. ** Question ** How can I define a specific configuration of tabs (i.e. tables, procedures, etc) to be opened upon startup of SQL Developer? For example, creating a .BAT file to open
-
Pls. identify some seeded views used as Existing Data Source in DBI Reports
Hi! Can someone please identify some seeded views used as Existing Data Source in DBI Reports. I only need some idea how they are defined. Thanks.
-
Xsd:dateTime formatting problems
This is driving me nuts. I've been playing around with JAXB and it has worked great so far. Until now. I have an xml file with this little block <timestamps> <created>2000-03-04T20:00:00Z</created> <last_modified>2003-03-14T02:20:02-05