HTMLB Chart (JSPDynPage)

Hi,
I'm trying to set-up a HTMLB Chart but not having any luck.  Has anyone done this before?.  Thanks
Here is my code:
Java:
package za.co.pciza.jsppage;
import za.co.pciza.jsppage.GraphJSPBean;
import com.sapportals.htmlb.*;
import com.sapportals.htmlb.enum.*;
import com.sapportals.htmlb.event.*;
import com.sapportals.htmlb.page.*;
import com.sapportals.portal.htmlb.page.*;
import com.sapportals.portal.prt.component.*;
import com.sap.mw.jco.*;
public class GraphJSPPage extends PageProcessorComponent {
  public DynPage getPage(){
    return new GraphJSPPageDynPage();
  public static class GraphJSPPageDynPage extends JSPDynPage{
    public void doInitialization(){
          IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
          IPortalComponentContext myContext = request.getComponentContext();
          IPortalComponentProfile myProfile = myContext.getProfile();
          GraphElement theBean = new GraphElement();
          theBean.setTitle("Graph Title");
          Chart chartBean = new Chart();          
          JCO.Table table = new JCO.Table("DAX");
//             add the info/header to the table. The header is defined by the column name,
//             data type and length (see JCO table API for details).
          table.addInfo("GROUPID", JCO.TYPE_CHAR, 50);
          table.addInfo("X", JCO.TYPE_CHAR, 50);
          table.addInfo("Y", JCO.TYPE_CHAR, 50);
          table.addInfo("Z", JCO.TYPE_CHAR, 50);
          table.addInfo("COLOR", JCO.TYPE_CHAR, 50);
          table.addInfo("EXTENSION", JCO.TYPE_CHAR, 150);
//             append a record to the table. setValue sets the value as string. The second
//             parameter is the column. The numbers are according to the sequence of the
//             definition of the header (see above).
          table.appendRow();
          table.setValue("07.2001",0);
          table.setValue("SAP",1);
          table.setValue("158",2);
          table.setValue("20",3);
          table.setValue("10",4);
          table.setValue("href=\"http://www.sap-ag.de/\"",5);
//             create a JCOChartModel and set the JCO table
          IChartModel model = new JCOChartModel();
          ((JCOChartModel) model).setDataSrc(table);
          chartBean.setModel(model);
          myProfile.putValue("infoBean", theBean);
          myProfile.putValue("graphBean", chartBean);
    public void doProcessAfterInput() throws PageException {
    public void doProcessBeforeOutput() throws PageException {
      //GraphJSPBean graphJSPBean = new GraphJSPBean();
      //((IPortalComponentRequest)getRequest()).getServletRequest().setAttribute("graphJSPBean", graphJSPBean);
      // fill your bean with data here...
      this.setJspName("graphjsppage.jsp");
JSP:
<%-- jspoverviewpage.jsp --%>
<%@ taglib uri= "tagLib" prefix="hbj" %>
<%@ page import="java.util.*"%>
<%@ page import="za.co.pciza.jsppage.GraphElement" %>
<%@ page import="za.co.pciza.jsppage.GraphJSPPage" %>
<%@ page import = "com.sapportals.htmlb.enum.EventTrigger" %>
<%@ page import = "com.sapportals.htmlb.*" %>
<%@ page import = "com.sap.barchart.ModelBean" %>
<hbj:content id="myContext" >
     <hbj:page title="PageTitle">
          <hbj:form id="myFormId" >
          <jsp:useBean
               id="infoBean"
               scope="application"
               class="za.co.pciza.jsppage.GraphElement" />
                         <hbj:textView
                              encode="false"
                              text="<%= infoBean.getTitle() %>"
                              wrapping="true"
                         />
                         <br><br>
          <jsp:useBean
               id="graphBean"
               scope="application"
               class="com.sap.barchart.ModelBean" />
                    <hbj:chart
                         id="myChart1"
                         model="graphBean.model"
                         visible="true"
                         displayObjectValues="true"
                         titleCategories="Company"
                         titleValues="Turnover"
                         title="Washers by Companies!"
                         chartType="BARS_3D"
                         colorOrder="DEFAULT"
                         height="200"
                    />
          </hbj:form>
     </hbj:page>
</hbj:content>

Hi,
If you do not get any error message and if you cannot see the chart, check IE(settings)->internet options->advanced tab->select use java for applet.
In the portalapp.xml change the PrivateSharingReference to
SharingReference
<application-config>
    <property name="SharingReference" value="com.sap.portal.htmlb"/>
  </application-config>
If this does not solve your problem, please post the error from the trace file.

Similar Messages

  • Problem with htmlb:chart after upgrade

    We just upgraded from BW 3.0, WAS 6.20 to BW 3.5, WAS 6.40.   Testing revealed that my htmlb:chart would no longer work.  I just got a white screen whether using Internet Explorer or Netscape.  After much digging, I found that the values for charttype changed with this upgrade.  Any value before that was COLS* now is COLUMNS*
    This is just a "for your information" in case you run into this.
    Janice

    Thanks for the info!

  • Color in htmlb:chart

    hi all,
    kindly help me in htmlb:chart. M using it and wanna give a blue color but dnt know
    the number for that. I tried near about all the numbers. plz tell me the number of it.
    thanks in advance
    ons bs

    Hi,
    line-color = 25 (or) 26 (or) 27 these all are for Blue color.
    Hope this will solve your problem,Reward if it helpful.
    Thanks&regds,
    Sree.

  • Problem with htmlb:chart

    Hi to all,
    how can I solve this Problem:
    <b>--- code ---</b>
    data: line type igs_data.
      line-groupid = 'user 1'.
      line-x = '11.03.2004'.
      line-y = 12.
      append line to data.
      line-x = '12.03.2004'.
      line-y = 14.
      append line to data.
      line-groupid = 'user 2'.
      line-x = '10.03.2004'.
      line-y = 10.
      append line to data.
      line-x = '11.03.2004'.
      line-y = 12.
      append line to data.
      line-x = '12.03.2004'.
      line-y = 21.
      append line to data.
    <b>--- end ---</b>
    <b>Result:</b>
    12.03.2004 | <b>*****user 2*****</b> 21
    11.03.2004 | <b>***user 1***</b> 14
    _________ | <b>***user 2**</b> 12
    10.03.2004 | <b>***user 1**</b> 12
    _________ | <b>**user 2**</b> 10
    How can I get the right result for 'user 1' ?
    Thanks in advance

    I just tried the same program and I think it works correctly. You have not defined, what correct solution is. You have just stated end result. I am not sure why you get value 12 for user 1 on day 10.03.2004, but I get value 0 for the same. I think I am missing something here. Not sure.
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="test " >
        <htmlb:form>
          <%
            data: line type igs_data.
            data: graph_data type igs_data_tab.
            line-groupid = 'user 1'.
            line-x = '11.03.2004'.
            line-y = 12.
            append line to graph_data.
            line-x = '12.03.2004'.
            line-y = 14.
            append line to graph_data.
            line-groupid = 'user 2'.
            line-x = '10.03.2004'.
            line-y = 10.
            append line to graph_data.
            line-x = '11.03.2004'.
            line-y = 12.
            append line to graph_data.
            line-x = '12.03.2004'.
            line-y = 21.
            append line to graph_data.
          %>
          <htmlb:chart data="<%=graph_data%>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>

  • Htmlb chart control is not working

    Hi All
    I created chart using htmlb chart control as per documents  given in pdk. but it is not displaying any thing on the browser,I am attaching code ,Please tell me where will the wrong
    Thanks in advance
    Gopal
    Java:
    create a new JCO table
            JCO.Table table = new JCO.Table("DAX");
    //       add the info/header to the table. The header is defined by the column name,
    //       data type and length (see JCO table API for details).
            table.addInfo("GROUPID", JCO.TYPE_CHAR, 50);
            table.addInfo("X", JCO.TYPE_CHAR, 50);
            table.addInfo("Y", JCO.TYPE_CHAR, 50);
            table.addInfo("Z", JCO.TYPE_CHAR, 50);
            table.addInfo("COLOR", JCO.TYPE_CHAR, 50);
            table.addInfo("EXTENSION", JCO.TYPE_CHAR, 150);
    //       append a record to the table. setValue sets the value as string. The second
    //       parameter is the column. The numbers are according to the sequence of the
    //       definition of the header (see above).
            table.appendRow();
            table.setValue("07.2001",0);
            table.setValue("SAP",1);
            table.setValue("158",2);
            table.setValue("20",3);
            table.setValue("10",4);
            table.setValue("href=\"http://www.sap-ag.de/\"",5);
    //       create a JCOChartModel and set the JCO table
           IChartModel model = new JCOChartModel();
            ((JCOChartModel) model).setDataSrc(table);
    myBean.setModel(model1);
    JSP:
    <jsp:useBean id="myBean" scope="session" class="com.sap.barchart.ModelBean" />
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
         <hbj:chart
               id="myChart1"
               model="myBean.model"
               visible="true"
               displayObjectValues="true"
               titleCategories="Company"
               titleValues="Turnover"
               title="Washers by Companies!"
               chartType="BARS_3D"
               colorOrder="DEFAULT"
               height="200"
         />
         </hbj:form>
      </hbj:page>
    </hbj:content>

    HI,
    Check if the bean is null.
    Try displaying it using classlib in the dynpage itself .
    Regards
    Bharathwaj

  • Use of HTMLB:chart displayObjectValues

    Hi,
    I need a little help with the attribute displayObjectValues of the HTMLB:Chart extension.
    I have the following code
          <htmlb:chart id                  = "myChart1"
                       data                = "<%= data %>"
                       displayObjectValues = "True"
                       chartType           = "COLS"
                       colorOrder          = "DEFAULT"
                       title               = "Test Chart"
                       titleCategories     = "Statuses"
                       titleValues         = "Percentages"
                       visible             = "X"
                       width               = "500" />
    but still cannot seem to get the values to display and the end of the columns.  Any ideas what I am doing wrong?
    Regards
    Paul.

    Concerning the HTMLB:Chart for 3D Bars, with IGS PH_IGS_RFC_DEST, you can specify colors for the 3D Bars and the legend also appears in the colors you specify.  But according to previous messages and posts, numeric values must appear in European notation and displayObjectValues does not work.
    Conversely with GFW_ITS_RFC_DEST, you can specify colors for the 3D bars but the legend always displays automatic colors so that the chart and the legend can be out of sync.  But I can get U.S. numeric notation and displayObjectValues works.
    Does SAP supply an IGS that will let me display numbers with U.S. notation, supports the displayObjectValues labels, and allows me to specify colors for a 3D Bar chart that will also be reflected in the chart legend?
    Thanks
    Janice Ishee

  • Htmlb chart numeric values format

    Hi, does anyone know how to display a big value such as 100000 as 100,000 on a column chart
    (y axis)? Would be easier to read... Thanks,
    Mireille Lachance

    Hi, thanks for the answer. I believe you are refering to a different type of chart / technology... I am using htmlb chart and there is not tag for format. We're still running Web As 6.20 so I might be missing some options included in a later version.
    Mireille

  • Jspdynpage ,htmlb,JCO

    hi
    can any one help with the coding and syntax for writing a program in which my interface should be in HTMLB and i should connect that form with sap r/3 backend system using jspdynpage. As i am trying to do this but not able to get any proper documentation so that;s why i was just looking for my help in which if i get a proper documentation to do this.
    As i am new to this so,please provide me some good documentaion which i can use for my refernces. i have been through lots of net sites but nothing useful.
    thanks
    Regards
    sandeep

    hi sandeep,
    You can connect to R/3 using Jco, check this sample jspDynpage, it retrieves data from R/3...
    import java.util.ArrayList;
    import com.sap.mw.jco.IFunctionTemplate;
    import com.sap.mw.jco.JCO;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    public class jsp_rfc extends PageProcessorComponent {
      public DynPage getPage(){
        return new jsp_rfcDynPage();
      public static class jsp_rfcDynPage extends JSPDynPage{
         public JCO.Client mConnection;
         public JCO.Repository mRepository;
         public ArrayList al = new ArrayList();
        public void doInitialization(){
             conn();
             IPortalComponentResponse res = (IPortalComponentResponse)this.getResponse();
             for(int i=0;i<al.size();i++)
             res.write(" "+al.get(i).toString());
        public void doProcessAfterInput() throws PageException {
        public void doProcessBeforeOutput() throws PageException {
          this.setJspName("rfc.jsp");
         public ArrayList conn() {
                          //r3-accessing
                          //connect_to_r3();
                          try {
                                  // Change the logon information to your own system/user
                                         mConnection = JCO.createClient("812", // SAP client
                          "User id", // userid
                          "******", // password
                          null, // language
                          "ctsgvcsap3", // application server host name
                   "03"); // system number
                                  mConnection.connect();
                                  mRepository = new JCO.Repository("dummy string", mConnection);
                          } catch (Exception ex) {
                                  ex.printStackTrace();
                                  System.exit(1);
                          JCO.Function function = null;
                          JCO.Table codes = null;
                          try {
                                  function = this.createFunction("RFC name");
                                  if (function == null) {
                                         System.out.println("RFC" + " not found in SAP.");
                                         System.exit(1);
                                  for(int i=1;i<10;i++){
                                  function.getImportParameterList().setValue(i, "Import parameter");
                                  mConnection.execute(function);
                                  Object name =function.getExportParameterList().getValue("Export parameter");
                                  al.add(name);
                                  //store values into strings
                                  //pushing of values we get from r3 into awt
                          } catch (Exception ex) {
                                  ex.printStackTrace();
                                  System.exit(1);
                          disconnect_r3();
                        return al;
         public void connect_to_r3() {
                   public JCO.Function createFunction(String name) throws Exception {
                          try {
                                  IFunctionTemplate ft =
                                         mRepository.getFunctionTemplate(name.toUpperCase());
                                  if (ft == null)
                                         return null;
                                  return ft.getFunction();
                          } catch (Exception ex) {
                                  throw new Exception("Problem retrieving JCO.Function object.");
                   public void disconnect_r3() {
                          mConnection.disconnect();
    Create your RFC in the R/3 and give that details in the code wherever required...
    Hope this helps...
    Regs,
    jaga

  • SAP connector and JSPDynPage

    hi everybody, I am trying to display some data from RFC on a JspDyn Page, I have prepared the project but the data from RFc is not displaying.... the code is
    MyJspPage.java:-
    package com.ust.jca;
    import javax.resource.cci.MappedRecord;
    import javax.resource.cci.RecordFactory;
    import com.sapportals.connector.connection.IConnection;
    import com.sapportals.connector.execution.functions.IInteraction;
    import com.sapportals.connector.execution.functions.IInteractionSpec;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.ivs.cg.ConnectionProperties;
    import com.sapportals.portal.ivs.cg.IConnectorGatewayService;
    import com.sapportals.portal.ivs.cg.IConnectorService;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    import com.sapportals.connector.execution.objects.language.IFunction;
    import com.sapportals.connector.execution.structures.IRecordSet;
    import com.sapportals.connector.execution.structures.IRecordMetaData;
    import com.sapportals.connector.execution.structures.IStructureFactory;
    import com.sapportals.connector.metadata.functions.IFunctionsMetaData;
    import java.util.Vector;
    public class MyJspPage extends PageProcessorComponent {
         public DynPage getPage() {
              return new MyJspPageDynPage();
         public static class MyJspPageDynPage extends JSPDynPage {
              private RfcBean myBean;
              public void doInitialization() {
              public void doProcessAfterInput() throws PageException {
              public void doProcessBeforeOutput() throws PageException {
                   myBean = new RfcBean();
                   ((IPortalComponentRequest) getRequest())
                        .getServletRequest().setAttribute("myBean",myBean);
                   IPortalComponentRequest request =
                        (IPortalComponentRequest) this.getRequest();
                   // fill your bean with data here...
                   try {
                        //Alias is the name of the alias you defined in portal for SAP system
                        getSAPdata(getConnection(request, "P35"));
                   } catch (Exception e) {
                        e.printStackTrace();
                   this.setJspName("MyJspPage.jsp");
              private IConnection getConnection (IPortalComponentRequest request,String alias)
              throws Exception
                   IConnectorGatewayService cgService = (IConnectorGatewayService) PortalRuntime
                             .getRuntimeResources().getService(IConnectorService.KEY);
                   ConnectionProperties cp =     new ConnectionProperties(
                             request.getLocale(),request.getUser());
                   return cgService.getConnection(alias, cp);                              
              private void getSAPdata(IConnection client) throws Exception {
    try
              /* Start Interaction * */
              IInteraction interaction = client.createInteractionEx();
              // call the BAPI_MDDATASET_CREATE_OBJECT
              IInteractionSpec interactionSpec = interaction.getInteractionSpec();
              interactionSpec.setPropertyValue("Name", "ZHRESS_FIRSTDAY_SERVICE");                
              RecordFactory recordFactory = interaction.getRecordFactory();
              MappedRecord input = recordFactory.createMappedRecord("input");
             com.sapportals.connector.metadata.functions.IFunction function = client.getFunctionsMetaData().getFunction("T_ZHRESS_FIRSTDAY");
              IPortalComponentRequest request = (IPortalComponentRequest)this.getRequest();
              //input.put("P35", request.getUser().getUniqueName());
              input.put("SERVICEID","7");     
              input.put("YYUSER" , "EMP");     
              input.put("YYMOD","DIS");               
             MappedRecord importParams = recordFactory.createMappedRecord("input");        
             IStructureFactory structureFactory = interaction.retrieveStructureFactory();
             IRecordSet table = (IRecordSet) structureFactory.getStructure(
             function.getParameter("T_ZHRESS_FIRSTDAY").getStructure());     
              MappedRecord exportParams = (MappedRecord) interaction.execute(interactionSpec, input);
              //myBean.setCW1((String) exportParams.get("CW1"));
              //myBean.setCW1(((Integer) exportParams.get("T_ZHRESS_FIRSTDAY")).toString());                  
             //myBean.setCW1((String) exportParams.get("T_ZHRESS_FIRSTDAY"));
             IRecordSet exportTable = (IRecordSet) exportParams.get("T_ZHRESS_FIRSTDAY");
             exportTable.beforeFirst(); // Moves the cursor before the first row.
             while (exportTable.next()) {
              String column_1  = exportTable.getString("PERNR");
              String column_2  = exportTable.getString("ZDOJ");
              myBean.setCW1((String)exportParams.get(column_1));
              myBean.setCW2((String)exportParams.get(column_2));
             //System.out.println(" COMPANYCODE_LIST-COMP_CODE = " + column_1);
             //System.out.println(" COMPANYCODE_LIST-COMP_NAME = " + column_2);
             myBean.createData(exportTable);
             client.close();
           catch(Exception e){}      
    @param ex
    @param string
              private void printException(Exception ex, String string) {
                   // TODO Auto-generated method stub               
    @param string
              private void logMsg(String string) {
                   // TODO Auto-generated method stub
    RfcBean.java:-
    package com.ust.jca;
    import java.io.Serializable;
    import com.sapportals.connector.execution.structures.IRecordSet;
    public class RfcBean implements Serializable {
         private String CW1;
         private String CW2;
    @return
         public String getCW1() {
              return CW1;
    @return
         public String getCW2() {
              return CW2;
    @param string
         public void setCW1(String string) {
              CW1 = string;
    @param string
         public void setCW2(String string) {
              CW2 = string;
    @param exportTable
         public void createData(IRecordSet exportTable) {
              // TODO Auto-generated method stub
    MyJspPage.jsp:-
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <jsp:useBean id="myBean" scope="request" class="com.ust.jca.RfcBean" />
    Hello World
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
          <hbj:textView
                        text="<%=myBean.getCW1()%>"
                        id="tv1" 
                        design="HEADER2"
                        encode="false">
            </hbj:textView>
            <br>     
            <hbj:textView
                        text="<%=myBean.getCW2()%>"
                        id="tv1" 
                        design="HEADER2"
                        encode="false">
            </hbj:textView>
       </hbj:form>
      </hbj:page>
    </hbj:content>

    Hi Sanjyoti:
    JCo is one of the connectors for SAP backend through any Java/JSP/Servlet based applications. You need to have the SAP JCo libraries (Jar files) with you to connect to the SAP R/3 system, ofcourse along with the connection parameters.
    Here is the sample scenario where you are connecting SAP RFCs/BAPIs with JSPs:
    1: first you need to manage required JCo jar files and import it into your project lib folder. this is to have the JCo api at runtime to your application
    2: import the library path into your JSP page
    3: write a custom method to connect to SAP with connection parameter
    4: you should have an idea of which Remote_Func_Module you are connecting and the input and output attributes
    5: Execute the functional module and display the results and close the connection parameters.
    Its almost like connecting to a RDBMS in a general scenario.
    For more information about SAPJCo:
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/content.htm
    For example program1 to connect:
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/14e13d8ee4535ee10000000a114084/content.htm
    For example program2 to connect:
    http://help.sap.com/saphelp_nw04/helpdata/en/9d/14e13d8ee4535ee10000000a114084/content.htm
    For example program a BAPI:
    http://help.sap.com/saphelp_nw04/helpdata/en/de/e6c9255044b241a9401a3a1b7009a9/content.htm
    For Tools & Services of SAPJCo:
    https://websmp101.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000463649
    If you still want already working program, I can mail it your email id.
    Thanks,
    MS

  • At com.sapportals.htmlb.table.TableView.getColumnCount(TableView.java:539)

    when i use the tag <hbj:tableview> in the jsp of the project portal application!
    01:56_02/04/09_0006_9369850
    [EXCEPTION]
    java.lang.NullPointerException
         at com.sapportals.htmlb.table.TableView.getColumnCount(TableView.java:539)
         at com.sapportals.htmlb.unifiedrendering.controls.TableViewRow.<init>(TableViewRow.java:33)
         at com.sapportals.htmlb.unifiedrendering.controls.TableView.<init>(TableView.java:50)
         at com.sapportals.htmlb.unifiedrendering.ie5.TableViewRenderer.render(TableViewRenderer.java:28)
         at com.sapportals.htmlb.rendering.PageContext.render(PageContext.java:987)
         at com.sapportals.htmlb.taglib.TableViewTag.doEndTag(TableViewTag.java:139)
         at pagelet._sapportalsjsp_admin.subDoContent(_sapportalsjsp_admin.java:543)
         at pagelet._sapportalsjsp_admin.doContent(_sapportalsjsp_admin.java:40)
         at pagelet._sapportalsjsp_admin.service(_sapportalsjsp_admin.java:24)
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.service(PortalComponentItemFacade.java:360)
         at com.sapportals.portal.prt.core.broker.PortalComponentItem.service(PortalComponentItem.java:934)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:435)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:527)
         at com.sapportals.portal.prt.component.AbstractComponentResponse.include(AbstractComponentResponse.java:89)
         at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:232)
         at com.sapportals.portal.htmlb.page.JSPDynPage.doOutput(JSPDynPage.java:76)
         at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)
         at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.doPreview(AbstractPortalComponent.java:240)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:168)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
         at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:524)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:407)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)

    be answered

  • Java iview htmlb & jco question

    hello all,
    I am writing an Java iView to pull some data from an
    R/3 table & displaying that as a LINE chart.
    I've already got the portion of getting data from R/3
    by creating a shim function that returns the table.
    Now i want to display that using htmlb.Chart
    I can seet the JCO.Table as my JCOChartModel easily enough
    however the Table returns to me multiple rows
    (data that will be used elsewhere) but there are only
    two rows i want to use as the source for the Chart.
    Is there any way to limit the Chart to those two rows
    or do i need to (in my opinion wastefully) create
    a Vector and duplicate the data from those two
    rows to use for Chart?

    Hi Srivatsan,
    I need to write a java iview to pull some data from an R3 table.  But I dont know how :S
    I did something with jco in EP 5, but now with EP 6 I'm confused with the term JCA. 
    What do you do to connect to R3 ?  Could you share your code ?
    Thanks and regards from Mexico !!!
    Diego

  • HTMLB, WebDynpro or both together?

    Hi @ all,
    I had a look at some possibilities to create Portal Content .
    I read something about HTMLB and the comparison to WebDynpro in the SDN Forum.
    Some guys are saying that they would prefer HTMLB and some others saying that they prefer WebDynpro.
    My question now is, what is the difference for the EP if I have a HTMLB IView or a WebDynpro IView. I know that Webdynpro uses a SLD to get the backend connection and so on.
    The Business Logic is fully implemented in R/3 so the IViews are only for displaying content.
    Because we have not much time and UI Design in HTMLB take much time, would it be an solution to source out some very complex Graphical UI Views to Webdynpro. I think this would save us a lot of time, or?
    Is it possible to access in Portal from an HTMLB to a WebDynpro and reverse? Could I trust in it, that these both different kinds of development will work together?
    It would be really nice if someone could give me some good hints and anwsers to this topic.
    Thanks and Kind Regards
    Dennis

    Hi Dennis,
    > Some guys are saying that they would prefer
    I really depends. First, it depends on experience, even if this is not a really objective comparator... And it depends on what you want to do. If for example you'd need some heavy KM integration, there are many reasons for using HTMLB.
    > Business Logic is fully implemented in R/3 so the
    > IViews are only for displaying content
    That's a "classical" scenario for using Web Dynpro, for you have some automatism to create the backend connection as well as the mapping of the table values into your UI.
    > I think this would save us a lot of time, or?
    If you have some experience in WD, then yes. If you have no Web Dynpro experience but much experience in HTMLB, then you'd probably be faster in HTMLB and JSPDynPage, but that shouldn't be a reaon to stick to this technique, for once you have gained the necessary experience, at least next time you will be faster
    > Is it possible to access in Portal
    > from an HTMLB to a WebDynpro and reverse?
    In general: Yes. But that can get quite tricky. If you only want to "enter" the WD app from the JSPDynPage app and vice versa - no problem. If you want to leave the WD app at a certain point but return later - also this is possible in the meantime.
    > that these both different kinds of development
    > will work together
    In general they do, but a complete application should be developed in the one <i>or</i> the other technology. Otherwise, you would have mixed UI (even if using the same style, WD and HTMLB pages just look different), double coding for R/3 connection, etc.
    Hope it helps
    Detlev

  • Portal Object JSPDynPage

    Hi,
    I am developing an application using Portal Component - JSPDynPage.
    I have the following code in the JSPDynpage Class
    import com.sap.security.api.IUser;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    public void doProcessBeforeOutput() throws PageException {
                   IPortalComponentRequest request=(IPortalComponentRequest)this.getRequest();
                        IUser user=request.getUser();
                        String name=user.getUniqueID();
                        request.getNode().putValue("myuser", name);
                   this.setJspName("MILTestJSPDynPage.jsp");
    No Code in any other method.
    The MILTestJSPDynPage.jsp files has following code.
    <html>
         <title>
         </title>
         <body>
         <% componentRequest.getNode().getValue("myuser").toString(); %>
         </body>
    </html>
    There are no compilation errors and I am able to deploy the PAR file to Portal. On execution of Iview following error is given.
      Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    Error occurs during the rendering of jsp component.
    Exception id: 05:13_26/02/08_0016_3930150
    See the details for the exception ID in the log file
    What could be the problem in the code.
    My ultimate aim to access the KM Folders and access files in folders with JSPDynpage.
    Pls help
    Regards
    Sumant

    Hi Fabricio,
    As requsted the portalapp.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
        <property name="SharingReference" value="com.sapportals.wcm.util.uri.RID"/>
      </application-config>
      <components>
        <component name="MILTestComponent">
          <component-config>
            <property name="ClassName" value="com.pil.test.PILTestComponent"/>
          </component-config>
          <component-profile/>
        </component>
        <component name="MILTestComponent_NEW">
          <component-config>
            <property name="ClassName" value="com.pil.test.PILTestComponent_NEW"/>
          </component-config>
          <component-profile/>
        </component>
        <component name="PILTestJSPDynPage">
          <component-config>
            <property name="ClassName" value="com.pil.test.PILTestJSPDynPage"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/PILTestJSPDynPage.jsp"/>
          </component-config>
          <component-profile/>
        </component>
        <component name="ShowResult">
          <component-config>
            <property name="ClassName" value="com.pil.test.ShowResult"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/ShowResult.jsp"/>
          </component-config>
          <component-profile/>
        </component>
        <component name="ShowResult">
          <component-config/>
          <component-profile/>
        </component>
        <component name="ShowResult">
          <component-config/>
          <component-profile/>
        </component>
        <component name="NewJSPClass">
          <component-config>
            <property name="ClassName" value="NewJSPClass"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/newjspclass.jsp"/>
          </component-config>
          <component-profile/>
        </component>
        <component name="tt">
          <component-config>
            <property name="ClassName" value="tt"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/com.pil.test.jsp"/>
          </component-config>
          <component-profile/>
        </component>
       </components>
      <services/>
    </application>

  • Pie chart using BSP

    Hi,
         Is it possible to display a pie chart using BSP.The piechart want to viewable in internet (URL)
    Can anyone help me with step by step procedure.

    Dear Ramya,
    There is an option to display the Pie chart in BSP.  For that please do the following steps,
    In layout:
    <htmlb:chart
            id                   = "myChart1"
            data                 = "<%=data%>"
            width                = "300"
            height               = "300"
            titleCategories      = "Company"
            titleValues          = "Turnover"
            title                = "Washers by Companies!"
            chartType            = "PIE_3D"
            legendPosition       = "EAST"
            colorOrder           = "STRAIGHT"
          />
    You can specify the other charttype in the propoerty chartType . 
    In OnInitialization:
    some data to be displayed give your datas to be displayed
    DATA: line TYPE igs_data.
      line-groupid = 'SAP AG'.
      line-x = '1st Quarter'.
      line-y = 50.
      line-color = 48.
      line-extension = 'href="http://www.sap.com" alt="SAP AG"'.
      append line to data.
      line-x = '2nd Quarter'.
      line-y = 35.
      line-color = 0.
      append line to data.
      line-x = '3rd Quarter'.
      line-y = 43.
      append line to data.
      line-groupid = 'Microsoft'.
      line-x = '1st Quarter'.
      line-y = 46.
      line-extension = 'href="http://www.microsoft.com" alt="Microsoft"'.
      append line to data.
      line-x = '2nd Quarter'.
      line-y = 26.
      line-color = 64.
      append line to data.
      line-x = '3rd Quarter'.
      line-y = 38.
      line-color = 0.
      append line to data.
    In Page Attributes:
    data     TYPE     IGS_DATA_TAB
    Now check in IE you can get ur pie chart.
    Appreciate if tis Helpful.
    Regards,
    Anita Vizhi Arasi B

  • Tableview tag in htmlb visible controls

    hi gurus,
    i am trying to create a table view using the "tableView" tag presents in the htmlb visible controls.
    i am using the"help.sap.com" as reference website.i understood the details given there partially.so i couldnt complete my task.
    if anybody completed these type of task please send me ur sample code for reference with the codes for  jsp file,model (bean) and controller (.java file).....
    regards,
    tamil

    Hi,
    In JavaDeveloper role you have working examples of TableView.
    I am pasting the code, incase you dont have JavaDeveloper on your server.
    TableViewExample.java
    import bean.TableViewBean;
    import com.sapportals.htmlb.event.Event;
    import com.sapportals.htmlb.event.TableNavigationEvent;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.htmlb.table.TableView;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentContext;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    public class TableViewExample extends PageProcessorComponent {
      public DynPage getPage() {
        return new MyDynPage();
      // JSPDynPage
      public class MyDynPage extends JSPDynPage {
        public TableView table;
        TableViewBean myBean;
        Used for user initialization. called when the application is started
        public void doInitialization() {
          // Get the request, context and profile from portal platform
          IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
          IPortalComponentContext myContext = request.getComponentContext();
          IPortalComponentProfile myProfile = myContext.getProfile();
          // Initialization of bean
          TableViewBean myBean = new TableViewBean();
          setBeanFromProfile(myProfile, myBean);
          // Put the bean into the application context
          myContext.putValue("myBeanName", myBean);
      Used for handling the input. Generally called each time
        after doInitialization
        public void doProcessAfterInput() throws PageException {
          // Get the request, context and profile from portal platform
          IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
          IPortalComponentContext myContext = request.getComponentContext();
          IPortalComponentProfile myProfile = myContext.getProfile();
          // Get the bean from application context
          table = (TableView) this.getComponentByName("myTableView");
          myBean = (TableViewBean) myContext.getValue("myBeanName");
          setBeanFromProfile(myProfile, myBean);
          myBean.setOldTableView(table);
      Used for handling the output. This method is always called.
        public void doProcessBeforeOutput() throws PageException {
          // set the name of your JSP page
          setJspName("tableview.jsp");
        public void onMyOnNavigate(Event event) throws PageException {
          // NAVIGATION - get the event to recover the actual position
          TableNavigationEvent tne = (TableNavigationEvent) event;
          // With the event we can use method getFirstVisibleRowAfter(); which gives
          // us the actual position (after the event)
          if (myBean != null) { // just for the first time, when there is no bean
            // set the new visibleRow
            myBean.setVisibleFirstRow(new Integer(tne.getFirstVisibleRowAfter()).toString());
        public void onMyOnHeaderClick(Event event) throws PageException {
        public void onMyOnCellClick(Event event) throws PageException {
        public void onMyOnRowSelection(Event event) throws PageException {
        private void setBeanFromProfile(IPortalComponentProfile myProfile, TableViewBean myBean) {
          myBean.setDesign(myProfile.getProperty("design"));
          myBean.setHeaderVisible(myProfile.getProperty("headerVisible"));
          myBean.setFooterVisible(myProfile.getProperty("footerVisible"));
          myBean.setFillUpEmptyRows(myProfile.getProperty("fillUpEmptyRows"));
          myBean.setNavigationMode(myProfile.getProperty("navigationMode"));
          myBean.setSelectionMode(myProfile.getProperty("selectionMode"));
          myBean.setHeaderText(myProfile.getProperty("headerText"));
          myBean.setVisibleFirstRow(myProfile.getProperty("visibleFirstRow"));
          myBean.setVisibleRowCount(myProfile.getProperty("visibleRowCount"));
          myBean.setRowCount(myProfile.getProperty("rowCount"));
          myBean.setTableWidth(myProfile.getProperty("width"));
    D:\usr\sap\J2E\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.pct.pdk.htmlbcontrols\pagelet\tableview.jsp
    <%--- TableView.jsp --%>
    <%@ taglib uri= "tagLib" prefix="hbj" %>
    <%--- Get the Bean named myBeanName from the application context --%>
    <jsp:useBean id="myBeanName" scope="application" class="bean.TableViewBean" />
    <hbj:content id="myContext" >
      <hbj:page title="Template for a portal component">
       <hbj:form id="myFormId">
        <hbj:tableView
                   id="myTableView"
                   model="myBeanName.model"
                   design="<%=myBeanName.getDesign() %>"
                   headerVisible="<%=myBeanName.isHeaderVisible() %>"
                   footerVisible="<%=myBeanName.isFooterVisible() %>"
                   fillUpEmptyRows="<%=myBeanName.isFillUpEmptyRows() %>"
                   navigationMode="<%=myBeanName.getNavigationMode() %>"
                   selectionMode="<%=myBeanName.getSelectionMode() %>"
                   headerText="<%=myBeanName.getHeaderText() %>"
                   visibleFirstRow="<%=myBeanName.getVisibleFirstRow() %>"
                   visibleRowCount="<%=myBeanName.getVisibleRowCount() %>"
                   rowCount="<%=myBeanName.getRowCount() %>"
                   width="<%=myBeanName.getTableWidth() %>"
                   onNavigate="myOnNavigate">
                   <% myTableView.setOnHeaderClick("myOnHeaderClick");
                      myTableView.setOnCellClick(1,"myOnCellClick");
                      myTableView.useRowSelection(myBeanName.getOldTableView());
                      myTableView.setOnRowSelection("myOnRowSelection"); %>
        </hbj:tableView>
        </hbj:form>
      </hbj:page>
    </hbj:content>
    TableViewBean.java
    package bean;
    import com.sapportals.htmlb.table.DefaultTableViewModel;
    import com.sapportals.htmlb.table.TableColumn;
    import com.sapportals.htmlb.table.TableView;
    // Bean for dataexchange between DynPage and JSP
    public class TableViewBean {
      public String design;
      public String headerVisible;
      public String footerVisible;
      public String fillUpEmptyRows;
      public String navigationMode;
      public String selectionMode;
      public String headerText;
      public String visibleFirstRow;
      public String visibleRowCount;
      public String rowCount;
      public String tableWidth;
      public DefaultTableViewModel model;
      private TableView oldtableview;
      public TableView getOldTableView() {
        return this.oldtableview;
      public void setOldTableView(TableView table) {
        this.oldtableview = table;
      public DefaultTableViewModel getModel() {
        return model;
      public void setModel(DefaultTableViewModel model) {
        this.model = model;
      public String getDesign() {
        return design;
      public void setDesign(String design) {
        this.design = design;
      public String isHeaderVisible() {
        return headerVisible;
      public void setHeaderVisible(String headerVisible) {
        this.headerVisible = headerVisible;
      public String isFooterVisible() {
        return footerVisible;
      public void setFooterVisible(String footerVisible) {
        this.footerVisible = footerVisible;
      public String isFillUpEmptyRows() {
        return fillUpEmptyRows;
      public void setFillUpEmptyRows(String fillUpEmptyRows) {
        this.fillUpEmptyRows = fillUpEmptyRows;
      public String getNavigationMode() {
        return navigationMode;
      public void setNavigationMode(String navigationMode) {
        this.navigationMode = navigationMode;
      public String getSelectionMode() {
        return selectionMode;
      public void setSelectionMode(String selectionMode) {
        this.selectionMode = selectionMode;
      public String getHeaderText() {
        return headerText;
      public void setHeaderText(String headerText) {
        this.headerText = headerText;
      public String getVisibleFirstRow() {
        return visibleFirstRow;
      public void setVisibleFirstRow(String visibleFirstRow) {
        this.visibleFirstRow = visibleFirstRow;
      public String getVisibleRowCount() {
        return visibleRowCount;
      public void setVisibleRowCount(String visibleRowCount) {
        this.visibleRowCount = visibleRowCount;
      public String getRowCount() {
        return rowCount;
      public void setRowCount(String rowCount) {
        this.rowCount = rowCount;
      public String getTableWidth() {
        return tableWidth;
      public void setTableWidth(String tableWidth) {
        this.tableWidth = tableWidth;
      public TableViewBean() {
        String[][] data = createData();
    // get a new array for the titles
        String[] colNames = {"LASTNAME", "FIRSTNAME", "STREET", "ZIP", "CITY"};
    // set titles
    /// By default the title also defines the column name - we use both methods to create a
    /// proper title and a column name that is better to work with. You should omit
    /// blanks or other special characters in the column name.
    /// The column name is important later (Part 2) to retrieve data from the tableView
        model = new DefaultTableViewModel(data, colNames);
        model.setKeyColumn(1);
        // To set the cell event we have to get the column and set the setOnCellClick
        // for every column.
        // Get the column with the specified column name.
        TableColumn column = model.getColumn("LASTNAME");
        // Set the event.
        column.setOnCellClick("onMyOnCellClick"); // set the TableCellClickEvent
        column.setTitle("Last Name");
        // Repeat that with the other column. Every cell can have its own onCellClick
        // method names of course. We use the same event method for all cells.
        column = model.getColumn("FIRSTNAME");
        column.setOnCellClick("onMyOnCellClick"); // set the TableCellClickEvent
        column.setTitle("First Name");
        column = model.getColumn("STREET");
        column.setOnCellClick("onMyOnCellClick"); // set the TableCellClickEvent
        column.setTitle("Street");
        column = model.getColumn("ZIP");
        column.setOnCellClick("onMyOnCellClick"); // set the TableCellClickEvent
        column.setTitle("ZIP - Code");
        column = model.getColumn("CITY");
        column.setOnCellClick("onMyOnCellClick"); // set the TableCellClickEvent
        column.setTitle("City");
      private String[][] createData() {
        // just a simple way to produce data, not real life indeed
        String[][] retVal = {
          {"Backer", "Melissa", "528 34th Ave", "94121", "San Francisco"},
          {"Hamilton", "Ann", "4752 17th St", "94117", "San Francisco"},
          {"Hudson", "Bree", "16 Hudson Ct", "94124", "San Francisco"},
          {"Watson", "David", "168 Cervantes Blvd", "94123", "San Francisco"},
          {"Eastwood", "Kenneth", "3367 Troy Dr", "90068", "Los Angeles"},
          {"Peter", "Smith", "524 Arvin St", "93308", "Bakersfield"},
          {"Antony", "Miller", "10430 Wilshire Blvd", "90024", "Los Angeles"},
          {"Moore", "Roger", "1815 W 82d", "90001", "Los Angeles"},
          {"Jackson", "Michael", "3450 Sawtelle Blvd", "90066", "Los Angeles"}
        return retVal;
    Greetings,
    Praveen Gudapati
    [Points are always welcome for helpful answers]

Maybe you are looking for

  • Upgraded Iphone software and apps won't load

    I updated by Iphone software to the latest version last week and now none of my applications will load onto the iphone, i have tried deleting the applications and getting them again from the I-Tunes store but this doesn't work either... can any one p

  • NEED SERIOUS HELP; BATTERY.

    Today I went out and the rain was really really bad and my phone being in my pocket got a bit wet but when I looked at it it was completely gone and dead so I got home and plugged it in and it showed the 'no battery' indication so I put it in rice an

  • Won't connect to preferred network automatically

    In the last week, my Macbook suddenly doesn't connect to my preferred network (top of the list) automatically. Rather I sometimes I have to turn airport on and off once or twice and it usually connects to another network first. Suggestions?

  • MySQL returning results based on dates

    Hi all, I'm making a system which returns names of people who are free on certain days, and then prints their contact details, and books them for user selected days. The employee clicks on days which are then stored into an availability table in the

  • Unable to install Grid on AIX 6L

    We're trying to perform the software-only method of getting Grid Control 10.2.0.5 onto our AIX 6L box. The first step is to do a silent install of 10.2.0.1, but the installer immediately bombs out saying that only OS versions 5200 or 5300 are support