Selective Deletion using 0REQUID & Date fields in combination

We are running SAP NetWeaver 2004s patch 15 I have tried to run a selective deletion with request ID and date fields but we are getting an SQL error.  The cube is compressed but the requests I am after have not been compressed.  Is this an activity I should be able to do?  I have checked SAP messages and found one but it was for version much older than ours  below is the error message I recieve in the Job Log.
Job started
Step 001 started (program RSINDEX1, variant &0000000000098, user ID BROWNAW)
SQL: 2010/12/16 15:06:21
CREATE TABLE "/BI0/0100000703" (DIMID INTEGER
NOT NULL) IN CMC#BTAB
SQL-END: 2010/12/16 15:06:21 00:00:00
SQL: 2010/12/16 15:06:21
insert into "/BI0/0100000703" SELECT DISTINCT
DIMID FROM "/BIC/DZFIGL_STGP" WHERE (
"DIM"."SID_0REQUID" =  109126
SQL Error: SQL0206N  "DIM.SID_0REQUID" is not valid in the co ntext where it is used
SQL-END: 2010/12/16 15:06:21 00:00:00
System error: CREATE_TABLE_AS_SELECT/RSDU_EXEC_SQL /BI0/0100000703 206-
Job cancelled after system exception ERROR_MESSAGE

Thanks for the quick response.  I have validated that the data ranges do exist for the requests.  Part of our process is to use the same selection to output the data before the deletion is ran so we can validate the number of records that are purged and have a backup of the data in case another issue is discovered at a later date. 
When I run this seleciton for output I get over 30k records.  Unfortunately I cannot just blow away the requests as most contain data that needs to remain.  As well as we use this as a source for delta records that come from multiple sources so the logistics of resetting the delta indicator on the requests and not screwing up other delta's is a big risk.  If I should be able to run a selective deletion with request I am hoping SAP can respond with a fix to the issue.

Similar Messages

  • How to select data from a table using a date field in the where condition?

    How to select data from a table using a date field in the where condition?
    For eg:
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
                                                      and bdatu = '31129999'.
    thanks.

    Hi Ramesh,
    Specify the date format as YYYYMMDD in where condition.
    Dates are internally stored in SAP as YYYYMMDD only.
    Change your date format in WHERE condition as follows.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and bdatu = <b>'99991231'.</b>
    I doubt check your data base table EQUK on this date for the existince of data.
    Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and <b> bdatu <= '99991231'.</b>
    Thanks,
    Vinay
    Thanks,
    Vinay

  • Using a date field in a JDOQL query crashes

    Hello:
    I am trying to use a date field in a JDOQL filter. It appears from the
    log file that the date is not being substituted into the SQL.
    It is not clear from the JDOQL spec how to do date queries.... doing date
    queries in SQL involves several special operators, yet the
    JDOQL defines the ">" and "<" operators as working on dates....and there is
    no mention of date specific operators so I am hoping that I
    can do a filter where I compare a date to an input parameter date using the
    ">" and "<" operators...
    I have enclosed a copy of my driver code, followed by an except of my class
    that contains the date, followed by the kodo exception log
    I can't see where I am doing anything that violates the JDOQL spec and I
    don't see any other way of doing date comparisions.
    Brian
    Here is the driver code that I am attempting:
    public void getDateRange ()
    PersistenceManager pm = JDOFactory.getPersistenceManager ();
    String filter = "leafDates.contains (cdate) & cdate.statusName ==
    myStatus & cdate.datePhaseStarted > myDate";
    Date date = new Date ();
    Calendar calendar = new GregorianCalendar (TimeZone.getDefault ());
    calendar.set (2002, Calendar.DECEMBER, 26);
    date=calendar.getTime();
    Extent extent = pm.getExtent (LeafBase.class, false);
    Query query = pm.newQuery (LeafBase.class, filter);
    query.declareImports ("import aqueduct.*; import java.util.Date");
    query.declareVariables ("aqueduct.LeafDate cdate; Date myDate");
    query.declareParameters ("String myStatus");
    System.out.println ("dated used = " + date);
    Collection results = (Collection) query.execute ("closed", date);
    Iterator iter = results.iterator ();
    while (iter.hasNext () ) {
    LeafBase myLeaf = (LeafBase) iter.next ();
    System.out.println ("My leaf = " + myLeaf);
    pm.close ();
    Here is the class:
    public class LeafDate implements Serializable
    // *******The Attributes***************
    private Date datePhaseStarted = null;
    private boolean isEstimatedDate = false;
    //mark this as non-persistent in the JDO metadata
    private StatusType status = null;
    //put here to enable one-to-many mapping using a single table in JDO
    private LeafBase parent = null;
    Here is the error I am getting:
    C:\bcs\jdo\kodo-jdo-2.4.0\aqueduct>java aqueduct.DealMaint dated used = Thu
    Dec 26 08:47:33 CST 2002
    Exception in thread "main" javax.jdo.JDODataStoreException:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=SELECT DISTINCT t0.ID, t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX,
    t0.DEALPARENTX, t0.PARENTX, t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAME FROM
    JDO_DATE t1, JDO_LEAF t0 WHERE ((t1.STATUSNAME = 'closed' AND t1.DATESTARTED
    *variable*) AND t0.ID = t1.PARENTX) PRE=SELECT DISTINCT t0.ID,
    t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX, t0.DEALPARENTX, t0.PARENTX,
    t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAME FROM JDO_DATE t1, JDO_LEAF t0 WHERE
    ((t1.STATUSNAME = ? AND t1.DATESTARTED > *variable*) AND t0.ID =
    t1.PARENTX)
    ORA-00936: missing expression
    [code=936;state=42000]
    NestedThrowables:com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=SELECT DISTINCT t0.ID, t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX,
    t0.DEALPA RENTX, t0.PARENTX, t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAME FROM
    JDO_DATE t1, JD O_LEAF t0 WHERE ((t1.STATUSNAME = 'closed' AND
    t1.DATESTARTED > *variable*) AND t0.ID = t1.PARENTX)] [PRE=SELECT DISTINCT
    t0.ID, t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX, t0.DEALPA RENTX,
    t0.PARENTX, t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAME FROM JDO_DATE t1, JD
    O_LEAF t0 WHERE ((t1.STATUSNAME = ? AND t1.DATESTARTED > *variable*) AND
    t0.ID = t1.PARENTX)]
    ORA-00936: missing expression
    at
    com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwDataStore(SQLExcep
    tions.java:23)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
    reManager.java:742)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java
    :92)
    at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
    at com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:668)
    at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:623)
    at aqueduct.DealMaint.getDateRange(DealMaint.java:523)
    at
    aqueduct.DealMaint.main(DealMaint.java:35)NestedThrowablesStackTrace:java.sq
    l.SQLException:
    ORA-00936: missing expression
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:643)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1819)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
    :2015)
    at
    oracle.jdbc.driver.OraclePreparedStatement.doScrollPstmtExecuteUpdate(Oracle
    PreparedStatement.java:3021)
    at
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
    ment.java:416)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePrepare

    Oh, thanks for pointing this out.... I got caught up in trying to figure out
    the date issues, I missed the obvious.
    Brian
    "Patrick Linskey" <[email protected]> wrote in message
    news:[email protected]...
    Brian,
    The problem is that you're declaring myDate as a variable instead of a
    parameter. Yes, we should be doing better error checking. But that's the
    problem.
    So, change your declareVariables() and declareParameters() statements
    accordingly, and all should work out.
    -Patrick
    Brian Smith wrote:
    Here is the driver code that I am attempting:
    public void getDateRange ()
    PersistenceManager pm = JDOFactory.getPersistenceManager ();
    String filter = "leafDates.contains (cdate) & cdate.statusName ==
    myStatus & cdate.datePhaseStarted > myDate";
    Date date = new Date ();
    Calendar calendar = new GregorianCalendar (TimeZone.getDefault
    >>
    calendar.set (2002, Calendar.DECEMBER, 26);
    date=calendar.getTime();
    Extent extent = pm.getExtent (LeafBase.class, false);
    Query query = pm.newQuery (LeafBase.class, filter);
    query.declareImports ("import aqueduct.*; importjava.util.Date");
    >>
    query.declareVariables ("aqueduct.LeafDate cdate; Date myDate");
    query.declareParameters ("String myStatus");
    System.out.println ("dated used = " + date);
    Collection results = (Collection) query.execute ("closed", date);
    Iterator iter = results.iterator ();
    while (iter.hasNext () ) {
    LeafBase myLeaf = (LeafBase) iter.next ();
    System.out.println ("My leaf = " + myLeaf);
    pm.close ();
    >
    Here is the class:
    public class LeafDate implements Serializable
    // *******The Attributes***************
    private Date datePhaseStarted = null;
    private boolean isEstimatedDate = false;
    //mark this as non-persistent in the JDO metadata
    private StatusType status = null;
    //put here to enable one-to-many mapping using a single table in JDO
    private LeafBase parent = null;
    >
    Here is the error I am getting:
    C:\bcs\jdo\kodo-jdo-2.4.0\aqueduct>java aqueduct.DealMaint dated used
    = Thu
    Dec 26 08:47:33 CST 2002
    Exception in thread "main" javax.jdo.JDODataStoreException:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=SELECT DISTINCT t0.ID, t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX,
    t0.DEALPARENTX, t0.PARENTX, t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAMEFROM> > JDO_DATE t1, JDO_LEAF t0 WHERE ((t1.STATUSNAME = 'closed' AND> > t1.DATESTARTED> >> > >*variable*) AND t0.ID = t1.PARENTX) [PRE=SELECT DISTINCT t0.ID,
    >
    ORA-00936: missing expression
    [code=936;state=42000]
    NestedThrowables:com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=SELECT DISTINCT t0.ID, t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX,
    t0.DEALPA RENTX, t0.PARENTX, t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAMEFROM
    JDO_DATE t1, JD O_LEAF t0 WHERE ((t1.STATUSNAME = 'closed' AND
    t1.DATESTARTED > variable) AND t0.ID = t1.PARENTX)] [PRE=SELECTDISTINCT
    t0.ID, t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX, t0.DEALPA RENTX,
    t0.PARENTX, t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAME FROM JDO_DATE t1,JD
    O_LEAF t0 WHERE ((t1.STATUSNAME = ? AND t1.DATESTARTED > variable) AND
    t0.ID = t1.PARENTX)]
    ORA-00936: missing expression
    at
    com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwDataStore(SQLExcep
    tions.java:23)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
    reManager.java:742)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java
    :92)
    atcom.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
    >>
    at
    com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:668)
    >>
    at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:623)
    at aqueduct.DealMaint.getDateRange(DealMaint.java:523)
    at
    aqueduct.DealMaint.main(DealMaint.java:35)NestedThrowablesStackTrace:java.sq
    l.SQLException:
    ORA-00936: missing expression
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at
    oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:643)
    >>
    at
    oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1819)
    >>
    at
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
    :2015)
    at
    oracle.jdbc.driver.OraclePreparedStatement.doScrollPstmtExecuteUpdate(Oracle
    PreparedStatement.java:3021)
    at
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
    ment.java:416)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePrepare
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Help please: Selective Deletion of Infocube data (Sales)

    Dear Experts
    Am working on a BW 3.5 server
    I have been referring to the below SDN posting
    <u>Selective Deletion of Infocube data</u>
    My scenario is like this..
    My Sales data infocube has multiple records with the
    same Delivery number and Bill of Lading number
    (same material number also).
    Some of these records are having "Created" status
    others are with "Cancelled" status.
    Requirement is to retain latest record based on Billing date
    after deleting previous records
    having same Delivery number and Bill of Lading number.
    Kindly advice a best practice solution.
    warm Regards,
    AbyJ
    ============

    Hi,
    I think selective deletion won't be the right solution to your problem.
    I would suggest to build up a second cube as a 1:1 copy of your sales cube.
    Build a transformation or update rule from your old to your new cube. In the startroutine you can now easily retain latest record based on Billing date
    after deleting previous records having same Delivery number and Bill of Lading number by sorting your data package according to this fields. After you have checked it in the new cube, you can either leave that and build the reporting on this cube if possible or in a second step you have to delete data in your old cube and then reload your new cube completely in your old cube. Build a transformation or update rule, easy 1:1 relations and reload data.
    An issue for this approach can be the number of records in your sales cube.
    Regards,
    Juergen

  • Creating a Calendar View using alternative date fields

    I have a Sharepoint 2007 calendar list that includes the standard Start and End Date fields.  I also have "Suggested Start Date" and "Suggested End Date" fields that are utilized by users to recommend the Start and End Dates for
    the event.
    I can create a Calendar view that displays the events according to the Start and End dates.
    I cannot create a Calendar view that displays the events according to the Suggested Start and Suggested End date fields.
    In practice, all items are not displayed on this second calendar view that should be displayed even though you can choose these fields as Time Interval values when establishing the calendar.
    Is there a way to create a Calendar View that will use date fields other than the default Start and End date fields?
    Thanks,
    Chris Mang>> JDA Software Group, Inc.

    Hello,
    It seems problem with time value. Have you included time value in custom datatime column wile creating? What happens when you select "date only" from column settings?
    You can also try below suggestion to include "IncludeTimeValue" parameter in CAMl query by designer:
    http://stackoverflow.com/questions/18362853/how-do-i-filter-by-today-and-time-in-sharepoint-list-view
    OR else create two more calculated column and save date only in those columns then filter by them.
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Using a date field to remove 'duplicates'

    Hi all,
    Really struggling here, would appreciate some fresh ideas !!
    I have a ton of rows in a table that are duplicates with the exception of a date field that differs very slightly.
    e.g.
    TO_CHAR(START_DATE,'
    13-JUN-2007 12:39:03
    13-JUN-2007 12:39:10 << dup
    18-JUN-2007 05:49:15
    18-JUN-2007 05:49:21 << dup
    13-JUN-2007 09:02:25
    13-JUN-2007 09:02:32 << dup
    It would be great if I could identify these dups in SQL and remove them. I've sampled the data and the times are out by between 5 and 7 seconds so if I could weed out all rows that have another row with a time that differs by <10 seconds that would be ideal.
    My other, but not as thorough, idea was to drop the seconds and I would be then able to drop them as if they were true duplicates ... run the risk of not catching some that way though.
    Any ideas?
    Many thanks in advance!
    Adam

    Assuming that you could legititmately have two records for the same day that are more then 10 seconds apart (and you would not consider these to be duplicates, then something along these lines should do it. In the initial select, I have bolded the "duplicates"
    pre]SQL> SELECT * FROM rt;
    SNO SDATE
    1 13-jun-2007 12:39:03
    1 13-jun-2007 12:39:10
    1 13-jun-2007 12:39:12
    1 13-jun-2007 12:39:45
    2 18-jun-2007 05:49:15
    2 18-jun-2007 05:49:21
    3 13-jun-2007 09:02:25
    3 13-jun-2007 09:02:32
    SQL> DELETE FROM rt
    2 WHERE rowid IN (SELECT rid
    3 FROM (SELECT sno, sdate, rowid rid,
    4 LAG(sdate) OVER (PARTITION BY sno
    5 ORDER BY sdate) rn
    6 FROM rt)
    7 WHERE (sdate - NVL(rn, sdate))*24*60*60 BETWEEN 1 and 10);
    4 rows deleted.
    SQL> SELECT * FROM rt;
    SNO SDATE
    1 13-jun-2007 12:39:03
    1 13-jun-2007 12:39:45
    2 18-jun-2007 05:49:15
    3 13-jun-2007 09:02:25
    This keeps the oldest of the duplicates by sdate, if you want to keep the newest, then something like:
    SQL> rollback;
    Rollback complete.
    SQL> DELETE FROM rt
      2  WHERE rowid IN (SELECT rid
      3                  FROM (SELECT sno, sdate, rowid rid,
      4                               LEAD(sdate) OVER (PARTITION BY sno
      5                                                ORDER BY sdate) rn
      6                        FROM rt)
      7                  WHERE (NVL(rn, sdate) - sdate)*24*60*60 BETWEEN 1 and 10);
    4 rows deleted.
    SQL> SELECT * FROM rt;
           SNO SDATE
             1 13-jun-2007 12:39:12
             1 13-jun-2007 12:39:45
             2 18-jun-2007 05:49:21
             3 13-jun-2007 09:02:32John

  • SELECT statement using XML data taking way too long.

    Hi all, I am using SQL Server 2005.
    I have an issue which I find hard to describe. The server that I am using contains two test databases which are (supposed to be) identical. They both have tables named EVENTS with identical fields. I am using XML data to query and update data to this table. 
    When I run the SELECT in one database, against the EVENTS table it takes a long time. The longest I've kept it running is 2:30 minutes. When I run it against the EVENTS table in the other database the results are almost instantaneous. I've created a test
    query to duplicate this behavior:
    declare @ValidXMLInput xmlset @ValidXMLInput = '<EVENTS>
    <EVENT EID="8077" EDATE="2014-07-20 10:15"
    USERID="GTJ789" LOCID="7016" STATE="0" />
    </EVENTS>'
    SELECT Col.value('@EID','VARCHAR(5)'),Col.value('@STATE','INT')
    FROM @ValidXMLInput.nodes('//EVENTS/EVENT') Tab(Col) 
    left join tblEvents on                   
     tblEvents.EvIdNum=Col.value('@EID','VARCHAR(5)') And
     tblEvents.EvDate=Col.value('@EDATE','DATETIME') And
      tblEvents.UserId=Col.value('@USERID','VARCHAR(8)') And
    tblEvents.EvLocId=Col.value('@LOCID','VARCHAR(8)') 
    where tblEvents.EvIdNum Is Null
    Basically, the above query returns all rows in the XML table that are not in the database table. The results are then passed on to other statements.The columns in the join are key fields for tblEvents and have a PK index for both tables (in each db).
    Now the issue that I am having. When I use an EID in the XML data of any other value (as presented in the example above), such as '3477' the query runs fast on both databases; however, when I specifically use an EID of '8077' then the query slows down to
    a point where it takes more than 2:30 minutes (after which I cancel the execution). This only happens with one of the databases.
    For testing purposes I've created an XML structure with only one item. Both tables have approximate 111 million records. One table contains about 900K records with an EID of 8077. The other table contains about 930K records with this EID. There aren't many
    differences in the data. The records with the EID of 8077 (the slow one) are for different dates, users and locations. I should also mention that although the data presented here for EID consists of number, provisions exist where the number may be prefixed
    by a letter; hence the varchar designation.
    My question to you all is: How can I start troubleshooting this issue? Should I be looking at indexes?
    I had some doubt about this because the query is fast for other EIDs. Why would it get "stuck" with this particular one?
    Any troubleshooting advice is welcomed. Thanks! Saga
    Insanity is the prelude to discovery

    Some thoughts:
    Is there a hardware difference between the two databases ? E.g. are they on the same disk (array) ?
    Is there anything else running on your server besides your SQL instance ?
    Do you see spikes in I/O, CPU or both ?
    Maybe there is locking on one DB that's not happening in the other.
    You should check indexes and statistics plus compare estimated execution plan between the two DBs.
    Also check this links:
    http://technet.microsoft.com/en-us/library/ms345118%28v=sql.90%29.aspx
    http://technet.microsoft.com/en-us/library/ms345115%28v=sql.90%29.aspx

  • Selective Deletion of Infocube data

    BW experts,
    I have a scenario where in "rough" data already stored in an InfoCube will be replaced by a more "intelligent" data from another source. The deletion/replacement of data should happen without manual intervention (cause flat file data files arrive at a schedule time and should be loaded "automatically"into the cube) What are my options here? I currently know that it is possible to delete infocube contents using function module 'RSDRD_SEL_DELETION' (perhaps do it in the Update Rule).
    1) Is there another way (more "SAP Standard" or more "intelligent")?  I need to delete based on characteristics  that can be found in the file (e.g. the file has data for 0MATERIAL, 0CALWEEK).
    2) What are the "watch outs" for using function module 'RSDRD_SEL_DELETION'?
    Please advise.
    Thank you very much.

    Hello Emmanuel,
       In ABAP programe Just used the Infocube Name and the selection condition on what basis you want to delete.
    See Below the code.
    *add the fiscper selection in L_THX_SEL table for seletion of data
    CLEAR L_SX_SEL.
      L_SX_SEL-IOBJNM = '0FISCPER'.
        CLEAR L_S_RANGE.
        L_S_RANGE-SIGN = 'I'.
        L_S_RANGE-OPTION = 'EQ'.
        L_S_RANGE-LOW = TFISCPER.  "yr data.
    *--this is imortant otherwise data wil not delete
        L_S_RANGE-KEYFL = RS_C_TRUE.
        APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
      INSERT L_SX_SEL INTO TABLE L_THX_SEL.
    **get the selection for company
      CLEAR L_SX_SEL.
      L_SX_SEL-IOBJNM = '0COMPANY'.
        CLEAR L_S_RANGE.
        L_S_RANGE-SIGN = 'I'.
        L_S_RANGE-OPTION = 'EQ'.
        L_S_RANGE-LOW = VARIANT.
    *--this is imortant otherwise data wil not delete
        L_S_RANGE-KEYFL = RS_C_TRUE.
        APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
      INSERT L_SX_SEL INTO TABLE L_THX_SEL.
    *function module for selective deletion..
    CALL FUNCTION 'RSDRD_SEL_DELETION'
      EXPORTING
        I_DATATARGET              = 'IFIBIV'
        I_THX_SEL                 =  L_THX_SEL
      I_DEL_ACTIV               = RS_C_TRUE
      I_DEL_UPDATE              = RS_C_FALSE
      I_DEL_CHANGE              = RS_C_FALSE
      I_AUTHORITY_CHECK         = RS_C_TRUE
      I_MODE                    = RSDRD_C_MODE-CHOOSE
      I_THRESHOLD               = '0.1'
      I_PARALLEL_DEGREE         = 1
      I_NO_LOGGING              = RS_C_FALSE
      I_NO_COMMIT               = RS_C_FALSE
      I_NO_ENQUEUE              = RS_C_FALSE
      I_SHOW_REPORT             = RS_C_FALSE
      I_TRANSACTIONAL_ODS       = RS_C_FALSE
      CHANGING
        C_T_MSG                   =  L_T_MSG
    EXCEPTIONS
      X_MESSAGE                 = 1
      INHERITED_ERROR           = 2
      INVALID_TYPE              = 3
      OTHERS                    = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Hope This will help.
    In Start Routine there is no disadvantage to delete the data from data package.
    But it depened on the scenario and requirement.
    Regards
    Gopal

  • Selective deletion and plan data

    Hello Gurus,
    I am having some doubts
    Any one of  them,could you please  clarify my doubts.
    1.By using the selective deletion (for Infocube),I have deleted some records.
    when i checked it on the log,In Deletion mode its showing the different values such as D,N and R....
    When I deleted the records,it has created 2 requests in log .
    onething its showing the status as 'N' and another thing as 'R'
    What is this mean.why its differing by requests.
    2.Reg plan data,How we are getting this plan data.(I know,based on actual data we are creating),But what is the procedure,how and  where we are creating this plan data like R/3 or BW.
    Will assign points.
    Thanks in advance
    Brgds
    Kumar

    Hi,
    As far as plan data is concern, there would be various plan data requirements for an org. let's say 'sales budget' / 'Production Planning' / 'Procurement plan' /
    'inventory status'..and so on so forth..
    basically when ever there is plan data requirement normaly the concern department has to prepare the paln data for the quater/Half/fiscal year, on either
    a legacy system or R/3 system..
    If it is from R/3 you are suppose to create a DS and then an infosource and so on..
    If it is a Legacy system - then go for the File Upload, after making your flat file
    infosource.
    Hope this helps..
    assign points if useful..
    cheers,
    Pattan.

  • How do I apply filters or limit the rows on my report using a Date field in SQL report builder 3.0?

    I have a status of completed and a date field in the dataset. The date field is either empty or contains a date. All 2015 dates are holding dates.
    So how can I limit the report to only pull completed status with an empty date or a holding date?
    I have not been able to set an OR option on a date field filter and if I add two filters on the date column one for empty one for > 12/31/2014 then it treats it as an "and" and pulls nothing from the list I have in sharepoint.
    any help will be appreciated.

    Hi MB,
    In Reporting Services, the relationship of  filters is “And”, and there is no option to change the relationship from “And” to “Or”. While we can use “or” operator within the expression to create one filter to integrated all filters to work around this
    issue.
    We can add a filter as follows in the dataset to limit the rows in your report:
    Expression: =Fields!date.Value is nothing or Fields!date.Value>"12/31/2014"    Type: Boolean
    Operator: =
    Value: true
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Problem Querying Oracle Forms Using a Date Field and a Format Mask

    Hello,
    We are experiencing a problem with Oracle Forms that I was wondering if you can help me with.
    We have several Forms that have single database blocks assigned to Oracle tables. The Forms are queryable and one of the fields we’re querying on is assigned to a field on the base table which is Not Null and has a Type of DATE. We are storing date/time information in this field on the database table. The item on the form is set up as a Date field with a Maximum Length of 7, a Format Mask ‘MMDDYY’ and having a Query Length of 10.
    We’ve seen a discrepancy in how these fields are used to query the base table block. On some user’s computers they are able to enter a 6 digit date followed by the % sign (e.g. ‘091808%’) and they get the expected results. Other users get ‘FRM-40301: Query caused no records to be retrieved. Re-enter’. Do you know why we are experiencing this difference?
    - The Oracle Database version we are running is Release 10.1.0.5.0.
    - The Forms Developer version that we’re experiencing the problem with is 4.5.10.15.2
    Thanks,
    Kris

    There is no obvious reason that I can see.
    Version 4.5 is very old so you might have problems calling Oracle Support. If you can reproduce the same problem o0n 10.1.2 you should call have them analyze the problem.

  • Restricting date selection of the calender date field

    Right now we have a web app where you choose the starting date of a work week. We're using the calender date field to get that date. However, our client wants to restrict that to just the Mondays of the month. Is it possible to do this?

    Hi Nagy,
    The way I would approach this is by implementing that kind of calendar picker myself, from some jQuery plugin or maybe a couple of simple dropdowns, and then use javascript to populate the current date field which would be hidden. You just have to make sure that the date format looks like this:
    03-Oct-2012
    Cheers,
    -mario

  • Selective deletion in master data

    Hi all,
    I m unableto delete a particular employee from the 0EMPLOYEE master data.Please help me on this
    Thanks,
    Mahee

    hi Mahee,
    you can't delete master data if it's used in infoprovider(ods/cube), you can check this with
    rsa1->infoobject->choose the characteristic->'master data maintenance', select the row for that characteristic value, and button 'delete' (trash icon) and 'save', you will get a message 'master data cannot be deleted'.
    transaction slg1, object RSDMD, subobject MD_DEL, and execute, in next screen double click the top node, you will see the log, message text in below panel, e.g 'master data xyz(SID xxxxx) is used in /.../...'
    xyz = characteristic value
    /.../... = table name, can be dimension table of infocube, e.g /bic/d[infocubename]x, then you know which data target used the value
    How to see where all the master data is being used
    hope this helps.

  • Sending reports to various recipients using a data field on the report

    Hi,
    I am currently running Crystal Reports Server 2008 with SP 3  applied.
    I was wondering if this was possible.
    I have a report that I would like to be sent to an email address field on the table that the report runs from. Fields are something like this:
    Amount Due, Invoice #, Client's email address, Date
    What I would like CRS to do is send out emails depending on what's on the table. Obviously I would need the server to send out the report to a particular client with only the records that should be for them.
    I, for some reason, thought there was an ability to add a field from the report on the email itself using brackets or some sort of variable but I'm not sure if this is true.
    If anyone can help, I would appreciate it greatly.
    Thanks!

    You can use Publications for that. As far as I know this should be supported natively in CRS 2008 with SP3.
    Take a look at the demo on building a data-driver publication here:
    http://www.sap.com/solutions/sap-crystal-solutions/information-infrastructure/sapcrystalserver/featuresfunctions/index.epx
    You have to have CALs (concurrent access licenses) though.
    Regards,
    Stratos

  • How to use 2 date field as delta control in generic extractor.

    Hi colleagues:
    I have developed a generic extractor to extract logistic data: Purchase Orders and Invoice. In order to do that, I have defined a view joining EKBE, EKKO, EKPO, EKET tables on R/3. By this approach, the delta mechanism is supposed to be controlled by the EKBE-BUDAT field and also by the EKPO-AEDAT field. Both fields are available on the view used to create the Datasource. However, the Datasource creation allows us to define just one field as delta control.
    I have a few questions regarding to this scenario:
    <b>1 - Is it possible to define 2 fields as delta control field on Generic Datasource?</b>
    <b>2 - How about creating two similar Datasouces, one having AEDAT as delta control, the other having BUDAT as delta control, and then connect those Datasources to an unique Infosource on the bw side?</b>
    Best regards
    Waldemar

    hi,
    1 - as far as I know it is not possible to define 2 fields
    2 - this workaround is used often in cases like yours.
    Just remember about order of extracting: first you extract new documents then changed
    Regards,
    Andrzej

Maybe you are looking for

  • Account 'Acquisition:Acquis. and production costs' could not be found for a

    dear all when i am posting periodic asset postings through ASKB below error is comming ple help Account 'Acquisition:Acquis. and production costs' could not be found for area 90 Message no. AU133 Diagnosis When creating the accounting document, the s

  • In ios 8 my messages did'nt sort by time

    WHen i updateed my iPhone 4s to iOS 8 my messages did not sort by time please help me

  • Bank information

    Hi All,            I need to load in all the employee bank information in to SAP. My company only have a record of all the empoyees routing number in their legacy system but not the bank name. How can I find information about their corresponding bank

  • Created letter head templates with pages-open using in WORD HOW?

    please help.. i created beautiful letter head templates with iwork pages  and i am trying to give to my employee to use it ... and then they can't import or open  use from microsoft Word 2011. they do not have iwork.. possible can share templates bot

  • Can i play a cd on my macBook Pro version 10.7.5?

    I downloaded photo's on a cd and now I am trying to bring them up via the DVD player on my MacBook Pro, OSX Lion, but it won't open.