Urgent doubt in struts

Hi,
I have created the code for search employee from database values,
my struts code in search.jsp is
<logic:present name="searchForm" property="results">
<hr width="100%" size="1" noshade="true">
<bean:size id="size" name="searchForm" property="results"/>
<logic:equal name="size" value="0">
<center><font color="red"><b>No Employees Found</b></font></center>
</logic:equal>
<logic:greaterThan name="size" value="0">
<table border="1">
<tr>
<th>Name</th>
<th>Social Security Number</th>
</tr>
<logic:iterate id="result" name="searchForm" property="results">
<tr>
<td><bean:write name="result" property="name"/></td>
<td><bean:write name="result" property="ssNum"/></td>
</tr>
</logic:iterate>
</table>
</logic:greaterThan>
</logic:present>
2. Also i created the code for searchForm for get and set methods
3. As i created the servlet code as also searchAction.java
4. the following code used to generate the search values from database as the following code
EmployeeSearchService.java
public ArrayList searchByName(String name) {
ArrayList resultList = new ArrayList();
EmployeeImp Emp=new EmployeeImp();
ArrayList results =Emp.searchName(name);
Iterator Int=results.iterator();
while(Int.hasNext())
Employee ep=(Employee)Int.next();
String Name=ep.getName();
String SSNum=ep.getSsNum();
resultList.add(Name);
resultList.add(SSNum);
return resultList;
5. EmployeeImp.java contain database connection and search code as
public ArrayList searchName(String name1)
{      //External Interface
ArrayList resultList = new ArrayList();
ResultSet resultSet = null;
Statement aStmt2 = null;
String url="jdbc:odbc:test";
String uname="root";
String pwd="root";
String name="";
try {
Connection con=getConnection();
aStmt2 = con.createStatement();
String query2 = "SELECT SSNO,NAME FROM EMPLOYEE WHERE NAME ='"+ name1 +"'";
//cat.debug(query2);
resultSet = aStmt2.executeQuery(query2);
while(resultSet.next())
Employee tvo=new Employee();
name = resultSet.getString("NAME");
String SsNum1 = resultSet.getString("SSNO");
tvo.setName(name);
tvo.setSsNum(SsNum1);
// Employee tvo = new Employee(name,SsNum1);
resultList.add(tvo);
catch (Exception e) {
System.out.println( e);
e.printStackTrace();
return resultList;
public ArrayList searchSSNo(String ssNum)
ArrayList resultList = new ArrayList();
ResultSet resultSet = null;
Statement aStmt2 = null;
String url="jdbc:odbc:test";
String uname="root";
String pwd="root";
String name="";
try {
Connection con=getConnection();
aStmt2 = con.createStatement();
String query="SELECT SSNO,NAME FROM EMPLOYEE WHERE SSNO ='"+ ssNum +"'";
// cat.debug(query);
resultSet = aStmt2.executeQuery(query);
while(resultSet.next())
Employee tvo=new Employee();
name = resultSet.getString("NAME");
String SsNum1 = resultSet.getString("SSNO");
tvo.setName(name);
tvo.setSsNum(SsNum1);
// Employee tvo = new Employee(name,SsNum1);
resultList.add(tvo);
catch (Exception e) {
System.out.println( e);
e.printStackTrace();
return resultList;
My error is:
javax.servlet.ServletException: No getter method for property name of bean result
     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
     org.apache.jsp.search_jsp._jspService(search_jsp.java:239)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
     org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
     org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
     org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
     org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316)
     org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
     org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
     org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
I am new to struts how can correct is.
Plz reply me. its urgent

Hi,
My SearchForm.java contain you said plz verify it..
public class SearchForm extends ActionForm
private String name = null;
private String ssNum = null;
private List results = null;
private List result = 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;
public void setResult(List result) {
this.result = result;
public List getResult() {
return result;
After also the same error ...

Similar Messages

  • Urgent: Doubt in coding a logic

    Hi Experts,
    I have a doubt in coding a logic . The bussiness requirement is that i have to capture a string of alphabets and check for particular alphabet in particular position and then process the rest of the logic.
    the logic is given below , can anyone suggest me coding for this logic .Its very urgent . points will be rewarded.
    Logic:
    If 1st letter is D then
        If 3rd letter of DPVERSION is:
            A --> Asia (like DPA0202)
            C --> EMEA (like DPC0111)
            L --> Latin America LA (like DPL0502)
            N --> North America NA (like DPN0408)
            W --> EMEA (like DPW0207)
            D then
                if 4th letter is:
                    A --> Asia (no example yet)
                    C --> EMEA (no example yet)
                    L --> Latin America LA (no example yet)
                    N --> North America NA (like DPDN01TH)
                    W --> EMEA (like DPDW09TH)
                End If
          End If
    Else if 1st letter is X then:
         If 2nd letter of DPVERSION is:
            A --> Asia (no example yet)
            C --> EMEA (XEHC_RTF)
            L --> Latin America LA (no example yet)
            N --> North America NA (XNFAB_RTF)
            W --> EMEA (no example yet)
        End If
    End If
    Thanks in advance
    Kumaran

    Hi, I think you can adopt offset logic.
    assign character value to a variable  like string+2(3) = char
    then use case statement
    case char
    when 'A'
    write ASIA
    when--
    End case.
    Like this u can approach . 
    Hope this helps
    Regards
    Pavan

  • Urgent: Portletizing an struts JSP application

    Hello all,
    I have a struts JSP application. I want to portletize this whole
    application, so that navigation is always within the portal
    framework.
    Using URL Services all I can see is that the first page will be a
    portlet.
    Can anyone suggest the best way to portletize the application?
    This is quite urgent and your help will be greatly appreciated.
    Thanks in advance.
    Faisal.

    Hi all,
    Concerning the message below, does the struts framework affect how normal JSP applications are added to Portal? Or is it as simple as just importing the portal classes and referencing them in the JSP's?
    We would like to use struts for our next web application using JSPs, but need to display them within Portal. I've done this before by just changing the way our hrefs work, but am wondering if using struts will affect any of this.
    Thanks in advance,
    Gillian
    Hello all,
    I have a struts JSP application. I want to portletize this whole
    application, so that navigation is always within the portal
    framework.
    Using URL Services all I can see is that the first page will be a
    portlet.
    Can anyone suggest the best way to portletize the application?
    This is quite urgent and your help will be greatly appreciated.
    Thanks in advance.
    Faisal.

  • URGENT: Doubts in SRM5.0

    hi sir,
             i have some doubts in srm5.0 back end settings as shown below...
    1) what is VMC& how to activate VMC in SM52?
    2) what happend if i change the LOGICAL System for my naming convention in RFC destination?
    3) why should we maintain the local RFC within the SRM OWN server for what purpose? EVEN i having a SRM server.
    4) is it RFC user is a dialog user?
    5) I want to know the T.CODES for each &every menupath. pls tell me the path for that.
    my kind request to all can anyone send me solutions as written above questions URGENTLY.my id is      <b> [email protected]</b>
    WITH REGARDS TO ALL

    Hi
    1. For VMC check the link http://help.sap.com/saphelp_nw04s/helpdata/en/a9/26ae3c95164695accbf2483a14281e/frameset.htm
    2. Logical system name should be same as RFC destination (recommended by SAP), one reason may be, because for posting of IDocs in the system which will require same naming convention for LS name and RFC destination.
    3. I think, The local RFC is for creating the follow-on documents for SC in SRM system.
    4. RFC user may be a dialog or a system/communication user. For search helps you can RFC as dialog uer and for other data transfers thru RFC, it should be made as communication/system user.
    5. For Tcodes you can look at TSTC table. One alternative to find T-codes for an activity is (only some will work): SPRO - Menu options - Additional Information - Additional Information - Display Key - attributes.
    Rgds
    Reddy

  • Very urgent: Doubts regarding CRM WORKFLOW OF BUSINESS PARTNER CREATION

    HI ,
    I HAVE DOUBTS REGARDING CRM WORKFLOW OF BUSINESS PARTNER CREATION, WHILE I AM CREATING BUSINESS PARTNER THROUGH R/3 , IT REFLECT IT INTO MYSAP CRM ALSO, AT THAT TIME IT SENDING THE MAIL TWICE TO THE RECEIPIENT. IS THERE ANY WAY THROUGH  WHICH I CAN RESTRICT IT TO SEND THE MAIL ONLY ONCE,
    PLZ SEND ME THE REPLY AS SOON AS POSSIBLE,
    THANKS  ADVANCED,

    HI
    WORKFLOW SEETING. SAP MAIL
    MULTIPLE MAILS AND
    ONLY ONCE CHOOSE
    ONLY ONCE OPTION ON WHICH VERSION U R WORKING?
    REWARD IF HELPFUL
    VENKAT

  • Urgent doubt in validating numbers

    Hi Experts,
    i have a doubt that how can we checking and validating all numbers; mind you: the US uses different decimal notation so it would have to format into SAP's internal, catching conversion exceptions and notifying the user if such occurs?
    Thanks

    Hi
         Here iam giving 1 example .
    The Excel sheet provides:-template to fill out by user-control fields to verify what data format is used by userThe sheet must be protectedWe use control fields in the spreadsheet (protected, cannot be changed by user) to store a predefined date (i.e. 12/31/2005) and number (i.e. -12345.67). The upload program will read these values and confirms the user’s settings for date and number formatting.
    wa2_datatab-col020(4) = wa_datatab-col026(4).
    wa2_datatab-col024(2) = wa_datatab-col023(2).
    wa2_datatab-col026(2) = wa_datatab-col020(2).
    data: l_month(8) type c,
          l_mnr(2) type c.
    l_month = WA_DATATAB-COL02+3(8).
    perform sub_get_month using l_month
                          changing l_mnr.
    wa2_datatab-col02+3(2) = l_mnr.
    form sub_get_month  using    p_l_month
                        changing p_l_mnr.
    select mnr
           from t247
           into p_l_mnr
           where spras = sy-langu
           and ltx = p_l_month.
    endselect.
    how can do this?plz give the code DATE can be formeted as above logic but how can format number?
    Thanks
    Message was edited by:
            bhanu

  • Urgent  Doubt in 3rd party

    Hi,
    In 3rd party, the customer sales information How to track the Vendor. And
    how to find the vendor delivery qty
    how to settled the Accounts
    How to settled the return materials to vendor
    Thanks for advace
    pls urgent
    Regards
    Rao

    Hello,
    Assume three companies X, Y and Z
    X - The company,
    y - The customer
    Z - Vendor
    Now Z supplies the material to Y and acknowledges the same to X.
    Z  will send a copy of delivery acknowledgement and invoice to X.
    After receiving the delivery confirmation and invoice from Z, X has to verify the invoice and this process is known as invoice verification and is done in SAP through Tcode MIRO.
    The next step for X  is to create an invoice and submit to Y
    Only after the invoice verification document is posted  then only X can create an invoice for Y.
    Third Party Return Process
    If the vendor grants you a credit memo on a quantity or a value basis, you can then send this credit memo directly to your customer.
    The billing type Third-party credit memo (G2S) is available for this. The billing type Third-party credit memo works with the item category TASG (third-party credit memo item). The Billing-relevance indicator F is set in Customizing for Sales for this item category. This means that the cost is not created. In Customizing for Sales, the item category TASG is set at item level in copying control for the billing type G2S (copying control sales document by billing document) as the target item category (source: TAS-> Target:> TASG.)
    Process Flow
    Create a billing document with billing type Third-party credit memo (for further information, see the section Creating a billing document in the Billing document). Enter the third-party order as a document still to be processed. The quantities are automatically removed from the invoice.
    The above is the process for giving a credit memo which can be adapted for return goods.
    REWARD POINTS IF HELPFUL
    Regards
    Sai

  • Urgent-doubt in servlets

    hi to all,
    i am using tomcat server.i have a doubt in executing packaged servlet and it shows error 404 cannot resolve symbol when i tried to access thru browser
    i have attached below the mapping content of web.xml.Actually the servlet file got executed for packageless servlet and there is a
    problem in executing the packaged servlet.
    Any help would be highly appreciable because i have tried few methods
    and it didn't work out.help me
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!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>
    <display-name>Welcome to Tomcat</display-name>
    <description>
    Welcome to Tomcat
    </description>
    <* mapping content for packageless servlet */
    <servlet>
    <servlet-name>HelloServlet</servlet-name>
    <servlet-class>HelloServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloServlet</servlet-name>
    <url-pattern>/servlet/HelloServlet</url-pattern>
    </servlet-mapping>
    <* mapping content for packaged servlet */
    <servlet>
    <servlet-name>HelloServlet2</servlet-name>
    <servlet-class>moreservlets.HelloServlet2</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloServlet2</servlet-name>
    <url-pattern>/HelloServlet2</url-pattern>
    </servlet-mapping>
    </web-app>
    reg,
    arv

    Hi aarvindk,
    I remember <servlet-mapping> tags must appear after any <servlet> tags in web-app document.

  • Urgent : Doubt in writing a code in start routine

    Hi all ,
                 I am BI 7.0 system , I have doubt in writing a code in start routine .
    1) i have to extract the data first from a custom table based on one condition and then placing it into internal table .
    2) Now i have to loop at source_package for a particular region field say "ASIA". with this result i have to check for the correponding entries in custoom table .
       if condition is not true (i.e ) with entries or not matching then delete that particular record from source_package.
    i have written a small logic for this . but this is producing any ouput , Please check it and also let me know for modifications .
    thanks in advance.
    select * from zcsp
        into corresponding fields of TABLE itab_T
        where
        ZBUSINESSUNIT = 'BC'.
    loop at SOURCE_PACKAGE into ls_SOURCE_PACKAGE where /BIC/DPREGION = 'XE'.
                 loop at itab_t into itab_w where zcategory =
                   ls_source_package-/BIC/DPMAT/BIC/DPCAT.
                       if sy-subrc ne 0.
                         delete SOURCE_PACKAGE.
                       endif.
               endloop.
           endloop.

    You're deleting the entire input package.  You only want to delete the one row.
    DATA: g_tabix TYPE sy-tabix.
    SELECT * FROM zscp
    INTO CORRESPONDING FIELDS OF TABLE itab_t
    WHERE zbusinessunit = 'BC'.
    SORT itab_t BY zcategory.
    LOOP AT source_package INTO ls_source_package WHERE /bic/dpregion = 'XE'.
      g_tabix = sy-tabix.
      READ TABLE itab_t WITH KEY zcategory = ls_source_package-/bic/dpmat/bic/dpcat TRANSPORTING NO FIELDS BINARY SEARCH.
      IF sy-subrc NE 0.
        DELETE source_package INDEX g_tabix.
      ENDIF.
    ENDLOOP.

  • Urgent : Doubt in Chart of accounts & Report generating

    Hi Gurus,
    Hope all are doing well !!
    I have a doubt in generating Balance sheet & Financial statement report for country specific COA.
    The Scenario is like this:
    We have 3 Company codes and all company codes are assigned with single operating chart of acconts.
    In one company code there is an addtional requirement of maintaining country specific COA.
    All three company codes are maintaining same Group (consolidated) chart of accounts.
    Now my question is :
    How to generate FS report for Country specific COA for the Company code along with the operating COA? And also would be helpful if you can explain me how it can also be for Group chart of account.
    As per my understanding once you assign an operating COA to a co code and account determination is done, the table SKB1 (GL master co code segment)will get linked to the respective co code and you may not be able to creat data in co code segment of GL master record for another COA (Viz.Country specific COA). There is no such customisation has given to adopt this. Probably there should be some report or program need to be executed to copy the relevant table and country templates.
    It would be helpful if you can provide some documentation on this please forward it to me.
    Thanks in advance for your valuable suggestions.
    Best regards,
    Sudheer
    Message was edited by:
            sudheer Raja Gubba

    In IMG, under 'Global parameters for company code', you need to mention the country chart of Accounts in one of the fields.
    In the GL master, you need to fill in the Alternate Account number field with the Account from the country COA.
    As for reporting,COA is one of the selection criteria for any standard report anyway.
    Hope this helps
    Thanks
    Raja

  • Urgent problem in struts bc4j app

    The problem occurs between the Controller an the View Layer(can I debug there?) Anyway, I can see the data in the Action class, but not in the jsp page, there's just one row (the first).
    Thank you.
    I'm using the 9.0.3.3 build 1205
    The Action class:
    public class ShowneuebehauftrAction extends Action
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    BC4JContext context = BC4JContext.getContext(request);
    ViewObject vo = context.getApplicationModule().findViewObject("BehauftrNeu");
    //here the output looks fine
    Row r = vo.first();
    while (r != null)
    for (int i = 0; i < vo.getAttributeCount(); i++)
    String attrName = vo.getAttributeDef(i).getName();
    String attrVal = r.getAttribute(i).toString();
    System.out.println(attrName + " = " + attrVal);
    r = vo.next();
    return BC4JUtils.getForwardFromContext(context, mapping);
    And the jsp page:
    <%@ page language="java" errorPage="errorpage.jsp" contentType="text/html;charset=windows-1252" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <html>
    <head>
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    <LINK REL=STYLESHEET TYPE="text/css" HREF="bc4j.css">
    <TITLE>
    <bean:message key="behauftr.title"/>
    </TITLE>
    </head>
    <body>
    <table border="0" bgcolor="#003399">
    <tr>
    <th><font color="white" size="3"><bean:message key="behauftr.nr"/></font></th>
    <th><font color="white" size="3"><bean:message key="behauftr.wunschdatum"/></font></th>
    <th><font color="white" size="3"><bean:message key="behauftr.status"/></font></th>
    <th> </th>
    </tr>
    <jbo:RowsetIterate datasource="DataaccessModule.BehauftrNeu" userange="true" >
    <tr bgcolor="#f3f3f3">
    <td>
    <jbo:ShowValue dataitem="Nr"/>
    </td>
    <td>
    <jbo:ShowValue dataitem="Wunschdatum"/>
    </a>
    </td>
    <td align="right">
    <jbo:ShowValue dataitem="BasNr"/>
    </td>
    </tr>
    </jbo:RowsetIterate>
    </table>
    </body>
    </html>

    There's another question: I tried to format a date field to SimpleDate format dd.MM.yyyy - in the Entity's and ViewObject's Attribute-Editor-Control-Hint.
    It works fine in the BC-App-Module, but in the Action class there's the yyyy-MM-dd format back again (and of course in the jsp page as well). Does this have to be handled in the Action class?
    But, more important, I still can't figure out why there's only one row in the jsp page - as described earlier -
    Thanks in advance for your help.
    Regards
    gabriela

  • Urgent : Doubt on creating joins

    Hi friends,
    I have two tables , ekes and eine
    my requirement is if Ekes-ebtyp = 'X1'.
    then Ekes-ebtyp = EKES-EINDT + Eine-j_3alitra.
    the doubt is there is no primary key common between this table . actually in my whole program for purchase order i used EBELN for extracting details when two tables are involved . in this two tables no two primary keys are common to extract data ...is there any ways please suggest..
    the code i wrote is
    loop at li_ekes assigning <fl_ekes>.
    read table li_eine assigning <fl_eine> with table key (here i need to give some unique fields to join these two fields please guide me which field i can use.).
    <fl_ekes>-ebtyp = <fl_ekes>-EINDT + <fl_eine>-j_3alitra.

    Hi Gokul try this one,
    ekes-ebeln = eine-anfnr
    ebes-ebelp = eine-anfps
    Make join on this condition it will work.
    Reward if it is useful.

  • Doubt in Struts: In multiple select

    Hi,
    I am new to struts. How to retrieve the value from multiple select ?
    for example:
    jsp file
    i have given a id named "ff" for this form
    <select name="fruits" multiple="true" size=2>
    <option>apple</option>
    <option>orange</option>
    <option>grapes</option>
    </select>
    In Actionform, i have written like this...
    public String[] getfruits() {       return fruits;   }
    public void setfruits(String[] fruits {     this.fruits = fruits;   }
    In action class,
    i am retrieving values from form like this:
    String[] t = ff.getfruits();
    Is this correct? i m not getting any error. value is also not retreiving.
    note: ff is an id for jsp file.

    hi,
    firstly you have to create String arrays which populate the list box --->"arrFruits"
    And the other for the multiple selection-->"fruits"
    Notice this->you need to have setter and getter methods for the string arrays in your form bean.
    jsp file-->
    <html:select property="fruits" multiple ="true" size="2">
    <html:options property="arrFruits" />
    </html:select>
    You have to Iterate through the selection array(arrFruits) to retrieve the values.
    Thanx
    Ranvijay

  • Urgent-Doubt in GUI_DOWNLOAD

    hi friends,
    In downloading data from internal table using GUI_DOWNLOAD i want only one space to be there after each field ...
    is it right to use write_field_seperator = '   '  or write_field_seperator = 'X'.
    i tried with 'X' i get tab delimited with multiple spaces , also tried with '  ' i got output fields with no space

    Hi Gokul,
    the function module GUI_DOWNLOAD is like this....
    <b>CALL FUNCTION 'GUI_DOWNLOAD'</b>
    EXPORTING
    BIN_FILESIZE =
    filename = 'C:\Documents and Settings\msgpool\Desktop\entries.txt'
    FILETYPE = 'ASC'
    APPEND = ' X'
    <b>write_field_separator = '|'</b>
    TABLES
    data_tab = it_final.
    in that function module you give like this means...
    <u>write_field_seperator = 'X'.</u> that indicates the separator in the file is <b><u>TAB</u></b>so you getting more space between fields....
    you want only one space to be there after each field ...so use like this..
    <b>write_field_seperator = 'SPACE'.</b>
    Now also you getting problem in ouput send a mail to my id....
    <u>[email protected]</u>
    *reward for useful answers*
    With Regards,
    Sandeep.

  • Urgent :Doubt on open Purchase orders

    Hi friends,
    i will be more help full if anybody can help me on below issue how to find open PO and partially open PO.
    Only “open” purchase orders will be extracted for conversion into Destination Server. An “open” purchase order is defined as any unshipped, non-cancelled with “open quantities”. In regards to, partially “open” purchase orders, we will only convert “open” units (i.e. Original ordered qty was 300; 70 have shipped, 230 remain open…Target Server sales order will have an original order qty of 230).
    also where to find that Sub Contracting orders and Sample orders.
    • Orders not considered for migration because they will have either shipped in full or deleted prior to data migration as a part of data clean-up: ALL subcontracting orders; sample orders
    please help me on the above two issues.
    thanks and Regards,
    Gokul.

    Hi
    First take the ALL Po's from EKKO and EKPO tables and check for the different GR's and GI's qty's from MKPF and MSEG tables and you have to compare the PO qty with the total GR/GI qty's and to find the OPEN po's
    see the sample report
    *& Report  ZMM_PO_REPORT
    REPORT  ZMM_PO_REPORT message-Id yb
           NO STANDARD PAGE HEADING
           LINE-COUNT 60(1)
           LINE-SIZE 230.
           D A T A B A S E  T A B L E S   D E C L A R A T I O N
    TABLES: lfa1,           " Vendor Master
            t161,           " PO Doc Types
            t024,           " Purchase Groups
            ekko.           " PO Header
                   T Y P E S  D E C L A R A T I O N S
    Purchase Orders Main Structure
    TYPES: BEGIN OF s_po,
            ebeln TYPE ebeln,           " PO No.
            ebelp TYPE ebelp,           " PO Item
            bstyp TYPE bstyp,           " PO Category
            bukrs TYPE bukrs,           " Company Code
            bsart TYPE bbsrt,           " PO Type
            lifnr TYPE lifnr,           " Vendor No
            ekgrp TYPE bkgrp,           " Purchase Group
            waers TYPE waers,           " Currency
            bedat TYPE etbdt,           " PO Date
            txz01 TYPE txz01,           " Material Text
            werks TYPE ewerk,           " Plant
            lgort TYPE lgort_d,         " Storage Location
            matkl TYPE matkl,           " Material Group
            menge TYPE bamng,           " PR Quantity
            meins TYPE bamei,           " UOM
            bprme TYPE bbprm,           " Price Unit
            netpr TYPE netpr,           " Net price
            peinh TYPE peinh,           " Price Unit UOM
            pstyp TYPE pstyp,           " Item Category
            knttp TYPE knttp,           " Account Assignment Category
           END OF s_po.
    Purchase Orders History Structure
    TYPES: BEGIN OF s_account,
            ebeln TYPE ebeln,           " PO No.
            ebelp TYPE ebelp,           " PO Item
            gjahr TYPE mjahr,           " Fiscal Year
            belnr TYPE mblnr,           " PO Invoice No
            menge TYPE menge_d,         " PR Quantity
            wrbtr TYPE wrbtr,           " Price in Local Currency
            dmbtr TYPE dmbtr,           " Price in Foreign Currency
            waers TYPE waers,           " Currency
            shkzg TYPE shkzg,           " Dr/Cr Indicator
           END OF s_account.
    Purchase Orders History Structure(Item Sum)
    TYPES: BEGIN OF s_inv_sum,
            ebeln TYPE ebeln,           " PO No.
            ebelp TYPE ebelp,           " PO Item
            menge TYPE menge_d,         " PR Quantity
            wrbtr TYPE wrbtr,           " Price in Foreign Currency
            waers TYPE waers,           " Currency
           END OF s_inv_sum.
    Purchase Orders Main Structure
    TYPES: BEGIN OF s_rep,
            lifnr TYPE lifnr,           " Vendor No
            ebeln TYPE ebeln,           " PO No.
            ebelp TYPE ebelp,           " PO Item
            bstyp TYPE bstyp,           " PO Category
            bsart TYPE bbsrt,           " PO Type
            ekgrp TYPE bkgrp,           " Purchase Group
            waers TYPE waers,           " Currency
            bedat TYPE etbdt,           " PO Date
            txz01 TYPE txz01,           " Material Text
            werks TYPE ewerk,           " Plant
            lgort TYPE lgort_d,         " Storage Location
            matkl TYPE matkl,           " Material Group
            menge TYPE bamng,           " PR Quantity
            meins TYPE bamei,           " UOM
            bprme TYPE bbprm,           " Price Unit
            netpr TYPE netpr,           " Net price
            peinh TYPE peinh,           " Price Unit UOM
            pstyp TYPE pstyp,           " Item Category
            knttp TYPE knttp,           " Account Assignment Category
            name1 TYPE name1,           " Plant
            orewr TYPE netpr,           " To be Invoiced Price
            curr  TYPE waers,           " Inv Doc Currency
           END OF s_rep.
               D A T A  D E C L A R A T I O N S
    DATA: gv_title1 TYPE sylisel,            " Report title
          gv_dial.                           " Color flag
                C O N S T A N T S  D E C L A R A T I O N S
    CONSTANTS: c_x                VALUE 'X',   " Flag X
               c_h                VALUE 'H',   " Debit
               c_vgabe TYPE vgabe VALUE '2'.   " Transaction Type
         I N T E R N A L  T A B L E S  D E C L A R A T I O N S
    DATA: i_po    TYPE STANDARD TABLE OF s_po WITH HEADER LINE,
                                 " Purchase Order
          i_inv   TYPE STANDARD TABLE OF s_inv_sum WITH HEADER LINE,
                                         " PO Invoice Values
          i_rep   TYPE STANDARD TABLE OF s_rep WITH HEADER LINE,
                                     " PO Invoice Values
          i_ekbe  TYPE STANDARD TABLE OF s_account WITH HEADER LINE.
                               " PO Invoice Values
                     S E L E C T I O N  S C R E E N                      *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr MATCHCODE OBJECT kred,
                    s_ebeln FOR ekko-ebeln MATCHCODE OBJECT mekk,
                    s_bsart FOR t161-bsart,
                    s_ekgrp FOR t024-ekgrp,
                    s_bedat FOR ekko-bedat.
    SELECTION-SCREEN END OF BLOCK b1.
                      I N I T I A L I Z A T I O N                        *
    INITIALIZATION.
                  A T  S E L E C T I O N - S C R E E N                   *
    AT SELECTION-SCREEN.
    Validate the screen fields
      PERFORM validate_screen.
                   S T A R T - O F - S E L E C T I O N                   *
    START-OF-SELECTION.
    Fetch main data
      PERFORM fetch_data.
                   T O P - O F - P A G E                                 *
    TOP-OF-PAGE.
    Header of the List
      PERFORM header.
                   E N D - O F - P A G E                                 *
    Footer
    END-OF-PAGE.
      ULINE.
                   E N D - O F - S E L E C T I O N                       *
    END-OF-SELECTION.
    Display the Report Output data
      PERFORM display_data.
    At Line-Selection
    AT LINE-SELECTION.
    When double clicked on EBELN display the details of Purchase Doc
      PERFORM line_sel.
    *&      Form  validate_screen
    Validation of Selection Screen fields
    FORM validate_screen .
    Validation of Vendor Number
      CLEAR lfa1-lifnr.
      IF NOT s_lifnr[] IS INITIAL.
        SELECT lifnr UP TO 1 ROWS
            INTO lfa1-lifnr
            FROM lfa1
            WHERE lifnr IN s_lifnr.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e000 WITH 'Invalid Vendor'(002).
        ENDIF.
      ENDIF.
    Validation of PO Number
      CLEAR ekko-ebeln.
      IF NOT s_ebeln[] IS INITIAL.
        SELECT ebeln UP TO 1 ROWS
            INTO ekko-ebeln
            FROM ekko
            WHERE ebeln IN s_ebeln.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e000 WITH 'Invalid Document Number'(003).
        ENDIF.
      ENDIF.
    Validation of PO Document Type
      CLEAR t161-bsart.
      IF NOT s_bsart[] IS INITIAL.
        SELECT bsart UP TO 1 ROWS
            INTO t161-bsart
            FROM t161
            WHERE bsart IN s_bsart.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e000 WITH 'Invalid Purchase Document Type'(004).
        ENDIF.
      ENDIF.
    Validation of Purchasing Group
      CLEAR t024-ekgrp.
      IF NOT s_ekgrp[] IS INITIAL.
        SELECT ekgrp UP TO 1 ROWS
            INTO t024-ekgrp
            FROM t024
            WHERE ekgrp IN s_ekgrp.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e000 WITH 'Invalid Purchasing Group'(005).
        ENDIF.
      ENDIF.
    ENDFORM.                    " validate_screen
    *&      Form  fetch_data
    Fetching the PO related data from Database Tables
    FORM fetch_data .
      CLEAR i_po.
      REFRESH i_po.
      SELECT a~ebeln            " PO No.
             b~ebelp            " PO Item
             a~bstyp            " PO Category
             a~bukrs            " Company Code
             a~bsart            " PO Type
             a~lifnr            " Vendor No
             a~ekgrp            " Purchase Group
             a~waers            " Currency
             a~bedat            " PO Date
             b~txz01            " Material Text
             b~werks            " Plant
             b~lgort            " Storage Location
             b~matkl            " Material Group
             b~menge            " PR Quantity
             b~meins            " UOM
             b~bprme            " Price Unit
             b~netpr            " Net price
             b~peinh            " Price Unit UOM
             b~pstyp            " Item Category
             b~knttp            " Account Assignment Category
        INTO TABLE i_po
        FROM ekko AS a JOIN ekpo AS b
        ON a~ebeln = b~ebeln
        WHERE a~ebeln IN s_ebeln AND
              a~lifnr IN s_lifnr AND
              a~ekgrp IN s_ekgrp AND
              a~bsart IN s_bsart AND
              a~bedat IN s_bedat.
      SORT i_po BY ebeln ebelp.
      break-point.
      IF NOT i_po[] IS INITIAL.
    Fetch the PO History/Invoice Details from EKBE Table
        CLEAR i_ekbe.
        REFRESH i_ekbe.
        SELECT ebeln           " PO No.
               ebelp           " PO Item
               gjahr           " Fiscal Year
               belnr           " PO Invoice No
               menge           " PR Quantity
               wrbtr           " Price in Local Currency
               dmbtr           " Price in Foreign Currency
               waers           " Currency
               shkzg           " Dr/Cr Indicator
         INTO TABLE i_ekbe
         FROM ekbe
         FOR ALL ENTRIES IN i_po
         WHERE ebeln = i_po-ebeln AND
               ebelp = i_po-ebelp AND
               vgabe = c_vgabe.
      break-point.
        IF sy-subrc = 0.
          SORT i_ekbe BY ebeln ebelp.
          LOOP AT i_ekbe.
            IF i_ekbe-shkzg = c_h.
              i_ekbe-wrbtr = i_ekbe-wrbtr * -1.
            ENDIF.
            MODIFY i_ekbe.
          ENDLOOP.
      break-point.
    Sum up the Item wise Invoice totals
          LOOP AT i_ekbe.
            AT END OF ebelp.
              READ TABLE i_ekbe INDEX sy-tabix.
              SUM.
              MOVE-CORRESPONDING i_ekbe TO i_inv.
              APPEND i_inv.
            ENDAT.
            CLEAR i_inv.
          ENDLOOP.
          SORT i_inv BY ebeln ebelp.
            break-point.
        ENDIF.
      ENDIF.
    Move the Vendor Name and Invoice Values to I_rep Internal Table
      LOOP AT i_po.
        MOVE-CORRESPONDING i_po TO i_rep.
        CLEAR i_inv.
        READ TABLE i_inv WITH KEY ebeln = i_po-ebeln
                                  ebelp = i_po-ebelp.
        IF sy-subrc = 0.
          i_rep-orewr = ( i_po-menge - i_inv-menge ) * i_po-netpr.
          i_rep-curr  = i_inv-waers.
        ELSE.
          i_rep-orewr = i_po-menge * i_po-netpr.
          i_rep-curr  = i_po-waers.
        ENDIF.
      break-point.
    Get the Vendor Name
        CLEAR lfa1-name1.
        SELECT SINGLE name1 FROM lfa1 INTO lfa1-name1
          WHERE lifnr = i_po-lifnr.
        IF sy-subrc = 0.
          i_rep-name1  = lfa1-name1.
        ENDIF.
        APPEND i_rep.
        CLEAR  i_rep.
          break-point.
      ENDLOOP.
      SORT i_rep BY lifnr ebeln ebelp.
      DELETE i_rep WHERE orewr LE 0.
      break-point.
    ENDFORM.                    " fetch_data
    *&      Form  display_data
    Display the Report Output data
    FORM display_data .
      DATA: lv_flag,               " New Flag
            lv_rec TYPE i.         " No of Records
      CLEAR lv_rec.
      IF i_rep[] IS INITIAL.
        MESSAGE e000 WITH 'No Data found'(022).
      ELSE.
        LOOP AT i_rep.
    Toggle Color
          PERFORM toggle_color.
          IF lv_flag <> space.
            NEW-LINE.
          ENDIF.
    At New Purchase Document
          AT NEW ebeln.
            WRITE:/1 sy-vline, 2(10) i_rep-ebeln INTENSIFIED OFF.
            lv_flag = c_x.
            lv_rec = lv_rec + 1.
          ENDAT.
          WRITE: 1 sy-vline,
                12 sy-vline,13(4)   i_rep-bsart,
                17 sy-vline,18(10)  i_rep-lifnr,
                28 sy-vline,29(35)  i_rep-name1,
                64 sy-vline,65(4)   i_rep-ekgrp,
                69 sy-vline,70(10)  i_rep-bedat,
                80 sy-vline,81(5)   i_rep-ebelp,
                86 sy-vline,87(40)  i_rep-txz01,
               127 sy-vline,128(9)  i_rep-matkl,
               137 sy-vline,138(1)  i_rep-pstyp,
               139 sy-vline,140(1)  i_rep-knttp,
               141 sy-vline,142(4)  i_rep-werks,
               146 sy-vline,147(4)  i_rep-lgort,
               151 sy-vline,152(13) i_rep-menge UNIT i_rep-meins,
               165 sy-vline,166(3)  i_rep-meins,
               169 sy-vline,170(15) i_rep-netpr CURRENCY i_rep-waers,
               185 sy-vline,186(4)  i_rep-waers,
               190 sy-vline,191(5)  i_rep-peinh,
               196 sy-vline,197(4)  i_rep-bprme,
               201 sy-vline,202(15) i_rep-orewr CURRENCY i_rep-curr,
               217 sy-vline,218(4)  i_rep-curr,
               222 sy-vline,223(7)  i_rep-bstyp centered,
               230 sy-vline.
          NEW-LINE.
          hide: i_rep-ebeln.
        ENDLOOP.
        ULINE.
        FORMAT COLOR OFF.
        WRITE : /2 'Total Number of Purchasing Documents:'(025) COLOR 3,
                    lv_rec COLOR 3.
      ENDIF.
    ENDFORM.                    " display_data
    *&      Form  header
    Write the Report Header
    FORM header .
      FORMAT RESET.
    header
      WRITE:/1(230) 'LIST OF PURCHASE DOCUMENTS PER VENDOR'(006) CENTERED.
      SKIP.
      FORMAT COLOR COL_HEADING.
      ULINE.
      WRITE:/1 sy-vline,2(10)   'Pur.Doc.No'(006) CENTERED,
            12 sy-vline,13(4)   'Type'(007),
            17 sy-vline,18(10)  'Vendor'(008) CENTERED,
            28 sy-vline,29(35)  'Name'(009) CENTERED,
            64 sy-vline,65(4)   'PGrp'(010) CENTERED,
            69 sy-vline,70(10)  'Doc.Date'(012) CENTERED,
            80 sy-vline,81(5)   'Item'(011),
            86 sy-vline,87(40)  'Material Short Text'(024) CENTERED,
           127 sy-vline,128(9)  'Mat.Group'(013),
           137 sy-vline,138(1)  'I',
           139 sy-vline,140(1)  'A',
           141 sy-vline,142(4)  'Plnt'(014),
           146 sy-vline,147(4)  'SLoc'(015),
           151 sy-vline,152(13) 'Quantity'(016) CENTERED,
           165 sy-vline,166(3)  'UoM'(017),
           169 sy-vline,170(15) 'Net Value'(018) CENTERED,
           185 sy-vline,186(4)  'Curr'(019),
           190 sy-vline,191(5)  'Per'(020),
           196 sy-vline,197(4)  'Unit'(021),
           201 sy-vline,202(15) 'To be Invoiced'(023) CENTERED,
           217 sy-vline,218(4)  'Curr'(019),
           222 sy-vline,223(7)  'Doc.Cat'(026),
           230 sy-vline.
      ULINE.
    ENDFORM.                    " header
    *&      Form  toggle_color
    This routine alters the color of the records in the list
    FORM toggle_color.
      IF gv_dial = space.
        FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
        gv_dial = c_x.
      ELSE.
        FORMAT COLOR 1 INTENSIFIED OFF.
        CLEAR gv_dial.
      ENDIF.
    ENDFORM.                    " toggle_color
    *&      Form  LINE_SEL
    *When double clicked on EBELN field display the details of Purchase Doc
    FORM line_sel.
      CASE sy-lsind.
        WHEN '1'.
          DATA: lv_field(20),
                lv_value(10),
                lv_bstyp like i_rep-bstyp.
          clear: lv_bstyp,lv_value, lv_field.
          GET CURSOR FIELD lv_field VALUE lv_value.
          IF lv_field = 'I_REP-EBELN'.
            IF NOT lv_value IS INITIAL.
              READ LINE sy-index FIELD VALUE i_rep-bstyp
                                       INTO  lv_bstyp.
             READ CURRENT LINE FIELD VALUE i_rep-bstyp INTO lv_bstyp.
              if lv_bstyp = 'F'.
                SET PARAMETER ID 'BES' FIELD lv_value.
                CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
              elseif ( lv_bstyp = 'K' or lv_bstyp = 'L' ).
                SET PARAMETER ID 'VRT' FIELD lv_value.
                CALL TRANSACTION 'ME33' AND SKIP FIRST SCREEN.
              elseif lv_bstyp = 'A'.
                SET PARAMETER ID 'ANF' FIELD lv_value.
                CALL TRANSACTION 'ME43' AND SKIP FIRST SCREEN.
              endif.
            ENDIF.
          ENDIF.
      ENDCASE.
    ENDFORM.                    " line_sel
    <b>Reward points for useful Answers</b>
    Regards
    Anji

Maybe you are looking for

  • Issue in Due date analysis report S_ALR_87012168

    Hi Friends, We have a strange issue regarding due date analysis report (S_ALR_87012168)... When i execute this report it displays different amounts in "Not Due" column under 0-30 bucket. In 0-30 bucket, under not due column it shows 10,000 and under

  • I have 2 iCloud accounts, one under hotmail and one under gmail. I would like to consolidate them.

    Hi, I have had an iTunes account using my hotmail email address for a long time. I recently bought an iPhone and began using it and unintentionally created a new iCloud account based on my gmail address (I thought I was logging into my existing accou

  • Problem with Acrobat X in web browser

    When I try to open .pdf files or, in this latest case, submit a job application I get the following dialog box: 'The Adobe Acrobat/Reader that is running can not be used to view PDF files in a Web Browser. Please exit Adobe Acrobat/Reader and exit yo

  • Printing from Portal (horizontal scrolling issues)

    We upgraded to Portal (3.0.9, I think) in March, from WebDB 2.2. We have a couple reports that scroll horizontally fine onscreen, but both the print preview and print function only will print what appears on the screen without scrolling, and don't pr

  • How can I customize button's function in N73

    Hi Can any one help me on this? I need to customise the functioning of my N73 buttons. Currently left button has 'Messaging' and right button has 'Home' functions assigned to it. I mistakely press right button some time which takes me Orange home pag