We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE:[sap-dev] How to Save Ole2 Object in AL11 Directory?

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from Lukasz Pegiel on May 3 at 6:19 AM
You have to save the file fistly for example in temporary windows folder, then upload it to internal table with gui_upload , then loop on itab and use open dataset statement.

Second option could be savin file to temp win folder and then upload it to unix using ftp if you have available one on your sap server.

Lukasz

---------------Original Message---------------
From: Sanjeev Gowda
Sent: Wednesday, May 01, 2013 10:01 AM
Subject: How to Save Ole2 Object in AL11 Directory?

Hi Experts,

I have created an excel sheet using ole2incl. Here is the snippet of the program
create object gobj_excel 'EXCEL.APPLICATION'.
Set Property of gobj_excel 'Visible' = 1.
call method of gobj_excel 'workbooks' = gobj_workbook.
call method of gobj_excel 'worksheets' = gobj_sheet.
.....
.....
call method of gobj_sheet 'SaveAs'
Exporting
#1 = <lv_destName>
#2 = 1 .

In the <lv_destname> i need to use the location specified in AL11 . So i have wrote the code
SELECT SINGLE dirname INTO lv_dir_param FROM user_dir WHERE aliass = 'ABC'.
after the execution of above statement i get the value lv_dir_param = /ABC/XYZ .
I concatenate time stamp into the lv_destname
CONCATENATE lv_dir_param '/' sy-datum '.xls' into lv_destname and try to use it .
It does not save.

Please help me out on this. I have been trying to solve this thing for days.

I was told that I need to use DATASET in order to read or write in UNIX environment. How can I use DATASET without having saved the excel sheet, I don't have the values of the excel sheet in any internal table.

Any suggestions is greatly appreciated.

Thank You

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2013 Ziff Davis, Inc. and message author.
Ziff Davis, Inc. 28 E 28th Street New York, NY 10016
Lukasz Pegiel  

SAP Specialist (ABAP, PP, MM)
achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Have an SAP Question? Ask Your Peers at Toolbox for IT

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language