Simple Abap Code Case i_chabsnm is not working

Please help me asap, I am trying to enhance the BW datasource with only one field "Responsible" in 0refx_2 datasource . I am getting the error in code that case i_chabasnm is unknown and tables not defined by data statement
please help me to correct the code I am just picking the field RESPONSIBLE from Table VIBDPR
Abap Code below:
Tables:  VIBDPR.          "Property master data table
data:    l_tabix like sy-tabix.
case i_CHABASNM.
*Enhancement of Property Master Record
  WHEN '0REFX_2'.
    case i_datasource.
      WHEN '0REFX_2'.
        data:  l_s_REIS_MEASUREMENT_TRAN like REIS_MEASUREMENT_TRAN.
        loop at i_t_data into l_s_REIS_MEASUREMENT_TRAN.
          l_tabix = sy-tabix.
select single * from VIBDPR where BUKRS = l_s_ REIS_MEASUREMENT_TRAN - BUKRS.
          if sy-subrc = 0.
            l_s_BIW_VIBDPR_s-ZZRESPONSIBLE = VIBDPR-RESPONSIBLE.
            modify i_t_data from l_s_ REIS_MEASUREMENT_TRAN index l_tabix.
          endif.
        endloop.
    endcase.
endcase

I am getting the error in cmid abap code that
REIS_MEASUREMENT_TRAN shall be a flat structure but that is the extract structure in datasource 0refx_2  so what should i change on this
Tables:  VIBDPR.          "Property master data table
data:    l_tabix like sy-tabix.
data:    i_CHABASNM.
case i_CHABASNM.
*Enhancement of Property Master Record
  WHEN '0REFX_2'.
    case i_datasource.
      WHEN '0REFX_2'.
        data:  l_s_REIS_MEASUREMENT_TRAN like REIS_MEASUREMENT_TRAN.
        loop at i_t_data into l_s_REIS_MEASUREMENT_TRAN.
          l_tabix = sy-tabix.
select single * from VIBDPR where BUKRS = l_s_ REIS_MEASUREMENT_TRAN - BUKRS.
          if sy-subrc = 0.
            l_s_BIW_VIBDPR_s-ZZRESPONSIBLE = VIBDPR-RESPONSIBLE.
            modify i_t_data from l_s_ REIS_MEASUREMENT_TRAN index l_tabix.
          endif.
        endloop.
    endcase.
endcase

Similar Messages

  • Any sample ABAP code to send Lotus Notes email to a list of people?

    Any sample ABAP code to send Lotus Notes email to a list of people?
    We will give you reward points!

    hi..
      This sample code help you to send mail from SAP .
    REPORT  ZSSO_DOCUMENT_SEND_API1.
    DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS  2 WITH HEADER LINE.
    DATA: OBJHEAD LIKE SOLISTI1   OCCURS  1 WITH HEADER LINE.
    DATA: OBJBIN  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
    DATA: OBJTXT  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
    DATA: RECLIST LIKE SOMLRECI1  OCCURS  5 WITH HEADER LINE.
    DATA: DOC_CHNG LIKE SODOCCHGI1.
    DATA: TAB_LINES LIKE SY-TABIX.
    Creating the document to be sent
    DOC_CHNG-OBJ_NAME = 'OFFER'.
    DOC_CHNG-OBJ_DESCR = 'Auction of a Picasso jr'.
    OBJTXT = 'Reserve price : $250000'.
    APPEND OBJTXT.
    OBJTXT = 'A reproduction of the painting to be auctioned'.
    APPEND OBJTXT.
    OBJTXT = 'is enclosed as an attachment.'.
    APPEND OBJTXT.
    DESCRIBE TABLE OBJTXT LINES TAB_LINES.
    READ TABLE OBJTXT INDEX TAB_LINES.
    DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    Creating the entry for the compressed document
    CLEAR OBJPACK-TRANSF_BIN.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM   = 0.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM   = TAB_LINES.
    OBJPACK-DOC_TYPE   = 'RAW'.
    APPEND OBJPACK.
    Creating the document attachment
    (Assume the data in OBJBIN are given in BMP format)
    OBJBIN = ' \O/ '. APPEND OBJBIN.
    OBJBIN = '  |  '. APPEND OBJBIN.
    OBJBIN = ' / \ '. APPEND OBJBIN.
    DESCRIBE TABLE OBJBIN LINES TAB_LINES.
    OBJHEAD = 'picasso.bmp'. APPEND OBJHEAD.
    Creating the entry for the compressed attachment
    OBJPACK-TRANSF_BIN = 'X'.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM   = 1.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM   = TAB_LINES.
    OBJPACK-DOC_TYPE   = 'BMP'.
    OBJPACK-OBJ_NAME   = 'ATTACHMENT'.
    OBJPACK-OBJ_DESCR = 'Reproduction object 138'.
    OBJPACK-DOC_SIZE   = TAB_LINES * 255.
    APPEND OBJPACK..
    Entering names in the distribution list
    RECLIST-RECEIVER = '[email protected]'.
    RECLIST-REC_TYPE = 'U'.
    APPEND RECLIST.
    RECLIST-RECEIVER = 'DLI-NEUREICH'.
    RECLIST-REC_TYPE = 'P'.
    APPEND RECLIST.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
         EXPORTING
              DOCUMENT_DATA = DOC_CHNG
              PUT_IN_OUTBOX = 'X'
              COMMIT_WORK   = 'X'
         TABLES
              PACKING_LIST  = OBJPACK
              OBJECT_HEADER = OBJHEAD
              CONTENTS_BIN  = OBJBIN
              CONTENTS_TXT  = OBJTXT
              RECEIVERS     = RECLIST
         EXCEPTIONS
              TOO_MANY_RECEIVERS = 1
              DOCUMENT_NOT_SENT  = 2
              OPERATION_NO_AUTHORIZATION = 4
              OTHERS = 99.
    CASE SY-SUBRC.
      WHEN 0.
        WRITE: / 'Result of the send process:'.
        LOOP AT RECLIST.
          WRITE: / RECLIST-RECEIVER(48), ':'.
          IF RECLIST-RETRN_CODE = 0.
            WRITE 'sent successfully'.
          ELSE.
            WRITE 'not sent'.
          ENDIF.
        ENDLOOP.
      WHEN 1.
        WRITE: / 'no authorization to send to the specified number of'              'recipients!'.
      WHEN 2.
        WRITE: / 'document could not be sent to any of the recipients!'.
      WHEN 4.
        WRITE: / 'no authorization to send !'.
      WHEN OTHERS.
        WRITE: / 'error occurred during sending !'.
    ENDCASE.
    Go for SCOT  transaction to send those mails.
    REGARDS,
    VEERESH

  • CASE Statement is not working Derived table

    Hi All,
    in the bello SQL Statement case statement is not working in derived table. I am new to creation of derived table if any body knows plz kinldy help me out on this.
    SELECT x.market, x.droprate as med1
    FROM
    (select upper(market_name) as market, fulldate as date_value,
         (sum([Dy_LOT_DROPS_N][Dy_OB_HO_DROPS][Dy_NonRF_Drop]))/
              nullif(sum(CASE WHEN (month(BBHDLY.FullDate)}>= 6 and { year(BBHDLY.FullDate)} = 2011) or {fn year(IDENSLABBHDLY.FullDate)} > 2011
    THEN  BBHDLY.Dy_Calls - BBHDLY.Dy_HO_CHAN_ALLOC ELSE BBHDLY.Dy_Calls END),0)*100 as droprate
    from BBHDLY sla
    inner join Dim mkt
         on sla.bts_name = mkt.bts_name and sla.SectorID = mkt.Sector_Id
                   where fulldate >= GETDATE()-46
                   group by market_name, fulldate) x,
    (select market_name as market, fulldate as date_value,
    (sum([Dy_LOT_DROPS_N][Dy_OB_HO_DROPS][Dy_NonRF_Drop]))/
              nullif(sum(CASE WHEN ({fn month(BBHDLY.FullDate)}>= 6 and {fn year(BBHDLY.FullDate)} = 2011) or {fn year(BBHDLY.FullDate)} >
    2011 THEN  BBHDLY.Dy_Calls - BBHDLY.Dy_HO_CHAN_ALLOC ELSE BBHDLY.Dy_Calls END),0)*100 as droprate
    from BBHDLY sla
    inner join Dim mkt
         on sla.bts_name = mkt.bts_name and sla.SectorID = mkt.Sector_Id
                   where fulldate >=GETDATE()-46
                   group by market_name, fulldate) y
    where x.market = y.market
    GROUP BY x.droprate, x.market
    HAVING
       SUM(CASE WHEN y.droprate <= x.droprate
          THEN 1 ELSE 0 END)>=(COUNT(*)+1)/2 AND
       SUM(CASE WHEN y.droprate >= x.droprate
          THEN 1 ELSE 0 END)>=(COUNT(*)/2)+1
    Thanks

    It looks like SQL Server or Sybase given that you're using getdate().
    As such, Vinesh's comment to use decode is wrong - decode is  Oracle syntax.
    Looking at your statement again, I've noticed the following:
    you have no { to match the first } - not sure why you're using them anyway.
    you haven't given x.market a name - use x.market as market instead
    use coalesce instead of nullif if you're on SQL Server.

  • Html snippet is not working on iweb 9. i can't write a code, Html snippet is not working on iweb 9. i can't write a code

    Html snippet is not working on iweb 9. i can't write a code, Html snippet is not working on iweb 9. i can't write a code

    You don't get this window when you insert an HTML snippet on the page?
    Click to view full size
    If you don't try the following:
    delete the iWeb preference files, com.apple.iWeb.plist and com.apple.iWeb.plist.lockfile, that resides in your Home() /Library/Preferences folder.
    go to your Home()/Library/Caches/com.apple.iWeb folder and delete its contents.
    Click to view full size
    launch iWeb and try again.
    OT

  • I am a student and have received my redemption code but it will not work to get a serial number

    I am a student and have received my redemption code but it does not work to get a serial number

    What happens? How are you trying to redeem it?

  • Upper case "s" does not work in most programs

    Upper case "s" does not work in a number of programs, lower case is fine. It is the only letter that is missing in both cases.
    Any ideas. Do I need to reinstall driver for keyboard? If so any idea where to get it.

    Open the Speech pane of System Preferences and check whether either the listening key or the speech key has become set to that keystroke; if so, change the setting.
    (41135)

  • Simple JAX-WS web service does not work on WS7u6

    Hello,
    I am trying to deploy a very simple JAX-WS web service on WS7u6, but it is not working. The same service deployed on Tomcat 6.0.16 works fine.
    The service I'm trying to deploy is from a tutorial on the Netbeans website: [http://netbeans.org/kb/docs/websvc/jax-ws.html] - it is a simple calculator web service that adds two ints and returns an int.
    I follow the tutorial to the letter, but when I attempt to deploy on WS7, it fails as follows:
    [10/Dec/2009:21:21:44] info (25757): CORE3276: Installing a new configuration
    [10/Dec/2009:21:21:44] info (25757): WEB0118: SSO is enabled in virtual server [dadydude.qisc.com]
    [10/Dec/2009:21:21:44] info (25757): WEB0100: Loading web module in virtual server [dadydude.qisc.com] at [/wstest]
    [10/Dec/2009:21:21:44] info (25757): WSSERVLET12: JAX-WS context listener initializing
    [10/Dec/2009:21:21:44] info (25757): wsdl cannot be found from DD or annotation. Will generate and publish a new WSDL for SEI endpoints.
    [10/Dec/2009:21:21:44] failure (25757): WSSERVLET11: failed to parse runtime descriptor: class: org.me.calculator.jaxws.Add could not be found
    class: org.me.calculator.jaxws.Add could not be found
         at com.sun.xml.ws.modeler.RuntimeModeler.getClass(RuntimeModeler.java:271)
         at com.sun.xml.ws.modeler.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:562)
         at com.sun.xml.ws.modeler.RuntimeModeler.processMethod(RuntimeModeler.java:509)
         at com.sun.xml.ws.modeler.RuntimeModeler.processClass(RuntimeModeler.java:355)
         at com.sun.xml.ws.modeler.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:251)
         at com.sun.xml.ws.server.RuntimeEndpointInfo.createSEIModel(RuntimeEndpointInfo.java:170)
         at com.sun.xml.ws.server.RuntimeEndpointInfo.init(RuntimeEndpointInfo.java:317)
         at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.createModelAndMetadata(WSServletContextListener.java:200)
         at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:120)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4456)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:5113)
         at com.sun.webserver.connector.nsapi.WebModule.start(WebModule.java:235)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:924)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:520)
         at org.apache.catalina.startup.Embedded.start(Embedded.java:917)
         at com.sun.enterprise.web.PwcWebContainer.onStartup(PwcWebContainer.java:70)
         at com.sun.webserver.connector.nsapi.WebContainer.start(WebContainer.java:491)
         at com.sun.webserver.init.J2EERunner.confPostInit(J2EERunner.java:304)
    [10/Dec/2009:21:21:44] failure (25757): WebModule[/wstest]PWC1275: Exception sending context initialized event to listener instance of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener
    WSSERVLET11: failed to parse runtime descriptor: class: org.me.calculator.jaxws.Add could not be found
         at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:131)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4456)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:5113)
         at com.sun.webserver.connector.nsapi.WebModule.start(WebModule.java:235)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:924)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:520)
         at org.apache.catalina.startup.Embedded.start(Embedded.java:917)
         at com.sun.enterprise.web.PwcWebContainer.onStartup(PwcWebContainer.java:70)
         at com.sun.webserver.connector.nsapi.WebContainer.start(WebContainer.java:491)
         at com.sun.webserver.init.J2EERunner.confPostInit(J2EERunner.java:304)
    Caused by: class: org.me.calculator.jaxws.Add could not be found
         at com.sun.xml.ws.modeler.RuntimeModeler.getClass(RuntimeModeler.java:271)
         at com.sun.xml.ws.modeler.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:562)
         at com.sun.xml.ws.modeler.RuntimeModeler.processMethod(RuntimeModeler.java:509)
         at com.sun.xml.ws.modeler.RuntimeModeler.processClass(RuntimeModeler.java:355)
         at com.sun.xml.ws.modeler.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:251)
         at com.sun.xml.ws.server.RuntimeEndpointInfo.createSEIModel(RuntimeEndpointInfo.java:170)
         at com.sun.xml.ws.server.RuntimeEndpointInfo.init(RuntimeEndpointInfo.java:317)
         at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.createModelAndMetadata(WSServletContextListener.java:200)
         at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:120)
         ... 11 more
    [10/Dec/2009:21:21:44] failure (25757): PWC1306: Startup of context /wstest failed due to previous errors
    [10/Dec/2009:21:21:44] failure (25757): Null component com.sun.web-3:type=JspMonitor,name=jsp,WebModule=//localhost/wstest,J2EEApplication=null,J2EEServer=none
    [10/Dec/2009:21:21:44] info (25757): CORE3280: A new configuration was successfully installed
    [10/Dec/2009:21:21:44] info (25757): WSSERVLET13: JAX-WS context listener destroyedAm I simply missing something obvious here?
    Thanks,
    Bill

    OK, I've made significant progress.
    As I suspected, JAX-WS was indeed supposed to generate the missing class for me, but while it appears to do so automatically when deploying in Tomcat, it is necessary to hack your build.xml file to add the generated classes to your WAR file for WS7. Reference [http://developers.sun.com/webtier/reference/techart/websvcs_nb.html] for a (rather dated) description of how to deploy a JAX-WS service on WS7 (using Netbeans 5.0!).
    Note that as of NB6.7/6.8 much of the manual process is now done automatically by Netbeans, but curiously, not the part that actually causes the web service code to be generated. For that, we have to manually modify the build.xml to include a "-pre-dist" target that invokes the wsgen Ant task.
    This is the target I added to build.xml for this sample calculator service:
      <target name="-pre-dist">
        <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
          <classpath path="${javac.classpath}:${j2ee.platform.classpath}"/>
        </taskdef>
        <wsgen
          debug="true"
          keep="true"
          destdir="build/web/WEB-INF/classes"
          resourcedestdir="build/web/WEB-INF/classes"
          xendorsed="true"
          sei="org.me.calculator.CalculatorWS">
          <classpath>
            <pathelement path="${javac.classpath}:${j2ee.platform.classpath}"/>
            <pathelement location="${java.home}/../lib/tools.jar"/>
            <pathelement location="build/web/WEB-INF/classes"/>
          </classpath>
        </wsgen>
      </target>That will allow the project to build and deploy successfully, and I am now able to view my WSDL.
    However, at first the service itself was not working. After a bit of casting about, I determined that this was due to the fact that at some point I had added the METRO library to the project rather than simply the JAX-WS 2.2 library. After returning the configuration to just use JAX-WS and doing a clean build and deploy, the simple web service now works!
    One thought does emerge from all this, though: if the built in support for Tomcat runs wsgen for me when I deploy an app to that container, perhaps the Sun WS7 team needs to update their Netbeans plugin to do this for us, too. I should probably open a support case on that...
    OK, now on to real work. ;-)
    Bill

  • PLEASE HELP - Simple movieclip click to URL is NOT working... Why???

    I've tried over 4 tutorials to make my movieclip link to a URL. It's just not working for some reason...
    Here is my code.
    ondemand.addEventListener(MouseEvent.CLICK,goThere);
    function goThere(e:MouseEvent){
    var request:URLRequest = new URLRequest("www.money.net");
    navigateToURL(request);
    ondemand.buttonMode = true;
    ondemand.useHandCursor = true;
    stop();
    ondemand is a movieclip instance with a PNG image of text.
    This should work!! There are no compilation errors...
    No mouse cursor change on hover... just like nothing is there.
    Please help...   

    I am overall confused by your description of what you have, especially when you get to doubleclicking the movie and assigning code in it.
    In any case, you need to assign the name (the same name) to every instance of a tweened object. The lack of a name in earlier frames will be inherited by instances in subsequent frames
    I'm confused about your mention of 3 instances being in the library.  Just for clarity, an instance is a library symbol (or an object) that you place on the stage.  If you place two of the same objects on the stage, then you have 2 instances.  Items in the library are instance-wanna-bes.  If you have three different symbols in the library, and you are tweening them as if they were the same, your tween can't possibly work.

  • Case when statement not working

    hi there, I am trying to work out how to get my case statement to work.
    I have got the following code. 
    select pthproto.pthdbo.cnarole.tpkcnarole, pthproto.pthdbo.cnaidta.formataddr as formataddr, cnaidta.dateeffect as maxdate, isnull(cast (pthproto.pthdbo.cnaaddr.prefix1key as varchar (50)),'') + ' ' + isnull(cast (pthproto.pthdbo.cnaaddr.prefix2key
    as varchar (50)),'')+ ' ' + isnull(cast (pthproto.pthdbo.cnaaddr.prefix3key as varchar (50)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.houseidkey as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component1
    as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component2 as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component3 as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component4
    as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component5 as varchar (100)),'') as mailaddress, row_number() over(partition by pthproto.pthdbo.cnarole.tpkcnarole order by cnaidta.dateeffect desc) as rn into #address from pthproto.pthdbo.cnarole
    inner join pthproto.pthdbo.cnaidty on cnarole.tfkcnaidty =cnaidty.tpkcnaidty inner join pthproto.pthdbo.cnaidta on cnaidty.tpkcnaidty = cnaidta.tfkcnaidty inner join pthproto.pthdbo.cnaaddr on cnaidta.tfkcnaaddr = cnaaddr.tpkcnaaddr order by cnaidta.dateeffect
    select *, case when mailaddress is not null then mailaddress else formataddr end as test from #address where tpkcnarole = '18306695'
    The case when statement is struggling with how i have created the column mailaddress.  As it does seem to understand when it is null.  In the example I have got there is no value in any of the columns to create
    the mailaddress.  Hence why I am referencing it from elsewhere.  Due to having a way on the system where it picks up data from 2 different places.    The mailaddress is always correct if there is one, hence why
    trying to reference that one first.  So how do i change this case when statement to work ?            

    It's ok I have fixed my own problem
    when
    (mailaddress
    is
    null 
    or mailaddress

    then formataddr
    else mailaddress
    end
    as test
    case

  • Spring-jsf: "wiring datasource"-code looks correct, yet not working...why?

    The "applicationContext.xml" appears to be correctly configured to "wire" the datasource to the bean...
    But, unfortunately, this simple app does not work...Error message reports "dataSource is required"...
    The code/configuration I'm using reflects -- to the best of my knowledge -- the examples I've seen in books and online...
    Its apparent that I am misunderstanding some fundamental concept....
    Any help pointing out the critical flaw would be much appreciated!
    Thanks in advance!
    jw
    applicationContext.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>
    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName"><value>oracle.jdbc.OracleDriver</value></property>
    <property name="url"><value>jdbc:oracle:thin:@localhost:1521:ORCL</value></property>
    <property name="username"><value>scott</value></property>
    <property name="password"><value>tiger</value></property>
    </bean>
    <bean id="jsp1Bean" class="testjsf01.Jsp1Bean">
    <property name="dataSource"><ref bean="dataSource"/></property>
    </bean>
    </beans>
    Jsp1Bean class:
    package testjsf01;
    import org.springframework.jdbc.core.*;
    import org.springframework.jdbc.core.support.JdbcDaoSupport;
    import org.springframework.jdbc.datasource.DriverManagerDataSource;
    import org.springframework.beans.factory.xml.XmlBeanFactory;
    import org.springframework.core.io.*;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import javax.sql.DataSource;
    import java.util.ArrayList;
    import javax.faces.model.DataModel;
    import javax.faces.model.ListDataModel;
    public class Jsp1Bean extends JdbcDaoSupport
    private JdbcTemplate template;
    private DriverManagerDataSource dataSource;
    public Jsp1Bean ()
    public void setDataSource (DriverManagerDataSource dataSource)
    this.dataSource = dataSource;
    public DataModel getDataModel1() throws Exception
    final ArrayList outList = new ArrayList();
    template = new JdbcTemplate(dataSource);
    class RowCallbackHandlerImpl implements RowCallbackHandler
    public void processRow(ResultSet rs) throws SQLException
    ArrayList sublist = new ArrayList();
    sublist.add(rs.getString(1));
    sublist.add(rs.getString(2));
    sublist.add(rs.getString(3));
    outList.add(sublist);
    template.query("select a.empno, a.ename, a.job from scott.emp a", new RowCallbackHandlerImpl());
    return new ListDataModel(outList);
    web.xml:
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <taglib>
    <taglib-uri>/spring</taglib-uri>
    <taglib-location>/WEB-INF/tlds/spring.tld</taglib-location>
    </taglib>
    </web-app>
    faces-context.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
    <application>
    <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
    </application>
    <managed-bean>
    <managed-bean-name>jsp1Bean</managed-bean-name>
    <managed-bean-class>testjsf01.Jsp1Bean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    </faces-config>
    Error messages:
    Mar 17, 2006 1:08:10 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet Faces Servlet threw exception
    javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error getting property 'dataModel1' from bean of type testjsf01.Jsp1Bean: java.lang.IllegalArgumentException: dataSource is required
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
    at javax.faces.component.UIData.getValue(UIData.java:527)
    at javax.faces.component.UIData.getDataModel(UIData.java:856)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.faces.el.EvaluationException: Error getting property 'dataModel1' from bean of type testjsf01.Jsp1Bean: java.lang.IllegalArgumentException: dataSource is required
    at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:89)

    Ok, I got this fixed. Turns out it didn't like being inside a <rich:columnGroup>. Removed that and it's working.

  • I did write a simple java program but it is not working please help me.....

    This is the program I wrote LineRect just to draw a line a rectangle etc...... Y it is not working How can i used the same program to run without using applet that is by using awt and swing.........Pls Help me.............
    import java.awt.*;
    import java.io.*;
    public class LineRect
    {public void paint(Graphics g)
         {g.drawLine(10,10, 50,50);
         g.drawRect(10, 60, 40,30);
         g.fillRect(60,10,30,80);
         g.drawRoundRect(10,100,80,50,10,10);
         g.fillRoundRect(20,110,60,30,5,5);
         g.drawLine(100,10,230,140);
         g.drawLine(100,140,230,10);
    <APPLET
    CODE =LineRect.class
    WIDTH=250
    HEIGHT=200>
    </APPLET>

    There are many significant errors here for instance you are using a class file as if it were an applet yet you do not subclass applet. Your code has no init method (if it is to be an applet). Your best bet is to go through the tutorials one step at a time. One thing to consider is to subclass a JPanel and draw on the jpanel overriding the paintComponent method. This can then be added to a JFrame or a JApplet's contentPane and would allow the same graphics in both. But again, please study the tutorials on all of this, otherwise you will be doing hit-or-miss programming, and that is no way to learn.
    Much luck!
    Addendum: Also, if you are just beginning in Java programming, I suggest you start with the basics and not with Swing / AWT / graphics programming. Otherwise you will just end up bruised and disappointed. You have to learn to walk before you can run.
    Edited by: Encephalopathic on Dec 26, 2007 5:09 AM

  • TS3274 I did restore my ipad and now it is asking for a access code, previous one is not working

    I did reset my iPad and now I can't access to it, previous access code is not working, how shoud I do to fix the problem?
    Any help is welcome
    vx

    You will need to restore your iDevice from the same computer that you most recently synced to.
    Read this: http://support.apple.com/kb/ht1212
    If you can't do the restore then you will need to try recovery mode.
    Read this: http://support.apple.com/kb/ht1808

  • Simple button highlights in PSD menu not working properly in Encore

    I'm having some trouble making even basic menus this week - I'm working on a couple of projects that need simple menus on their DVDs, but I can't get them to work.
    For one project, it's a simple menu with a photo as the background and two buttons - 'Play' and 'Behind the Scenes'. Each button group consists of a text layer with the button title and a layer called '(=1) Highlight'. The highlight layer is a simple straight line underneath the text. Nothing is overlapping, however the line is not appearing on one of the buttons. The group is detected as a button in Encore, and works when it is linked to the timeline, but the line does not appear
    With the other project I've been working on this week, there's a few menu pages - a main menu, and some chapter select sub menus. These menus look a bit fancier, but the buttons are still fairly simple - they basically consist of a line of text, but this time the highlight is a rectangular outline. I'm having what looks like the same problem with these menus - the highlights aren't displaying correctly. Most of the outlines are missing their bottom lines - so only a three-sided box is appearing.
    I've made plenty of menus before using the same method, and more complicated ones than this too, without running into any issues. I haven't been able to figure out what the problem is, despite starting over and making the menus from scratch several times, and making them one step at a time, importing them into Encore at every step to test. At some point, one or more of the highlights will always stop working. Despite this systematic approach, I'm still baffled. I'm using Photoshop CS5.1 and Encore CS5.1. After running into problems on one computer I tried making menus from scratch on another computer with the same version software but had the same problem.
    Has anyone got any suggestions of things I should try that might solve this problem? I can send an example of a menu that's not working for me if anyone would like to take a look.

    Thank you, everyone, for your continued support.
    I have tried everything suggested here, plus lots more, since I last posted. There are glitches no matter what I do. I don't think it's anything to do with what I'm doing in Photoshop as I've tried using some menus from the Encore library and I'm having the same problem with those. I've also tried using buttons from the Encore library on my menus with the same result.
    But that got me to thinking - perhaps it's just a glitch with Encore's previews. So I tried actually building a DVD image, even with the menus that appeared to be broken, and they turned out to be fine. So it must just be a glitch in the Encore preview.
    I've also discovered another bug while doing this - if you create a menu in Encore, it's always NTSC, even if the project is PAL. It makes a 4:3, 720x480 menu with a PAR of D1/DV NTSC 0.91. Surely, if you've set up a PAL project, and you create a new menu, it should create one that's actually PAL?

  • Lenovo Miix 10 Built-In Case Keyboard is not working

    Hello,
    I am having problem with my case keyboard which is not working. I bought my Lenovo Miix 10 3 days ago but the Keyboard (the built-in Case Keyboard) has never worked. Does anyone have a solution on how to turn it on/fix it?
    Thank you for your help
    Moshe

    Hi
    Welcome To Lenovo Community
    We are really sorry to hear about the issue you are facing,  
    Based on what I read from the post, it seems to be a hardware issue with the keyboard
    Please contact Local Lenovo support to have system verified
    http://support.lenovo.com/en_IN/feedback/detail.page?LegacyDocID=MIGR-76613
    Do give this a try and let us know  
    Hope This Helps
    Cheers!!!
    WW Social Media
    Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    Follow @LenovoForums on Twitter!
    How to send a private message? --> Check out this article.
                            English Community   Deutsche Community   Comunidad en Español

  • CASE function is not working

    Hi,
    I want to use the CASE function in a sql statement used at form level but it's not working. I can't compile the form. I am using developer 6i at font end and Oracle 10g database at back end. Is it possible to use case function at form level sql statement. If so then please help me about it.
    Best Regards

    Forms has it's own PL/SQL engine, and in Forms 6i it's version 8 where no CASE was available. So if you want to use CASE you'll have to use a view or put your logic in a stored procedure.

Maybe you are looking for

  • Error while Refreshing provider when tried to view the portlet on portalpag

    Hi All, We have developed an oracle PDK portlet in jdeveloper 10g. The name of the application is ChngPasswd. This application is deployed on OAS 10.1.3.1.0. The deployment was successful. Now, I tried to register the web provider which was deployed

  • Scales in Scheduling agreement.

    Hi, This query i am posting again, as there is a need from my client for this regularly. I need your expertise for meeting out this functionality. Hi, Pl findherwith the following sceario. I had created a Scheduling agreement for 5000 units with the

  • Oracle 9i Installation on Windows 2003 Server 64bit - URGENT

    Hi , I am installing oracle 9i on win 2003 server (64 bit) enterprise edition. After the installation whenever I try to run Database Configuration Assistant or Net configuration assistant nothing happens. If i run DBCA on command line then it runs bu

  • Projects/Events not being saved.

    I am having major problems with FCPX. I have edited and re-edited the same movie about 20 times now. Every time, at some stage, the undo feature stops working and when I quit and re-open FPCX I am just seeing the project at the very start of my work,

  • Downloaded a song and it only downloaded halfway but says the download is complete

    And I don't see any way of redownloading the song. It says it should be fine. The song's duration is listed as about 5 minutes, but whenever it gets to 2 minutes or so it ends and just goes on to the next song. What can I do?