Date selection in background

Hi,
i have to run a repot on 15th of every month in a part in the report i want to select the data from table bkdf with the foolwinf condition
     The field is BKDF-DBEDT  All items with a date in the next 4 month should be
      included on the report.
for eg :  On September report (run 09/15) all entries with an end date in the range
            of 10/01 through 01/31.
            October report (run 10/15) would include the date range of 11/01 through
            02/28.
Please suggest for what condition should i run select query on table bkdf.

Hi Richs
I wrote a small program...check this code..
REPORT test.
DATA : date1 LIKE sy-datum,
       date2 LIKE sy-datum.
RANGES : s_date FOR sy-datum.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
  EXPORTING
    months  = '1'
    olddate = sy-datum
  IMPORTING
    newdate = date1.
date1+6(2) = '01'.
WRITE :/ date1.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
  EXPORTING
    months  = '5'
    olddate = sy-datum
  IMPORTING
    newdate = date2.
date2+6(2) = '01'.
date2  = date2 - 1.
WRITE :/ date2.
s_date-low = date1. "append date1 and date2 to ranges s_date
s_date-option ='BT'.
s_date-sign = 'I'.
APPEND s_date.
s_date-high = date2.
s_date-option ='BT'.
s_date-sign = 'I'.
APPEND s_date.
SELECT .......FROM BKDF  WHERE "Use s_date in select statement.
DBEDT IN s_date.

Similar Messages

  • Error occurred in the data selection

    Hi Expert,
    I met issue when full loading data from R3 via customized datasource.
    the error message in request monitor is:
    Error message from the source system
    Diagnosis
    An error occurred in the source system.
    System Response
    Caller 09 contains an error message.
    Further analysis:
    The error occurred in Extractor .
    Refer to the error message.
    I checked in RSA3, the data extraction is successful, but in BW, when execute the infopackage with or without data selection, both failed due to the same error.
    I also checked the background job in SM37 in source system, the background BI* completed successfully, and the IDoc in both BW and source system processed successfully.
    I also tried to replicate datasource and activate is using RSDS_DATASOURCE_ACTIVATE_ALL, delete infopackage and recreate it. but seems all this didn't work.
    Could u pls tell me how to solve this issue? Thanks.
    Eileen

    Hello Eileen zhang,
    I have exactly the same error as you,  do you still remember how did you solved this problem?
    Regards,
    Thanks,
    Maria João
    Error message:
    "Error message from the source system
    Diagnosis
    An error occurred in the source system.
    System Response
    Caller 09 contains an error message.
    Further analysis:
    The error occurred in Extractor .
    Refer to the error message.
    Procedure
    How you remove the error depends on the error message.
    Note
    If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request."

  • ICR Process 003 - question about data selection (table FBICRC003A)

    Hello, I am implementing ICR process 003. We are doing several test and we I have some questions that I hope you can help me:
    1 - If I run transaction FBICS3 - Customer/Vendor(  Select Documents) and then FBICA3 - Customer/Vendor (Document Assignment ) several times (the same selection criteria) will the same documents be selected redundantly and will be stored redundantly in table FBICRC003A? I expected that this will not happen but It seems to happen in my test environment. (?)
    2- If I need to delete the data stored in ICR '003' functionality I need to use transaction GCDE. The problem as I am using ledger '0L' for '003' process I cannot "delete data of one ledger" functionality -that allows to set selection data- and I have to "delete the data of an entire data group" that deletes all data stored in FBICRC003A & FBICRC003T tables. Should I set another ledger for '003' process in order to delete data using selection criteria? Is it recommended to not to use '0L' and create a new one?
    I have read in reference documentation that "is not necessary to set up a SL", but since all my productive companies are running in the same client that is the ICR cliente I am wondering if could be better to create and set a SL.
    Thanks in advance
    Rafael Barreda
    Edited by: Rafael Barreda on Sep 14, 2009 1:27 PM

    Hi Ralph,
    we have created a RFC in order to get data from client B to client A (where ICR system is placed). The summary is:
    I need to import vendors/customer data from Client B that belongs to a certain company code "0001". The company is called "X" in both clients A & B although it only exists as a company code (FI) in Client B and just as a company (and trading partner) in client A.
    Client A:
    1- have set company "0001" as a "Company to be reconciled" at FBIC032:
    RFC destination = ""
    RFC destination for data selection = "ZRFC0001"
    Local company= ""
    Data Source="Documents of Current Process"
    Separate Selection Process= "X"
    Data Transfer Type="Asynchronous via Direct RFC Connection"
    Sender field for reference number = "XBLNR"
    Client B:
    1- I have created the companies (V_T880) that I will need in order to inform trading partner on vendor's master data.
    2- I have assigned company code '0001' to company "X"
    3- I have assigned trading partners created on step 1 to vendors
    4- I have post few FI documents with trading partners informed.
    Then I run FBICS3 - Customer/Vendor: Select Documents in background but the programs takes a lot of time and do not select any document.
    Do you think that I am missing something?
    Thanks very much in advance.

  • WorkOrderList TileView Row & Selected Row Background Color Change

    Hi,
         can we change the background color of WorkorderList TileView Row & Selected Row Background color ?. Actually i am trying to change the color of both in WorkOrderList but it not reflecting any color on my Agentry client. I used a style on Tile List View Data/Style.
    but these applied style on Rows & Selected Rows are not working in Agentry client.
    if any other alternate solution exist in Agentry, please guide me.
    i am using following...
      sap mobile platform-2.3.3
    Thanks & Regard
    Manish Kumar
    Tags edited by: Michael Appleby

    Hi Jason
          Yes using Image we can achieve that goal but i want to use a background color instead of Image background. Finally I used a background color on label and set the that label field on Screen. And It's showing the background color on WorkOrderList Row & Selected Row that what i wanted. But on both Row & Selected TileView Screen showing white outline that i don't want and also i could not remove the default Selected Blue Background Color.
         Please guide me how to remove white outline and default Blue Selected Background color.
    Thanks & Regard
    Manish Kumar

  • Runtime Error during Phase Start Data Selection

    Hello Forums,
    We are using TDMS (2006_1_700) to extract a year's worth data from one client into a new client on the same ERP EhP4 system.
    All the systems - central, sender and receiver are at the same DMIS levels(SP16) and all necessary notes have been applied.
    During the Step 'Start Data Selection' of the Data Transfer Phase, we see around 60 of the ~12000 sub tasks abort with the below error:
    Batch job for access plan calculation in sender system ended with errors
    Message no. DMC_UTIL_MSG021
    Diagnosis
    The access plan calculation was executed as a background job in the sender system. In this background job, an error occurred.
    Procedure
    Check if a short dump occurred in the sender system while the access plan was calculated. If existing, this short dump contains further information about the cause of the problem.
    A frequent error is that selection criteria for data reduction (for example selection groups) are wrongly defined which causes the database access that consideres these selection criteria to fail.
    The corresponding dump in the Sender system is as below:
    Runtime Errors         SAPSQL_WHERE_PARENTHESES
    Exception              CX_SY_DYNAMIC_OSQL_SYNTAX
    Error analysis                                                                                |
    |    An exception occurred that is explained in detail below.                                      |
    |    The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SYNTAX', was not                |
    |     caught in                                                                                |
    |    procedure "/1CADMC/DMCACS00P000000001" "(FUNCTION)", nor was it propagated by a               |
    |     RAISING clause.                                                                              |
    |    Since the caller of the procedure could not have anticipated that the                         |
    |    exception would occur, the current program is terminated.                                     |
    |    The reason for the exception is:                                                              |
    |    The current ABAP program has tried to execute an Open SQL statement                           |
    |    which contains a dynamic condition. The part of the condition specified                       |
    |    at runtime is incorrectly parenthesized.   
    Please suggest in case any of you have encountered similar error and possible resolution.
    Thanks in advance,
    Srikishan

    Hi Suman,
    Thanks a ton. I somehow missed this when searching on the SMP.
    I will implement the steps and post it back by tomorrow.
    Regards,
    Srikishan

  • Is it possible to delete data selectively from Business content cubes

    Dear Experts,
             Requesting you to help me out to know, is it possible to delete data selectively from Business content cubes.
    When I'm trying to delete selectively from Business content cubes, the background job gets cancelled with ST22 logs stating
    A RAISE statement in the program "SAPLRSDRD" raised the exception  condition "X_MESSAGE".                                                                               
    Since the exception was not intercepted by a superior program, processing was terminated.  
    and i tried  with few more Technical content cubes but the same thing happens.
    Pls let me know how to selectively delete data from Business content cubes if it's possible?.
    Thanks in advance for your favorable assistance.
    Regards,
    Ramesh-Kumar.

    Hi Ramesh,
    Follow below steps for selective deletion:
    1.     Transaction code: Use the Transaction code DELETE_FACTS.
    2.     Generate selective deletion program:
    A report program will be generated of the given name, here .
    3.     Selection screen:
    Take the deletion program u201CZDEL_EPBGu201D to the transaction code SE38 to see/execute the program.
    After executing it will take you to a selection screen:
    As we need to carry out deletion selective on Calendar week, we need to get the screen field for the field Calendar week. For this, click on the Calendar week field and press F1.
    Click on the technical information button (marked in red box above) you will get below screen:
         ABAP program to carry out the Calendar week calculation
    Problem scenario: As stated earlier the requirement is to delete the data from the cube based on the calendar week. Thus a code must be developed such that the number of weeks should be taken as input and corresponding calendar week should be determined. This calendar week should be then passed to the deletion program in order to carry out the data deletion from the InfoCube.
         Transaction code: Use T-code SE38 in order to create a program.
    Logic: Suppose we need to delete the data older than 100 weeks.
    a.     Get the number of weeks and system date in variables and calculate the total number of days :
    lv_week = 100.      *number of weeks      
    lv_dte = sy-datum.     *system date
    v_totaldays = lv_week * 7.      *total days
    b.     Get the corresponding calendar day from the total days. This is obtained by simply subtracting the total no. of days from the system date.
    lv_calday = lv_dte - v_totaldays. *corresponding calday.     
    c.     Now in order to get the calendar week corresponding to the calculated calendar day we must call a function module 'DATE_TO_PERIOD_CONVERT'. This function module takes input as Calendar day and Fiscal year variant and returns the appropriate fiscal period.
    Get the sales week time elements
      call function 'DATE_TO_PERIOD_CONVERT'
        exporting
          i_date                      = lv_calday
          i_periv                     = lc_sales
        importing
          e_buper                     = lv_period
          e_gjahr                     = lv_year
        exceptions
          input_false                 = 1
          t009_notfound               = 2
          t009b_notfound              = 3.
      if sy-subrc = 0.
        ls_time-calweek(4)      = lv_year.
        ls_time-calweek+4(2)    = lv_period.
      endif.
    v_week = ls_boots_time-calweek.
    Note: We can pass the fiscal year variant which can be obtained from the table T009B.For e.g. here fiscal year variant lc_sales = Z2. LS_TIME will be any table with suitable time units.
    d.     Now we have obtained the required calendar week in the v_week variable. This calendar week is the week till which we need to keep the data. And older data than this week will be deleted. This deletion will be done by the deletion program
    Submitting the Data deletion program for ZEPBGC01 and key field
    SUBMIT ZDEL_EPBG WITH C039 LT v_week.
              Here the calendar week value is submitted to the deletion program ZDEL_EPBG with the screen field of calendar week.
    Hope ... this will  help you..
    Thanks,
    Jitendra

  • HCM errors in phase Identify Objects for Transfer and Start Data Selection.

    Hello Colleagues ,
    Background: We are using TDMS HCM PA PD Expert package to transfer all of the HCM data
    We are using TDMS 4.0 SP 5. We are trying to do the Configuraition in Identify Objects for Transfer and Start Data Selection.. In this phase, we are encountering the issue of 'choose to confirm to trigger data selection'.  The only option in this activit is'confirm batch' and 'confirm online'. Even if we press the button, we are still encountering issues. What selections then or values can we use?Thank you. Kindly see screen shot
    Regards,
    Meinard

    Hello Meinard,
    There could be two issues:
    First check if you have assigned the target ranges for the dialog user which you are using to select data from sender system. You need to maintain target ranges in activity 'Define target ranges for users' which you can find under activity "Configuration and Utilities in Control system".
    Secondly, there could be authorizaton issues for the sender system user. Check for any authorization issue in SU53 in sender system for the user which you used to logon to sender system.
    Thanks
    Anita

  • Report help for multiple Date Select options

    Hi Friends,
    For a particular year wise report, the client wants 12 date select-options which are changeable and informal every year .The report will also be displayed as per the given date selection period wise. Please help me how to fetch the datas from the table as per the given selection period. Currently the report have one date select-option where the user gives selection range as 1.04 to 31.03. It's related to EB power consumption report and hence the new requirement on date selection which are informal and not a fixed date of every year.
    Ex:Selection-Screen
    Period 1 : 08.04.2008 to 12.05.2008
    Period 2: 12.05.2008 to 20.06.2008
    Period 3: 21.06.2008 to 28.07.2008
    Period 4: 29.07.2008 to 15.08.2008
    Period 5: 15.08.2008 to 21.09.2008
    Period 6 : 21.09.2008 to 14.10.2008
    The data will derive as per the above selection ranges.......
    Please advise with example.
    thanks & regards
    Sankar.

    >
    sankar babu wrote:
    > Ex:Selection-Screen
    > Period 1 : 08.04.2008 to 12.05.2008
    > Period 2: 12.05.2008 to 20.06.2008
    > Period 3: 21.06.2008 to 28.07.2008
    > Period 4: 29.07.2008 to 15.08.2008
    > Period 5: 15.08.2008 to 21.09.2008
    > Period 6 : 21.09.2008 to 14.10.2008
    Hi,
    In this case just derive all records matching dates between 08.04.2008 (low in first select-options) and 14.10.2008(high in last select-options.
    Also my advice is to use a single select-options and prompt the user to give the dates as ranges in the multiple entries dialog which can be opened by clicking the button on the right side of the select-options.
    Regards
    Karthik D

  • Can i have html code for date select options (SEARCH HELP)

    Hi frinds,
    I have a BSP Page with input as date.
    Can i have html code for date select options (SEARCH HELP)
    Moosa

    Hi
    Please find the sample code below.
    FROM DATE
          <htmlb:inputField id        = "dd"
                            width     = "45%"
                            type      = "DATE"
                            showHelp  = "X" <- Search help
                            alignment = "CENTER"
                            maxlength = "10"
                            disabled  = "TRUE"
                            value     = "<%= w_FROMDATE %>" />
    TO DATE
          <htmlb:inputField id        = "dd"
                            width     = "45%"
                            type      = "DATE"
                            showHelp  = "X"
                            alignment = "CENTER"
                            maxlength = "10"
                            disabled  = "TRUE"                      
    value     = "<%= w_TODATE %>" />
    Thanks
    kalyan

  • Need a single point of view on date selections for Delta and Full load IP's

    Hi Experts,
    Every year we are facing issues on date selections for data extraction, for example the Delta or Full selections for particular IP is like 2005 to 2008 , in this situation, for the year 2009, this IP is picking 0 records as the selections are upto 2008 only.
    My requirement is, I need to check the selections of all the IP's in the system and want to change on need base if the selections are getting expired instead of going and checking manually to each and every IP as the system is having around 3000 IP's, which is a tedious job.
    Guys, please let us know if there exits a Table/Program or any other way to check it.
    Inputs appreciated.
    Regards
    Nandu

    Hi
    Persistent through module RSSM_SHIP_PSEUDO_DVERSION_WRI
    Primary table RSLDPIOSH
    RSLDPIO Links datasource to infopackages
    RSLDPIOT InfoPackage Text Description
    RSLDPRULE ABAP source code for InfoPackages
    RSLDPSEL Hardcoded selections in InfoPackages
    RSMONICDP Contains the request-id number by data target
    RSPAKPOS List of InfoPackage Groups / InfoPackages
    http://help.sap.com/saphelp_nw70/helpdata/en/2e/20d704d45be7458582cdfcc5487090/frameset.htm
    Hope it helps

  • I have a question about General Data Selection in Report Painter

    Please help me out. Thi is the question....here it goes.
    In a Report in ReportPainter, I have in the General Data Selection the following selected characteristics. They are:
    Ledger = 0
    Record Type = 0
    Version = 1
    Fiscal Year = Z-ANOACT
    Period = (1CPERIV, 1CPERIB)
    So that we have the next screen in the Report’s execution.
    Fiscal Year : 2006
    From Period : 1
    To Period : 12
    Note:
    *Z-ANOACT = Variable so that with a user-exit calculates the actual year. Right now is 2006.
    *1CPERIV = This From-Period Variable is referenced to CCSS Table and PERBL Field Name. Its default value is 1.
    *1CPERIB = This To-Period Variable is referenced to CCSS Table and PERBL Field Name.
    Its default value is 12. Rigth now, we are in the fiscal month 5 (November).
    Id like to filtrate information from January,2006,Period:07 to November,2007,Period:05.
    I mean I work with the fiscal calendar because the information to get from the table is saved due to this calendar.
    The Fiscal Calendar is from July to June:
    Month          Period     Year
    January          07     2006     
    February     08     2006
    March          09     2006
    April          10     2006     
    May          11     2006                   
    June          12     2006
    July          01     2007
    Augost          02     2007
    September     03     2007     
    October          04     2007
    November     05     2007
    December      06     2007
    Right now, we are in November , 2006 (month=11) but according to the fiscal calendar we are in November, 2007 (month=5).
    How I can accommodate my variables or what I am doing wrong so that I can select information from periods 7 to 12, 2006 ( January to June, 2006) and information from periods 1 to 5, 2007 (July to November, 2007) having the screen cited above so that report painter adds the 2 ranges.
    I cannot do it with the criteria selection cited above because I only have a year and a range of periods and my end-user doesnt want to run my report twice:
    One run with periods 7 to 12, 2006 and
    Another run with periods 1 to 5, 2007 and then to add the 2 reports in excel to form a report.
    Hed like something in my screen like this……
    Fiscal Year = 2006
    From period = 7
    To Period = 12
    Fiscal Year = 2007
    From period = 1
    To Period = 5
    And then report painter will add the 2 ranges.
    Many Thanks if you know anything that can help me, please let me know.

    Please help me out. Thi is the question....here it goes.
    In a Report in ReportPainter, I have in the General Data Selection the following selected characteristics. They are:
    Ledger = 0
    Record Type = 0
    Version = 1
    Fiscal Year = Z-ANOACT
    Period = (1CPERIV, 1CPERIB)
    So that we have the next screen in the Report’s execution.
    Fiscal Year : 2006
    From Period : 1
    To Period : 12
    Note:
    *Z-ANOACT = Variable so that with a user-exit calculates the actual year. Right now is 2006.
    *1CPERIV = This From-Period Variable is referenced to CCSS Table and PERBL Field Name. Its default value is 1.
    *1CPERIB = This To-Period Variable is referenced to CCSS Table and PERBL Field Name.
    Its default value is 12. Rigth now, we are in the fiscal month 5 (November).
    Id like to filtrate information from January,2006,Period:07 to November,2007,Period:05.
    I mean I work with the fiscal calendar because the information to get from the table is saved due to this calendar.
    The Fiscal Calendar is from July to June:
    Month          Period     Year
    January          07     2006     
    February     08     2006
    March          09     2006
    April          10     2006     
    May          11     2006                   
    June          12     2006
    July          01     2007
    Augost          02     2007
    September     03     2007     
    October          04     2007
    November     05     2007
    December      06     2007
    Right now, we are in November , 2006 (month=11) but according to the fiscal calendar we are in November, 2007 (month=5).
    How I can accommodate my variables or what I am doing wrong so that I can select information from periods 7 to 12, 2006 ( January to June, 2006) and information from periods 1 to 5, 2007 (July to November, 2007) having the screen cited above so that report painter adds the 2 ranges.
    I cannot do it with the criteria selection cited above because I only have a year and a range of periods and my end-user doesnt want to run my report twice:
    One run with periods 7 to 12, 2006 and
    Another run with periods 1 to 5, 2007 and then to add the 2 reports in excel to form a report.
    Hed like something in my screen like this……
    Fiscal Year = 2006
    From period = 7
    To Period = 12
    Fiscal Year = 2007
    From period = 1
    To Period = 5
    And then report painter will add the 2 ranges.
    Many Thanks if you know anything that can help me, please let me know.

  • In RSA3, Data Selection is not Restricting the Data

    Hi Guys,
       In RSA3, if check the entries after providing the Selection Criteria, it is extracting all the Data.
    I tried for OSS Note. I didn't find any?
    Please refer this information:
    We load data from a source system EBP (similar to R3) to our BW system. The four ODSs (targets) we are using are:
    0BBP_SC (Shopping Cart - Individual Documents)
    0BBP_SCA (Approval Process for Shopping Cart - Single Documents)
    0BBP_INV (Invoice - Single Documents)
    0BBP_CON (Goods/Services Confirmation - Single Documents)
    And the four Datasources related to the above respectively are:
    0BBP_TD_SC_1
    0BBP_TD_SC_APPR_1
    0BBP_TD_INV_1
    0BBP_TD_CONF_1
    In the four InfoPackages related to the above, we use company code 0COMP_CODE (which corresponds to EBP field CO_CODE (Company Code in FI System) as data selection and the range, e.g., from X100 to X200, but somehow other company code ranges of data get in, e.g., Q001, Q100, 1000, and etc. What would cause the problem?
    Thanks
    Nagesh.

    Can you just try giving only one value instead of range and see what it comes?
    Ex: Company code = X100?
    regards,
    Hari

  • How to customize the data selection on a standard 2LIS_08TRTLP

    Hi All,
    on the datasource '2LIS_08TRTLP Shipment delivery per stage', I would need to filter on  '0DEL_TYPE delivery type' but it is not part of the standard 'data selection' for this datasource.
    I have some initial loading issue if I cannot filter directly at the datasource on a specific delivery_type.
    How can I 'enhance' the data selection for this standard datasource with the addition of this new filtering condition on 'DEL_TYPE'
    thanks in advance for your great support
    DHNG

    Go to change mode of datasource using transaction code RSA6. uncheck the hide sel and customer field column.
    Check the check box - del type and save it.
    it will be available for selection and check it in rsa3
    hope it helps you
    mahantesh

  • Error in Data selection in R/3 Generic Extraction Using function Modules

    Hi Friends,
    I have created a a generic data source using function module to load data from PA0000 and PA0001 Tables ,Function module is working fine when i execute it indipendently and  the data source is also working fine when i extract data using RSA3. it is showing correct no of records 157.
    When loading data into DSO from BW (using 3.x/7.0 flows) data is comming to PSA  all 157 records but in the RSMO the load status is showing yellow when i look into the step by step analysis it is
    data selection successfully started
    Data selection successfully ended
    All Data packets completed.
    are showing in red.
    after and hour time load getting failed and in the error message it is showing " job terminated in source system---> Request set to red"
    it is giving this message wir no RSM 78.
    Please let me know it

    Hi Jerry,
    Thanks for the immediate replay
    But here in my source system job is getting terminated.
    this is the status of job in Job logs.
    the job is running till this step not going ahead.
    Call customer enhancement BW_BTE_CALL_BW204010_E (BTE) with 157 records 
    Result of customer enhancement: 157 records                             
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 301 records     
    Result of customer enhancement: 157 records                             
    Asynchronous send of data package 000001 in task 0002 (1 parallel tasks)
    pl. update me if any idea.

  • MEIS - MEssage 'No data selected' after changes in VEFU

    Dear Gurus,
    While doing the Intrastat reporting, we have the Statistical value as 0 in some of the documents.
    The client's requirement is to populate a value in this field.
    So, they are trying to use the Transaction VEFU to insert a statistical value for such PO's.
    But, after doing this, when we go back to the transaction MEIS & regenerate the report in update mode (Using Log Type B) , it gives the message 'No data selected for this time period'.
    Can anyone please suggest the reason for this & how to resolve this?
    Thanks
    Ritu

    Hi all,
    I found a very strange behaviour when reversing Account Maintenance Document.
    After posting Account Maintenance using MR11.  I used ME23N to view the Account Maintenance document and double click it to get to MR11SHOW.  Here I reversed the document.  But if i execute MR11 again it prompts out the error "No data selected".
    Another scenario is to use execute MR11SHOW directly and reverse the Account Maintenance document.  Here I am about to use MR11 to post the document again....
    It seems the behaviour for reversing is different by using ME23N and MR11SHOW, which is weird...

Maybe you are looking for