Problem while retrving data from a view
Hi Friends
i have a problem while retriving data from a view <b>v_t685a</b>.
the error message is :""" "V_T685A" is not defined in the ABAP Dictionary as a table, projection view or database view."""
i wrote : select single VTEXT1 from V_T685A into w_cst_jin1 where
KSCHL = 'JIN1' and
KAPPL = 'V'.
how to retrive the data.
waiting for quick response
Regards
Mukesh
Hi
This is a Maintenance View, not a Database View
SO can't fetch data using select statement.
You can use the Table <b>T685</b> directly to fetch the condition Types data straight away instead of the view. write the same select for this table and use.
Regards
Anji
Message was edited by:
Anji Reddy Vangala
Similar Messages
-
Problem while loading data from ODS to infoobject
Hi guys,
I am facing problem while loading data from <b>ODS to infoobject</b>.
If I load data via PSA it works fine but
if I load data without PSA its giving error as Duplicate records.
Do u have any idea why it is so.
Thanks in advance
savioHi,
when you load the data via the PSA, what did you select? Serial or Paralel?
If you select serial most likely you don't have duplicates within the same datapackage and your load can go through.
Loading directly in the IObj will happen thefore if you have the same key in two different packages, the "duplicate records" will be raised; you can perhaps flag your IPack with the option "ignore duplicate records" as suggested...
hope this helps...
Olivier. -
Problem while reading data from Serial Port
Hi All,
I am facing some problem while reading data from Serial Port.
As per the requirement I am writing the data on Serial Port and waiting for response of that data.
Notification for data availabilty is checked with method public void serialEvent(SerialPortEvent event) of javax.comm.SerialPortEventListener.
When we are writing data on the port one thread i.e. "main" thread is generated and when data availability event occures another thread "Win32SerialPort Notification thread" is generated. This creates problem for me as we can't control thread processing.
So can anybody pls explain me how to overcome this problem?
Regards,
NehaMy Problem is:-
I am simoultaneouly wrting data on port & reading data from port.
First I write data on port using outputStream.write() method. Now when target side sends me response back for the request on serial port DATA_AVAILABLE of SerialPortEventListner event occured,we are reading data from serial port.Now till the time we didn't get the response from target next command can't be written on the serial port. When we are writing data on port main thread is executed.Now my problem starts when DATA_AVAILABLE event occured.At this point another thread is created.Due to this my program writes data of next command without reading response of previous command.To solve this prob. I have used wait() & notify() methods as follows.But again due to this my pc hangs after execution of 2 commands. (PC hang in while loop in a code provided below.)
From SOPs I could figure it out that after 2 commands we are not able to write data on serial port so DATA_AVAILABLE event doesn't occure n pro. goes in wait state.
Can anybody help me to solve this issue.
Neha.
Code:
public void serialEvent(SerialPortEvent event)
switch (event.getEventType())
case SerialPortEvent.BI:
case SerialPortEvent.OE:
case SerialPortEvent.FE:
case SerialPortEvent.PE:
case SerialPortEvent.CD:
case SerialPortEvent.CTS:
case SerialPortEvent.DSR:
case SerialPortEvent.RI:
case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
break;
case SerialPortEvent.DATA_AVAILABLE:
try
dataThread = Thread.currentThread();
dataThread.setPriority(10);
dataAvailable = true;
byte[] tempArray=new byte[availableBytes];
inputStream.read(tempArray);
catch (IOException io)
SOP(io, "Error in serialEvent callback call for event DATA_AVAILABLE");
public void writetoPort(byte[] data) throws IOException
outputStream.write(data);
while(finalTimeOut >= actualTime)
if( ! dataAvailable)
actualTime = System.currentTimeMillis();
else
synchronized (mainThread)
mainThread = Thread.currentThread();
mainThread.wait();
public void sendDatatoUser(byte[] b) throws Exception, HWCCSystemFailure
obj.returnData(b);
synchronized(mainThread)
mainThread.notify();
-
Problem while reading data from AL11
Hi Experts,
I am using OPEN DATASET
READ DATASET
CLOSE DATASET to read data from the application sever. In application sever the file type is .CSV. So after reading data from application layer(AL11) to a text variable, using statement ' SPLIT AT ',' ' all the values passing into correspoding internal table fields. And it getting updated successfully into DB also.
In above scenario my question is, if aquantity figure with coma seperator( 95,000,000.000), then while SPLIT it's creating problem. Same case in .XLS file, it will be created # seperator in the application layer. if any field having # then it will create problem again.
So can anybody suggest how can we over come the problem. Or is there any other way to read data properly from application layer(AL11)?
Thanks and regards,
Phani.to overcom this problem,
normally we use tab as sparator
so use CL_ABAP_CHAR_UTILITIES=>VERTICAL_TAB to separate your fields!
grx
Andreas -
Problem while opening data from mysql in Excel
Hi friends
when i try to download data from MySQL to excel sheet I am getting error of
This file is not in a recognizable format.
. If you know the file is from another program which is incompatible with Microsoft Office Excel,click Cancel then open this file in its original application.If you want to open the file later in Microsoft Office Excel,save it in a format that is compatible,such as text format.
etc
Code is
Class.forName("org.gjt.mm.mysql.Driver");
Connection conn = DriverManager.getConnection("xxxxxx");
Statement st = conn.createStatement();
StringBuffer sb = new StringBuffer();
sb.append("SAP#" + "\t");
sb.append("x-plant status" + "\t");
sb.append("Total Amount" +"\t");
sb.append(">90 days" + "\t");
sb.append("\n");
try
String query="select * from temp_Xplant";
ResultSet rs = st.executeQuery(query);
while(rs.next()){
sb.append(rs.getString("sapNo") + "\t");
sb.append(rs.getString("status")+ "\t");
sb.append(rs.getString("amt") + "\t");
sb.append(rs.getString("days") + "\t");
sb.append("\n");
conn.close();
st.close();
catch (Exception e)
out.println("error");
conn.close();
st.close();
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment; filename=\"test.XLS\"");
I can open them after clicking OK, but before that it is showing the above error message
Thank you
Edited by: priyap on Apr 3, 2008 4:54 AMhi,
there are some specific restrictions in downloading data in alv.
i.e you cannot have morethan 1024 characters that can be downloaded in single row.
so change your report columns accordingly. -
Problem while reading data from USB with JSR80
Hi
Iam using Fedora 9 with 32 bit.
Iam using JSR80 api to read the data from USB devices.
I successfully set-up the code as per given on JSR80 site on my eclipsce ide.
below is my code which iam using to read data from usb
import com.ibm.jusb.*;
import java.util.List;
import javax.usb.*;
import java.util.List;
public class USBReader {
public static UsbInterface interf = null;
public static void main(String[] args) {
try
{// Access the system USB services, and access to the root
// hub. Then traverse through the root hub.
System.out.println("Application started");
UsbServices services = UsbHostManager.getUsbServices();
UsbHub rootHub = services.getRootUsbHub();
traverse(rootHub);
testIO(rootHub);
} catch (Exception e) {
System.out.println("The Exception occured"+e.getMessage());
public static void traverse(UsbDevice device){
System.out.println("Iam in traverse ");
if (device.isUsbHub()){
// This is a USB Hub, traverse through the hub.
System.out.println("The device is hub");
List attachedDevices = ((UsbHub) device).getAttachedUsbDevices();
System.out.println("The attached devices size:"+attachedDevices.size());
for (int i=0; i<attachedDevices.size(); i++){
traverse((UsbDevice) attachedDevices.get(i));
if(attachedDevices !=null){
for(int j=0;j<attachedDevices.size();j++){
System.out.println("The device is"+attachedDevices.get(j));
else{
// This is a USB function, not a hub.
// Do something.
System.out.println("The device is not hub");
public static void testIO(UsbDevice device) throws UsbClaimException, UsbNotActiveException, UsbDisconnectedException, UsbException{
System.out.println("Iam in testIO");
try{
// Access to the active configuration of the USB device, obtain
// all the interfaces available in that configuration.
UsbConfiguration config = device.getActiveUsbConfiguration();
List totalInterfaces = config.getUsbInterfaces();
System.out.println("The Total interfaces: "+totalInterfaces.size());
// Traverse through all the interfaces, and access the endpoints
// available to that interface for I/O.
for (int i=0; i<totalInterfaces.size(); i++){
interf = (UsbInterface) totalInterfaces.get(i);
System.out.println("The interfaces are "+totalInterfaces.get(i));
String strinf=interf.getInterfaceString();
System.out.println("Claimed Status: "+interf.isClaimed());
System.out.println("Active status : "+interf.isActive());
System.out.println("Settings :"+interf.getNumSettings());
//interf.release();
interf.claim();
List totalEndpoints = interf.getUsbEndpoints();
for (int j=0; j<totalEndpoints.size(); j++){
// Access the particular endpoint, determine the direction
// of its data flow, and type of data transfer, and open the
// data pipe for I/O.
UsbEndpoint ep = (UsbEndpoint) totalEndpoints.get(i);
int direction = ep.getDirection();
int type = ep.getType();
UsbPipe pipe = ep.getUsbPipe();
pipe.open();
// Perform I/O through the USB pipe here.
pipe.close();
interf.release();
} catch (Exception e) {
System.out.println("Exception in TestIO"+e.getMessage());
e.printStackTrace();
}When i execute the above code i get the following exception
Exception in TestIOCannot claim an interface on a virtual root hub.
javax.usb.UsbException: Cannot claim an interface on a virtual root hub.
at com.ibm.jusb.VirtualRootUsbHubImp$VirtualRootUsbInterfaceOsImp.claim(VirtualRootUsbHubImp.java:143)
at com.ibm.jusb.os.DefaultUsbInterfaceOsImp.claim(DefaultUsbInterfaceOsImp.java:54)
at com.ibm.jusb.UsbInterfaceImp.claim(UsbInterfaceImp.java:109)
at com.ibm.jusb.UsbInterfaceImp.claim(UsbInterfaceImp.java:83)
at USBReader.testIO(USBReader.java:60)
at USBReader.main(USBReader.java:15)iam not getting the clue for it .Cannot claim an interface on a virtual root hubSo don't do that? I have no idea how to tell, but clearly you need to test a few more attributes before you claim. Or else just log the claim error and continue with the next interface.
-
Problem while Fetchign data from
Hi,
I am fetching the data from table CDHDR but though there exists data in the database table, the select query is giving 0 Entries..Please look into my code.
SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr, "Account Number of Vendor or Creditor
s_kunnr FOR kna1-kunnr, "Customer Number
s_bp FOR but000-partner, "Business Partner
s_udate FOR cdhdr-udate OBLIGATORY. "Create/Change Date
TYPES: BEGIN OF ty_cdhdr_v,
MANDANT type MANDT, "Client
objectclas TYPE cdobjectcl, "Object class
objectid TYPE cdobjectv, "Object value
changenr TYPE cdchangenr, "Document change number
username TYPE cdusername, "User name of the person responsible in change document
udate TYPE cddatum, "Creation date of the change document
tcode TYPE cdtcode, "Transaction in which a change was made
langu TYPE langu, "Language Key
END OF ty_cdhdr_v.
DATA : it_cdhdr_v TYPE STANDARD TABLE OF ty_cdhdr_v.
start-of-selection.
Get data from CDHDR for Vendors
SELECT MANDANT "Client
objectclas "Object class
objectid "Object value
changenr "Document change number
username "User name of the person responsible in change document
udate "Creation date of the change document
tcode "Transaction in which a change was made
langu "Language Key
INTO TABLE it_cdhdr_v
FROM cdhdr
WHERE objectclas EQ 'KRED'
AND objectid EQ s_lifnr
AND udate EQ s_udate
AND tcode IN ('XK01','XK02')
AND langu EQ sy-langu.
Regards,
Deepthi.Get data from CDHDR for Vendors
SELECT MANDANT "Client
objectclas "Object class
objectid "Object value
changenr "Document change number
username "User name of the person responsible in change document
udate "Creation date of the change document
tcode "Transaction in which a change was made
langu "Language Key
INTO TABLE it_cdhdr_v
FROM cdhdr
WHERE objectclas EQ 'KRED'
AND objectid IN s_lifnr
AND udate IN s_udate
AND tcode IN ('XK01','XK02')
AND langu EQ sy-langu. -
Problem while selecting data from external tables
Hi All,
I am facing a problem with external tabels. I have created an external table
create table ext_org_table
( id varchar2(10)
, name varchar2(100)
,id_parent varchar2(10)
,name_parent varchar2(100))
organization external
( type oracle_loader
default directory MYDIR
access parameters
records delimited by newline
nologfile
nobadfile
fields terminated by ','
missing field values are null
location ('Orgdata.csv')
reject limit unlimited;
The problem is that when i give select * from ext_org_table , i get following error
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file Orgdata.csv in MYDIR not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19
ORA-06512: at line 1
Now , i have file Orgdata.csv in the specified directory.
I have created directory in oracle using create directory command.
I have granted read,write permission on the directory to user.
I have given all read,write and execute permissions to folder where my files resides.My file resides in /appl/home/kk
Now i don't understand why it is giving error file in Mydir not found.
Kindly suggest.
Regards
KrishHi,
You are obviously doing someting wrong.
May be the direcotry is not present or may be the file is not rpesent in the directory.
I just tried ths
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Connected as SYS
create directory mydir as 'c:\csv';
grant read,write on directory mydir to scott;From Scott
create table ext_org_table
( id varchar2(10)
, name varchar2(100)
,id_parent varchar2(10)
,name_parent varchar2(100))
organization external
( type oracle_loader
default directory MYDIR
access parameters
records delimited by newline
nologfile
nobadfile
fields terminated by ','
missing field values are null
location ('Orgdata.csv')
reject limit unlimited;
select * from ext_org_table;Ofcourse i made up some dummy data to test and its all OK.
again,
You may want to check if
1) If the directory exists (select * from all_directories where directory_name='MYDIR');
2) If the user has the read/write permissions on that directory
3) If the file orgdata exists in that directory.
Regards,
Bhushan -
Problem while uploading data from flat file
hi friends,
suppose if there are 100 records in flat file , if 20 records uploaded with out any problem and if error occurs while uploading remaing data . is necessary to upload entire data again or else only remaining data should be uploaded?
i had used call transaction for purchase order application?
please give me reply soon its urgent
thanks & regards
priyaHi Hari,
you have to upload the remaining data.
as u have used CT method, do 1 thing trap the error data in runtime & prepare another flat file. next time correct the data in new flat file. & run the DBC program again with this new flat file.
Reward if useful
Regards
ANUPAM -
Problem while loading data from quality to production
Hai,
We are using standard extractor 2LIS_11_VASCL, and in test case in QTY 300, we were able to make some changes and see the changes and see the results of the changes in T-CODE RSA3. When we try the same changes in PRD300, No Changes are triggered and T-CODE RSA3 shows no changes.
Can any one suggest me regarding this prolem...Hi bandi,
Instead of trying for the same changes in production, why cant you do the transport the object from Quality to Production & then check for the changes in RSA3.
You are transporting the object only from Quality to production.
As no data is present in PRD, u may not be finding any changes in RSA3.
Hope it helps. -
Problem while transfering data from form to excel
Hi all.
I have a little problem. I have a procedure that fires on when-button-pressed trigger that goes to current block and download the data into an excel file.
The block has 2200 records.
The problem is that if I make the application visible all is ok; if I make the application not visible it remains "append" and nothing happens.
I'm on developer suite 10g.
Here is the code:
PROCEDURE pr_Forms_to_Excel(p_block_name IN VARCHAR2 DEFAULT NAME_IN('system.current_block')) IS
-- Declare the OLE objects
application OLE2.OBJ_TYPE;
workbooks OLE2.OBJ_TYPE;
workbook OLE2.OBJ_TYPE;
worksheets OLE2.OBJ_TYPE;
worksheet OLE2.OBJ_TYPE;
cell OLE2.OBJ_TYPE;
range OLE2.OBJ_TYPE;
range_col OLE2.OBJ_TYPE;
-- Declare handles to OLE argument lists
args OLE2.LIST_TYPE;
-- Declare form and block items
form_name VARCHAR2(100);
f_block VARCHAR2(100);
l_block VARCHAR2(100);
f_item VARCHAR2(100);
l_item VARCHAR2(100);
cur_block VARCHAR2(100) := NAME_IN('system.current_block');
cur_item VARCHAR2(100) := NAME_IN('system.current_item');
cur_record VARCHAR2(100) := NAME_IN('system.cursor_record');
item_name VARCHAR2(100);
baslik VARCHAR2(100);
row_n NUMBER;
col_n NUMBER;
filename VARCHAR2(100);
BEGIN
-- Start Excel
application:=OLE2.CREATE_OBJ('Excel.Application');
OLE2.SET_PROPERTY(application, 'Visible', 'TRUE');
-- Return object handle to the Workbooks collection
workbooks:=OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
-- Add a new Workbook object to the Workbooks collection
workbook:=OLE2.GET_OBJ_PROPERTY(workbooks,'Add');
-- Return object handle to the Worksheets collection for the Workbook
worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
-- Get the first Worksheet in the Worksheets collection
-- worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 1);
worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Item',args);
OLE2.DESTROY_ARGLIST(args);
-- Return object handle to cell A1 on the new Worksheet
go_block(p_block_name);
baslik := get_block_property(p_block_name,FIRST_ITEM);
f_item := p_block_name||'.'||get_block_property(p_block_name,FIRST_ITEM);
l_item := p_block_name||'.'||get_block_property(p_block_name,LAST_ITEM);
first_record;
LOOP
item_name := f_item;
row_n := NAME_IN('SYSTEM.CURSOR_RECORD');
col_n := 1;
LOOP
IF get_item_property(item_name,ITEM_TYPE)<>'BUTTON' AND
get_item_property(item_name,VISIBLE)='TRUE'
THEN
-- Set first row with the item names
IF row_n=1 THEN
baslik:=NVL(get_item_property(item_name,PROMPT_TEXT),baslik);
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(cell, 'Value', baslik);
OLE2.RELEASE_OBJ(cell);
END IF;
-- Set other rows with the item values
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n+1);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
IF get_item_property(item_name,DATATYPE)<>'NUMBER' THEN
OLE2.SET_PROPERTY(cell, 'NumberFormat', '@');
END IF;
OLE2.SET_PROPERTY(cell, 'Value', name_in(item_name));
OLE2.RELEASE_OBJ(cell);
END IF;
IF item_name = l_item THEN
exit;
END IF;
baslik := get_item_property(item_name,NEXTITEM);
item_name := p_block_name||'.'||get_item_property(item_name,NEXTITEM);
col_n := col_n + 1;
END LOOP;
EXIT WHEN NAME_IN('system.last_record') = 'TRUE';
NEXT_RECORD;
END LOOP;
-- Autofit columns
range := OLE2.GET_OBJ_PROPERTY( worksheet,'UsedRange');
range_col := OLE2.GET_OBJ_PROPERTY( range,'Columns');
OLE2.INVOKE( range_col,'AutoFit' );
OLE2.RELEASE_OBJ( range );
OLE2.RELEASE_OBJ( range_col );
-- Get filename and path
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args, p_block_name );
OLE2.ADD_ARG( args,'Excel Workbooks (*.xls, *.xls');
filename := OLE2.INVOKE_CHAR( application,'GetSaveAsFilename',args );
OLE2.DESTROY_ARGLIST( args );
-- Save as worksheet
IF NVL(filename,'0')<>'0' THEN
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args,filename );
OLE2.INVOKE( worksheet,'SaveAs',args );
OLE2.DESTROY_ARGLIST( args );
END IF;
-- Close workbook
OLE2.INVOKE( workbook ,'Close');
-- Release the OLE objects
OLE2.RELEASE_OBJ(worksheet);
OLE2.RELEASE_OBJ(worksheets);
OLE2.RELEASE_OBJ(workbook);
OLE2.RELEASE_OBJ(workbooks);
OLE2.INVOKE(application, 'Quit');
OLE2.RELEASE_OBJ(application);
-- Focus to the original location
go_block(cur_block);
go_record(cur_record);
go_item(cur_block||'.'||cur_item);
END;
Is there anyone that can help me????
Thanks,
FabrizioHi all.
I have a little problem. I have a procedure that fires on when-button-pressed trigger that goes to current block and download the data into an excel file.
The block has 2200 records.
The problem is that if I make the application visible all is ok; if I make the application not visible it remains "append" and nothing happens.
I'm on developer suite 10g.
Here is the code:
PROCEDURE pr_Forms_to_Excel(p_block_name IN VARCHAR2 DEFAULT NAME_IN('system.current_block')) IS
-- Declare the OLE objects
application OLE2.OBJ_TYPE;
workbooks OLE2.OBJ_TYPE;
workbook OLE2.OBJ_TYPE;
worksheets OLE2.OBJ_TYPE;
worksheet OLE2.OBJ_TYPE;
cell OLE2.OBJ_TYPE;
range OLE2.OBJ_TYPE;
range_col OLE2.OBJ_TYPE;
-- Declare handles to OLE argument lists
args OLE2.LIST_TYPE;
-- Declare form and block items
form_name VARCHAR2(100);
f_block VARCHAR2(100);
l_block VARCHAR2(100);
f_item VARCHAR2(100);
l_item VARCHAR2(100);
cur_block VARCHAR2(100) := NAME_IN('system.current_block');
cur_item VARCHAR2(100) := NAME_IN('system.current_item');
cur_record VARCHAR2(100) := NAME_IN('system.cursor_record');
item_name VARCHAR2(100);
baslik VARCHAR2(100);
row_n NUMBER;
col_n NUMBER;
filename VARCHAR2(100);
BEGIN
-- Start Excel
application:=OLE2.CREATE_OBJ('Excel.Application');
OLE2.SET_PROPERTY(application, 'Visible', 'TRUE');
-- Return object handle to the Workbooks collection
workbooks:=OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
-- Add a new Workbook object to the Workbooks collection
workbook:=OLE2.GET_OBJ_PROPERTY(workbooks,'Add');
-- Return object handle to the Worksheets collection for the Workbook
worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
-- Get the first Worksheet in the Worksheets collection
-- worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 1);
worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Item',args);
OLE2.DESTROY_ARGLIST(args);
-- Return object handle to cell A1 on the new Worksheet
go_block(p_block_name);
baslik := get_block_property(p_block_name,FIRST_ITEM);
f_item := p_block_name||'.'||get_block_property(p_block_name,FIRST_ITEM);
l_item := p_block_name||'.'||get_block_property(p_block_name,LAST_ITEM);
first_record;
LOOP
item_name := f_item;
row_n := NAME_IN('SYSTEM.CURSOR_RECORD');
col_n := 1;
LOOP
IF get_item_property(item_name,ITEM_TYPE)<>'BUTTON' AND
get_item_property(item_name,VISIBLE)='TRUE'
THEN
-- Set first row with the item names
IF row_n=1 THEN
baslik:=NVL(get_item_property(item_name,PROMPT_TEXT),baslik);
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(cell, 'Value', baslik);
OLE2.RELEASE_OBJ(cell);
END IF;
-- Set other rows with the item values
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n+1);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
IF get_item_property(item_name,DATATYPE)<>'NUMBER' THEN
OLE2.SET_PROPERTY(cell, 'NumberFormat', '@');
END IF;
OLE2.SET_PROPERTY(cell, 'Value', name_in(item_name));
OLE2.RELEASE_OBJ(cell);
END IF;
IF item_name = l_item THEN
exit;
END IF;
baslik := get_item_property(item_name,NEXTITEM);
item_name := p_block_name||'.'||get_item_property(item_name,NEXTITEM);
col_n := col_n + 1;
END LOOP;
EXIT WHEN NAME_IN('system.last_record') = 'TRUE';
NEXT_RECORD;
END LOOP;
-- Autofit columns
range := OLE2.GET_OBJ_PROPERTY( worksheet,'UsedRange');
range_col := OLE2.GET_OBJ_PROPERTY( range,'Columns');
OLE2.INVOKE( range_col,'AutoFit' );
OLE2.RELEASE_OBJ( range );
OLE2.RELEASE_OBJ( range_col );
-- Get filename and path
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args, p_block_name );
OLE2.ADD_ARG( args,'Excel Workbooks (*.xls, *.xls');
filename := OLE2.INVOKE_CHAR( application,'GetSaveAsFilename',args );
OLE2.DESTROY_ARGLIST( args );
-- Save as worksheet
IF NVL(filename,'0')<>'0' THEN
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args,filename );
OLE2.INVOKE( worksheet,'SaveAs',args );
OLE2.DESTROY_ARGLIST( args );
END IF;
-- Close workbook
OLE2.INVOKE( workbook ,'Close');
-- Release the OLE objects
OLE2.RELEASE_OBJ(worksheet);
OLE2.RELEASE_OBJ(worksheets);
OLE2.RELEASE_OBJ(workbook);
OLE2.RELEASE_OBJ(workbooks);
OLE2.INVOKE(application, 'Quit');
OLE2.RELEASE_OBJ(application);
-- Focus to the original location
go_block(cur_block);
go_record(cur_record);
go_item(cur_block||'.'||cur_item);
END;
Is there anyone that can help me????
Thanks,
Fabrizio -
Problem while retreiving data from a text file
AOA
I tried to retreive text from a .txt file.
By using following code, i get junk box after every character retreived. What may be the reason.
public void run()
try
FileReader reader = new FileReader(uidsFile);
BufferedReader bin = new BufferedReader(reader);
while((line = bin.readLine()) != null )
String uid =line;// line.substring(0,4);
System.out.println(uid.trim());
catch(Exception x)
JOptionPane.showMessageDialog(null ,
x.getStackTrace(),
JOptionPane.INFORMATION_MESSAGE);
}The reason would be that that is what your text file looks like (namely UTF-16) while you use a FileReader without specifying any encoding, which means that it will choose your platform default - which is not UTF-16.
-
Problem while downloading data from Application server.
Hi
I have create a file on the application server.
When i tried to download the file from application server into Excel file , all the fields in the file appear in the same column.
How can place the fields separately in different columns in the Excel.
Thanks
Subha
Edited by: subhacp on Sep 5, 2011 8:32 AMHi,
Try to use below function module where you need not to do anything new, just give path of the directory where you want to store on your workstation in the parameter I_FILE_FRONT_END and give path of your application server from where you want to pick file which is in .XLS format in the FM parameter I_FILE_APPL .
It will simply copy the file from Apllication server to your workstation in the same format and with the same characters.
CALL FUNCTION 'C13Z_FILE_DOWNLOAD_BINARY'
EXPORTING
I_FILE_FRONT_END = pr_down
I_FILE_APPL = l_w_file
I_FILE_OVERWRITE = 'X'
* IMPORTING
* E_FLG_OPEN_ERROR =
* E_OS_MESSAGE =
EXCEPTIONS
FE_FILE_OPEN_ERROR = 1
FE_FILE_EXISTS = 2
FE_FILE_WRITE_ERROR = 3
AP_NO_AUTHORITY = 4
AP_FILE_OPEN_ERROR = 5
AP_FILE_EMPTY = 6
OTHERS = 7
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope it will solve your query. -
Problem while downloadind data from ALV in excel format.
Hi Experts,
I have developed one ALV Report.
it have 53 columns. when i tried to download it in excel format using standard functionality, all columns are not coming in one line i.e 50 cloumns in one line and rest columns to the next line.
For Example.
Row 1 Header-> Fld1 Fld2 Fld3 Fld4 Fld5
Fld6 Fld7
Row 2 Values-> Val1 Val2 Val3 Val4 Val5
Val6 Val7
how i will get all these 53 columns in one line in EXCEL..
its urget........
Usefull answer will be rewarded...hi,
there are some specific restrictions in downloading data in alv.
i.e you cannot have morethan 1024 characters that can be downloaded in single row.
so change your report columns accordingly. -
SQL*Loader Problem while loading date from earlier era
Hi everybody,
I'm trying to load a date with SQL*Loader in Oracle 8.1.6. The value of the date is '11671102004338' with a date format 'YYYYMMDDHH24MISS'. Everytime I try it, I get the error message "ORA-01438: Wert größer als angegebene Stellenzahl für diese Spalte zuläßt" (meens: value is larger than the maximum length of the column). This is a little bit crazy, because the same works in SQL*Plus with the to_date function.
What I've to do?
Thanks in advance
RalfSorry, it's solved (I've to respect to correct type)
Maybe you are looking for
-
Can I use intel wireless display on my iPhone 5?
I would like to wirelessly stream movies and whatever I'm doing on my phone to my HDTV. I would like to use the NetGear Push2TV adapter. It needs a widi compatible device in order to stream wirelessly. So does the iPhone have widi?
-
Different background colors after publishing
I imported a powerpoint presentation into Captivate 7 and everything looks fine in the film strip. However, when I preview or publish the project some of the background colors change dramatically (dark blue/grey turns into sky blue). Is there a way t
-
PI sheet : CO54 messages
Hi Experts, We have a z Function module for a PI sheet process message. The functionality coded in this FM is to post a GR (material document). We have a event driven job which is triggering this Z fm. We are facing the issue, in some cases there are
-
How do I stop AE from changing my workspace when loading a project?
How do I stop AE from changing my workspace when loading a project? I've looked everywhere and can't find it. I work on a lot of projects that a peer works on and his screen size is smaller and his workspace is different than mine. Is there a sett
-
I'm very new to xml, what I'm asking is if any one can suggest good books to do with java xml and servlets, on a unix platform. I did find two books from Wrox (Professional Java XML , Java XML Programmer's Reference ), what I hope to complete with th