To reterieve value from logical database psj

i need to reterieve value from the logical database psj,
the table name is BPJA1 and the field name is WTJHR, based on the wbs element.

Hi,
assign your prog (attributes) to ldb psj and
try:
GET BPJA1   FIELDS wtjhr. "-> look F1
Andreas

Similar Messages

  • An sample progam how to reterieve values from logical database

    i need to reterieve prart, vernr, verna, from the table prps using the logical database psj, i know if i give psj in the logical database of the report attributes, but i should not give in the attributes, but i need to use the logical database.
    i need a sample program

    Here is the help on the subject.
    <i>
    Addition 2
    ... DEFINING DATABASE ldb
    Effect
    This addition shows that the current program is the database program of the logical database ldb. The name of this logical database has a maximum length of 20 characters. Logical databases are maintained with the tool Logical Database Builder of the ABAP Workbench, in which the framework program is generated automatically including the statement REPORT. The name of the framework program is SAPDBldb.
    Example
    Introduction of the logical database F1S.
    REPORT sapdbf1s DEFINING DATABASE f1s.
    </i>
    This is leading me to believe that this extension DEFINING DATABASE F1S is used only when actually building the logical database via the LDB Builder, not for use when actually using it in a program.  I don't think that you can use this extension in your case.
    Regards,
    Rich Heilman

  • How to get the value from a database without submitting a jsp page

    I have a jsp which has a text box depending on the value entered I want to get the value from a database for other two fields with out submitting jsp page. I am using struts.
    Thanks For any assistance provided.

    Alright,here is an example for you for the first case.
    Present.jsp:
    ============
    <html:html>
    <head>
    <title><html:message key="page.title"/></title>
    </head>
    <body>
    <html:form action="ChangeEvent.do">
    <html:hidden property="method"/>
    <!-- Submitting the Form onKeyUp of EmpId field and trying to save the
         state of the Form in the scope of session -->
    Emp Id:<html:text property="empId" size="5"  onkeyup="if(true){this.form.elements[0].value='populateDetails';this.form.submit();}"/>
    Emp Name:<html:text property="empName" size="10" />
    Email Address:<html:text property="email" size="10" />
    <html:submit>Submit</html:submit>
    </html:form>
    </body>
    </html:html>struts-config.xml:
    ==================
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <!-- Form bean which stores the properties of all the Form elements -->
    <form-beans>
    <form-bean name="employeeFormBean" type="org.apache.struts.action.DynaActionForm">
       <form-property name="empId" type="java.lang.String"/>
       <form-property name="empName" type="java.lang.String"/>
       <form-property name="email" type="java.lang.String" />   
    </form-bean>
    </form-bean>
    <action-mappings>
    <action path="/ChangeEvent" type="Test.GetChangeAction" name="employeeFormBean" scope="request" parameter="method"> 
    <!-- On successful call of DB the Page has to be forwarded to the same page again by
          uploading updated form bean values. -->
    <forward name="success" path="/Present.jsp"></forward>
    <forward name="failed" path="/error.jsp"></forward>
    </action>
    </action-mappings>
    </struts-config>GetChangeAction.java:
    =====================
    public class GetChangeAction extends DispatchAction{
      public ActionForward populateDetails(ActionMapping mapping,ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
            DynaActionForm dForm = (DynaActionForm)form;
            String empId = dForm.get("empId");     
            // calling Model / Db and then getting back Employee Details
            EmployeeBean eb = ModelUtils.getDetails(empId);
            // Updating form bean by updating values from the Model 
            dForm.set("empName".eb.getEmpName()); 
            dForm.set("email".eb.getEmail());
            return mapping.findForward("success");
    }well to me this should work regardless to any browser but we need to make sure we put in our logic properly.

  • Error while populating drop down list with values from a database

    Hi all,
    I have a JSP page with a drop down list that is to be populated with values from a database.
    This is the code in my JSP file:
         <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers();
                Iterator<Integer> iterator = floornumbers.iterator(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% while (iterator.hasNext()) { %>
                       <option value="<%=iterator.next().intValue()%>"> <%=iterator.next().intValue()%> </option>
                       <% } %>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>   The DataManager.java class simply forwards this to its respective Peer class, which has the code shown below:
          package seatplanner.model;
        import java.sql.Connection;
        import java.sql.ResultSet;
        import java.sql.SQLException;
        import java.sql.Statement;
        import java.util.ArrayList;
        /* This class handles all floor operations */
         public class FloorPeer
         /* This method returns all the floor numbers */
         public static ArrayList<Integer> getAllFloorNumbers(DataManager dataManager) {
            ArrayList<Integer> floornumbers = new ArrayList<Integer>();
            Connection connection = dataManager.getConnection();
            if (connection != null) {
              try {
                Statement s = connection.createStatement();
                String sql = "select ID from floor order by ID asc";
                try {
                  ResultSet rs = s.executeQuery(sql);
                  try {
                    while (rs.next()) {
                      floornumbers.add(rs.getInt(1));
                  finally { rs.close(); }
                finally {s.close(); }
              catch (SQLException e) {
                System.out.println("Could not get floor numbers: " + e.getMessage());
              finally {
                dataManager.putConnection(connection);
            return floornumbers;
         }  The classes compile properly, but when I load this page up in Tomcat it just freezes and does not load the form. I tested the DB connection and it works fine.
    What am I doing wrong in the JSP code?
    Thanks for the help in advance.
    UPDATE: I commented out the form, and added <%=floornumbers.size()%> right above the commented code to check if the ArrayList is indeed getting populated with the values from the database (the values are of type integer in the database). The page still freezes like before. I'm puzzled now :confused: .

    Wrong usage of Iterator.
    <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers();
                Iterator<Integer> iterator = floornumbers.iterator(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% while (iterator.hasNext()) {
                                    Integer inte = iterator.next();
                            %>
                       <option value="<%=inte.intValue()%>"><%=inte.intValue()%></option>
                       <% } %>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>or make use of enhanced loop as you are already using J2SE 5.0+ for avoiding confusions.
    <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% for(Integer inte:floornumbers) {%>
                       <option value="<%=inte.intValue()%>"><%=inte.intValue()%></option>
                       <%}%>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>and a lot better thing would be making usage of basic Taglib provided with JSTL spec or struts spec which make life easier and simple.
    something like usage of <c:forEach/> or <logic:iterate/> would be lot better without writing a single scriptlet code.
    Hope that might help :)
    REGARDS,
    RaHuL

  • Logical database PSJ

    Hi All,
    I need to add a Y-table in the logical database PSJ and need to assign the fields to one of the Functional Groups.
    For this I went to tcode SE36 with logical database as PSJ, then went to Extras->Selection Views from menu, I gave the Origin of view as CUS and went in change mode. But in the tables/nodes it is not allowing me to add the Y-table.
    In the tables/nodes I need to add the Y-table and assign its fields to one the function groups
    Please give me the step by step procedure to do the same.
    -Srinath S

    Hi Sisab,
    Can you check for your support pack level ?
    125199 Termination with error message OK033 25.03.2003
    Other related notes are:
    165309 Termination with error message OK033 /3 25.03.2003
    144419 Termination with error message OK033 /2 11.10.2005
    Also please provide your system details.
    Do let me know if this solves your problem.
    Thank you.
    Regards,
    Manomeet
    Award points if helpful **

  • Fetching value using Logical Database

    Hi
    I have some fields in my selection screen apart from the selection screen obtained from my logical database.
    Kindly let me know how to fetch data from logical database.
    My requirement is this:
    I have to select company code from T001 based on entry frm selection screen .
    with the obtained company code along with other fields from dynamic selection screen I have to fetch value from Lfb1.
    Kindly let me know how to do this
    Thanks
    Yamini

    use f.m LDB_PROCESS....
    refer demo program DEMO_LOGICAL_DATABASE

  • Default value from Oracle database not working

    Hi Everyone:
    We use JHeadstart 10.1.3.1.
    I have an Oracle table that has 2 fields that are both mandatory and have default values. We have been spending a lot of time putting this type of business logic in the database so that these checks do not have to happen in the JHeadstart Application.
    The mandatory field is being brought into our Entity Object (as the mandatory checkbox is checked), but the default values do not seem to be getting pulled from the database. Even though the default value is defined at the database level, when trying to insert a new row into the table, a value must be filled in by the User running the application, otherwise an Oracle error is received that it is a mandatory field and must have a value. This happens when I am running the ApplicationModule by right-clicking it and clicking on "Test" as well as when running the Application
    Does JDeveloper not pull default values from the database? Is there something I am missing?
    Just for clarity, we have developed a re-usable library of entity objects that imports all of our Business Components similar to the following link
    http://download-uk.oracle.com/docs/cd/B32110_01/web.1013/b25947/bcadvgen007.htm#CHEFECGD This is working well, but want to mention it here in case it is a consideration.
    Thanks in advance.
    Mary
    U of W

    Steven:
    Thanks so much for taking the time to reply. Good to hear from you. Hope you are keeping warm in the Netherlands!
    During synchronization or initial creation of the Business Components from the Oracle tables, JDeveloper brings over the mandatory attribute as defined in the database.
    Would it be possible, in a future release, to also bring over the default values found in the database and assign them to the "Default" property in the Entity Objects Editor?
    I always like to follow the best practice of defining something in one spot to make maintenance as easy as possible and avoid manual steps.
    Thanks very much for your time.
    Mary B
    U of Windsor

  • How to get the selection parameters from logical database into one of the t

    Hi Sap ABAP Champians,
    How to get the selection parameters from logical database into one of the tab in the tabstrip selection-screen.
    Please help me for this
    Thanks
    Basu

    Hi
    Thanks, that will work, but then I'll have to insert code into all my reports.
    I can see that "Application Server Control Console" is able to rerun a report.
    This must mean that the Report Server has access to the runtime parameters.
    But how?
    Cheers
    Nils Peter

  • Is it possible to view the data that is extracted from logical database.

    Hi ,
    i have a standard program(T-code F.38) that uses logical database.This program also uses fields groups to define the structure.
    Now my question how can i see the data that is been fetched from logical database?Is that possible?
    I need to do further modifications on this data.Please advice whether its possible?

    hi,
    one possibility is dat.  goto SLDB give ur ldb name and goto source code.
    u will get code.
    now see dat and by giving same conditions u can check data using se16.

  • Regarding logical database PSJ

    Hi,
    how can we add a additional field (Activity type )to the logical database PSJ used for  transaction CN47N.The field does not exist in the given field options
    My requirement is currently the program RPSISVG000  display the actual hours of the activity without any filter on the activity type. user requirement is to filter the data based on few activity types given by them. ie they want the actual hours to be calculated only for these activity types.
    CN47N transaction has been customized to ZCN47N.
    I have populated a field with given activity types but could not get the point where to do the filteration as the program uses GET events.
    GET ACT01. (contains the field activity type LARNT)
    Please let me know how to filter the data based on the activity types.
    Thanks and Regards,
    Premalatha

    Hi Sisab,
    Can you check for your support pack level ?
    125199 Termination with error message OK033 25.03.2003
    Other related notes are:
    165309 Termination with error message OK033 /3 25.03.2003
    144419 Termination with error message OK033 /2 11.10.2005
    Also please provide your system details.
    Do let me know if this solves your problem.
    Thank you.
    Regards,
    Manomeet
    Award points if helpful **

  • Dealing with null values from a database (easy?)

    I'm sure this should be a simple question :
    I'm creating a dynamic dropdown of my companies products that once a product is selected draws values (links) from a database and displays them (links to User guides, FAQs etc).
    My problem is dealing with blank entries in the database - i.e. if a product doesn't have a User guide I've left the database blank.
    I'd like to show 'none' or 'not available' if the entry is blank rather than the 'null' I currently get.
    I'm sure it should be a straightforward if .... else .... but I'm struggling and would appreciate any help,
    Many thanks,
    Mo

    Thanks for the message, the cut down piece of code I'm using for the output is:
    <%
    while (rs.next())
    //header row
    out.println("<tr bgcolor='#666666'>");
    out.println("<td><font style='font-family:arial;color:#ffffff;font-size:10px;'>Product Name</font></td>");
    out.println("<td><font style='font-family:arial;color:#ffffff;font-size:10px;'>FAQs</font></td>");
    out.println("<td><font style='font-family:arial;color:#ffffff;font-size:10px;'>Technical Information</font></td>");
    out.println("</tr>");
    //results
    out.println("<tr border='1' bordercolor='#CCCCCC' bgcolor='#FFFFFF'>");
    out.println("<td><font style='font-family:arial;font-size:12px;font-weight:bold;'><a style='text-decoration:none' href=" + rs.getString("ProductURL") + " target='_blank'><font color='#669999'>" + rs.getString("ProductName") + "</a></td>");
    out.println("<td><font style='font-family:arial;color:#000000;font-size:10px;'>" + rs.getString("FAQs") + "</td>");
    out.println("<td><font style='font-family:arial;color:#000000;font-size:10px;'>" + rs.getString("TechInfo") + "</td>");
    out.println("</tr>");
    stmt.close();
    conn.close();
    %>
    It's the FAQs and TechInfo strings I need to use the statement on - if there's no entry show 'none',
    Thanks again,
    Mo

  • How do I load values from a database column to an array variable in TS?

    I'm trying to get the values from the column in a database into an array variable in TS using the property loader.
    The Open Database, Open SQL Statement, and Property loader steps all complete and say "done".  But my array is empty when it's all over.
    Using TestStand 2010
    Microsoft SQL Management Express 2008
    Database configured by my company, I can not change it only read from it.
    Thank you,
    Newb-D

    The database has to be in a form that will work with the PropertyLoader and it sounds like it isn't.
    Try using the Import/Export Properties tool found in the Tool menu, to export some data to a database and then you can see if your database is compatible.
    My guess is you will have to write your own loader.
    Regards
    Ray Farmer

  • Short Dump while fetching values from a Database view

    Hi ALL,
    Here is the code that is giving short dump
    SELECT * FROM ZVMATLMOVE INTO TABLE I_MATLMOVE
        WHERE BUDAT >= V_LASTRUN_DATE
        AND   WERKS IN S_WERKS
        AND   LIFNR IN S_LIFNR
        AND   EBELN IN S_EBELN
        AND   MATNR IN S_MATNR
        AND   BWART IN S_BWART
    (Please don't say that I am using * in the select query,
    I knew that it is not a good way of fetching values)
    Declaration of the internal table is:
    DATA  I_MATLMOVE LIKE ZVMATLMOVE OCCURS 0 WITH HEADER LINE.
    The variable V_LASTRUN_DATE is:
    DATA  V_LASTRUN_DATE LIKE SY-DATUM.
    We will be getting the lastrundate value from another table. And it is passing correct value (ex. 20060731)
    ZVMATLMOVE is a database view created for MKPF and MSEG table. And I checked both table were consistent.
    Dump Analysis:
    Runtime errors         DBIF_RSQL_SQL_ERROR          
    Exception              CX_SY_OPEN_SQL_DB
    Every thing is fine. But I don't know how it is going to dump. Any suggestions?

    Hi !
    It seams that your table is not correct / fully activated.
    To check it out you should try the following:
    - Go to the SE11
    - Give it your table name and go to "Display"
    - Check if the table is "active"
    - Choose "Utilities->Database Object->Check" and see
      if there are any errors
    - go back and choose "Utilities->Runtime Object->Check"
      and see if there are any errors
    If there are any errors - try to activate the table again. You may need the "Utilities->Database Utiliy" for that.
    After there are no more errors by checking all these your program should work.
    Regards
    Rainer
    Some points would be nice if thate helped a bit.

  • Exclude one field from Logical Database's dynamic selection screen

    Hi Guru,
    I have a requirement to amend a program to exclude the document number field (bsik-belnr) from the dynamic selection-screen of the logical database KDF(Vendor Database) so that the program will not filter according to the document number.
    I have use the below syntax in my zprogram.
      selection-screen exclude select-options: doc-no.
    However I get syntax error "The addition EXCLUDE is only allowed in INCLUDE DBKDFSEL".
    Please advice.
    Best Regards,
    Fung

    The selection part of the logical database defines input fields for selecting data.
              The runtime environment displays these on the selection screen when you run an executable program linked to the logical database.
              Include called DB<ldbname>SEL.
            SELECTION-SCREEN BEGIN OF VERSION ver TEXT-xxx.
                                                                    SELECTION-SCREEN EXCLUDE ... .
                                                    SELECTION-SCREEN END OF VERSION ver.
    Defines a selection screen version (with a three-character name ver ). Between BEGIN OF VERSION and END OF VERSION , you can exclude selection screen objects for the version ver , i.e. remove them from the selection screen with SELECTION-SCREEN EXCLUDE.
              SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE dbtab
    If one of these tables is active in the report (i.e. it is declared under TABLES or lies somewhere on the path from the root of the database hierarchy to a table declared with TABLES ), a pushbutton called 'Dynamic selections' appears on the selection screen.

  • How to read data from Logical Database ADA for more than one financia year

    Hi,
    I need to read data from ADA logical database and ANLCV node for current financial year 2007 and for the next 3 years – 2008, 2009, 2010. When I do this using program attached below, I receive only data for one year, which is entered at the selection screen in the field BERDATUM. How should I modify my program to read ANLCV node for more then one year ? Could anybody help me ?
    Kind regards,
    Zbigniew Debowski
    REPORT  ZWRZD075.
    NODES: anlav, anlcv.
    START-OF-SELECTION.
    GET anlav.
    WRITE:/ anlav-anln1, ' ', anlav-anln2.
    GET anlcv.
    WRITE:/ anlcv-kansw, ' ', anlcv-knafa, ' ', anlcv-gjahr.

    Hi!
    Have you already tried your luck in Java Programming forum?
    Regards,
    Thomas

Maybe you are looking for