Portal application connect SQL Database

Hi all,
I'm newbie in SAP Portal. Now, I've created a new system which connects to SQL Database. Now I want to write a small portal application in Netweaver developer studio, using JSP Dynpage, and retrieve data from this SQL database. Could you please help me or show me the step by step documents to write this example ?
Thank you very much.

Hi Tweety,
SAP NetWeaver Portal comes with some standard iView templates that can be used to access data stored in databases.
Check <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/f5/eb51610e6a11d7b84900047582c9f7/frameset.htm">SAP Library</a> for more information.
Best regards,
Martin

Similar Messages

  • PDA Application Connect to Database

    Hi,
    I want to develop application sit on PDA(like iPAQ) eg.Contact Manager (to keep personal contact). this require a database to keep all these information in the PDA so that can be retrieve.
    Its there any Micro-Database that can be installed into PDA (free?).
    Please show me the link to get this Installaler, JDBC and documentation.
    Please show me also the way to create database and table in PDA. and step to install this micro-db into the PDA.
    It would be more helpful, if someone can give me some simple example of a PDA Application connect to Database.
    Thanks in advance, Regards

    Open source one is :
    http://sourceforge.net/projects/hsqldb
    This one is not absolute free but the price is quite compelling.$995 for unlimited install.
    http://www.quadcap.com/home.html
    http://www.quadcap.com/purchase/index.html
    4. The rights granted pursuant to this Agreement are contingent upon Licensee's payment of the license fees for the QED Software. The License Fee for this Commercial Redistribution License is USD $995.
    Even SQL CE from MS is free, as long as you not use it connected to backend system. so if u could work out other sync implementation or u dont need data sync at all, this might be a choice too. The issue is no official JDBC driver for SQL CE though there is for SQL server.
    However, I have no hand on experience on those 3. We are evaluating Pointbase Micro, thought not free.l

  • How to connect sql database with Flash

    Dear Friends,
    Iam working on a quessinarie (assesment) for elearning software. i want to connect sql database with flash and save my records in back end like add, delete, modification of student result and details.
    Kindly help me to connect the sql database. or dot net server. I know how to connect PHP and mysql. But my client dont want php. only sql database and do the add, del, modificaiton.
    Thanks in advance,
    Syed Abdul Rahim

    unfortunately no, i do not know ASP well enough to give any code advice, other than the basic concept:  make a request on a server-side script (such as ASP) via URLLoader - the script receives variable values (if required), runs the DB queries you wish to invoke, and 'returns' the results - pick them up in the URLVariables class via the event handler in Flash and assign them to local properties if needed, etc.
    there are quite a few threads that you could find more specific information on the ASP side, here and elsewhere around the net.

  • 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 */

  • 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

  • How sap application connect oracle database

    The gurus,
    I just to known how sap application connect to oracle database. Where or what the configuration files at SAP level and oracle level.
    Thank you
    Edited by: Muzaidi Marjuki on Apr 28, 2011 8:58 AM

    existing database to other database that also running on oracle ( right now we testing for recovery server) in case the existing server going down or have a problem that cannot been restore
    Its similar to DR setup, then why don't you install application at time of initial installation of DR?
    *Explain in  detial with a clear query
    Regards,
    Nick Loy

  • Coonect Portal to External SQL Database

    HI,
    I would like to link the portal to an external Sequel database, but could not find instructions on how to do this.  Please post instructions on how to do this - thanks

    Hi,
    This has to be done through Portal admin ; follow /chk the following steps to connect ur Portal server to External SQL DB server;
    1. Define system object by specifying server IP, db name, port name etc.
    2. In JDBC u can interface this system object
    3. Provide User mapping from portal to SQL server user

  • How to develop portal application connecting to SAP R/3(backend system)

    Hello Everyone,
                            Can anyone guide me on how to create portal aplication(JSPDYNPAGE), that will connect to backend SAP R/3 system, & it will fetch the data from some table from that R/3 system. Any reference material will be appriciated, it will be of great help.
    Thanks
    Chetan.

    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

  • How can I build mobile application , connect with database and can show its working by simulator

    Dear, I want to build mobile application.
    Actually, my application has 2 parts. one is webbased application.
    Second part is mobile bases.
    instructor will take interview of the students. he will enters marks by mobile and then by using BT, it will be sent to webbased part and saved in mysql database.

    Actually, the mobile part of your question is irrelevant to the central issue of building an application that will allow:
    1.  Collecting information from a student
    2.  Entering that information into a database
    To do this, you would build a form page that allows you to input the desired information. When that form is submitted, validate the information and enter it into a database.
    Once you have this working, format the form page so that it displays well on mobile devices.
    To use this you would browse to the form page on your mobile device browser, input the information, and submit it.
    Is that what you want?

  • Connecting SQL database as model in webdynpro

    Hi experts,
    I've some queries regarding JDBC in webdynpro.
    1) Can I use stored procedures in SQL server as RFC model in webdynpro?
    2) How should I load SQL table data in webdynpro? Is there any alternative other then writing pure java jdbc code?
    Please give possible solution in description.
    Thanks and Regards,
    Mehul

    Hi experts,
    I've some queries regarding JDBC in webdynpro.
    1) Can I use stored procedures in SQL server as RFC model in webdynpro?
    2) How should I load SQL table data in webdynpro? Is there any alternative other then writing pure java jdbc code?
    Please give possible solution in description.
    Thanks and Regards,
    Mehul

  • Failing to connect SQL Server 2005 from SAP

    I'm trying to connect SQL database to write some data to an external sql table. But it's failing giving below message,
    Error Message returned from "ADBC_TEST_CONNECTION" program:
    Testing a Database Connection Defined in DBCON        
    Could not open connection EACT_MESSAGES               
    sql error          1- occured:                        
    Login timeout expired                                                                               
    I can connect from .NET Applications using the same connection string configuration.
    What could be the reason for this.
    Do I need to enable some service for this in SQL server. I have enabled all possible SQL related services.
    But still no luck.

    I found a solution..
    Instead putting the server name, used IP address which is static. that solved the issue.

  • Integration of SQL database with XI

    Dear All,
    I have a req in that I have to connect to SQL Server database to XI system then from XI to ECC.
    To do this what are Connection should done from DatabaseXI-ECC.
    I have JDBC adapter in XI.Do I need install again in XI .
    how we will connect SQL Database to XI system?
    Regards
    Manish

    Hi Manish,
    Your scenario like this
    JDBC->XI->ECC(RFC/PROXY/IDOC).
    Download the following JDBC Driver. Once you deploy this driver you would be able to connect to SQL Server .
    http://www.microsoft.com/downloads/details.aspx?familyid=6d483869-816a-44cb-9787-a866235efc7c&displaylang=en
    Drivers Instalation Process
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70ffd890-0201-0010-708f-d5dad2dfcf3a
    Jdbc Channel Configuaration
    JDBC Diver:com.microsoft.sqlserver.jdbc.SQLServerDriver
    Connection:jdbc:sqlserver://ServerName:Port;Database=XXXXXXXX;
    Username:XXXXX(Ex:sa)
    Pwd:XXXXXXXX
    Thanks
    Ravi

  • Upload sql database to hosting company

    Hi folks, quick question,
    I create asp.net web application and sql database, I have then created App_Data folder within my application and pasted the MDF & log files into this folder, but my application is still not working!
    Works ok on the localhost.
    Any tips or advice much appreciated.

    You have to Restore/Attach the database to an SQL Server Database Engine and refer it from your asp.net code by using the connection strings.
    Sandesh Segu | www.SansSQL.com

  • Connecting sql 2000 to sap NW was

    I want to develop webdynpro java  applications connecting Sql 2000 . I have done examples using R/3 , webservices etc .
    Please give me a detailed step by step guide else a good link
    Thanks in advance
    Bhat

    Thank mil.. :-) It is working...!!!No problem glad to hear it.
    By the way you can use Windows authentication (if it is a requirement) but I don't believe that driver version supports it. You can use the JTDS driver ( a free open source type 4 driver) instead because that does support Windows authentication.
    Again though.. only if you need it.

  • Host column in the dba_db_links changing once application connects

    Hi,
    The host(net service name used to connect to the remote database) in the dba_db_links is changing to pindb.corp.youtele.com
    after database link creatoin the host is -> pindb
    once application connects is it changing to -> pindb.corp.youtele.com
    please can anybody shed some light on this

    HI,
    we created the private db link as below
    CREATE DATABASE LINK "PINDB_LINK" CONNECT TO PIN IDENTIFIED by PIN USING 'PINDB';
    select db_link,host, created from dba_db_links;
    DB_LINK                                         HOST                                               CREATED
    PINDB_LINK                                     PINDB                                             11-JAN-13
    but once the application connects the database the host column is changing in dba_db_links
    select db_link,host, created from dba_db_links;
    DB_LINK                                         HOST                                               CREATED
    PINDB_LINK                                     pindb.corp.youtele.com                             11-JAN-13
    as host is changing users are facing the issue
    in sqlnet.ora file we have commneted
    #NAMES.DEFAULT_DOMAIN = corp.youtele.com and show parameter db_domain shows
    NAME                                 TYPE        VALUE
    db_domain                            string
    please can you help on this why it is changing and how we can troubleshoot

Maybe you are looking for