I am not able to fecth data using this statement

Hi All,
Iam getting problem when i was using select queiry based on vbak,vbap and konv tables.
Error is i am not able to get  all condition types but i am getting only first record
Example...
number of the document condition which is KNUMV
condition item number which is KPOSN
condition type which is kshcl
knumv              kposn             kshcl
00000002          000100        zpro
00000002          000100        zdsc
00000002          000100        zima
00000002          000100        zpak
but iam getting only first fecord not getting all the records
like
000000002    000100    zpro
code is ..........
*select Sales Document: Header Data and Item Data from vbak and vbap
select avbeln aerdat aernam aauart avkorg avtweg aspart akunnr avkbur avkgrp alifsk afaksk aaugru aknumv
       bposnr bmatnr bwerks blgort bkwmeng bpstyv babgru bbedae blprio bvstel bntgew bbrgew
       bvolum bfaksp bktgrm btaxm1 babfor bkalsm_k bmatkl bkondm bgsber bprctr
       into corresponding fields of table it_vbak
       from vbak as a inner join vbap as b on avbeln = bvbeln
       where a~vbeln in lr_vbeln and
             a~vkorg in lr_vkorg and
             a~vtweg in lr_vtweg and
             a~spart in lr_spart and
             b~werks in lr_plant and
             a~auart in lr_auart and
             a~erdat in lr_erdat.
Move all the data to it_sorder
  IF sy-subrc = 0.
    LOOP AT it_vbak.
          MOVE-CORRESPONDING it_vbak TO it_sorder.
          APPEND it_sorder.
          CLEAR it_sorder.
    ENDLOOP.
  ENDIF.
*select Conditions from konv
IF NOT it_sorder[] IS INITIAL.
    SELECT knumv kposn STUNR KAPPL ZAEHK kschl kbetr KAWRT
           INTO CORRESPONDING FIELDS OF TABLE it_konv
           FROM konv FOR ALL ENTRIES IN it_sorder
           WHERE knumv = it_sorder-knumv and
                 kposn = it_sorder-posnr.
  ENDIF.
Read Conditions  from it_konv move it to it_sorder
  sort it_konv by knumv .
   sort it_sorder by knumv .
    LOOP AT it_sorder.
    READ TABLE it_konv WITH KEY knumv = it_sorder-knumv
                                kposn = it_sorder-POSNr binary search.
    IF sy-subrc = 0.
      it_sorder-Kposn = it_konv-kposn.
      it_sorder-STUNR = it_konv-STUNR.
      it_sorder-KAPPL = it_konv-KAPPL.
      it_sorder-ZAEHK = it_konv-ZAEHK.
      it_sorder-kschl = it_konv-kschl.
      it_sorder-kbetr = it_konv-kbetr.
      MODIFY it_sorder.
      CLEAR it_sorder.
    ENDIF.
    CLEAR it_konv.
  ENDLOOP.
pls can you help me
thanks
mars

I think the problem is here:
sort it_konv by knumv .
sort it_sorder by knumv .
LOOP AT it_sorder.
READ TABLE it_konv WITH KEY knumv = it_sorder-knumv
kposn = it_sorder-POSNr binary search.
There will be mulitple lines in it_konv with this key so it will only return the first. You need a second loop round it_konv eg:
LOOP AT it_conv WHERE knumv = it_sorder-knumv and kposn = it_sorder-POSNr.
* do stuff here
ENDLOOP.
Try that and see if it helps...
Andy

Similar Messages

  • Not able to select data using DB link.

    Hi ,
    I have created the database link in oracle 8.1.7.0.0 to oracle 8.1.7.4.0
    But I am not able to select data using DB link.
    The error is = ORA 12154 : TNS: could not resolve service name.
    I have created the DB link with the same command in oracle 9.2.0.4.0 to oracle 8.1.7.4.0. I can select data using this link.
    Please suggest me the solution.
    Thanks,
    Shailesh

    If the service name is different on the 8i machine than on the 9i machine, you'll need to modify the service name when creating the link from 8i. Can you see the DB link in ALL_DB_LINKS in the 8i database?

  • Not able to fetch data using Scenario

    Hi
    I am working with Quincy Fund Demo. In that we have investorhome.jsp page, where we have following code to get the offer Advertisement data.
    <dsp:droplet name="/atg/targeting/TargetingFirst">
    <dsp:param bean="/atg/registry/Slots/QFOfferSlot" name="targeter"/>
    <dsp:param name="howMany" value="1"/>
    <dsp:param name="fireContentEvent" value="false"/>
    <dsp:param name="fireContentTypeEvent" value="false"/>
    <dsp:oparam name="output">
                        <dsp:a href="offer.jsp">
    <dsp:param name="ElementId" param="element.repositoryId"/>
    <img border="0" src="<dsp:valueof param="element.imageURL"/>"></dsp:a>
    </dsp:oparam>
    </dsp:droplet>
    And the scenario I am trying to use is PromoteSpecialSituations.( Please refer ACC for Quincy fund demo).
    But my problem is that I am not able to get any data from this scenario.
    Can anyone tell me the reason behind it and its solution?
    Thanks
    Prasanna

    Hi Shaik
    Here is the detail of that scenario
    (event) Logs in ------(people) Locale is en_US-------(fork)-----
    --------------(people) Fund list includes ---------------|
    | /repositories/Funds/en_US |
    | /specialsituation.xml |
    |
    -----------|(Otherwise Cond)--Add items to slot
    named QFOfferSlot
    named Offers:offer:
    /repositories/Offers/en
    _US/specialsituations.html
    The content of specialsituation.xml file is as follows:
    <fund>
    <aggressiveIndex>2</aggressiveIndex>
    <targets>aggressive</targets>
    <fundName>Quincy Special Situations Fund</fundName>
    <symbol>QUISS</symbol>
    <category>stock</category>
    <type>Growth; Income</type>
    <price>5.69</price>
    <language>de_DE</language>
    <objective>Quincy Special Situations Fund seeks high total return through
    capital appreciation and income.
    </objective>
    <strategy>This fund pursues capital appreciation and current income by
    buying stocks with deeply-depressed prices that fund management believes
    have the potential for recovery. Fund management searches for three types
    of value stocks: stocks with high current dividend yields, stocks
    temporarily discounted by the market, and stocks that management
    believes are fundamentally misunderstood but have great potential. The
    depressed prices of these stocks make them more responsive to
    company-specific news than to general stock market trends.
    </strategy>
    <inceptionDate>02/15/1992</inceptionDate>
    </fund>
    Thanks
    Prasanna

  • Not able to Import data using "clear and replace"

    Hi,
    If I import data using the data admin package "Import" and "Merge" as 'method for importing' the process runs without problems.
    If I change the 'method for importing' to "Clear and Replace" the process fails. See message:
    TOTAL STEPS  2
    1. Convert Data:         completed  in 3 sec.
    2. Load and Process:     Failed  in 1 sec.
    3. Import:               completed  in 1 sec.
    [Selection]
    FILE=\UHRENHOLT\LEGAL_DATALOAD\DataManager\DataFiles\\Axapta_Load.txt
    TRANSFORMATION=\UHRENHOLT\LEGAL_DATALOAD\DataManager\TransformationFiles\\Axapta_Load.xls
    CLEARDATA= Yes
    RUNLOGIC= Yes
    CHECKLCK= Yes
    [Messages]
    Key cannot be null.
    Parameter name: key
    I'm uisng the standard data admin package (and thereby the values 0 and 1). For some reason the value 1 is not accepted.
    Any suggestions?
    /Lars

    Hi,
    The "Replace & clear..." feature during data import depends on Work Status. So to use this functionality, you need to setup Work Status under your application. Notice that you need to setup Work Status even if you aren't selecting the option to check Work Status when running the package.
    Hope this will help you.
    Kind Regards,
    Patrick

  • Not able to display data in separate columns using Unicode encoding

    Hi,
    Iam using Unicode encoding in my Java appln to support Japanese characters while downloading CSV report. But using the Unicode encoding displays all data in the first column of Excel sheet.
    Please let me know how to display data in different columns using Unicode encoding in Excel sheet.
    This is an urgent need. Please help me out.

    Hi,
    I have no problem with item :P15_EV_LCL this is having a value my probem here is i am using java script to display the value in different color based on the condtion case
    eg:
    select
    case
    TRUNC((
    ( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
    ),2)
    = :P15_EV_LCL
    then
    span style="background-color:lightgreen"
    || TRUNC((
    ( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
    ),2) || '%' || /span
    else
    span style="background-color:yellow"
    || TRUNC(
    ( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
    ),2) || '%' || /span
    end "Effort"
    from actuals Z
    If i dont use this <Span style="Background-color:color"> i am able to generate data in excel sheet if i use this color coding i am not able to get data in spread sheet.
    Please suggest
    Thanks
    Sudhir
    Edited by: Sudhir_N on Mar 23, 2009 10:00 PM

  • Not able to View data in .CSV file

    Hi,
    I am using some java script to display data conditionall, for color coding purpose but when i try to download the data to an spread sheet i am not able to do that please suggest me how to export fix this bug
    select
    case
    TRUNC((
    ( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
    ),2)
    = :P15_EV_LCLthen
    '<span style="background-color:lightgreen">'|| TRUNC((
    ( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
    ),2) || '%' || '</span>'
    else
    '<span style="background-color:red">'|| TRUNC((
    ( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
    ),2) || '%' || '</span>'
    end "Effort"
    from actuals Z
    If i try to extract actuals it shows blank not able to extract data please suggest me how to fix this issue.
    Thanks
    Sudhir

    Hi,
    I have no problem with item :P15_EV_LCL this is having a value my probem here is i am using java script to display the value in different color based on the condtion case
    eg:
    select
    case
    TRUNC((
    ( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
    ),2)
    = :P15_EV_LCL
    then
    span style="background-color:lightgreen"
    || TRUNC((
    ( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
    ),2) || '%' || /span
    else
    span style="background-color:yellow"
    || TRUNC(
    ( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
    ),2) || '%' || /span
    end "Effort"
    from actuals Z
    If i dont use this <Span style="Background-color:color"> i am able to generate data in excel sheet if i use this color coding i am not able to get data in spread sheet.
    Please suggest
    Thanks
    Sudhir
    Edited by: Sudhir_N on Mar 23, 2009 10:00 PM

  • Not Able To View Data in Web Service Model

    Hi ,
       I m trying to view a table using web service model.
       When i write the same code for binding it to context , i m able to view its data.
       But not so while using Web Service Model(not adaptive web service model).
       The code is: 
             Request_ZMANAGE_MAKT_ZMANAGE_ZMAKT object1 =new Request_ZMANAGE_MAKT_ZMANAGE_ZMAKT();
       wdContext.nodeRequest_ZMANAGE_MAKT_ZMANAGE_ZMAKT().bind(object1);
       object1.setResponse(new Response_ZMANAGE_MAKT_ZMANAGE_ZMAKT());
      CAn anybody plz solve my problem.
    Thanks..
    Regards,
    Ankita

    Hi,
    I have no problem with item :P15_EV_LCL this is having a value my probem here is i am using java script to display the value in different color based on the condtion case
    eg:
    select
    case
    TRUNC((
    ( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
    ),2)
    = :P15_EV_LCL
    then
    span style="background-color:lightgreen"
    || TRUNC((
    ( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
    ),2) || '%' || /span
    else
    span style="background-color:yellow"
    || TRUNC(
    ( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
    ),2) || '%' || /span
    end "Effort"
    from actuals Z
    If i dont use this <Span style="Background-color:color"> i am able to generate data in excel sheet if i use this color coding i am not able to get data in spread sheet.
    Please suggest
    Thanks
    Sudhir
    Edited by: Sudhir_N on Mar 23, 2009 10:00 PM

  • Not able to see data in 0FIGL_V30 & 0FIGL_V31

    Hi,
    I've activated / installed standard business content for EpH3 i.e Mutltiprovider 0FIGL_M30 and entire data flow which includes reports and virtual providers 0FIGL_V30 & 0FIGL_V31.
    I'm able to see data in cubes where above virtual providers read data from. here is the link from help.sap.com
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/6b/fdc62d9e0b444cb14b7f424d9f9cb7/frameset.htm
    Issue is i'm not able to see data in Virtual providers 0FIGL_V30 & 0FIGL_V31 and hence in reports.
    Can anyone advice please. thanks
    SD

    Hi All,
    Yes I've checked data in underlying cubes.
    Mulitprovider is fine.
    I've added Master Data for both 0GL_ACCTP  and 0ACCESSTP
    RFC connection is fine.
    No DTP & Transformation since this is Virtual Provider based on Functional Module.
    However when I debug FM for 0FIGL_V30 & 0FIGL_V31 - I see no data and thought there might be master data issue b/w 0GL_ACCOUNT & 0GLACCEXT but MD is fine.
    It just not pulling data.
    Is there some setting I'm missing?
    FM's used for Virtual Providers are
    0FIGL_V30  - RS_BCT_FIGL_SREP_DATA_GET_V30
    0FIGL_V31 - RS_BCT_FIGL_SREP_DATA_GET_V31
    SD

  • Not able to access data in Query

    Hi,
    I have loaded data using DTP from 2 different source systems.
    One is 3.x emulated datasource and the other is New 7.0 datasource.I have loaded data sucessfully in to DSO.Built a query on same.
    But when iam executing the query by material as selection criteria.Iam not able to found data in query from one source system.The same data is available in DSO.Please needed in this regard.

    Hi Venkat,
    After extracting data into DSO check the request whether active or not.
    Check data in DSO in contents.
    If is there any restrictions on info providers in Queries.
    Let us know status clearly.......
    Reg
    Pra

  • Not able to see Data in Xcelsius 2008

    Hi everyone,
    My question is I am not able to see data in Xcelsius spreadsheet although I am able to connect to SAP BW and also able to see and select query but when I select Cross Tab Data in output Values it is not displaying in Xcelsius spreadsheet
    System Info
    Xcelsius 2008 Enterprise Trial Version SP 3.0
    SAP BW 7.1 SP 6 ABAP and JAVA
    Any help would be appreciated

    Hi Rashid,
    When you are using the BW conenction in Xcelsius you will not see any data in the spreadsheet at design time or at preview time.
    To see the data you need to go SAP > Publish, then SAP > Launch to test the dashboard in the NetWeaver Portal as that is the only place where the data can be viewed.
    Regards
    Matt

  • Not able pass the data from component to other component.

    Hello All
    I am not able pass the data from component to other component.
    I have done like this.
    1 Main Component (Parent component ) having below  two child components.Embeded as used components.
    2)     Search Component  and Details Component
    3)     In the Search Component having buttons,  Say : Button u201CXu201D on click of button I am navigating to Details component view through FPM.
    4)     When I am clicking above button u201CXu201D raising the event to call the parent   business logic method, there I am getting  Structure with values and binded this structure to the node and Mapped this node to the Details component  interface node. FYI : I kept the debugging point Structure is having data , I had set static attributes table to node instance.
    5)     In the Details component node data is not coming mean empty.
    Thanks in Advance.
    Br-
    CW
    Edited by: CarlinWilliams on Jul 4, 2011 9:21 AM

    Hi,
    When you use input Ext. check that the parent component should not be used as used component in child component.
    Only in the parent component the child components should be used as used components and the usage has to be created for the
    Child Components and the binding of the Node should be done from comp. controller of parent component to child node
    by which you will be able to see double arrow against the node.This should work
    Thanks,
    Shailaja Ainala.

  • Not able to run validation using validation.xml & validator-rules.xml

    Hello Friends,
    I am not able to run validation using validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    </form-beans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    </global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    </action>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    </form>
    </formset>
    </form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    } else {
    results = service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come from a real data
    source such as a database. */
    private static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees.getName().toUpperCase().indexOf(name.toUpperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.

    Hello Friends,
    I am not able to run validation using
    validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error
    messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    ans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    tion>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in
    className="org.apache.struts.validator.ValidatorPlugI
    ">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    >
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}"
    resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    /form>
    </formset>
    form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping
    mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new
    EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria
    was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    else {
    results =
    service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access
    by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come
    from a real data
    source such as a database. */
    ivate static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if
    (employees.getName().toUpperCase().indexOf(name.toU
    pperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.
    Hi,
    Your error message are not displaying because u does not made Message-Resoucrce property file (Resource Bundle) when you make it .
    give it entry in
    struts-config.xml
    <message-resources parameter="ApplicationResources" />
    and
    define key and corresponding error message to key in this ApplicationResources i.e
    #Error Resources
    label.search.ssNum=Plz Enter correct ssNum

  • Not able insert ,query data from forms

    hi,
    I am not able to insert data or query data from forms(10g devsuite).getting error frm-40505,frm 40508 .i am able to insert and select record from sql plus.the block ihave created is control block .it is connected to the table using the properties.
    should i do anything to insert record.please help

    the block ihave created is control block .it is connected to the table using the properties.A Control Block, by definition, is a non-database block. This means the block is not directly connected to a table so you have to manually display data in the block and any DML you want to perform on data in this block you must do manually as well.
    There are four database objects you can base your database block on; 1) a Table, 2) a View, 3) From Clause Query (basically an In-line View), and 4) a database stored procedure. I recommend you use one of these four methods rather than manually display your data.
    Craig...

  • Not able to get data while executing in background for mb52

    Dear all,
    my requirement is i want to schedule the zreport for every 1 hour.but proble is when iam executing in fore ground iam able to get data.but when iam going to scheduling this iam not able to get data.
    my code is
    type-pools:slis.
    data zbudat type RANGE OF budat.
    data wab like line of zbudat.
    data zmatkl type RANGE OF MATKL.
    data waz like line of zMATKL.
    data zwerks type RANGE OF werks.
    data wax like line of zwerks.
    waz-sign = 'I'.
    waz-low = 'CRUDE'.
    waz-option = 'EQ'.
    append waz to zmatkl.
    clear waz.
    waz-sign = 'I'.
    waz-low = 'SGO'.
    waz-option = 'EQ'.
    append waz to zmatkl.
    clear waz.
    *waz-sign = 'I'.
    *waz-low = 'FINES'.
    *waz-option = 'EQ'.
    *append waz to zmatkl.
    *clear waz.
    *waz-sign = 'I'.
    *waz-low = 'LUMPS'.
    *waz-option = 'EQ'.
    *append waz to zmatkl.
    *clear waz.
    *waz-sign = 'I'.
    *waz-low = 'UFO'.
    *waz-option = 'EQ'.
    *append waz to zmatkl.
    wax-sign = 'I'.
    wax-low = 'BIMI'.
    wax-option = 'EQ'.
    append wax to zwerks.
    clear wax.
    wax-sign = 'I'.
    wax-low = 'BIPL'.
    wax-option = 'EQ'.
    append wax to zwerks.
    *waz-sign = 'I'.
    waz-low = 'C'.
    *waz-option = 'CP'.
    *append waz to zmatnr.
    *clear waz.
    *waz-sign = 'I'.
    waz-low = 'S'.
    *waz-option = 'CP'.
    *append waz to zmatnr.
    *clear waz.
    *waz-sign = 'I'.
    waz-low = 'UC'.
    *waz-option = 'CP'.
    *append waz to zmatnr.
    *waz-sign = 'I'.
    waz-low = 'F'.
    *waz-option = 'CP'.
    *append waz to zmatnr.
    *clear waz.
    *waz-sign = 'I'.
    waz-low = 'L'.
    *waz-option = 'CP'.
    *append waz to zmatnr.
    types:begin of w_tab,
           bwkey type werks_d,
           matnr type matnr,
            lgort type LGORT_D,
            budat type budat,
            labst type labst,
           endmenge type p decimals 3,
          end of w_tab.
          DATA : IT_TAB TYPE STANDARD TABLE OF W_TAB WITH HEADER LINE .
    FIELD-SYMBOLS: <gt_fieldcat> TYPE slis_fieldcat_alv,
    <gt_report_list> TYPE w_tab .
    field-symbols <lt_pay_data> type any table.
    *FIELD-SYMBOLS : <LT_DATA> LIKE LINE OF IT_TAB .
    FIELD-SYMBOLS : <LT_DATA> type any .   " i have chaged  it
    data lr_pay_data type ref to data.
    cl_salv_bs_runtime_info=>set( exporting display = abap_false
    metadata = abap_false
    data = abap_true ).
    ****SUBMIT ZQM_GR_BARGE_LOADING WITH S_date in zbudat with s_werks in zwerks with p_pend = ' ' AND RETURN .
    submit RM07MLBS  with MATKLA in zmatkl with werks in zwerks
    "with XVBST = 'X'
    using selection-SCREEN '1000' and return.
    try.
    cl_salv_bs_runtime_info=>get_data_ref( importing r_data = lr_pay_data ).
    assign lr_pay_data->* to <lt_pay_data>.
    catch cx_salv_bs_sc_runtime_info.
    message `Unable to retrieve ALV data` type 'E'.
    endtry.
    cl_salv_bs_runtime_info=>clear_all( ).
    data: obj_s type ref to ZKMINCO_MINESTOCKFROM_SAP_OUT.
    create OBJECT obj_s.
    data : output TYPE ZKMINMINESTOCKFROM_SAP1 ,
            record type ZKMINMINESTOCKFROM_SAP_REC_TAB ,
           wa_record like line of record.
    LOOP AT <lt_pay_data> ASSIGNING <LT_DATA>.
    MOVE-CORRESPONDING <LT_DATA> TO IT_TAB .
    APPEND IT_TAB .
    wa_record-STOCK_AS_ON_DATE = sy-datum .
    wa_record-STOCK_AS_ON_TIME = sy-uzeit .
    wa_record-PLANT_ID = it_tab-bwkey.
    wa_record-STORAGE_LOC_ID = it_tab-lgort .
    wa_record-MATERIAL = it_tab-matnr .
    wa_record-STOCK_QTY = it_tab-labst.
    append wa_record to record.
    clear wa_record.
    endloop.
    output-MINESTOCKFROM_SAP-record = record .
    CALL METHOD obj_s->MINESTOCKFROM_SAP_OUT
      EXPORTING
        output = output .
    commit work.
    Thanks in advance.

    Hi,
    I assume that in your case you have two program lets say ZFOREGROUND and ZBACKGROUND (Called inside zforeground using submit statement)
    zforeground has :
    1. a input field to browse excel sheet or some file at the selection screen, and
    2. button 'post all' to determine the background processing.
    Now your requirement is such that you want zbackground to get scheduled as background job when post all button is clicked.
    So, within the event AT USER-Command, check the sy-ucomm as that of post all button, if so write the following code to schedule the job:
    DATA: jobname LIKE tbtcjob-jobname.
    DATA :jobcount LIKE tbtcjob-jobcount,
    host LIKE msxxlist-host.
    DATA: BEGIN OF starttime.
    INCLUDE STRUCTURE tbtcstrt.
    DATA: END OF starttime.
    DATA: starttimeimmediate LIKE btch0000-char1.
    DATA: gv_job_dt TYPE sy-datum,
    gv_job_tm TYPE sy-uzeit.
    jobname = 'EXCLUSION_LISTING'.
    gv_job_dt = sy-datum.
    gv_job_tm = sy-uzeit.
    Job open
    CALL FUNCTION 'JOB_OPEN'
    EXPORTING
    delanfrep = ' '
    jobgroup = ' '
    jobname = jobname
    sdlstrtdt = sy-datum
    sdlstrttm = sy-uzeit
    IMPORTING
    jobcount = jobcount
    EXCEPTIONS
    cant_create_job = 01
    invalid_job_data = 02
    jobname_missing = 03.
    IF sy-subrc NE 0.
    "error processing
    ENDIF.
    Insert process into job
    SUBMIT ZBACKGROUND AND RETURN
    WITH p_file1 = gv_file_cust_exc "<----
    Parameters which you want to pass to report zbackground from the report
    WITH p_file2 = gv_file_win_deal "------zforeground
    USER sy-uname
    VIA JOB jobname
    NUMBER jobcount.
    IF sy-subrc ne 0.
    "error processing
    ENDIF.
    Close job
    starttime-sdlstrtdt = gv_job_dt.
    starttime-sdlstrttm = gv_job_tm.
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
    event_id = starttime-eventid
    event_param = starttime-eventparm
    event_periodic = starttime-periodic
    jobcount = jobcount
    jobname = jobname
    laststrtdt = starttime-laststrtdt
    laststrttm = starttime-laststrttm
    prddays = 1
    prdhours = 0
    prdmins = 0
    prdmonths = 0
    prdweeks = 0
    sdlstrtdt = starttime-sdlstrtdt
    sdlstrttm = starttime-sdlstrttm
    strtimmed = starttimeimmediate
    targetsystem = host
    EXCEPTIONS
    cant_start_immediate = 01
    invalid_startdate = 02
    jobname_missing = 03
    job_close_failed = 04
    job_nosteps = 05
    job_notex = 06
    lock_failed = 07
    OTHERS = 99.
    IF sy-subrc EQ 0.
    WRITE:/1 'JOB' COLOR 3,
    jobname COLOR COL_GROUP,
    'Scheduled in Background' COLOR 3. "error processing
    gv_time = starttime-sdlstrttm.
    gv_date = starttime-sdlstrtdt.
    ENDIF.
    Above code will schedule the report zbackground in background.
    Note:
    the program schduled in background will not be able to access any data present on your presentation server. data should be provided either by the program schhedulling it in foreground or it has to be thr in application server.
    Regards,
    Ravi

  • Not able to query data from View

    Hi,
    I am not able to fetch data from views even while running simple select statements. I am using SQL Developer Version 3.0.04,
    Same query is fetching data on other computers running SQL Developer or Toad.
    Has anyone faced this issue??

    Is that the first version ever you installed? You unzipped in a clean directory, right?
    What OS/JDK/DB versions?
    So do you get an error or what?
    K.

Maybe you are looking for

  • PART# 5047401001/MODEL# CT4

    Hello, I am trying to find out the difference between the CT4740 and the CT4750. I ordered the CT4740 from a vendor who had the part number listed by 50474000. When I received the soundcard, the model I received was the CT4750. He told me that they a

  • How do I find a adress in the drive or walk mode.

    It seems impossible to make at route in the drive or walk mode, as maps won´t search for any roadnames?

  • How to start weblogic instance using wlserv ant task

    Hi, Iam using weblogic 8.1 Iam trying to write build script which starts remote weblogic instance and does deploy using wldeploy and restarts the instance. First iam trying with starting weblogic. ============================== <wlserver             

  • Back button loses its memory after a while

    Greetings, I brought up the ohguide.bat from OHJ 4.2.3 and selected the topic "About the Files". I selected each hyperlink from this page and then used the "Back" button to return back to the original About the Files topic. Using the table of content

  • Live clock on webpage

    hi folks, just in the process of redesigning my site and need a bit of help. http://www.morganroyle.co.uk/morganroylemusic/Home.html if you see my page here i'm trying to put a working date and time with seconds into the page. i've tried numerous htm