Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
athavanraja
Active Contributor
0 Kudos
Recently there was a  post  (Open ECL Viewer on a BSP Page) in BSP forum about using CL_GUI_ECL_3DVIEWER in BSP  applications and that lead to this weblog. This class(CL_GUI_ECL_3DVIEWER) is primarily for using in SAPGUI. I took a deeper look  to see which control they are using , whether the same can be used in webpage  and found out that its quite simple. This class uses methods of a dll (webviewer3d.dll) installed as  part of SAP GUI installation. For this example to work, your system should have  this dll registered in your local pc. Generally this dll can be found in the  following path - c:program filessapfrontendsapguiwebviewer3d.dll.


BSP Page layout code


<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2003" >
<htmlb:page title=" " >
<script language="javascript">
function setFile(value){
if ( ( value.lastIndexOf(".jt") != -1 ) || ( value.lastIndexOf(".wrl") != -1 ) || ( value.lastIndexOf(".stl") != -1 )){
document.getElementById('WebViewer3D1').File = value;
return true;
} else{
alert("Please upload files with extension .jt OR .wrl OR .stl files only!");
return false;
}
}
</script>
<htmlb:form>
<object classid="clsid:AFBBE070-7340-11d2-AA6B-00E02924C34E" id="WebViewer3D1" width="851" height="532">
<param name="BackgroundColor" value="8421440">
<param name="File" value="">
<param name="ContextMenuMode" value="1">
<param name="InteractionMode" value="6">
</object>
<br>
<input type="file" value="file get" name="f1" onchange="javascript:setFile(this.value);">
<br>
</htmlb:form>
</htmlb:page>
</htmlb:content>

20 Comments
Labels in this area