HTMLB classes in non-portal application

Hi,
I want to use HTMLB library in J2EE web application. I made an example using htmlb taglib in JSP. But i want using classlib in servlet. How can i do?
tablib example code :
<%@ page language="java" %>
<%@ taglib uri="/htmlb" prefix="hbj" %>
          <hbj:page title="sap page">
                 <hbj:form
                 id="myFormId"
                 method="post"
                 target="_blank"
                 encodingType="multipart/form-data"
                 This form submits to a new web client window
                 <br>
                 because of 'target=_blank'.
                 <br>
                 <br>
                 <hbj:inputField
                   id="myInputField1"
                   type="String"
                   invalid="false"
                   width="310"
                   value="After editing press <Enter> to submit"
                   visible="true"
                   disabled="false"
                   required="true"
                   maxlength="30"
                   size="50">
                 </hbj:inputField>
                 <br>
                 <br>
                 <hbj:button
                   id="oKbutton"
                   text="OK"
                   onClick="onOKClick"
                   design="EMPHASIZED"
                   width="100">
                   <%
                     myFormId.setDefaultButton(oKbutton);
                   %>
                 </hbj:button>
                 <hbj:button
                   id="Infobutton"
                   text="Info"
                   onClick="onInfoClick"
                   width="100"
                   />
                 <hbj:button
                   id="Cancelbutton"
                   text="Cancel"
                   onClick="onCanClick"
                   width="100"
                   />
                 </hbj:form>
          </hbj:page>

Maybe following thread can shed some light on this issue -
JSP HTMLB tags/Taglib
Cheers,
Sanjeev

Similar Messages

  • Submit a webdynpro IView from a non-Portal application

    Hi,
    i have create a WebDynpro application. This application shows in a table a list of '. This reports are IView for Bex Web Application in a SAP portal. For navigation to this BW IView the WebDynpro application must be also embedded in a WD iView.
    The problem is:
    This WD IView will be requested by a non-sap/portal application with dynamic parameters and also with the POST method.
    In the WD application i have implemented the parameter request with following code:
    int i = 1;
    String name = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("var_name_" + i);
    If the non-portal application submit the WD application directly -> the parameters are available.
    But when the non-portal application submit the WD IView, then the Parameters are 'null'.
    Thank you for quick response
    Anne

    Hi,
    yes I'm use the statement to submit the iView:
    <form action="http://server:50000/irj/servlet/prt/portal/prteventname/Navigate/prtroot/pcd!3aportal_content!2fevery_user!2fgeneral!2fdefaultDesktop!2fframeworkPages!2fframeworkpage!2fcom.sap.portal.innerpage!2fcom.sap.portal.contentarea?NavigationTarget=ROLES%3A%2F%2Fportal_content%2Fcom.kwl.kwl-01.KWL-01%2Fcom.kwl.kwl-01-iviews.KWL-01-Iviews%2Fcom.kwl.WEB_DP%2Fcom.kwl.IW_GISBW&DynamicParameter="
    method="post">
    var_name_1<input name="var_name_1" type="text" value="ZHAMFSB"><br>
    var_value_ext_1<input name="var_value_ext_1" type="text" value="129191"><br>
    var_name_2<input name="var_name_2" type="text" value="ZHAMFSB"><br>
    var_value_ext_2<input name="var_value_ext_2" type="text" value="129761">
    <input type="submit" value=" Senden ">
    In this case the DynamicParameter will be send by GET.
    But i want use the POST Method.
    I get the parameters in both cases not in my WD application.
    What is the problem?
    Thank you
    Anne

  • Accessing a portlet from Non-portal Application

    Hi,
    Is there a way to access a portlet in a non-portal application using javascript. The non-portal application may be a PHP one.
    Also, is it possible to send some parameters through javascript so that the portlet can use it and render different content.

    If by domain you mean the accessed url (and not the weblogic domain) , then yes any ajax based solution needs the files to be located in the same domain (as the browser sees it).
    If that isnt the case you
    a. Either use some sort of frames
    b. use a server side proxy
    c. Other loading javascipt based techniques
    Of this b. is the most common , because its pretty simple to do as most modern webservers directly allow you to reverse proxy to any site by simple configuration.
    E.g. if you have PHP on apache as www.youweb.com and your weblogic runs on yourapp.com , you can create a rule on the apache which states that /xyz goes to weblogic (by using the weblogic plugin or mod_proxy). Once you do this , you are running on the same domain as the browser ses and ajax will work

  • Authentication problem Portal to Non-portal

    Hi,
    The current system is having a portal system. And the login module also using the portal library which is "com.bea.p13n.controls"
    My problem exist when the client would like to switch the system to non-portal.
    after changing on the jsp files, there is one thing that is stuck, which is the login part. They can't login.
    The below code for the portal login has been commented:
    //ProfileWrapper pw = null;
    //pw = userLoginControl.login(aForm.username, aForm.password, super.getRequest());
    Info that the environment using AD for auhentication.
    Maybe the correct question is, how to do the login that replaced the code above for non-portal?
    Anyone can help?
    Thanks in advance

    Hi
    for non portal applications you can login using j_security_check or you can use a BEA specific class like ServletAuthentication(.weak())
    regards
    deepak

  • SSO for SAP and Non-SAP applications without Enterprise Portal

    Dear all,
    Is it possible to implement SSO for both SAP and non-SAP applications without involvement of EP at all?
    I have gone through this link.
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/e5/4344b6d24a05408ca4faa94554e851/frameset.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/e5/4344b6d24a05408ca4faa94554e851/frameset.htm</a>
    But I still i am not able to get the precise answer on how to enable SSO for both  SAP and non-SAP applications without EP.
    We have decided not to implement EP in first phase of SAP implementation. But we need to enable SSO for other SAP and Non-SAP applications.
    A detailed description on how to deal this kind of scenarios will be helpful.
    Thanks.

    A client of our's uses <b>SAP Enterprise Portal</b>, and is using the SAP SSO, which is implemented with tickets, and requires the use of SAPSECULIB.  My company provides an application for this client, and our application in hosted in our data center for the client, as a Software as a Service application, obviously across the internet.  Our client, which owns a SAP license, has asked that we support the SAP SSO as a non-SAP SSO application.  The client user's SSO ticket will be created from SAP EP, and then passed across the internet to our application, and we are to use that SSO ticket as an authentication ticket to our application.  I beleive I know how to do this work technically, having reviewed the SAP document named: "Dynamic Library for Verifying SSO Tickets in Third-Party Software"   Specification   Version 2.00  December 2005.
    My question is, does my company have the right to use the SAPSECULIB?  Where is the official download and <b>license</b> download, that indicates we can download this library, and use it to support a SAP customer?  We do not own a SAP license.  Thank you for your help.  I have searched many places in SAP support.<b></b>

  • Java class reference error in Portal Application

    Hello,
    I have created a Portal Application Project with the Class
    "public class TEST extends AbstractTestComponent implements ITestable"
    in order to test the application.
    The test works fine with a simple code.
    Instead, using the external class HSSFWorkbook in order to create an excel file, the Enterprise Portal Unit Test return the following error:
    "java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook"
    I have tried to put the ZIP file of class into the folder "dist/PORTAL-INF/lib" and "dist/PORTAL-INF/exlib" but it doesn't work.
    Can someone tell me what I have to do?
    Thanks and best regards,
    Matteo.
    Edited by: Matteo De Santis on Feb 10, 2009 7:22 PM

    Hi,
    note that a portal application has two classloaders. one for the public part (src.api) and one for the private one (src.core).
    portal components reside in src.core by default. this means you need to load your jar file to the private class loader.
    so instead of dist/PORTAL-INF/lib use dist/PORTAL-INF/private/lib
    Regards, Lior

  • Abap class in portal application?

    hi all,
    I know how to call rfc function modules from portal applications. but as you all know ABAP is now a days written using classes and methods(Object Oriented), I would like to know how to access this classes and methods from a portal application.
    please help me in this regard as my client has urgent need for this. is it mandatory to write an RFC enabled BAPI as a wrapper to the ABAP class.
    Rgds

    Hi Yogi,
    if you want to access BAPIs, you can do that by using JCA or if you are using EP6 SP2 JCo.
    There are JCA&JCo Code samples under the download section available.
    Kai

  • About integration between SAP and non-SAP applications via javaidoc classes

    Hi,All
    Now we are implementing a SAP-Retail project,we encounter a problem of integration between SAP and non-SAP applications(POS),we want to set Inbound/Outbound between SAP and POS applications realtimely,POS can connect to the SAP system via VPN,weather it can be implemented?
    I conceive to implement it with SAP Java Connector IDoc Class,I don't know weather it is the best solution?If not,please give some other proposal.
    I have download the classes from SAP website and try it with the samples provided by SAP(JCoIDocSample1.java/JCoIDocSample3.java),In my testing,Inbound is succeed,but,in SAP-Retail IS,standard Outbound message type is defined via file port,some one told me that SAP Java Connector IDoc Class can only receive idocs from tRFC port?is it true?If not,please tell me how to deploy in SAP so java program can receive idocs from file port?

    We too are interested in finding information on integration between SAP and Intergraph.  Were you able to obtain information and I was wondering if could share this with us.
    Thanks,
    Sue
    City of Edmonton

  • Error after deploying JCA on EP6( Portal Applications with  RFC)

    <b><u><b>Error</b></u>
      Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    iView not found: ewParProject.JspPage.
    Exception id: 06:22_23/03/07_0104_14574950
    See the details for the exception ID in the log file</b>
    I<u><i><b> have written code in java file for connection as follows
    please help me.</b></i></u>
    package com.rr.JspPage;
    import javax.resource.cci.MappedRecord;
    import javax.resource.cci.RecordFactory;
    import com.sap.security.api.umap.NoLogonDataAvailableException;
    import com.sapportals.connector.ConnectorException;
    import com.sapportals.connector.connection.IConnection;
    import com.sapportals.connector.execution.functions.IInteraction;
    import com.sapportals.connector.execution.functions.IInteractionSpec;
    import com.sapportals.connector.execution.structures.IRecordMetaData;
    import com.sapportals.connector.execution.structures.IRecordSet;
    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;
    @author laxmikant.pathak
    To change the template for this generated type comment go to
    Window>Preferences>Java>Code Generation>Code and Comments
    public class JspPage extends PageProcessorComponent {
      public DynPage getPage(){
        return new JspPageDynPage();
      public static class JspPageDynPage extends JSPDynPage{
        /* (non-Javadoc)
    @see com.sapportals.htmlb.page.DynPage#doInitialization()
         public void doInitialization()   {
              try {
                        IConnectorGatewayService cgService =(IConnectorGatewayService)
                        PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
                        IPortalComponentRequest request=(IPortalComponentRequest) this.getRequest();
                        ConnectionProperties cp = new ConnectionProperties(request.getLocale(),request.getUser());
                        IConnection connection = cgService.getConnection("P35",cp);
                        IInteraction ix = connection.createInteractionEx();
                        IInteractionSpec ixspec = ix.getInteractionSpec();
         //               Put Function Name into interaction Properties.
                       ixspec.setPropertyValue("Name","ZHRESS_ESEPARATION_DETAILS");
                       RecordFactory rf = ix.getRecordFactory();
         //               create input MappedRecord from
                       MappedRecord input;
                        input = rf.createMappedRecord("input");
                        input.put("YYMOD","DIS");
                        input.put("YYUSR","EMP");
                        MappedRecord output = (MappedRecord)ix.execute(ixspec, input);
                        IRecordSet rs = null;
                       Object result = output.get("T_P9100");
                        if (result instanceof IRecordSet)
                             rs = (IRecordSet) result;
                        IRecordMetaData rsmd = null;
                        try
                             rsmd = rs.retrieveMetaData();
                        } catch (Exception ex)
                             ex.getStackTrace() ;
         //                  Do something with the Metadata
                        finally
                             if (connection != null)
                                  try
                                       connection.close();
                                       //logMsg("* Iview: Closing connection ok.");
                                       connection = null;
                                  catch (Exception e)
                                       //logMsg("* Iview: Error closing connection.");
                   } catch (ConnectorException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   } catch (NoLogonDataAvailableException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   } catch (javax.resource.ResourceException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
        public void doProcessAfterInput() throws PageException {
        public void doProcessBeforeOutput() throws PageException {
          this.setJspName("JspPageFile.jsp");
    <b>My Jsp file</b>
    hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
        Test
       </hbj:form>
      </hbj:page>
    </hbj:content>
    <b><u>XML File</u></b>
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
        <property name="ServicesReference"  value="com.sap.portal.ivs.connectorservice"/>
      </application-config>
      <components>
        <component name="JspPage">
          <component-config>
            <property name="ClassName" value="com.rr.JspPage.JspPage"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/JspPageFile.jsp"/>
            <property name="ServicesReference"  value="com.sap.portal.ivs.connectorservice"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services/>
    </application>
    <b>Error
      Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    iView not found: ewParProject.JspPage.
    Exception id: 06:22_23/03/07_0104_14574950
    See the details for the exception ID in the log file</b>

    Hi Laxmi,
    this is a portal application problem - nothing to do with this forum. Anyway - you can try by changing your component-config portion in portalapp.xml and see whether it works or not.
    Your current component config is like below
    <component-config>
    <property name="ClassName" value="com.rr.JspPage.JspPage"/>
    <property name="ComponentType" value="jspnative"/>
    <property name="JSP" value="pagelet/JspPageFile.jsp"/>
    <property name="ServicesReference" value="com.sap.portal.ivs.connectorservice"/>
    </component-config>
    Try replaing the same with below:
    <component-config>
    <property name="ClassName" value="com.rr.JspPage.JspPage"/>
    <property name="SecurityZone" value="com.sap.portal.pdk/low_safety"/>
    </component-config>
    Check once and let me know...
    regards,
    Shubho

  • Portal application connecting backend SAP R/3 system

    Hi All,
               I am developing one portal application through NWDS. It's JSPDYNPage component.The applications functionality is basicaly is to connect it to backend SAP R/3 system & fetch some data in aparticular table & display that data in a tableview format on one JSP& also when i click any row of the tableview then details of that row should get displayed on the next JSP. So i reached till develpoing a code that connnects to Backend SAP R/3.(Basicaly coding of connection part is done). Now i need to test this code, to check whether it is fine or not? NWDS doesnt give nay error, not compile also or not runtime error also. It simply shows the output as a blank page, where it is supposed to display one line of text in textview(i coded this in my JSP).But as i said it displays a blank page. i tried to debug the application , but debugging also not worked.I performed the debugging twice in right way. The code was not debugged, it run the same way as it normally runs when debugging is off & shown the blank page. I also have done all the the settings or prerequisites for debugging properly. I am stuck at this point now.search many documents , but no relevant help has been received. Can anyonehlep me with this. i am putting below the code for JSP, JSPDYNPAGE component as well as portalapp.xml. Can anyone guide me with this, whhere i am making mistake? what should i change in this?
    JSPDYNPAGE code
    package com.lti.portal;
    //import java.util.ArrayList;
    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 java.util.ArrayList;
    import com.sap.mw.jco.IFunctionTemplate;
    import com.sap.mw.jco.JCO;
    import com.sun.corba.se.internal.core.Response;
    public class Connection_R3 extends PageProcessorComponent {
    public DynPage getPage(){
    return new Connection_R3DynPage();
    public static class Connection_R3DynPage extends JSPDynPage{
    private Conn_R3 myBean = null;
    public JCO.Client mConnection;
    public JCO.Repository mRepository;
    public ArrayList al = new ArrayList();
    public String output;
    public String Ans;
    public static String BEAN_KEY="myBean";
    public void doInitialization(){
    IPortalComponentRequest request =(IPortalComponentRequest) this.getRequest();
    IPortalComponentContext context = request.getComponentContext();
    IPortalComponentProfile profile = context.getProfile();
    //create & initialize the bean.
    Conn_R3 test_bean= new Conn_R3();
    test_bean.setans("3");
    // put the bean into application context.
    context.putValue(BEAN_KEY,test_bean);
    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("Connection_R3.jsp");
    public ArrayList conn() {
    IPortalComponentRequest request =(IPortalComponentRequest) this.getRequest();
    IPortalComponentContext context = request.getComponentContext();
    IPortalComponentProfile profile = context.getProfile();
    Conn_R3 sample_bean = new Conn_R3();
    sample_bean.setans("5");
    //context.putValue(BEAN_KEY, sample_bean);
    //r3-accessing
    //connect_to_r3();
    try {
    // Change the logon information to your own system/user
    mConnection = JCO.createClient("800", // SAP client
    "********", // userid
    "******", // password
    null, // language
    "*******", // application server host name
    "**"); // system number
    mConnection.connect();
    //System.out.println(mConnection.getAttributes());
    mRepository = new JCO.Repository("ABC", mConnection);
    } catch (Exception ex) {
    ex.printStackTrace();
    System.exit(1);
    JCO.Function function = null;
    JCO.Table codes = null;
    try {
    function = this.createFunction("ZSAMPLE");
    if (function == null) {
    System.out.println("ZSAMPLE" + " not found in SAP.");
    System.exit(1);
    String num1 = "7";
    String num2 = "9";
    //String ans;
    function.getImportParameterList().setValue(num1,"My_import");
    function.getImportParameterList().setValue(num2, "My_Import");
    mConnection.execute(function);
    Object name =function.getExportParameterList().getValue(Ans);
    output=name.toString();
    sample_bean.setans(output);
    //sample_bean.setans(output)
    //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();
    //**********************<b>Code for BEAN</b>****************************
    package com.lti.portal;
    import java.io.Serializable;
    public class Conn_R3 implements Serializable {
    public String answer;
    public void setans(String a)
    answer=a;
    public String getans()
    return answer;
    ///////////////////////<b>Code for JSP</b>*****************************
    ><%@ taglib uri= "tagLib" prefix= "hbj" %>
    <jsp:useBean id="myBean" scope="application" class="com.lti.portal.Conn_R3" />
    <hbj:content id="myContext" >
    <hbj:page title="PageTitle">
    <hbj:form id="myFormId" >
    <hbj:textView
    id="Welcome_message"
    text="<%=myBean.getans()%>"
    design="STANDARD" >
    </hbj:textView>
    </hbj:form>
    </hbj:page>
    </hbj:content>
    /////////////////////////////////<b>Portalapp.xml</b>*****************************************
    application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="Address_comp">
          <component-config>
            <property name="ClassName" value="com.lti.portal.Address_comp"/>
          </component-config>
          <component-profile>
          <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>

    Hi,
       Do onething, please refer this <a href="http://www.i-barile.it/SDN/JCoTutorial.pdf">JCo Tutorial</a> as well as <a href="http://www.apentia-forum.de/viewtopic.php?t=1962&sid=9ac1506bdb153c14edaf891300bfde25">Link</a> also.
    Regards,
    Venkatesh. K
    /* Points are Welcome */

  • Fetching data in R/3 via portal application(JSPDYNPage)

    Hello Everyone,
                           I want to fetch data in R/3 server via portal application(JSPDYNPAGE) & display that data as an output of the portal application in TABLEVIEW format. Can anyone guide me on this (I:e-How to connect to R/3 server via portal component & fetch data & display the same). any similar application developed for a reference will be of great help.
    Thanks,
    Chetan

    Hi Chetan,
    I hope you know how to create a JSP Dyn Page, anyway I will explain it briefly.
    Open NWDS->File->New->Create a portal application project->Specify the project name
    right click on the project->New->Create a new portal application object->Portal component->Select JSP dyn page-(By default it creates class and all)->this is available under description on the right column-
    Now goto the Java page->see the functions->attach zip and jar files(HTMLB plugin)
    ->Right click on the project->goto properties->Java build path->Add external jars->Select com.sap.portal.htmlbbridge.zip and htmlb.jar
    This is how JSP page is created.
    Now we want to do establish connection with R/3. That I will discuss in the next session.
    Award points if this was helpful......
    All the best for you
    Regards,
    Arun Jacob.

  • Portal application connecting to backend R/3 system

    Hi All,
               i am developing one portal application through NDS(Netweaver Developer Studio) that connects to backend SAP R/3 system & fetches some data in R/3 system. I started working on it & developed some code, which i want to test whether it is working fine or not.I:e- code to connect to SAP R/3, but when i run the application it doesnt give any error but also it doesnt show any output which it should display(value of output parameter of RFC). Below is the code for component, code for JSP & code for bean. Can any one tell me what is the error in this? or why i am not getting the output i desired. All the connection parameters supplied in the coding are correct. Now below i mentioned these parameters as *, bt in actual i have mentioned them correct. I checked them twice, they are fine.
    Code for Component
    [code]package com.lti.portal;
    //import java.util.ArrayList;
    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 java.util.ArrayList;
    import com.sap.mw.jco.IFunctionTemplate;
    import com.sap.mw.jco.JCO;
    import com.sun.corba.se.internal.core.Response;
    public class Connection_R3 extends PageProcessorComponent {
      public DynPage getPage(){
        return new Connection_R3DynPage();
      public static class Connection_R3DynPage extends JSPDynPage{
        private Conn_R3 myBean = null;
             public JCO.Client mConnection;
              public JCO.Repository mRepository;
              public ArrayList al = new ArrayList();
             public String output;
             public String Ans;
             public static String BEAN_KEY="myBean";
        public void doInitialization(){
              IPortalComponentRequest request =(IPortalComponentRequest) this.getRequest();
              IPortalComponentContext context = request.getComponentContext();
             IPortalComponentProfile profile = context.getProfile();
           //create & initialize the bean.
              Conn_R3 test_bean= new Conn_R3();
              test_bean.setans("3");
              // put the bean into application context.
              context.putValue(BEAN_KEY,test_bean);
              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("Connection_R3.jsp");
           public ArrayList conn() {
                      IPortalComponentRequest request =(IPortalComponentRequest) this.getRequest();
                        IPortalComponentContext context = request.getComponentContext();
                        IPortalComponentProfile profile = context.getProfile();
                      Conn_R3 sample_bean = new Conn_R3();
                      sample_bean.setans("5");
                      //context.putValue(BEAN_KEY, sample_bean);
                                  //r3-accessing
                                  //connect_to_r3();
                                  try {
                                         // Change the logon information to your own system/user
                                       mConnection = JCO.createClient("800", // SAP client
                                  "********", // userid
                                  "******", // password
                                  null, // language
                                  "*******", // application server host name
                          "**"); // system number
                                      mConnection.connect();
                                       //System.out.println(mConnection.getAttributes());
                                         mRepository = new JCO.Repository("ABC", mConnection);
                                  } catch (Exception ex) {
                                         ex.printStackTrace();
                                         System.exit(1);
                                  JCO.Function function = null;
                                  JCO.Table codes = null;
                                  try {
                                         function = this.createFunction("ZSAMPLE");
                                         if (function == null) {
                                                 System.out.println("ZSAMPLE" + " not found in SAP.");
                                                 System.exit(1);
                                         String num1 = "7";
                                         String num2 = "9";
                                         //String ans;
                                         function.getImportParameterList().setValue(num1,"My_import");
                                         function.getImportParameterList().setValue(num2, "My_Import");
                                         mConnection.execute(function);
                                  Object name =function.getExportParameterList().getValue(Ans);
                                         output=name.toString();
                                         sample_bean.setans(output);
                                                                            //sample_bean.setans(output)
                                         //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();
    Code for BEAN
    package com.lti.portal;
    import java.io.Serializable;
    public class Conn_R3 implements Serializable {
         public String answer;
         public void setans(String a)
              answer=a;
        public String getans()
             return answer;
    Code for JSP
    <%@ taglib uri= "tagLib" prefix= "hbj" %>
    <jsp:useBean id="myBean" scope="application" class="com.lti.portal.Conn_R3" />
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
           <hbj:textView
               id="Welcome_message"
               text="<%=myBean.getans()%>"
               design="STANDARD"  >
           </hbj:textView>
       </hbj:form>
      </hbj:page>
    </hbj:content>

    Hi Chetan,
    Connection to R/3 systems through Portal can be done in many ways. Since you have mentioned that you are using jspdynpage then its better that you use JCo for connecting to R/3 system.
    U can write the JCo code using the jspdynpage component. I hope you have pdfs related to JCO. Incase u dont have then give me you mail id. OK
    Another approach could be developing a web dynpro java application that access a r/3 table using a BAPI. You can a dynpro model to easily connect to R/3 system.
    Just develop an iview based on this web dynpro application. And finally navigate to this iview through your jspdynpage.
    I hope this helps you in some way
    Regards,
    Prasanna

  • Connection to R/3 system from a portal application

    hi
    I am trying to connect to the R/3 system through a portal application developed in Netweaver Developer Studio.
    Please tell what all are the prerequisites for that.
    I have created an alias in the portal for the R/3 system and named it as FIN, even though my program is not working.
    Are there any setting to be done in the portal
    kindly let me know.
    thanks
    kris

    hi Vadim
    Thanks for ur fast reply, I have implemented the same code that u have mentioned.herewith I am sending u the code that I have written.
    package com.keane.connection;
    import javax.resource.ResourceException;
    import com.sapportals.connector.connection.IConnection;
    import com.sapportals.portal.ivs.cg.IConnectorGatewayService;
    import com.sapportals.portal.ivs.cg.IConnectorService;
    import com.sapportals.portal.prt.component.AbstractPortalComponent;
    import com.sapportals.portal.prt.component.IPortalComponentContext;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    import com.sapportals.portal.prt.logger.ILogger;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    public class SimpleSapConnection extends AbstractPortalComponent {
      public void doContent(IPortalComponentRequest request, IPortalComponentResponse response) {
         IPortalComponentContext myContext = request.getComponentContext();
         IPortalComponentProfile myProfile = myContext.getProfile();
         // get the default_logger
         ILogger logger = request.getLogger();
         logger.info("SimpleSapConnection: default logger initialized");
         String sapsystem = myProfile.getProperty("SystemIdentifier");
         response.write("SimpleSapConnection: the SystemIdentifier is: " + sapsystem + "<br>");
         IConnection connection = null;
         logger.info("Start to get a Connection to R/3");
         try {
           // get the Connector Gateway Service
           IConnectorGatewayService cgService = (IConnectorGatewayService) PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
           if (cgService == null) {
              logger.severe("SimpleSapConnection: Error in get Connector Gateway Service");
              response.write("Error in get Connector Gateway Service <br>");
           try {
              connection = cgService.getConnection(sapsystem, request);
           } catch (Exception e) {
              logger.severe("SimpleSapConnection: Connection to SAP system failed");
              response.write("Connection to SAP system failed <br>");
           } finally {
              // !!!!Important! Connection pooling will not work if the connection object is not closed!!!
              // Next statement needs to be inlcuded in your coding always,
              // otherwise connections won't be reused.
              if (connection != null) {
                try {
                   connection.close();
                } catch (ResourceException e) {
                   e.printStackTrace();
           if (connection == null) {
              logger.warning("SimpleSapConnection: Connection is null");
              response.write("Connection is null <br>");
           } else {
              logger.info("SimpleSapConnection: Connection succesful");
              response.write("Connection succesful");
         } catch (Exception e) {
           logger.severe("SimpleSapConnection: Exception thrown" + e);
           response.write("Exception thrown" + e);
    I have created an R/3 system in the portal and named it as FIN with the same alias name as FIN.
    U please tell me what are the other things that we have to do in respect to get connection to R/3, how to configure the R/3 system in the portal and also in the NWDS.
    And also the portalapp.xml file i have created
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <!THIS FILE IS A COPY OF THE ORIGINAL VERSION STORED IN THE PCD. PLEASE DO NOT CHANGE IT!>
      <application-config>
        <property name="SharingReference" value="com.sap.portal.htmlb,      com.sap.portal.ivs.connectorservice, com.sap.portal.usermanagement,       com.sap.portal.usermapping, landscape"/>
        <property name="releasable" value="true"/>
      </application-config>
      <components>
        <component name="SimpleSapConnection">
          <component-config>
            <property name="ClassName" value="com.keane.connection.SimpleSapConnection"/>
            <property name="SafetyLevel" value="no_safety"/>
          </component-config>
          <component-profile>
            <property name="SystemIdentifier" value="FIN"/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>
    what I feel is that there is something wrong with the system I have created in the portal
    thanks
    krish

  • Creating a portal application(portal component) that connects to SAP R/3.

    Hello Everyone,
    I need to create a portal application that should connect to SAP R/3 & fetch some data in some table according to some input parameters provided at runtime & display the data in TABLEVIEW control.
    Anyone can guide me on this i:e- how to go about it. What things i should know or should be aware of before creating this application. Any PDF documents , any help material, any guidance about the same will be of great help.
    Thanks,
    Chetan

    Hi Chetan Deshpande
    package com.systechi.jspdynpages.tableapplication;
    import com.sap.mw.jco.IFunctionTemplate;
    import com.sap.mw.jco.JCO;
    import com.sapportals.htmlb.InputField;
    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.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 TableApp extends PageProcessorComponent {
          public DynPage getPage(){
                  return new TableAppDynPage();
        public static JCO.Client mConnection;
        public static class TableAppDynPage extends JSPDynPage{
              private TableBean myTableBean = null;
              private int visibleRow = 1;
              int flag=0;
              String inf1,inf2;
              public static JCO.Client mConnection = null;
              public static JCO.Repository mRepository = null;
              public static JCO.Function function = null;
              private String name1,name2;
             public void doInitialization(){
                    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
                    IPortalComponentContext myContext = request.getComponentContext();
                    myTableBean = new TableBean();
                    myContext.putValue("myTableBean", myTableBean);
                    mConnection = JCO.createClient("200",
                                                         "jbabu",
                                                         "sy5tech!",
                                                         "EN",
                                                         "10.5.5.33",
                                                         "00");
                   mConnection.connect();
                   mRepository = new JCO.Repository("myRep",mConnection);
                   IFunctionTemplate ft = mRepository.getFunctionTemplate("BAPI_BANK_GETLIST");
                   function = ft.getFunction();
                   setJspName("Input.jsp");
        public void doProcessAfterInput() throws PageException {
                    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
                    IPortalComponentContext context = request.getComponentContext();
                         myTableBean = (TableBean) context.getValue("myTableBean");
                   try{
                       InputField myInputField1 = (InputField) getComponentByName("inf1");
                        if (myInputField1 != null) {
                             this.name1 = myInputField1.getValueAsDataType().toString();
                        InputField myInputField2 = (InputField) getComponentByName("inf2");
                        if (myInputField2 != null) {
                             this.name2 = myInputField2.getValueAsDataType().toString();
                   JCO.ParameterList imParam1 = function.getImportParameterList();
                   imParam1.setValue(name1,"BANK_CTRY");
                   JCO.ParameterList imParam2 = function.getImportParameterList();
                   imParam2.setValue(name2,"MAX_ROWS");
                   mConnection.execute(function);
                   JCO.ParameterList exParam = function.getTableParameterList();
                   JCO.Table table = exParam.getTable("BANK_LIST");
                   myTableBean.setName(table);
                    mConnection.disconnect();
              catch(Exception ex)
                   ex.printStackTrace();
         public void doProcessBeforeOutput() throws PageException {
                   if(flag == 1)
                      this.setJspName("OutputTable.jsp");
         public void onButtonClicked(Event event) throws PageException
                    flag = 1;       
              public void onNavigation(Event event) throws PageException
                                  TableNavigationEvent tne = (TableNavigationEvent) event;
                                       this.visibleRow = tne.getFirstVisibleRowAfter();
                                       myTableBean.setVisibleRow(new Integer(this.visibleRow).toString());
    above is my JSPDynpage  
    package com.systechi.jspdynpages.tableapplication;
    import com.sap.mw.jco.*;
    import com.sap.mw.jco.JCO.*;
    import com.sapportals.htmlb.*;
    import com.sapportals.htmlb.event.*;
    import com.sapportals.htmlb.page.*;
    import com.sapportals.portal.prt.component.*;
    import com.sapportals.portal.htmlb.page.*;
    import com.sapportals.htmlb.table.JCOTableViewModel;
    import java.io.Serializable;
    public class TableBean
              private String visibleRow = "1";
              public JCO.Table t;
              public JCOTableViewModel tableListModel = null ;
              boolean bHasData = false;
         public JCO.Table getName()
                return t;
           public void setName(JCO.Table tab)
               this.t = tab;
         public String getVisibleRow()
              return (this.visibleRow);
        public  void setVisibleRow(String visibleRow)
                this.visibleRow= visibleRow;
         public boolean hasData()
                             if (t.getNumRows() == 0)
                                   return false;
                             else
                                   return true;
         public JCOTableViewModel getTableListModel()
                     //return new JCOTableViewModel(t);
                     tableListModel = new JCOTableViewModel(t);
                          return tableListModel;
         public void setTableListModel(JCOTableViewModel tm)
                     this.tableListModel = tm;
            public void     TableBean()
    like u can fetch the data from r/3 backend system...

  • Calling Oracle Ebusiness Forms from a Webcenter Portal application

    Hello All,
    Would there be any known/standard procedure of calling Oracle EBusiness Forms from a Custom WebCenter Portal Application. The issue we are facing currently is that we are successfully able to call an Oracle EBS Forms as a GO Link from the application. The problem is when there are multiple links to open different EBS Forms. Multiple instances of the Forms sessions are created. We would like to have only one. We are trying to mimic the Oracle EBusiness Home Page / Landing Page.
    Any pointers are much appreciated.
    Thanks,
    Nachi

    Hi.
    Are you using Portal or Framework Portal?.
    In case of <noscript> is generated by JAVA internal classes and the unique way to change the message is with a Non supported workaround overriding a CoreBundle class.
    About the af:skipLinkTarget usually is in the Page Template. The default templates has it in next snippet:
    <f:facet name="center">
        <af:skipLinkTarget>
        <af:facetref facetname="content">
        </af:facetref>
      </af:skipLinkTarget>
    </f:facet>
    If you're using default Templates then copy them and remove the af:skipLinkTarget tag from the copied one and assign it to the Portal.
    I hope it helps.
    Regards.

Maybe you are looking for

  • Excise JV with reference to Credit Bill

    Dear SAP Champions: I am struck in a situation where I'm returning the Sold goods which is excisable and for that I am doing the following 1. Sale Return Order 2. Return Delivery with reference to Sale Return Order 3.Credit for returns(Billing) with

  • To those with COREDUO TEMP

    to those who use CoreDuo Temp because the temperature sensors in istat nano don't work, well, in the new version, it works!!! go here: http://www.islayer.net/index.php?op=item&id=21  Mac Mini Intel Core Solo- 1 GB RAM- Superdrive- Production week 18

  • BURSTING TO FILE LOCATION

    Hi, i have a requirement to schedule a report to run every morning and then burst the output to a folder location on the network drive. i followed the user guide and everytime it asks me for a split by & deliver by(this should match the KEY in bursti

  • One Nano, One receiver, Two sensors and Calibration

    I share a nano with my wife. We each have our own sensors, but use the one receiver. We re-link our sensor to the receiver if the other has used the nano before hand. This has worked well-for the most part. My distances and pace have become irratic i

  • I am having trouble upgrading my apps.

    this is his grandmother and when i hit update all it says "your apple ID has been disabled".  We had trouble with clash of clans and really had a mess getting it straightened out but we didn't  have the apple ID disabled.