Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

How to save OLE2_Object in AL11 directory ?

$
0
0

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 into lv_destname and try to use it .

When i call the  function module  GUI_UPLOAD passing the lv_destname as the input parameter. I get the error saying it cannot process the file.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = lv_destname

filetype  ="BIN'

...

...

PLEASE HELP ME OUT ON THIS. I HAVE BEEN TRYIGN TO SOLVE THIS THING FOR DAYS.

 

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


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>