How to Get Blob data(In String Form) using OCCI
Hello frnds,
I am new to OCCI,so i hvnt that much of master in that side.
I have one problem while handling BLOb data.
How to convert binary form of SDO_GEOMETRY data into string format. I am able to convert data by using PLSQL block,but its take so much time to execute.So performance is the main issue.So if there is any API in OCCI which convert directly blob data into string format.
Thanx in advance for your support,
Nilesh.
Have you tried reading "http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28390/lobs.htm#BABDEGJD" ? This explains how you can read from BLOBs into a C vector (or C++ vector of chars).
Similar Messages
-
How to convert BLOB data into string format.
Hi,
I have problem while converting blob data into string format.
for example,
Select dbms_lob.substr(c.shape.Get_wkb(),4000,1) from geotable c
will get me the first 4000 byte of BLOB .
When i using SQL as i did above,the max length is 4000, but i can get 32K using plsql as below:
declare
my_var CLOB;
BEGIN
for x in (Select X from T)
loop
my_var:=dbms_lob.substr(x.X,32767,1)
end loop
return my_var;
I comfortably convert 32k BLOB field to string.
My problem is how to convert blob to varchar having size more than 32K.
Please help me to resolve this,
Thanx in advance for the support,
NileshNilesh,
. . . .The result of get_wkb() will not be human readable (all values are encoded into some binary format).
SELECT utl_raw.cast_to_varchar2(tbl.geometry.get_wkt()) from FeatureTable tbl;
-- resulting string:
☺AW(⌂özßHAA
Å\(÷. . . .You may also want to have a look at { dbms_lob | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i1015792 } "The DBMS_LOB package provides subprograms to operate on BLOBs, CLOBs, NCLOBs, BFILEs, and temporary LOBs."
Regards,
Noel -
How to get the GTRID in string form
Hello,
I would like to include the Global Transaction Identifier (GTRID) in my
application level logs. Preferrably it will be in the same format as it is
in the ULOG.
Is there a function to get the GTRID?
Once retrieved, is there a function to convert the GTRID into a string
equivalent to how it is presented in the ULOG?
We are using WLE 5.x (Corba).
Thanks...
Roger
Roger W. Fischer
North Vancouver, BCTuxedo uses GTRIDs internally, but externally documented functions make use
of XIDs, which is the official transaction ID format used in the XA
standard. (tpsuspend() and tpresume() make use of TPTRANID, which is
another internal data structure.)
The best approach would be to use userlog() for your application logging, in
which case you will get the GTRID as part of your log message whenever it is
present.
If you want to use XIDs, you can call
tx_info(&traninfo);
to get a binary XID and you can format this XID to a string format using
tpconvert(string_xid, &traninfo.xid, TPTOSTRING|TPCONVXID);
It is possible to pass this string_xid as a key field in a call to the
T_TRANSACTION MIB class, and TA_GTRID will be among the returned FML fields,
but the TA_GTRID MIB attribute is not officially documented.
"Roger W. Fischer" <[email protected]> wrote in message
news:[email protected]..
Hello,
I would like to include the Global Transaction Identifier (GTRID) in my
application level logs. Preferrably it will be in the same format as it is
in the ULOG.
Is there a function to get the GTRID?
Once retrieved, is there a function to convert the GTRID into a string
equivalent to how it is presented in the ULOG?
We are using WLE 5.x (Corba).
Thanks...
Roger
Roger W. Fischer
North Vancouver, BC -
How to get SO data on PR creation using exit EXIT_SAPLMEQR_001 ?
Dears,
I have a requirement which involves activation of PR creation from SO.
I have activated the exit EXIT_SAPLMEQR_001to assign source suply according to non standard rules.
The thing is that I need to have the field VBAK-VTWEG (Distribution Channel) available to make my source supply assignments because vendors are classified based on field VTWEG.
The only fields I have available are these ones:
""Local Interface:
*" IMPORTING
*" VALUE(I_BQPIM) LIKE BQPIM STRUCTURE BQPIM
*" VALUE(I_BANFN) LIKE EBAN-BANFN OPTIONAL
*" VALUE(I_BNFPO) LIKE EBAN-BNFPO OPTIONAL
*" TABLES
*" T_SOURCES STRUCTURE SRC_DETERM
*" CHANGING
*" VALUE(C_BQPEX) LIKE BQPEX STRUCTURE BQPEX
I tried to Sales Order from table EBKN...
SELECT SINGLE VBELN INTO lv_VBELN from EBKN WHERE BANFN = EBAN-BANFN AND BNFPO = EBAN-BNFPO.
The thing is that at the time the exit runs, the PR BANFN doesnt exist yet, thus, I cant find any reference SO.
The only avaliable/interesting fields I have in this exit are:
I_BQPIM-MATNR 810101
I_BQPIM-WERKS 0050
I_BQPIM-MATKL 40206
I_BQPIM-OLDAT 00000000
I_BQPIM-NEDAT 20101122
I_BQPIM-BESKZ
I_BQPIM-SOBES
I_BQPIM-OLMNG 0.000
I_BQPIM-NEMNG 1.000
I_BQPIM-OLBSM 0.000
I_BQPIM-NEBSM 0.000
I_BQPIM-BSART ZTPS
I_BQPIM-BSTYP B
I_BQPIM-PSTYP 5
I_BQPIM-BSAKZ
I_BQPIM-KZVBR V
I_BQPIM-KNTTP Z
I_BQPIM-SEQU
I_BQPIM-VORGA B
I_BQPIM-KUNNR 0000000882
I_BANFN 4000000176
I_BNFPO 00050
And a list of source suppliers based on inforecords.
Also no Distribution channel available or sales order information.
Any ideas on how this could be achieved?
Thank you in advance for any constructive suggestions,
João CabritaHi John,
Thanks for your suggestion. To be honest I also thought about a similar solution and applied it, though I thought it was not so clean as the one I used after.
I have checked the ABAP stack and saw where we were "loosing" the VBAK-VTWEG.
On the exit code I have done something like this:
DATA: lv_vtweg TYPE vbak-vtweg,
l_stru_name(20) TYPE c VALUE '(SAPFV45E)VBAK'.
FIELD-SYMBOLS: -vtweg.
And problem was solved.
Cheers,
João Cabrita -
Hi,
How to get the date as string in j2me form which is declared as
DateField datefield = new DateField("date ",DateField.DATE);
String strDate=datefield.toString();
System.out.println("Date "+strDate);
But it display the value javax.microedition.lcdui.DateField@84aee8b.
How to get the exact date value as string.Hi i used Another method ,but it works
public String getDate(){
Calendar calendar= Calendar.getInstance();
int date=0,year=0,month=0;
String strDate=null;
date=calendar.get( java.util.Calendar.DATE);
month=calendar.get( java.util.Calendar.MONTH)+1;
year=calendar.get( java.util.Calendar.YEAR);
strDate=date+"-"+month+"-"+year;
if(date<10)
strDate="0"+date+"-"+month+"-"+year;
else
strDate=date+"-"+month+"-"+year;
return strDate;
Please Tell me ,Is This correct or Not?
By
TechSivam -
How to get purchasing data from SAP R/3 to OWB (Oracle warehouse builder).
Hi,
My name is Pavan Tata. I work as a SAP BW developer. Here is the situation at my client place. Client decided to retire BW system and wants to replace with OWB(Oracle warehouse). In all this currently we have purhchasing application in BW production system and wants to move this application to OWB for the same type of reporting what they are getting currently.
Here is my question:
How to get purchasing data from SAP R/3 to OWB(Warehouse) with initial full loads and deltas mechanism in the same way as we do in BW.
Please help on this, also send me any documentation about this if you have.
Thanks,
Pavan.Hello,
here is a short report which converts S012 entries to strings with separator semicolon. Perhaps this will help you?
Regards
Walter Habich
REPORT habitest2 LINE-SIZE 255.
TYPES:
strtab_t TYPE TABLE OF string.
CONSTANTS:
separator VALUE ';'.
DATA:
it_s012 LIKE s012 OCCURS 0,
wa_s012 LIKE s012,
strtab TYPE strtab_t,
strele TYPE string.
SELECT * FROM s012 INTO TABLE it_s012 UP TO 100 ROWS.
PERFORM data_to_string
TABLES
strtab
USING
'S012'. "requires it_s012 and wa_s012
LOOP AT strtab INTO strele.
WRITE: / strele.
ENDLOOP.
*& Form data_to_string
FORM data_to_string TABLES strtab TYPE strtab_t
USING ittab TYPE any.
DATA:
h_zaehler TYPE i,
line_str TYPE string,
l_tabellenname(10) TYPE c,
l_arbeitsbereichsname(10) TYPE c,
h_string TYPE string,
h_char(255) TYPE c.
FIELD-SYMBOLS: <l_tabelle> TYPE ANY TABLE,
<l_arbeits> TYPE ANY,
<feldzeiger> TYPE ANY.
CLEAR strtab.
CONCATENATE 'IT_' ittab INTO l_tabellenname.
ASSIGN (l_tabellenname) TO <l_tabelle>.
CONCATENATE 'WA_' ittab INTO l_arbeitsbereichsname.
ASSIGN (l_arbeitsbereichsname) TO <l_arbeits>.
LOOP AT <l_tabelle> INTO <l_arbeits>.
CLEAR: h_zaehler, line_str.
line_str = ittab.
DO.
ADD 1 TO h_zaehler.
ASSIGN COMPONENT h_zaehler OF
STRUCTURE <l_arbeits> TO <feldzeiger>.
IF sy-subrc <> 0. EXIT. ENDIF.
WRITE <feldzeiger> TO h_char LEFT-JUSTIFIED. "#EC *
h_string = h_char.
CONCATENATE line_str separator h_string INTO line_str.
ENDDO.
APPEND line_str TO strtab.
ENDLOOP.
ENDFORM. "data_to_string -
How to get twiiter data?
How to get twitter data?
For my project I want large amount of twitter tweets. How do I get?//Oauth Keys (Replace with values that are obtained from registering the application
var oauth_consumer_key ="Your API Key";
var oauth_consumer_secret = "Your API Secret Key";
//Token URL
var oauth_url = "https://api.twitter.com/oauth2/token";
var headerFormat = "Basic {0}";
var authHeader = string.Format(headerFormat,
Convert.ToBase64String(Encoding.UTF8.GetBytes(Uri.EscapeDataString(oauth_consumer_key) + ":" +
Uri.EscapeDataString((oauth_consumer_secret)))
var postBody = "grant_type=client_credentials";
ServicePointManager.Expect100Continue = false;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(oauth_url);
request.Headers.Add("Authorization", authHeader);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded;charset=UTF-8";
using (Stream stream = request.GetRequestStream())
byte[] content = ASCIIEncoding.ASCII.GetBytes(postBody);
stream.Write(content, 0, content.Length);
request.Headers.Add("Accept-Encoding", "gzip");
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
Stream responseStream = new GZipStream(response.GetResponseStream(), CompressionMode.Decompress);
using (var reader = new StreamReader(responseStream))
JavaScriptSerializer js = new JavaScriptSerializer();
var objText =reader.ReadToEnd();
JObject o = JObject.Parse(objText); -
How to get the Date in a particular format?
Hi,
How to get the Date in the below format? I will be passing the year in my method..
2/10/2003 9:46:52 PM
D/M/YYYY H:M:S A
public Date getDate (String year) {
Here i want to get the Date in this format
2/10/<Passed Year> 9:46:52 PM
ThanksThis is my code
public static Date getCalendar(Calendar calendar,int getYear) {
String formatted_date="";
int year = getYear;
int month = calendar.get(Calendar.MONTH+1);
int day = calendar.get(Calendar.DATE);
int hour = calendar.get(Calendar.HOUR);
int min = calendar.get(Calendar.MINUTE);
int sec = calendar.get(Calendar.SECOND);
int am_pm =calendar.get(Calendar.AM_PM);
formatted_date = month+"/"+day+"/"+year+" "+hour+":"+min+":"+sec+" PM";
System.out.println("formatted_date is "+formatted_date);
o/p : formatted_date is 1/4/2006 1:44:21 PM
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
// DateFormat dateFormat =DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
Date passdate = new Date();
try {
passdate = dateFormat.parse(formatted_date);
} catch (ParseException e) {
System.out.println("Invalid Date Parser Exception "+e.getLocalizedMessage()+"DateFormat is "+dateFormat);
System.out.println("The Date inside the function is "+passdate+"and the year passed is "+year);
o/p : The Date inside the function is Sat Apr 01 00:00:00 IST 2006and the year passed is 2006
return passdate;
Expected O/P is 3/1/2006 1:44:12 PM
} -
How to get javabean data in Servlets.( JavaBean -- Servlet(Controller)
how to get javabean data in Servlets.
1) I am using name ,password in Jsp(View )
2) when I submit this Bean will be called and Setter methods will be called .
3) In ServletController (controller) I want to get data of javabean.
In this I have to do validation of user.
I want to pass the javabean obj as like -->
request.getAttribute("beanObj");
My intention is to get all the poperties in javabean by passing bean id
or beanobj ,
Is there any way to get all the data using bean id or beanObj.
Plz Reply,Now in the Servlet we can get the same bean by this code:
PageContext pageContext = JspFactoryImpl.getDefaultFactory().getPageContext(this, request, response, null, true, 8192, true);
UserBean userbean = (UserBean)pageContext.getAttribute("userbean", PageContext.SESSION_SCOPE);
String userid = userbean.getUsername();
For this code to work it is needed to import 2 files:
import org.apache.jasper.runtime.JspFactoryImpl;
import javax.servlet.jsp.PageContext;
The JspFactoryImpl is in jasper-runtime.jar file provided in tomcat dir.It seems to me that you are exactly knowing what you are doing :-(
You can get a Bean stored in a Session by
request.getSession().getAttribute("userbean");
In the login.jsp page for example we have the code
<jsp:useBean id="userbean" scope="session"class="com.newproj.UserBean" />
<jsp:setProperty name="userbean" property="*" />the jsp:setProperty is not called when you click on the submit button
if fills the bean with the request values from the previous request.
andi -
How can I pass data from a form guide to another form in a business process
How do we pass data from a form guide to another form(not necessarily a guide) without having to open the form. For example we have a small form guide to capture the contract id so we can then get data from contracts table to present to the user in a form. We want the user to open the guide (either Flex guide or form guide) to enter the contract id. Upon submission we want the process to get the contract data and put it into the form that will be opened at the next step by the user without having a user interact with the form to get the data into it. In other words we need the process to get the data and populate a different form than the form guide the contract id was entered in and this new form needs to be opened in the next step by the user.
Firstly, I'm assuming that you have a Forms ES Server if you are rendering a Guide. This could be either version ES1, ES2/2.5 or ES3/ADEP
If you submit the form back to the server, you can populate a second (PDF/XDP) form with the data bound to the same schema/Data Model using Forms ES.
You referred to the next user in the chain - If you are using Process Management, this is very easy, as you define what form is used to render the data in the "Presentation & Data" section of the Assign Task activity -
How to get values/data stored in the database into a list-item.
how to get values/data stored in the database into a list-item.
i tried to make a list item without any values assigned to it...but i got the below error.
FRM-30191: No list items defined for required poplist.
or
FRM-32082: Invalid value for given item type.
List EMPNO
Item: EMPNO
Block: EMP
Form: MODULE5
FRM-30085: Unable to adjust form for output.
then according to some docs, i tried the the following for the trigger
when-new-form-instance
declare
rg_name varchar2(40) := 'emp_rec';
status number;
groupid recordgroup;
it_id item;
begin
it_id := Find_Item('empno');
groupid := create_group_from_query(rg_name, 'select empno from emp');
status := populate_group(groupid);
populate_list(it_id, groupid);
end;
but yet didnt work... :(
so how the heck do i get values fetched from the database table into the list item?for list items you need to values in the record group, one is the shown value and one is the returned value.
Check out the online help for the populate_list built-in.
You'll need something like select ename,ename from emp as the record group query. -
How to get system date and time?
Can someone show me a code on how to get system date and time.
Thanks!there is one really easy way to get system time, the api gives a great example of code on this. use gregorian calendar, which you'll find in the api under GregorianCalendar. You only need to create one instance of GC, ie Calendar time = new GregorianCalendar();
you save seconds, minute and hours into int values, so you don't have to access the system time every second, you can create a thread which adds one to the int second value, if oyu see what i mean, for example, i have saved the hours, minutes and seconds as int values;
int hour, minute, second;
i can then create a thread (Thread thread = new Thread(this) and run it like:
Calendar time;
int hour, minute, second;
Thread thread = null;
public MyTime() {
hour= time.get(Calendar.HOUR_OF_DAY);
minute = time.get(Calendar.MINUTE);
second = time.get(Calendar.SECOND);
if(thread == null) {
thread = new Thread(this);
thread.start();
public void run() {
Thread t = Thread.currentThread();
while(thread == t) {
thread.sleep(1000);
second++;
if(second > 59)
minute++;
if(minute>59)
hour++;
formatTime();
public void formatTime() {
second = (second > 59? 0 : second);
minute = (minute > 59? 0 : minute);
hour = (hour > 23? 0 : hour);
System.out.println(hour+":"+minute+":"+second);
public static void main(String[] args) {
new MyTime();
I know this looks like gibberish but it should work. If not, try to fix the problem, i have written from memory really but i guarantee you, this gets the time then every second, simply adds one to the second and then formats time. You can also access the day, month and year then format them using the above code. I don't like giving code since you should really do these things yourself but it is 2:04am, i have nothing better to do and i am not tired so i did you a favour - i have become what i always did not want to, someone ho stays upall night writing code. -
How to get Yestuday date?
hI,
How to get yesturday date? in Message mapping. wht function should I use?
regards,
Ansar.Hello ,
Use this code....
import java.text.*;
import java.util.*;
public class DateTest {
public static void main(String[] args) {
Calendar c = Calendar.getInstance();
DateFormat fmt = DateFormat.getDateInstance();
for(int i=0; i<30; ++i) {
c.add(Calendar.DAY_OF_MONTH, -1); //back one
System.out.println(fmt.format(c.getTime()));
With Regards,
Sagar -
How to get changed data in ALV in Web Dynpro for ABAP
METHOD on_data_check .
DATA:
node_spfli TYPE REF TO if_wd_context_node,
node_sflight TYPE REF TO if_wd_context_node,
itab_sflight2 TYPE if_display_view=>elements_sflight.
node_spfli = wd_context->get_child_node( name = if_display_view=>wdctx_spfli ).
node_sflight = node_spfli->get_child_node( name = if_display_view=>wdctx_sflight ).
CALL METHOD node_sflight->get_static_attributes_table
IMPORTING
table = itab_sflight2.
this code is ..get all data(changed and not changed)
but i want get changed data only, not all data.
how to get changed data?
Edited by: Ki-Joon Seo on Dec 27, 2007 6:04 AMHi,
To get only the changed data in the ALV grid of a WD, you need to capture the "ON_DATA_CHECK" of the ALV grid.
To this please do the following in the ALV initialization of the ALV table settings :
lr_table_settings->set_data_check(
IF_SALV_WD_C_TABLE_SETTINGS=>DATA_CHECK_ON_CELL_EVENT ).
You may also do this:
lr_table_settings->set_data_check( IF_SALV_WD_C_TABLE_SETTINGS=>DATA_CHECK_ON_CHECK_EVENT)
The above two ways would depend on when do you need to check for the changed data. If you want to check the data as soon as it is entered, then use the first method. Else, use the second method.
You need to register an EVENT HANDLER for this event.(You may do this in your VIEW or Component Controller).
In this Event handler, you would find an importing parameter R_PARAM which is a ref type of IF_SALV_WD_TABLE_DATA_CHECK.
The attribute T_MODIFIED_CELLS of this interface IF_SALV_WD_TABLE_DATA_CHECK will contain the modified cells of the ALV with the old & new values. -
How to get all data from nokia to i5s
how to get all data from nokia E71 to i5s???
if you can put those data in your computer then add it in iTunes. your iPhone 5s should get it thru syncing.
Maybe you are looking for
-
No Thumbnails for RAW imagages from SDHC Card
I just purchased the 1Ds Mark III and when I bring in images from the CF card, I have thumbnails. When I bring in images from the SDHC card, no thumbnails. I can double click and open them in CS3 just fine however. It is INCREDIBLY inconvenient to no
-
I use Verizon/Yahaoo email and most of my new emails are not arriving in my inbox in bold. New emails are unbolded or as if I've already read them. I have a Firewall and I have changed my password twice in the last few days and still I have this pr
-
I have a zone created for FTP users I am trying to create home directories for individual users. I am using useradd command and /home/user-name as the home directory but there is no direcotry being created. The zone is created on a Veritas Volume. Wh
-
Hi Expert, I want to add two fields in the selection screen of F.27 Any idea if there is any screen exit available for this or i will need access key to do the change in standard prgram ?. Please advise. Thanks.
-
Hatte eine Canon-Scanner 9000F zum Scannen von Dias gekauft vor längerer Zeit mit beiliegender SW Adobe Photoshop Elements 8. Funktionierte einwandfrei mit dem ScanGear. Nun habe ich neu Photoshop Elements 13 installiert. Damit funktioniert der ScanG