Print clob type
How to print a clob type? I cannot do it using htp.p because the parameter's type is varchar2. I need clob type because the column content is more than 4000 chars (the maximum of varchar2 type).
thanks,
Jan
you can create a procedure that cuts your CLOB file into VARCHAR2(4000) variables with a loop and read the concatenated results in your browser.
It works fine for me :
Create or Replace MY_PROCEDURE
as
locator_var CLOB;
amount_var INTEGER;
offset_var INTEGER;
output_var VARCHAR2(4000);
length_var INTEGER;
counter INTEGER;
i integer;
begin
select MY_CLOB into locator_var from MY_TABLE where CONDITION;
length_var := DBMS_LOB.GETLENGTH(locator_var);
counter := CEIL(length_var/4000);
-- set the variables
offset_var := 1;
-- check that the length left to read is more or less than 4000 chars--
if length_var >= 4000 then
amount_var := 4000;
else amount_var := length_var;
end if;
-- cuts the CLOB into as many pieces as we need and prints it into the browser.
-- if the text is HTML code, the HTML page will be displayed
for i in 1..counter
loop
DBMS_LOB.READ(locator_var, amount_var, offset_var, output_var);
htp.p(output_var);
offset_var := offset_var + 4000;
length_var := length_var - 4000;
if length_var >= 4000 then
offset_var := 4000;
else offset_var := length_var;
end if;
end loop;
end;
I hope this helps.
Bertrand.
Similar Messages
-
Hello everybody,
I am working on uploading file from page to another one using HTP package, but whenever I submit the form, it only takes the filename without the full path.
for example :
if i sent 'c:\dir\a.txt' , the other page receives file parameter as 'a.txt'
the code is here
PROCEDURE upload(appno in varchar2,wsct in varchar2) AS
l_real_name VARCHAR2(1000);
BEGIN
HTP.htmlopen;
HTP.headopen;
HTP.title('Test Upload');
HTP.headclose;
HTP.bodyopen;
HTP.header(1, 'Test Upload');
HTP.print('<form action="https://ssltrng.uaeu.ac.ae/trng/document_api.upload1" method="get">');
HTP.print(' File to upload: <input type="file" name="file" >
HTP.print(' <input type="submit" value="Upload">');
HTP.print('</form>');
HTP.bodyclose;
HTP.htmlclose;
END upload;
the other page see it as
file is 'Water lilies.jpg'
Thanks
Edited by: dtabed on Mar 30, 2011 1:02 AMDo not understand the problem.
The code you've posted is a PL/SQL web enabled procedure that produces a dynamic HTML page. This page contains a form. And a full URL reference to the CGI that will process the form's data.
This is unusual - as it seems to be that the form is submitted across domains and web servers.. You usually refer to a local CGI procedure to deal with a form - no need for a fully qualified URL that includes web server and domain name.
If the CGI procedure that receives the form is also a PL/SQL web enabled procedure, that the uploaded file will be placed in the documents table (as defined in the DAD alias) by mod_plsql, prior to the web enabled procedure being called. The documents table will contain the Mime type, file name, file contents and other details. -
JDBC ADPATER - "Unsupported feature" in XI with CLOB type
Hi experts,
I have 15 patch XI level. In a stored procedure i use an in and out parameter with CLOB type. I get the exception:
com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'XXXX'): java.sql.SQLException: Unsupported feature
If i change the type CLOB by VARVHAR in the XI's XML (Design: Integration Buider), all works fine.
The strored procedure has this parameter like CLOB.
My question is
Is not possible to use the CLOB type?
SAP recognize that it, it's possible:
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
Sorry for my english. Thanks in advance.Hi,
Please make sure you use the 10.x driver for full stored procedure CLOB support.
A CLOB is a not comparable Datatype in SQL.
Regards,
Prateek -
HI All
I have AQ table and queue of object type. The object contains only one CLOB type field.
I tried to enqueue some message using OCI functions but I got error message:
OCI Error <25215> - ORA-25215: user_data type and queue type do not match.
I'm using struct defined as below:
struct message
OCILobLocator * data;
Does anyone know how to use CLOB object with OCI functions or maybe there is better type to enqueue hude messages??
Thank you.U just have to define a rule when creating a subscriber to your queue.
-
Problem importing printer device type using RSTXSCRP
Hello,
Referring to sapnote 8928 I have extracted 6 printer device types that I wish to import into our dev box.
(note: I am trying this on our sandbox first).
However, the readme instructions for performing the import using RSTXSCRP are out of date or not complete for all SAP versions. For one they refer to a radio button that does not exist in our version of . (note: RSTXSCRP is also the ABAP called when doing the import from SPAD).
In addition, when attempting the import, I receive a popup box requesting a package. Since I have never used packages I am at a loss. There is no option to create a new one, as when I created transports back when I did ABAP.
I can save these as local objects, but they are then not transportable. I wish to be able to transport these through the landscape as they go to production. I really do not want to do a bunch of individual imports in every system, since I would need to do so for R3, BW, APO, etc.
So long into short: How do I import printer device types using either RSTXSCRP or SPAD and have them transportable?Prabhu, Thank you, but this does not answer the question. It only repeats the information I already have.
How do I enter the package information when I do not have it, do not know how to get it or how to create a new one.
I have been out of directly working with SAP for a couple years and have only recently returned.
This is apparently such a basic thing it is not even in any of the documentation I can find. -
Hi All,
Can Anyone please tell how to compare clob type in select query with where condition ?
Ex: field: Desc_ short(Clob )
field ean_code(number,pk)
And i want to see those ean_code list matching to particullar clob pattern matching in the record in any where in the record.
Please help.
Thanks and regards,
DK.COMPARE function
This function compares two entire LOBs or parts of two LOBs. You can only compare LOBs of the same datatype (LOBs of BLOB type with other BLOBs, and CLOBs with CLOBs, and BFILEs with BFILEs). For BFILEs, the file must be already opened using a successful FILEOPEN operation for this operation to succeed.
COMPARE returns zero if the data exactly matches over the range specified by the offset and amount parameters. Otherwise, a non-zero INTEGER is returned.
For fixed-width n-byte CLOBs, if the input amount for COMPARE is specified to be greater than (4294967295/n), then COMPARE matches characters in a range of size (4294967295/n), or Max(length(clob1), length(clob2)), whichever is lesser.
Syntax
DBMS_LOB.COMPARE (
lob_1 IN BLOB,
lob_2 IN BLOB,
amount IN INTEGER := 4294967295,
offset_1 IN INTEGER := 1,
offset_2 IN INTEGER := 1)
RETURN INTEGER;
DBMS_LOB.COMPARE (
lob_1 IN CLOB CHARACTER SET ANY_CS,
lob_2 IN CLOB CHARACTER SET lob_1%CHARSET,
amount IN INTEGER := 4294967295,
offset_1 IN INTEGER := 1,
offset_2 IN INTEGER := 1)
RETURN INTEGER;
DBMS_LOB.COMPARE (
lob_1 IN BFILE,
lob_2 IN BFILE,
amount IN INTEGER,
offset_1 IN INTEGER := 1,
offset_2 IN INTEGER := 1)
RETURN INTEGER;
Pragmas
pragma restrict_references(COMPARE, WNDS, WNPS, RNDS, RNPS);
Parameters
Table 17-7 COMPARE Function Parameters
Parameter Description
lob_1 LOB locator of first target for comparison.
lob_2 LOB locator of second target for comparison.
amount Number of bytes (for BLOBs) or characters (for CLOBs) to compare.
offset_1 Offset in bytes or characters on the first LOB (origin: 1) for the comparison.
offset_2 Offset in bytes or characters on the first LOB (origin: 1) for the comparison.
Returns
INTEGER: Zero if the comparison succeeds, non-zero if not.
NULL, if
amount < 1
amount > LOBMAXSIZE
offset_1 or offset_2 < 1
offset_1 or offset_2 > LOBMAXSIZE
Exceptions
Table 17-8 COMPARE Function Exceptions for BFILE operations
Exception Description
UNOPENED_FILE
File was not opened using the input locator.
NOEXIST_DIRECTORY
Directory does not exist.
NOPRIV_DIRECTORY
You do not have privileges for the directory.
INVALID_DIRECTORY
Directory has been invalidated after the file was opened.
INVALID_OPERATION
File does not exist, or you do not have access privileges on the file.
http://www.java2s.com/Code/Oracle/System-Packages/Usedbmslobcomparetocompare.htm -
I want to print grey type on black cover stock.
I want to print grey type on black cover stock. I'd like the type to be the equivalent of a 20% grey in PhotoShop. I'm told setting the black (K) to 20% won't work. How then do I get my grey?
You have to be careful with drying times to avoid offset at the press.
And you also have to be mindful of reversing out type on a dark background.
It would look better if they used 50% Cyan and 100% Black - or 50% magenta would give a warmer hue to the black.
But that would make it easier to print the 20% gray into the white areas that remain.
And because it's going to knockout you have to be mindful of not using small type, thin fonts, or serifs as they could potentially fill in.
It's also wise to add a bit of extra tracking to the letters to separate them a bit more so that it doesn't break away on the plate.
For digital reproduction you don't need to worry about most of those - but if it's a large print run then printing digital is going to be very expensive. For short print runs it may not be.
But for digital large areas of ink coverage are prone to streaking and you may not get the desired effect.
In short
If it's a large print run talk to your printers about the best practice for setting up your Rich Black and caveats that interfer with your legibility of the text on the front cover.
It's a short print run consider having the cover screen printed rather than digitally printed. -
Print format type changed from 1024 to 255, when selecting 1024
Hi,
when i execute a Z report, with Print format type, X_65_1024/4, it changes to X_65_255 , when i see in the spool and the data is wrapped around.
What is the reason for this.See knowledgebase article [1548872|http://service.sap.com/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=1548872]
Cheers, Uwe -
How to print difftrent types of materials?
Hi ABAPer Friends,
I want to print difrent types of materials as our condition.
I know all abapers about materials, materials are different types and those are RAW MATEREIAL,FINISHED PRODUCT and SEMI FINISHED MATERIAL and diffrent types there.What is the exact code of suppose i take the material of RAW MATERIAL what is the code?
and i take SEMI FINISHED PRODUCT MATERIAL print only that material what type or how many types are there in particular material i want only that material output.Please understand my question i request to all members.This is the minimum real time question in any company.
Suppose i take RAW MATERIAL the output is like this way,this is example
MATERIAL NO MATERIAL TYPE
97979090990 ROH1 or 1ROH
54354354354 ROH2 or 2ROH
I want the output this type of scenario.
Any body tell i will really appreciate and heartful thanks.you have to use condition statements to print sll the different materials.
-
Print HTML using JPS API.. How to configure printer MIME-TYPE as text/html
Hi All,
I have to print the HTML pages.. for this i have used JPS API , but i found that my printer doesnt supoort Mime-type(Flavour) text/html.
Can someone help me in this ...
i) Can i configure my printer for this Mime-type , if yes then HOW?
ii) Is there any work around ?
Thank you all in advance :)I reposted this question in the Database forum. Admin can feel free to delete this thread.
The answer is to add this at the top: htp.addDefaultHTMLHdr(false);
Thanks,
T.
Edited by: 855677 on May 3, 2011 9:35 AM -
How to print true type font in smartform with ECC6
hi,expert:
I want to use true type font "Comic Sans MS.ttf".
I upload this font file by SE73 named ZTT2I.
In SE73.. select the Radio button "Font Families" And click on the "True type Font Installation" button. click the font attribute ITALIC。
Our print device is LP01 and driver is CNSAPWIN
when I create a new style in smartform using the font ZTT, in preview window the font still like other font.
Our system is IDES ECC6, SAP_BASIS SAPKB70014
Now when I create smartfrom in language EN adn logon with language EN,it can print correct style of that font.
But if the smartform is base on language ZH or logon with language ZH, the output is not correct.
why? How to solve it?
how can I solve this problem?
thaks a lotHi,
Is the problem that uploaded true type font ZTT is not used when language is ZH? Did you update the chinese version of the style associated with the smartform? There is a separate style for each language version. So you need to log on in Chinese language and update the style with new paragraph, character formats. Then you need to activate the style and smartform for ZH langauge also.
Regards,
Aidan -
Having problem with the printer with type "PDF Publisher"
Hi,
We are having problem with printing PDF reports with print style as "PDF Publishrer". The concurrent program errors out after it generates the report. But when we try that with style "PORTRAIT" then it prints successfully. We have tried with a number of printers and a number of reports. The results are same. So my understanding is it has something to do with the printer configuration from the EBS side.
Any help in this regard is highly appreciated.
PratapHi Hussein ,
Thanks for the response. The details are provided below.
The application is R12.1, Database 11.1.0.7, OS is Solaris 10.
The database characterset is US7ASCII.
The printer type is --PASTA Universal Printer Type
The log file does not give any error but the program completes with error. I am coping the log file below.
Receivables: Version : 12.0.0
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
RAXINV_SEL module: Invoice Print Selected Invoices
Current system time is 20-JUN-2011 14:23:10
+-----------------------------
| Starting concurrent program execution...
+-----------------------------
Arguments
p_order_by='TRX_NUMBER'
p_trx_number_low='10100'
p_trx_number_high='10100'
p_open_invoice='Y'
p_check_for_taxyn='N'
p_choice='SEL'
p_header_pages='1'
p_debug_flag='N'
p_message_level='10'
Forcing NLS_NUMERIC_CHARACTERS to: '.,' for XDO processing
APPLLCSP Environment Variable set to :
Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
American_America.AL32UTF8
Enter Password:
MSG-00100: DEBUG: AfterPForm_Trigger +
MSG-00100: DEBUG: Multi Org established.
MSG-00100: DEBUG: AfterParam_Procs.Get_Country_Details
MSG-00100: DEBUG: AfterParam_Procs.Switch_On_Debug
MSG-00100: DEBUG: AfterParam_Procs.Get_Trx_Number_Low
MSG-00100: DEBUG: AfterParam_Procs.Get_Trx_Number_High
MSG-00100: DEBUG: AfterParam_Procs.Get_Tax_Option
MSG-00100: DEBUG: BeforeReport_Trigger.Build_Where_Clause
MSG-00100: DEBUG: P_Choice: SEL
MSG-00100: DEBUG: Choice is other than ADJ, setting ORDER BY.
MSG-00100: DEBUG: AfterPForm_Trigger -
MSG-00100: DEBUG: BeforeReport_Trigger +
MSG-00100: DEBUG: BeforeReport_Procs.Populate_Printing_Option
MSG-00100: DEBUG: BeforeReport_Procs.Populate_Tax_Printing_Option
MSG-00100: DEBUG: BeforeReport_Trigger.Get_Message_Details
MSG-00100: DEBUG: BeforeReport_Trigger.Get_Org_Profile.
MSG-00100: DEBUG: Organization Id: 96
MSG-00100: DEBUG: BeforeReport_Trigger -
MSG-05000: DEBUG: Trx No... 10100
MSG-00010: 14:23 1 Transaction: 10100
Report Builder: Release 10.1.2.3.0 - Production on Mon Jun 20 14:23:26 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Start of log messages from FND_FILE
End of log messages from FND_FILE
Executing request completion options...
------------- 1) PUBLISH -------------
Beginning post-processing of request 895365 on node PAUPRJ01 at 20-JUN-2011 14:23:48.
Post-processing of request 895365 completed at 20-JUN-2011 14:23:51.
------------- 2) PRINT -------------
Printing output file.
Request ID : 895365
Number of copies : 1
Printer : SPOT
################################################################## -
Help - Inserting an XML document into a Oracle 8i Column (CLOB Type)
Hi JavaGurus,
I am looking for a simple java code which will take my XML document as input and insert the same into a Oracle 8i database's column which is of type CLOB.
Insert statement won't work and I can not use SQL Loader.
Any one?
JKMaybe you can adapt some of the code in Oracle's "LOB Datatype" example, which is a complete working program that stores and retrieves BLOBs and CLOBs.
http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.html -
Can report print clob and interpret the content
Hi,
we use reports and forms 9i on Linux.
During the development of our application we faced one problem:
users were using MS Word prior to our solutions, so they are used to manipulate with text( bold, underline, font....). We tried to enable them to use such attributes using CLOB field where we saved, for example, rtf formated text ( using java bean). It looks nice on the screen, but now we are facing the problem of printing such report. Oracle reports see this CLOB field as text ignoring formating.
Is it posible to tell oracle reports to interpret content of the fiels using formating that is already saved in CLOB?
I read about XML Publisher, but it is not a solution, because every time you have to print report, you have to edit it. Editing is not saved.
Any suggestion would be appreciated!
Kind regards,
Ozren PesticHi Zwired1,
Just to make sure I fully understand the situation - I am assuming since you say you are printing to two different printers that when you are using the Print Report.vi you are using the printer name string to specify which printer you would like to print on. And if the printer that you specify is not functioning it automatically prints on the other printer, is that correct?
From looking at the code in the Print Report.vi, it looks like if you specify a printer name in the input string, if there is a problem with that printer or if that printer is unavailable, the VI should not print anything, so please let me know if that is not the behavior you are seeing.
For your question about checking the health of printers, there is a VI in the report gen toolkit called Query Available Printers. You can find it if you open up the Print Report.vi and choose the Standard Report instance, the Query Available Printers.vi is on the block diagram of that VI. It will return the list of available printers and the default printer.
I hope that helps, -
Cannot print certain types of documents.
Many documents that are e-mailed to me can take up to 30 minutes to 1 hour to print one page. The best description I can give is if the document is scanned by my customer and e-mailed to me it will not print. Also the size of the document in the printing cue might be 320 KB/1.84 MB for one page. When I e-mail this same document to a co-worker to copy they can copy it with no problem.
Hi ... Scince that you hadn't list detailes for the operating system that you have ,the printer model and it's connection type/speed ,type of the mailed document ,...etc . .The best that I can tell you .. is that you have an operating system problem on your computer ... try to find an update or service progarm for it ...
Maybe you are looking for
-
Wireless printer and airport express
I have an HP officejet 7410 "all in one" printer that use to connect to my Imac wirelessly just fine but now I have to connect it to the usb cable to get it to print. my family has 4 mac bookpro's also and its hit or miss whether or not they will pri
-
My macbook pro retina just crashed
my macbook pro retina just crashed and i had to use safe boot to report this, please i want to know what the message that came with it meant, and if something is wrong inside .. Anonymous UUID: 4EBB583B-4640-14A1-3D94-B292D0C34D7B Fri Jan 24 13
-
Custom "Go" Button for vertical Dashboard Prompts
Hello All, I have to create single GO button for multiple prompts on dashboard. I am following below blogs but getting Error like "Exception OccurredReferenceError: GFPDoFilters_samvi is not defined" Or some Object Error. http://obieeone.com/2009/06/
-
How to add a row for every 5 records using logic:iterate
Hi, In my application, using logic:iterate iam displaying 20 records per page. I want to insert a row for every 5 records. Please tell how to insert that row. Thanks in advance. Mohan
-
Not enough space on my IPad to rent a movie while I have 2.6 GB off free space
I have 2.6GB on my iPad and I can't rent the hurt locker