Problem in getting EXCEL data using I_OI_SPREADSHEET
Hello All,
My requirement is to read data from Excel document having multiple worksheets. I am successful in getting all worksheets in the excel using the method spreadsheet->select_sheet.
Now I face problems while using spreadsheet_get_ranges_data. I dont have any range to select from the worksheets. When my program executes contents internal table which is importing paramater from get_ranges_data method is not getting me data from EXCEL.
Can you please give me hint or solution to solve this issue.
Best Regards,
Krishna
[email protected]
Hello Norman,
Thanks for your response. But the solution is not really working for my case.
Step1: call class method spreadsheet->select_sheet
Step2: call class method spreadsheet->get_active_sheet
Step3: call class method i_oi_document_proxy->select_all
Step4: call class method spreadsheet->get_selection
Step5: Call class method spreadsheet->insert_range_dim
passing parameters selected from step 2.
But the problem is parameters (top,left,rows,columns) values supplied in step 3 is not giving me correct rows,columns that is in my EXCEL worksheet.
I have 3 rows and 3 columns, but I get 1 row and 1 column and 26 as top.
Let me know whether I am doing anything wrong in my calls to class?!.
Best Regards,
Nagendra Krishna
[email protected]
Similar Messages
-
Problem in getting Item data using RLE_DELNOTE
Hi everyone,
I am using RLE_DELNOTE as print program. This print program is not populating item level details in its structure ls_dlv_delnote. Can anyone help me?
Thanks and Regards,
JaiHi,
Are you using the standard SMARTFORM or Custom developed?
Look into the OSS note 944762.
See this:
http://www.sapfans.com/forums/viewtopic.php?f=14&t=271216
Problem with standar smartform ( Program RLE_DELNOTE) -
Problem in Uploading Excel Data ! - Urgent
Dear Experts,
I am uploading excel data using FM 'TEXT_CONVERT_XLS_TO_SAP' , its directly convert data and store in internal table same as in excel sheet(row , column wise).
But the problem is , one of the column having description more then 500 characters. so while uploding excel to itab its truncating the text and only uploding 255 characters.
Is there any other way , so that i can upload more then 500 characters long text. Also i have tried 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM , it was also not working.
Please Help me , its Urgent.
Points will be rewared.
Thanks & Regards,Hi,
Please use FM 'GUI_UPLOAD'.
types: begin of ttab,
rec(1000) type c,
end of ttab.
types: begin of tdat,
fld1(10) type c,
fld2(10) type c,
fld3(10) type c,
end of tdat.
data: itab type table of ttab with header line.
data: idat type table of tdat with header line.
data: file_str type string.
parameters: p_file type localfile.
at selection-screen on value-request for p_file.
call function 'KD_GET_FILENAME_ON_F4'
exporting
static = 'X'
changing
file_name = p_file.
start-of-selection.
file_str = p_file.
call function 'GUI_UPLOAD'
exporting
filename = file_str
filetype = 'ASC'
tables
data_tab = itab
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
others = 17.
Best regards,
Prashant -
Can anyone list problems/errors when uploading data using BDC's and BAPI's?
Can anyone list the problems/errors when uploading data using BDC's and BAPI's?
Hi,
If you are actually creating a BDC to load data pls be more specific.
Data format incorrect. Tab delimited/ etc
Dates in wrong formats
Currency incorrect formats
Missing screens
Wrong transaction code
File not found,
Missing Mandatory fields,
Screen resoultion.
You should always use refresh for your Bdcdata table.
Loop at internal table.
refresh Bdcdata.
regards,
sowjanya. -
Problem with getting current date and time using oracle.jbo.domain.Date
I`d like to get current date and time using oracle.jbo.domain.Date method getCurrentDate(), but it always return current date and 12:00:00. I also need to get the current time.
I think you should use java.sql.Timestamp domain.
(And set database type to TIME or DATETIME.)
Jan -
Problem with getting actual data from Detail in Master/Detail
Hi.
I'm using master-detail tables (based on Read-Only view objects connected with view link).
In those tables some columns are inputText, so that user can change data for the use of stored procedure only (I don't want to change data showed in tables, just need a possibility to modify it before passing arguments to procedure)
The problem is when I get data from rows from detail view (Read Only with attributes set to "updatable always") it's not the data user entered in the table (there is no problem in master table) but the data fetched from database.
This is the way I do it in backing been:
Row[] masterRows = view.getAllRowsInRange();
for (int i = 0; i < masterRows .length; i++){
MasterRowImpl row = (MasterRowImpl )masterRows;
System.out.println("Group name:" + row.getGroup())
RowIterator rowIterator = row.getDetailsView();
while(rowIterator.hasNext()){
DetailsViewRowImpl detailRow = (DetailsViewRowImpl )rowIterator.next();
System.out.println("User name: " + detailRow.getName())
So if (for example) in database I have Group1, with 3 detail rows: John1,John2,John3;
and user in Tables displayedon page changes it like this:
Group1_changed, John1, John2_blah, John333
After executing the code above I get:
Group name: Group1_changed
User name: John1
User name: John2
User name: John3
Is it a normal behaviour?
ps. When I use entity based view objects there is no problem, but I want to use ReadOnly View Objects.this is my function that reads the data:
while( ( ch = dis.read() ) != -1 ){
mess.append((char)ch);
licz++;
if(licz>prog){
licz=0;
//gauge.setValue();
when i use just mess.append(dis.readUTF()))
i get en exception:
java.io.EOFException
at java.io.DataInputStream.readFully(+45)
at java.io.DataInputStream.readUTF(+32)
at java.io.DataInputStream.readUTF(+4)
at KConnection.KConnector.connect(+137)
at SerwisMain.download(+25)
at SerwisMain.ok(+415)
at KGUI.KInput.commandAction(+209)
at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+152)
at com.sun.kvem.midp.lcdui.EmulEventHandler$EventLoop.run(+459) -
Problem in Uploading excel file using WebDynpro for Java
Hi All
I have followed for Uploading excel file using WebDynpro for Java added by Tulasi Palnati
I done all, but I'm getting 500 Exception please contact u r system admin meag at run time also Jxl/Workbook class not found msag but i downloaded Jxl.jar file and there is no error signals in coding part. How can I solve the Problem.
Thanks
PolakaPlease ask the people in the Web Dynpro Java forum for a solution.
-
How to get exact date using to_date
Hi all
how to get exact date over there
select TO_DATE(TRUNC(PLLA.CREATION_DATE),'DD-MON-YYYY'),TRUNC(PLLA.CREATION_DATE),round(PLLA.CREATION_DATE),
TO_DATE(round(PLLA.CREATION_DATE),'DD-MON-YYYY'),TO_DATE(PLLA.CREATION_DATE,'DD-MON-YYYY'),PLLA.CREATION_DATE,
TO_DATE(TRUNC(PLLA.CREATION_DATE)),TO_DATE(round(PLLA.CREATION_DATE))
from po_line_locations_all plla.
In one of the plsql program i want to compare the creation date with given date where as creation date is in Timestamp formatHi,
Use trunc or to_char with masking like 'dd/mm/yyyy' format. If this does not solve your problem then do post your sample input and sample output. As I am unable to make out what is your actual problem.
Regards -
Problem in getting current Date at runtime and parsing into my own format
Hi all,
In my program....I want to get the Date(current Date).......
How can I get it....
And also I want it to change it to my own format.....
I should get this at runtime....
Plz tell me which class and method to use....
Any help will be greatly appreciated...
Thanks,Try looking at some of these articles:
http://www.javaworld.com/javaworld/javaqa/2001-10/01-qa-1005-dateformat.html
http://www.javaworld.com/jw-12-2000/jw-1229-dates.html
http://www.javaworld.com/javaworld/jw-03-2001/jw-0330-time.html -
Problem exporting to excel when using embedded web templates through WAD
Using web templates designed with WAD, we are experiencing an issue when trying to export excel when using embedded web templates.
We have set up tabstrips within our templates that load other templates (embedded into the global template).
Upon right clicking on any query and choosing "Export to Excel", any query that is in one of the tabs using the embedded web template item does not show up. Any queries in natively in the global web template will export and show up fine.
Any thoughts on how to enable something like this, or workarounds to make this work? We decided to split up these templates for performance reasons and can't go back from that decision. Also let me know if you need a better explanation of what we're trying to do.
Thanks in advance!
JonathanHi SDBI,
Is this in place of loading a new template per tab? We are using container layouts in all of our templates so we can link things into tabstrips as well, we have just split up some templates to be embedded into tabs for performance reasons and data locking.
Also when exporting, we are looking for all of the items displayed at that time to be exported, however only the items from the global template show up, not all of the displayed queries. For example, anything outside of the tabstrip will export perfectly, but since the query embedded into the template the tabstrip is loading is not part of the native web template, it does not show up.
Seems like a tool limitation to me when embedding templates?
Thanks,
Jon -
Problem in getting the Date object based on the TimeZone
Hi,
I need to create a Date object that holds the time of the specified TimeZone.
I am using TimeZone and Calendar object for that, but when I call the Calendar object's getTime() method, it returns
a Date object that holds the local time.
Can somebody let me know what why?
Here is what I uses in my code.
TimeZone tz = TimeZone.getTimeZone("IST");
Calendar cal = new GregorianCalendar(tz);
System.out.println("Date of "IST" TimeZone = " + cal.getTime());
Instead of cal.getTime, if I do the following I am getting the values correctly.
int month = cal.get(Calendar.MONTH); // 0..11
int day = cal.get(Calendar.DATE); // 0..11
int hour12 = cal.get(Calendar.HOUR); // 0..11
int minutes = cal.get(Calendar.MINUTE); // 0..59
Can somebody let me know why I am not able to assign the Date of the TimeZone specified.
Is there anything wrong with the code?
SebIs there anything wrong with the code?No, only with your understanding of the Date class. From the API:
The class Date represents a specific instant in time, with millisecond precision.
The different time displayed for different TimeZones around the world are just that: a display format for the same instant in time.
To display the "instant in time" in a different TimeZone, use DateFormat. Here's a small sample:TimeZone tz = TimeZone.getTimeZone ("GMT");
Calendar c = Calendar.getInstance (tz);
System.out.println(c.getTime ()); // prints Tue Mar 18 02:56:53 IST 2008
DateFormat dtf = DateFormat.getTimeInstance ();
dtf.setTimeZone (tz);
System.out.println(dtf.format (c.getTime ())); // prints 9:26:53 PMIt's no different from formatting the same number in various ways: 10 decimal == 0xA hexadecimal == 012 octal == 1010 binary. Same value, different representation. Same intant in time, different local time for each zone.
Savvy?
cheers, db -
Problem with updating pricing date using BAPI_SALESORDER_CHANGE
Hi,
I need to update pricing date on sales order (but only on item level).
I have been trying to use BAPI_SALESORDER_CHANGE but nothing changes.Bapi returns no errors, ends with success.
I hoped that bapi would change not only pricing date but also recalculate things the date affected.
Here is my code:
ls_head_inx-updateflag = 'U'.
ls_bapisdls-pricing = 'C'.
ls_item-itm_number = sales_order_posnr
ls_item-price_date = new_price_date
APPEND ls_item TO lt_item.
ls_item_inx-itm_number = sales_order_posnr
ls_item_inx-updateflag = 'U'.
ls_item_inx-price_date = 'X'.
APPEND ls_item_inx TO lt_item_inx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = sales_order
order_header_inx = ls_head_inx
logic_switch = ls_bapisdls
TABLES
return = lt_return
order_item_in = lt_item
order_item_inx = lt_item_inx
Thanks & Regards,
MarioMario,
I run same code as yours and work for me fine, able to update ITEM pricing date.
I suppose you are using BAPI_TRANSACTION_COMMIT after your BAPI call, then only it will work.
Also note that VBKD table stores this date for header and item. In my system, there are generally only header rows in that table, but a new item row gets generated when I change the item date with the BAPI to some other date. Also, this BAPI sometimes issues a W message instead of ERROR for something like non-existing items, so carefully check your RETURN table too.
'Item 000002 does not exist' as WARNING message, so might be considering it as a success.
If nothing works, try to do the same thing for the same data using VA02 and check . If that works, BAPI will work surely.
Regards,
Diwakar -
How to get a date using a String.
Hello!
I've got this code:
Calendar s=null;
String dateStr1=s.getInstance().getTime().toString());
String dateStr2=s.getInstance().getTime().toString());
I can't save these two dates in Date form, but only as Strings because it must be this way for my reasons.
I then want to compare the initial Dates. Is there any way to get the two Dates using these two Strings? I found
Date myDate1=new Date(String s); but it doesn't work.
Thanks.sigh I just realized I said "string
string" when I meant "strong string" in
the previous reply, and can't edit it now.It doesn't need to be that strong anyway. Tie a Patek watch to one end and leave it on the sidewalk outside a restaurant. When you see a woman reach for it, jerk it away. Keep repeating until she reaches your table. Congratulations, you have a date! Granted, it won't be very long date... -
Filter excel data using activex
Hi,
I have imported some datas to excel using labview, and using activex I can able to apply filter also. Attached screenshot is sample excel data. In that, I want column 3 to filter only 500 and then 100 and so on. Is it possible in activex. Because after filtering 500 I want to find least value for athoer columns 1st and put it in another sheet, then filter 100-->find least value-->put it in another sheet. So what I want now is to filter 500 alone in column 3 using activex. thanks in advance
Thanks & Regards
saamy
Attachments:
screenshot-excel.jpg 114 KBIf any1 know this.. please let me know..thanks in advance
-
hi
how i can get the following date using sql, ie i want to get '01-APR-2005'
if the sysdate is between (01/04/2005 - 31/3/2006). in the same way if it is
01/04/2004 - 31/3/2005 i want to get '01-apr-2004'...in the same way for any year..
how i can get this...
thx in adv
Kris
Message was edited by:
KrisSQL> select dt, add_months(trunc(add_months(dt, -3), 'yyyy'), 3) new_dt
2 from t
3 order by dt;
DT NEW_DT
01-APR-04 01-APR-04
31-DEC-04 01-APR-04
01-JAN-05 01-APR-04
31-MAR-05 01-APR-04
01-APR-05 01-APR-05
31-DEC-05 01-APR-05
01-JAN-06 01-APR-05
31-MAR-06 01-APR-05
8 rows selected.
SQL> select add_months(trunc(add_months(sysdate, -3), 'yyyy'), 3) from dual;
ADD_MONTH
01-APR-05
Maybe you are looking for
-
When i upgraded from 9.2.3 to 9.3.1 I had migration issues, where most my photos ended up in a restored event called restored photos. But then they don't come up in faces anymore. So can i upgrade to 9.3.2 and then just rebuild my photo library ? I w
-
Is this a settings issue or is there something wrong w the camera....? Any help appreciated. Ta
-
Documentation of Portal Implementation - Experiences Required!
Dear EP Experts & NW Gurus, I would like to know: 1)Any amount of portal implementation includes creation of Portal objects and PAR files, systems etc etc.. Moving these portal objects from one env to other some times involves changing few properties
-
Forwarded emails show my sender address as "rejected by the server"
Forwarded emails show my sender address as "rejected by the server". All forwarded mail sits forever in the outbox. All other mail functions are completely normal. Started happening when I switched over to the 4S.
-
IPhoto '08 photos don't appear after sync
When I sync my iPhoto '08 library to my iPod, the photos appear blank-how can I fix this?