‎2007 Mar 01 7:04 PM
Hi,
Does ECL viewer has drag and drop functionality for example we can drag and drop file from windows sever to SAP. So that it can be used later on using BDN.
Thanks.
Regards,
Rajesh.
‎2007 Mar 01 7:18 PM
‎2007 Mar 01 7:18 PM
‎2007 Mar 01 7:22 PM
‎2007 Mar 01 7:29 PM
ECL veiwer is a part of the SAPgui implemented as a frontend control. It was developed by SAP jointly with a third party(at least this is what I was told). It is implemented like any other frontend control, like a text editor, or an ALV grid. One important thing, is that you must have the frontend software installed. It is a component of SAPgui. You need to run the installation and select the component ECL Viewer, and install it. Then when you use the class in your program, it will be able to talk to the frontend. Example coding to follow........
Regards
Rich Heilman
‎2007 Mar 01 7:43 PM
Implement this program, it is a cut/paste solution. Again, you must have the ECL component installed on your SAPgui.
report zrich_0001 .
parameters: p_check type c.
start-of-selection.
at selection-screen output.
data: dockingleft type ref to cl_gui_docking_container,
dockingright type ref to cl_gui_docking_container,
ecl_viewer type ref to cl_gui_ecl_2dviewer,
html_viewer type ref to cl_gui_html_viewer.
data: repid type syrepid.
data: url(2048) value 'c:'.
repid = sy-repid.
check dockingleft is initial.
create object dockingleft
exporting repid = repid
dynnr = sy-dynnr
side = dockingleft->dock_at_left
ratio = 50
extension = 1000.
create object html_viewer
exporting
parent = dockingleft.
call method html_viewer->show_url
exporting
url = url.
check dockingright is initial.
create object dockingright
exporting repid = repid
dynnr = sy-dynnr
side = dockingright->dock_at_right
ratio = 50
extension = 1000.
create object ecl_viewer
exporting
parent = dockingright
exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
others = 5.
call method ecl_viewer->create_toolbar
exporting
close_button = ' '
tools = 'X'
viewer = 'X'
navigation = 'X'
options = 'X'
viewer_openfile = 'X'
viewer_savefile = 'X'
tool_measurement = 'X'
remove_document = ' '
exceptions
cntl_system_error = 1
cntl_error = 2
cntb_btype_error = 3
dp_error = 4 .
Now drap a PDF file from the left container, and drop in the right side. Slick, right?
The ECL doesn't handle every file type, but PDF works good.
Regards,
Rich Heilman
‎2007 Mar 01 7:43 PM
Waiting for Code...
Do I need to install ECL 5.1.1 from service marketplace ? Ihave downloaded it from service marketplace though ?
If you have any documents or information, I would be delighted to get it....
‎2007 Mar 01 7:45 PM
‎2007 Mar 01 7:51 PM
I ran the code without installing ECL viewver. Got an ABAP dump. Is it due to code or non-installation of ECL viewer.
"An exception occurred. This exception is dealt with in more detail below
The exception, which is assigned to the class 'CX_SY_REF_IS_INITIAL', was
neither
aught nor passed along using a RAISING clause, in the procedure
"%_SEL_SCREEN_O" "(FORM)"
ince the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
he reason for the exception is:
ttempt to access a component using 'NULL' object reference (points
o nothing).
n object reference must point to an object (an instance of a class)
efore you can use it to access components (variable: "ECL_VIEWER").
ither the reference has not yet been set, or it has been reset to
NULL' by a CLEAR statement. "
‎2007 Mar 01 8:00 PM
‎2007 Mar 01 8:04 PM
I ran the code and it worked for me. I am curious to know what is this used for ? I could see the files in my 'C directory, view them, close them. but what's the use of this in SAP ?
‎2007 Mar 01 8:10 PM
I'll tell you. We use the ECL viewer in exactly two programs at my company, but they do the same thing.
For example, the customer faxes a drawing/form to a fax number. This fax number is tied directly to our RightFax software which takes the fax and creates a .tiff file on our server. So now we have a soft copy of the incoming fax instead of a hard copy.(we love trees) Now my program reads this directory into a tree like structure on the left and the user can double click the files, when she does, the image of the fax opens in the right side. Now she can evaluate the drawing and what the customer is asking for and process accordingly, all done without a sheet of paper.
Regards,
RIch Heilman
‎2007 Mar 01 7:21 PM
Hi Rich,
I really need your help. Can you please tell me what I have to use ECL viewer. Please focus some light on this.....
Regards,
Rajesh.