Data output issue

Hello,
I wrote a program that would give me a list of orders in the system that have discount or price changes but I am having an issue with the output.  In my sample test I did I was supposed to get two lines of data but I only got one.  I think I have a looping issue but I am not sure. I am new at abap programming.  I entered one sales order with two item lines- on one line I did a price change using a custom pricing condition table and the other was a discount change.  When I debug the program I see that the program is picking up the data but it is not showing up on the output.  Can someone review a section of the program and let me know what I am missing?
thanks
*SELECT ORDERS THAT HAVE PRICE CHANGES
SELECT * FROM A517 WHERE ZZVBELN = I_CHANGE-SALES_OR.
  IF SY-SUBRC = 0.
    I_CHANGE-KNUMH = A517-KNUMH.
    I_CHANGE-LINE_NO = A517-ZZPOSNR.
  ENDIF.
ENDSELECT.
SELECT SINGLE * FROM KONV WHERE KNUMH = I_CHANGE-KNUMH AND
                                KSCHL = 'ZPR1' AND
                                KAPPL = 'V'.
    I_CHANGE-PRICE_CHANGE = KONV-KBETR.
    I_CHANGE-KNUMV = KONV-KNUMV.
SELECT SINGLE * FROM KONV WHERE KNUMV = I_CHANGE-KNUMV AND
                                    KSCHL = 'ZPR0' AND
                                    KAPPL = 'V' AND
                                    KPOSN = I_CHANGE-LINE_NO.
    I_CHANGE-BASE_PRICE = KONV-KBETR.
SELECT SINGLE * FROM VBAK WHERE KNUMV = I_CHANGE-KNUMV AND
                                ERDAT = ORD_DATE.
I_CHANGE-SALES_OR = VBAK-VBELN.
*SELECT ORDERS THAT HAVE DISCOUNT CHANGES
SELECT * FROM KONV WHERE  KSCHL = 'ZHCD' AND
                          KAPPL = 'V' AND
                          KDATU = ORD_DATE.
      IF SY-SUBRC = 0.
        I_CHANGE-KKNUMV = KONV-KNUMV.
        I_CHANGE-DISCOUNT_CHANGE = KONV-KBETR / 10.
        I_CHANGE-LINE_NO = KONV-KPOSN.
      ENDIF.
ENDSELECT.
SELECT SINGLE * FROM KONV WHERE KNUMV = I_CHANGE-KKNUMV AND
                                KSCHL = 'ZPR0' AND
                                KAPPL = 'V' AND
                                KPOSN = I_CHANGE-LINE_NO.
    I_CHANGE-BASE_PRICE = KONV-KBETR.
SELECT SINGLE * FROM KONV WHERE KSCHL = 'ZCUD' AND
                                KAPPL = 'V' AND
                                KPOSN = I_CHANGE-LINE_NO AND
                                KNUMV = I_CHANGE-KKNUMV.
IF SY-SUBRC = 0.
   I_CHANGE-BASE_DISCOUNT = KONV-KBETR / 10.
ENDIF.
SELECT SINGLE * FROM VBAK WHERE KNUMV = I_CHANGE-KKNUMV AND
                                ERDAT = ORD_DATE.
I_CHANGE-SALES_OR = VBAK-VBELN.
*DETAILS ON LINES DISPLAYED
SELECT * FROM VBAK WHERE VBELN = I_CHANGE-SALES_OR.
    IF SY-SUBRC = 0.
      I_CHANGE-ORD_DATE = VBAK-ERDAT.
      I_CHANGE-CREATED_BY = VBAK-ERNAM.
    ENDIF.
ENDSELECT.
  SELECT * FROM VBAP WHERE VBELN = I_CHANGE-SALES_OR AND
                           POSNR = I_CHANGE-LINE_NO.
    IF SY-SUBRC = 0.
      I_CHANGE-ITEM_NO = VBAP-MATNR.
      I_CHANGE-ITEM_DESC = VBAP-ARKTX.
    ENDIF.
  ENDSELECT.
  SELECT SINGLE * FROM VBEP WHERE VBELN = I_CHANGE-SALES_OR AND
                                  POSNR = I_CHANGE-LINE_NO.
  IF SY-SUBRC = 0.
    I_CHANGE-ORD_QTY = VBEP-WMENG.
  ENDIF.
  SELECT SINGLE * FROM VBPA WHERE VBELN = I_CHANGE-SALES_OR.
  I_CHANGE-CUST = VBPA-KUNNR.
  SELECT SINGLE * FROM KNA1 WHERE KUNNR = I_CHANGE-CUST.
  I_CHANGE-NAME = KNA1-NAME1.
APPEND I_CHANGE.

I was able to work out the issue with the looping.

Similar Messages

  • PO output issue

    Hello all Gurus,
    I have a problem with the PO output form. We have created new output types and tested them in quality environment and found that the PO is generating the correct output. Then we moved these output types to production environment and tested with our production user ids. There also, the system generated the correct PO output forms.
    But when my client tested the outputs he is not getting data in Bill to address and Registration boxes. These two boxes contains the company code address. The system is displaying only the hardcoded data for the client. Not the company code data which is picked up from the tables through the form program. Can somebody suggest me why my client is getting this issue when we are not getting with our user ids in production?
    Also, I don't think this is a problem of authorization roles, since this issue is coming only for the company code 3278.
    For the rest of the company codes, the user is getting the correct PO forms. Only for Company code 3278, he is getting the incorrect output issue.
    We tried to modify the program by updating the font size and character format. But this didn't work.
    This issue has been there in my queue since the last one month and it has exceeded the permitted time limit. We are really bothered about this issue but not getting any correct solution for this.
    Please, somebody provide me some valuable suggestions on this issue.
    Thanks and Regards,
    Umakanth.

    Murugan,
    1. For the client's user id, the PO output is not showing the company code data in the PO output form. But when we are trying to see the same thing in production in ME23N (we don't have access to make changes in production), we are getting the correct PO form that shows the company code address also.
    2. The company code 3278 and output types were created at the same time and moved to production.

  • Date Format Issue with Interactive Form

    Hi, here is the scenario:
    -We just upgraded to SP17 from SP15
    -I'm using Livecycle Designer 8.0
    When we were on SP15, this was not an issue.  I was wondering if anyone encountered this problem and if so, if there is a workaround?
    I create an interactive form to start a guided procedure process.  Im passing the data from my desktop Interactive form to another callable object in GP to send an email with the PDF attached.  This all works correclty. 
    My date/time fields are set to type DATE with a display pattern of YYYY-MM-DD.  When I create the form in the GP administrator to my desktop and open the PDF, the date format is correct. However, when I submit the form to start the process, the incomming date fields to be mapped to my second Callable Object have change in format from "2009-02-18" to  "Wed Feb 18 00:00:00 EST 2009".
    This is true in the new form I receive via email, and also in NWA->monitoring->guided procedures when I check the instances.  The input mapping is already set to the false formatting.
    When I open the form from the second callable object with the incorrect date format (in designer), the date's display patterns are set to YYYY-MM-DD but are not being displayed as such.
    New discovery....I tried to create a Business Logic callable object and format the date.  I created a string input and date output and mapped them accordingly.  When I perform a "TEST" from the design time and use the input "Wed Feb 18 00:00:00 EST 2009", the string is automatically converted to 18/02/2009 in the output, which is what I want to occur.  The only problem is when I run the actual process, the same "Wed Feb 18 00:00:00 EST 2009" is being output instead of the 18/02/2009 in the TEST.
    Anyone have any ideas?
    Thanks.
    Edited by: Warren Clements on Feb 26, 2009 2:20 AM

    This test program might help...
    import java.util.*;
    import java.text.*;
    public class ExpandYear
        public static void main(String[] args) throws ParseException
         SimpleDateFormat sdf_2dyear = new SimpleDateFormat("MM/dd/yy");
         SimpleDateFormat sdf_4dyear = new SimpleDateFormat("MM/dd/yyyy");
         String test1 = "3/21/00";
         System.out.println("test1: " + test1 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test1)));
         String test2 = "4/9/99";
         System.out.println("test2: " + test2 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test2)));

  • Date format issue in Web Analysis...

    Hi,
    I am creating a report by connecting to a couple of relational tables. I'm using SQL Spreadsheet and SQL Subscription objects. I'm creating a Date filter using SQL Subscription object (list box) using the data source created by the SQL Spreadsheet. My database default date format is 'DD-MON-YYYY'. But in the list box it shows as 'YYYY-MM-DD HH24:MI:SI". When this value is selected, I get a "Literal mismatch error" since it doesn't match with the value stored in the database.
    Why the format in WA is showing in this format even though it is fetchting it from my database in which the format is 'DD-MON-YYYY'. Is this related to WA date format settings? I cannot find anywhere in WA studio where I can set date formats. Is this something to be set in the server or webanalysis.properties file?
    PS: I tried to work around this by storing the date value as character in the database but then I am not able to sort them ascending or descending order.I also tried creating the web analysis relational database connection which creates a virtual cube. But even there when I build the report using Data Source Navigator, it is showing date in 'YYYY-MM-DD HH24:MI:SI'.
    H

    Hi,
    Let me provide you the details of the report.
    A concurrent program has been created with executable as XDODTEXE (XML publisher report).
    In the data definition, we have embed one query which fetches transaction date and due date from some tables based on some conditions.
    Now, we have to show these date columns in report output which will be in EXCEL format.
    We want these date outputs to be printed in dd/mm/yyyy format. That is the reason we had given-
    TO_CHAR(TO_DATE (SUBSTR(transaction_date,1,10), 'DD/MON/RRRR'),'DD/MM/RRRR') in the SQL query.
    Problem in output is- In date columns, data after 12th is fine i.e. in format dd/mm/yyyy, it is printing properly.
    But before 12th, it is printing in format mm/dd/yyyy as mentioned below-
    01/10/2012--wrong format, it should be 10/01/2012
    01/11/2012--wrong format, it should be 11/01/2012
    01/12/2012--wrong format, it should be 12/01/2012
    13/01/2012--correct format (dd/mm/yyyy)
    14/01/2012--correct format (dd/mm/yyyy)
    How can i send you the attachment, is there any way/any email id?
    Rgds-
    Sumir

  • Report is executing in background and need data(output) in excel format

    Report is executing in background and need data(output) to get downloaded in excel format in my PC from an internal table;;in any drive i.e. C: or D: .When executing in backround it prompt to user with which location excel file to be saved and the name of file.How to download in background in excel format?
    Edited by: PRASHANT BHATNAGAR on Aug 26, 2008 6:24 AM

    Hi
    Download a report to excel with format (border, color cell, etc)
    Try this program...it may help you to change the font ..etc.
    Code:
    REPORT ZSIRI NO STANDARD PAGE HEADING.
    this report demonstrates how to send some ABAP data to an
    EXCEL sheet using OLE automation.
    INCLUDE OLE2INCL.
    handles for OLE objects
    DATA: H_EXCEL TYPE OLE2_OBJECT,        " Excel object
          H_MAPL TYPE OLE2_OBJECT,         " list of workbooks
          H_MAP TYPE OLE2_OBJECT,          " workbook
          H_ZL TYPE OLE2_OBJECT,           " cell
          H_F TYPE OLE2_OBJECT.            " font
    TABLES: SPFLI.
    DATA  H TYPE I.
    table of flights
    DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
    read flights
      SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
    display header
      ULINE (61).
      WRITE: /     SY-VLINE NO-GAP,
              (3)  'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (4)  'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (8)  'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
      ULINE /(61).
    display flights
      LOOP AT IT_SPFLI.
      WRITE: / SY-VLINE NO-GAP,
               IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
      ENDLOOP.
      ULINE /(61).
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-007
           EXCEPTIONS
                OTHERS     = 1.
    start Excel
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
    PERFORM ERR_HDL.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
    CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
    PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-008
           EXCEPTIONS
                OTHERS     = 1.
    get list of workbooks, initially empty
      CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP.
      PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - start
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP  EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    tell user what is going on
      SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - end
    disconnect from Excel
         CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING  #1 = 'C:\SKV.XLS'.
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL.
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    FORM FILL_CELL USING I J BOLD VAL.
      CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_ZL 'Value' = VAL .
      PERFORM ERR_HDL.
      GET PROPERTY OF H_ZL 'Font' = H_F.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_F 'Bold' = BOLD .
      PERFORM ERR_HDL.
    ENDFORM.
    *&      Form  ERR_HDL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    FORM ERR_HDL.
    IF SY-SUBRC <> 0.
      WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
      STOP.
    ENDIF.
    ENDFORM.                    " ERR_HDL
    Regards
    Murali Papana

  • How to pull data output of TCODE "MRKO" into a BI Cube.....??

    Hi Gurus:
    One of the business requirement is to EXTRACT data from relevant tables that the R/3 TCode "MRKO" provides in a report format in to BI. I don't tknow if there is any std. SAP extractor that would provide me the details. We need this data to determine the payment DATE based on "Payment Terms" using a logic, then summarize the data at each Vendor level and pass this information to the BI Cube. We need this information for a Cash Flow Forecasting project.
    I am not familiar with the Tcode MRKO or the program. I would appreciate it if anyone can shed some light here. I basically need a Total Due amount for a month period, Vendor, The date on which the payment has to be made in future based on the Payment terms and Company code. I don't know the tables involved, but the TCODE provides a "Total" per Vendor and thats what I would like to capture and pass to BI. How can I achieve this?
    Appreciate the name of the STD extractor if one exists or the table(s), and if any logic is necessary.....?
    Thanks a lot in advance.....!
    PBSW

    HI,
    I am not aware of any standard extractor for the report that you get from Tcode MRKO, But I can suggest you in a very customized way to extract the data into BW.
    When you run the transaction "MRKO", please check the program that is running in the background for that report to run and get the data output. You could easily find from the lower side menu bar.
    Once if you get to know the program, create a structure and create a datasource assigned to that structure, where  the datasource uses funcion module as its extraction method. In SAP you can easily convert a program into a function module and let the extractor fill your datasource for extraction.
    - Another way of doing it, is to find out the tables that it is retrieving from the report MRKO and create a structure with those fields filled up using a function module. And then use that structure and function module for your new datasource to extract.

  • How to show data output in SSRS

    Below is my simply query.  I need to use Matrix SSRS format. I will put "Region" in "row" column, Header will use "Customer_Requested_Date" field, and will use "Amount" in the data session.
    The data output in the "Header" field will show January.....until December (current month is December).  In the Amount field under "December" (current month), I need to compute the formula like "Customer_Request_Month"
    < =  Current Month".  (I do not have the field name called Current Month, need to get a Date/Time function to display Current Month).
    How I can come up the data output under December Header field to show the current Amount in that section?
    November, 2014
    December,2014
    Region
    Amount
    CRD Month < = Current Month
    Select
    Customer_Request _Date,
    Customer_request_Month,
    Transaction_Type,
    Region,
    Amount
     From Table
    Thanks,
    Josephine
    Josey Tang

    Hi Josey,
    According to your descritption, you want to show the current month in your tablix. Right?
    In Reporting Services, we can use the Now() and datepart() function to get the current month. Please use the expression below:
    =Datepart("m",Now())
    In this scenario, since you want to show the amount of current month within the column group, you need to create another dataset which always show the data of current month. Then you can use lookup() function to get the amount value from the current dataset
    based on the Region. Please follow the steps below:
    Create a same dataset(DataSet2) using your query. Add a filter on this dataset. Make Fields!Customer_request_Month.Value
    =
    Datepart("m",Now())
    Then add a column inside of column group, using the expression below:
    =lookup(Fields!Region.Value,Fields!Region.Value,Fields!Amount.Value,"DataSet2")
    The design and result look like below:
    Reference:
    Expression Examples (Report Builder and SSRS)
    Lookup Function (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Windows 8.1 Data reordering issue with Intel Adaptors

    According to Intel, there is a data reordering issue with their adaptors and probably this dumb WIDI software. This is from Intel site. they say some are fixed, "A future Windows 8 fix will address this issue for other Intel wireless adapters." I
    have one Nope, still broke. I get drops all the time. Brand new Toshiba laptop I7 16 gigs of ram and a SSD and a 2 gig Vid card. Would be nice to be able to play games but I get dropped all the time. Now would Microsoft quit hiding
    about this, and fix the darn thing. Also i'm a system admin for 13 years. I have build over 1000 PCs and servers. I know bad software. Please fix this. PLEASE. Its not going to just go away and its not just Toshiba, I have seen other companies with the
    same problem. If there is a Fix PLEASE POST IT. Or even a workaround I have tried everything.
    http://www.intel.com/support/wireless/wlan/sb/CS-034535.htm
     

    Hi,
    Have your first tried the software fix under this link for your network adapter?
    http://www.intel.com/support/wireless/wtech/proset-ws/sb/CS-034041.htm
    Please Note: The third-party product discussed here is manufactured by a company that is independent of Microsoft. We make no warranty, implied or otherwise, regarding this product's performance or reliability.
    Also, you can try to check if there is any driver update under Device manager from manufacture's website.
    Kate Li
    TechNet Community Support
    Yep didn't work. Still get drops all the time, had to run a Cat 5E cable to my laptop from my modem, because I have Atheros Gigabyte Lan adaptor. Works Great. The Wireless still drops all the time. Has Microsoft let out the patch to fix this or is it coming in
    April in the 8.1 patch that's coming. Funny thing is all for Widi, I don't even use widi, I got the software to do that from Samsung works better on my TV. Intel and Microsoft need to get this fixed. because their driving off gamers and that's the
    people that make sure they buy Microsoft so they can play games. With the wireless link dead and a great laptop worthless what's the point. Ive been in IT for 13 years building PCs  and Servers how I knew how to run a 60 FT Cat 5e line thru
    a 2 story house and terminate it. Most people don't. Fix the problem.  

  • Data Load Issue "Request is in obsolete version of DataSource"

    Hello,
    I am getting a very strange data load issue in production, I am able to load the data upto PSA, but when I am running the DTP to load the data into 0EMPLOYEE ( Master data Object) getting bellow msg
    Request REQU_1IGEUD6M8EZH8V65JTENZGQHD not extracted; request is in obsolete version of DataSource
    The request REQU_1IGEUD6M8EZH8V65JTENZGQHD was loaded into the PSA table when the DataSource had a different structure to the current one. Incompatible changes have been made to the DataSource since then and the request cannot be extracted with the DTP anymore.
    I have taken the follwoing action
    1. Replicated the data source
    2. Deleted all request from PSA
    2. Activated the data source using (RSDS_DATASOURCE_ACTIVATE_ALL)
    3. Re transported the datasource , transformation, DTP
    Still getting the same issue
    If you have any idea please reply asap.
    Samit

    Hi
    Generate your datasource in R/3 then replicate and activate the transfer rules.
    Regards,
    Chandu.

  • ORA-01403 No Data Found Issue

    Hi,
    Im very new to streams and having a doubt regarding ORA-01403 issue happening while replication. Need you kind help on this regard. Thanks in advance.
    Oracle version : 10.0.3.0
    1.Suppose there are 10 LCRs in a Txn and one of the LCR caused ORA-01403 and none of the LCRs get executed.
    We can read the data of this LCR and manually update the record in the Destination database.
    Eventhough this is done, while re-executing the transaction, im getting the same ORA-01403 on the same LCR.
    What could be the possible reason.
    Since, this is a large scale system with thousands of transactions, it is not possible to handle the No data found issues occuring in the system.
    I have written a PL/SQL block which can generate Update statements with the old data available in LCR, so that i can re-execute the Transaction again.
    The PL/SQL block is given below. Could you please check if there are any issues in this while generating the UPDATE statements. Thank you
    /* Formatted on 2008/10/23 14:46 (Formatter Plus v4.8.7) */
    --Script for generating the Update scripts for the Message which caused the 'NO DATA FOUND' error.
    DECLARE
    RES NUMBER; --No:of errors to be resolved
    RET NUMBER; --A number variable to hold the return value from getObject
    I NUMBER; --Index for the loop
    J NUMBER; --Index for the loop
    K NUMBER; --Index for the loop
    PK_COUNT NUMBER; --To Hold the no:of PK columns for a Table
    LCR ANYDATA; --To Hold the Logical Change Record
    TYP VARCHAR2 (61); --To Hold the Type of a Column
    ROWLCR SYS.LCR$_ROW_RECORD; --To Hold the LCR caused the error in a Txn.
    OLDLIST SYS.LCR$_ROW_LIST; --To Hold the Old data of the Record which was tried to Update/Delete
    NEWLIST SYS.LCR$_ROW_LIST;
    UPD_QRY VARCHAR2 (5000);
    EQUALS VARCHAR2 (5) := ' = ';
    DATA1 VARCHAR2 (2000);
    NUM1 NUMBER;
    DATE1 TIMESTAMP ( 0 );
    TIMESTAMP1 TIMESTAMP ( 3 );
    ISCOMMA BOOLEAN;
    TYPE TAB_LCR IS TABLE OF ANYDATA
    INDEX BY BINARY_INTEGER;
    TYPE PK_COLS IS TABLE OF VARCHAR2 (50)
    INDEX BY BINARY_INTEGER;
    LCR_TABLE TAB_LCR;
    PK_TABLE PK_COLS;
    BEGIN
    I := 1;
    SELECT COUNT ( 1)
    INTO RES
    FROM DBA_APPLY_ERROR;
    FOR TXN_ID IN
    (SELECT MESSAGE_NUMBER,
    LOCAL_TRANSACTION_ID
    FROM DBA_APPLY_ERROR
    WHERE LOCAL_TRANSACTION_ID =
    '2.85.42516'
    ORDER BY ERROR_CREATION_TIME)
    LOOP
    SELECT DBMS_APPLY_ADM.GET_ERROR_MESSAGE
    (TXN_ID.MESSAGE_NUMBER,
    TXN_ID.LOCAL_TRANSACTION_ID
    INTO LCR
    FROM DUAL;
    LCR_TABLE (I) := LCR;
    I := I + 1;
    END LOOP;
    I := 0;
    K := 0;
    dbms_output.put_line('size >'||lcr_table.count);
    FOR K IN 1 .. RES
    LOOP
    ROWLCR := NULL;
    RET :=
    LCR_TABLE (K).GETOBJECT
    (ROWLCR);
    --dbms_output.put_line(rowlcr.GET_OBJECT_NAME);
    PK_COUNT := 0;
    --Finding the PK columns of the Table
    SELECT COUNT ( 1)
    INTO PK_COUNT
    FROM ALL_CONS_COLUMNS COL,
    ALL_CONSTRAINTS CON
    WHERE COL.TABLE_NAME =
    CON.TABLE_NAME
    AND COL.CONSTRAINT_NAME =
    CON.CONSTRAINT_NAME
    AND CON.CONSTRAINT_TYPE = 'P'
    AND CON.TABLE_NAME =
    ROWLCR.GET_OBJECT_NAME;
    dbms_output.put_line('Count of PK Columns >'||pk_count);
    DEL_QRY := NULL;
    DEL_QRY :=
    'DELETE FROM '
    || ROWLCR.GET_OBJECT_NAME
    || ' WHERE ';
    INS_QRY := NULL;
    INS_QRY :=
    'INSERT INTO '
    || ROWLCR.GET_OBJECT_NAME
    || ' ( ';
    UPD_QRY := NULL;
    UPD_QRY :=
    'UPDATE '
    || ROWLCR.GET_OBJECT_NAME
    || ' SET ';
    OLDLIST :=
    ROWLCR.GET_VALUES ('old');
    -- Generate Update Query
    NEWLIST :=
    ROWLCR.GET_VALUES ('old');
    ISCOMMA := FALSE;
    FOR J IN 1 .. NEWLIST.COUNT
    LOOP
    IF NEWLIST (J) IS NOT NULL
    THEN
    IF J <
    NEWLIST.COUNT
    THEN
    IF ISCOMMA =
    TRUE
    THEN
    UPD_QRY :=
    UPD_QRY
    || ',';
    END IF;
    END IF;
    ISCOMMA := FALSE;
    TYP :=
    NEWLIST
    (J).DATA.GETTYPENAME;
    IF (TYP =
    'SYS.VARCHAR2'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETVARCHAR2
    (DATA1
    IF DATA1 IS NOT NULL
    THEN
    UPD_QRY :=
    UPD_QRY
    || NEWLIST
    (J
    ).COLUMN_NAME;
    UPD_QRY :=
    UPD_QRY
    || EQUALS;
    UPD_QRY :=
    UPD_QRY
    || ' '
    || ''''
    || SUBSTR
    (DATA1,
    0,
    253
    || '''';
    ISCOMMA :=
    TRUE;
    END IF;
    ELSIF (TYP =
    'SYS.NUMBER'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETNUMBER
    (NUM1
    IF NUM1 IS NOT NULL
    THEN
    UPD_QRY :=
    UPD_QRY
    || NEWLIST
    (J
    ).COLUMN_NAME;
    UPD_QRY :=
    UPD_QRY
    || EQUALS;
    UPD_QRY :=
    UPD_QRY
    || ' '
    || NUM1;
    ISCOMMA :=
    TRUE;
    END IF;
    ELSIF (TYP =
    'SYS.DATE'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETDATE
    (DATE1
    IF DATE1 IS NOT NULL
    THEN
    UPD_QRY :=
    UPD_QRY
    || NEWLIST
    (J
    ).COLUMN_NAME;
    UPD_QRY :=
    UPD_QRY
    || EQUALS;
    UPD_QRY :=
    UPD_QRY
    || ' '
    || 'TO_Date( '
    || ''''
    || DATE1
    || ''''
    || ', '''
    || 'DD/MON/YYYY HH:MI:SS AM'')';
    ISCOMMA :=
    TRUE;
    END IF;
    ELSIF (TYP =
    'SYS.TIMESTAMP'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETTIMESTAMP
    (TIMESTAMP1
    IF TIMESTAMP1 IS NOT NULL
    THEN
    UPD_QRY :=
    UPD_QRY
    || ' '
    || ''''
    || TIMESTAMP1
    || '''';
    ISCOMMA :=
    TRUE;
    END IF;
    END IF;
    END IF;
    END LOOP;
    --Setting the where Condition
    UPD_QRY := UPD_QRY || ' WHERE ';
    FOR I IN 1 .. PK_COUNT
    LOOP
    SELECT COLUMN_NAME
    INTO PK_TABLE (I)
    FROM ALL_CONS_COLUMNS COL,
    ALL_CONSTRAINTS CON
    WHERE COL.TABLE_NAME =
    CON.TABLE_NAME
    AND COL.CONSTRAINT_NAME =
    CON.CONSTRAINT_NAME
    AND CON.CONSTRAINT_TYPE =
    'P'
    AND POSITION = I
    AND CON.TABLE_NAME =
    ROWLCR.GET_OBJECT_NAME;
    FOR J IN
    1 .. NEWLIST.COUNT
    LOOP
    IF NEWLIST (J) IS NOT NULL
    THEN
    IF NEWLIST
    (J
    ).COLUMN_NAME =
    PK_TABLE
    (I
    THEN
    UPD_QRY :=
    UPD_QRY
    || ' '
    || NEWLIST
    (J
    ).COLUMN_NAME;
    UPD_QRY :=
    UPD_QRY
    || ' '
    || EQUALS;
    TYP :=
    NEWLIST
    (J
    ).DATA.GETTYPENAME;
    IF (TYP =
    'SYS.VARCHAR2'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETVARCHAR2
    (DATA1
    UPD_QRY :=
    UPD_QRY
    || ' '
    || ''''
    || SUBSTR
    (DATA1,
    0,
    253
    || '''';
    ELSIF (TYP =
    'SYS.NUMBER'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETNUMBER
    (NUM1
    UPD_QRY :=
    UPD_QRY
    || ' '
    || NUM1;
    END IF;
    IF I <
    PK_COUNT
    THEN
    UPD_QRY :=
    UPD_QRY
    || ' AND ';
    END IF;
    END IF;
    END IF;
    END LOOP;
    END LOOP;
    UPD_QRY := UPD_QRY || ';';
    DBMS_OUTPUT.PUT_LINE (UPD_QRY);
    --Generate Update Query - End
    END LOOP;
    END;

    Thanks for you replies HTH and Dipali.
    I would like to make some points clear from my side based on the issue i have raised.
    1.The No Data Found error is happening on a table for which supplemental logging is enabled.
    2.As per my understanding, the "Apply" process is comparing the existing data in the destination database with the "Old" data in the LCR.
    Once there is a mismatch between these 2, ORA-01403 is thrown. (Please tell me whether my understanding is correct or not)
    3.This mismatch can be on date field or even on the timestamp millisecond as well.
    Now, the point im really wondering about :
    Some how a mismatch got generated in the destination database (Not sure about the reason) and ORA-01403 is thrown.
    If we could update the Destination database with the "Old" data from LCR, this mismatch should be resolved isnt it?
    Reply to you Dipali :
    If nothing is working out, im planning to put a conflict handler for all tables with "OVERWRITE" option. With the following script
    --Generate script for applying Conflict Handler for the Tables for which Supplymentary Logging is enabled
    declare
    count1 number;
    query varchar2(500) := null;
    begin
    for tables in (
    select table_name from user_tables where table_name IN ("NAMES OF TABLES FOR WHICH SUPPLEMENTAL LOGGING IS ENABLED")
    loop
    count1 := 0;
    dbms_output.put_line('DECLARE');
    dbms_output.put_line('cols DBMS_UTILITY.NAME_ARRAY;');
    dbms_output.put_line('BEGIN');
    select max(position) into count1
    from all_cons_columns col, all_constraints con
    where col.table_name = con.table_name
    and col.constraint_name = con.constraint_name
    and con.constraint_type = 'P'
    and con.table_name = tables.table_name;
    for i in 1..count1
    loop
    query := null;
    select 'cols(' || position || ')' || ' := ' || '''' || column_name || ''';'
    into query
    from all_cons_columns col, all_constraints con
    where col.table_name = con.table_name
    and col.constraint_name = con.constraint_name
    and con.constraint_type = 'P'
    and con.table_name = tables.table_name
    and position = i;
    dbms_output.put_line(query);
    end loop;
    dbms_output.put_line('DBMS_APPLY_ADM.SET_UPDATE_CONFLICT_HANDLER(');
    dbms_output.put_line('object_name => ''ICOOWR.' || tables.table_name|| ''',');
    dbms_output.put_line('method_name => ''OVERWRITE'',');
    dbms_output.put_line('resolution_column => ''COLM_NAME'',');
    dbms_output.put_line('column_list => cols);');
    dbms_output.put_line('END;');
    dbms_output.put_line('/');
    dbms_output.put_line('');
    end loop;
    end;
    Reply to u HTH :
    Our Destination database is a replica of the source and no triggers are running on any of these tables.
    This is not the first time im facing this issue. Earlier, we had to take big outage times and clear the Replica database and apply the dump from the source...
    Now i cant think about that situation.

  • 4G LTE data reception issue in area of work building

    Hi, I'm having a data reception issue in a certain area at work.  The signal indicator at the upper right of the homescreen shows "4GLTE" but this is clearly inaccurate since I am not able to navigate to websites or send/receive multimedia messages.  If I move ~30 feet east in the building, the reception is restored.  Two people with iPhone 5 devices have the same issue.  However, the Verizon iPhone 5 allows you to turn off LTE.  Once this was done and the signal fell back to 3G, reception was restored, albeit with slower speeds, but at least reception wasn't completely blocked.  I understand 4G is not available in all areas, but in this case, the phone is not automatically switching to 3G and there is no workaround because there is no option to turn off LTE on the Z10.  In the "Settings" -> "Network Connections" -> "Mobile Network" -> "Network Technology" dropdown, the only values are:
    UMTS/GSM (when I switch to this, no networks are found)
    Global (the current selection)
    LTE/CDMA
    This is a big problem for me because for 8+ hours in the day I can't receive MMS messages or navigate to websites.

    Hi, Nate650,
    Sorry to hear about your problem with 4G. First, let me ask, have you updated your Z10 to the latest official software version? I had a similar problem with my Z10. After about an hour on the phone with CS, we figured out it was a problem with the tower near me. The problem was fixed by VZW and I have not had connection issues. You are right, though, about the Z10 falling back to 3G. Mine did before the update but not since.
    Doc

  • Logical Standby Data Consistency issues

    Hi all,
    We have been running a logical standby instance for about three weeks now. Both our primary and logical are 11g (11.1.0.7) databases running on Sun Solaris.
    We have off-loaded our Discoverer reporting to the logical standby.
    About three days ago, we started getting the following error message (initially for three tables, but from this morning on a whole lot more)
    ORA-26787: The row with key (<coulmn>) = (<value>) does not exist in table <schema>.<table>
    This error implies that we have data consistency issues between our primary and logical standby databases, but we find that hard to believe
    because the "data guard" status is set to "standby", implying that schemas' being replicated by data guard are not available for user modification.
    any assistance in this regard would be greatly appreciated.
    thanks
    Mel

    It is a bug : Bug 10302680 . Apply the corresponding Patch 10302680 to your standby db.

  • How to get material's last posting date of issuing to production order?

    Hi,
    In my scenario, I need to get material's last posting date of issuing to production order (e.g. mov. typ. 261).
    I tried to select the material documents whose movement type is 261, and restrict the posting date from month to month each time, until the first material document is selected.
    But this method seems quite inefficient.
    What kind of algorithm is more effient to do this?
    Thanks
    Wesley

    Hi,
    select max( budat )
      from mkpf
      into gv_budat
      where mblnr in ( select mblnr
                         from aufm
                        where aufnr = gv_aufnr "(Prod. Order)
                            and  matnr = gv_matnr "(Issued Material)
                            and bwart = '261' ).
    Edited by: Azeem Ahmed Matte on Mar 12, 2010 12:33 PM

  • How to get the previous state of my data after issuing coomit method

    How to get the previous state of some date after issuing commit method in entity bean (It should not use any offline storage )

    >
    Is there any way to get the state apart from using
    offline storage ?As I said the caller keeps a copy in memory.
    Naturally if it is no longer in memory then that is a problem.
    >
    and also what do you mean by auditlog?
    You keep track of every change to the database by keeping the old data. There are three ways:
    1. Each table has a version number/delete flag for each record. A record is never updated nor deleted. Instead a new record is created with a new version number and with the new data.
    2. Each table has a duplicate table which has all of the same columns. When the first table is modified the old data is moved to the duplicate table.
    3. A single table is used which has columns for 'table', 'field', 'data' and 'activity' (update, delete). When a change is made in any table then this table is updated. This is generally of limited useability due to the difficulty in recovering the data.
    All of the above can have a user id, timestamp, and/or additional information which is relevant to the data being changed.
    Note that ALL of this is persisted storage.
    I am not sure what this really has to do with "offline storage" unless you are using that term to refer to backed up data which is not readily available.

  • XML data output in a custom grid table

    Hi!
    I was wondering if it is possible to display xml data output in a custom-made grid table? Important is the ability to
    arrange the fields on the grid layout (not a fixed layout with columns and rows).
    I am using the latest JDeveloper release.
    Thanks!

    See [url http://docs.oracle.com/cd/E14072_01/server.112/e10592/functions251.htm#CIHGGHFB]XMLTABLE
    For example:
    -- INSERT INTO <your table name>
    WITH x AS
    (SELECT XMLTYPE('<?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <EMPNO>7782</EMPNO>
    <ENAME>CLARK</ENAME>
    <JOB>MANAGER</JOB>
    <MGR>7839</MGR>
    <HIREDATE>09-JUN-81</HIREDATE>
    <SAL>2450</SAL>
    <DEPTNO>10</DEPTNO>
    </ROW>
    <ROW>
    <EMPNO>7839</EMPNO>
    <ENAME>KING</ENAME>
    <JOB>PRESIDENT</JOB>
    <HIREDATE>17-NOV-81</HIREDATE>
    <SAL>5000</SAL>
    <DEPTNO>10</DEPTNO>
    </ROW>
    <ROW>
    <EMPNO>7934</EMPNO>
    <ENAME>MILLER</ENAME>
    <JOB>CLERK</JOB>
    <MGR>7782</MGR>
    <HIREDATE>23-JAN-82</HIREDATE>
    <SAL>1300</SAL>
    <DEPTNO>10</DEPTNO>
    </ROW>
    </ROWSET>') myxml
    FROM DUAL)
    SELECT *
    FROM   x
    ,      XMLTABLE('/ROWSET/ROW'
             PASSING x.myxml
             COLUMNS empno, ename, job, mgr, hiredate, sal, deptno);

Maybe you are looking for

  • Inheriting Backups?

    I recently got a new Early 2013 15 Inch MacBook Pro with Retina Display as I sold my Mid-2012 MacBook Pro, and my questions are: How do I inherit backups on and from my Time Capsule - Time Machine backups after I accidentally instead picked create a

  • Has anyone tried taking an iPhone 5 from verizon and switching it to at

    My phone is super screwed up (iPhone4). I am on at&t while a friend with an extra iPhone 5 is from Verizon. Has anyone tried having their Verizon iPhone5 swapped to AT&T?

  • Why can't I register Adobe Acrobat XI

    I purchased Adobe Acrobat XI with my Dell computer last month. when I try to register I get a message saying "the serial number is valid but not for this product. Choose another." But the product Adobe Acrobat XI is not listed in the drop down window

  • Delete JAVA Stack in system with ABAP+JAVA

    Hello, A few days ago I installed a SAP ERP 6.0 SR3 with both stack: ABAP+JAVA. But now due some things, I want to know if it is possible to delete the JAVA stack! Yesterday I did a search how to do this, how it is possible to do this, and I found a

  • Adding photos to layers

    how do i add photos to layers so i can blend images on photoshop element 8?