How to select range for dater in BAPI_DOCUMENT_GETLIST2

Hi All
I have following problem with this FM BAPI_DOCUMENT_GETLIST2. I was looking a lot on different forums but I cannot find answer which corresponds to my problem.
I have in DMS saved files for our customer and Iu2019m using object linking as
Objlinkselection-DOKOB  =  KNA1
Objlinkselection- OBJKY   = KUNNR.
It works well, but it takes all doc from beginning.  Iu2019d like to make selection that final table documentdata is in range of defined range date with values 20111201 to 20111231
Now I have to select all documents for this customer and after that I have to make loop to get correct files. And it takes a huge time and in a few years it will collaps
LOOP AT LT_DOCUMENTDATA INTO <FS> WHERE CREATEDATE IN  rn_DATE.
ENDLOOP.
Any hint how to make this faster? 
Just to avoid any misunderstandings, I'm not asking on loop speed but how to select by FM less rows based on create date.
Thank a lot fo any hint
Petr

Hello Deepak,
Thanks a lot for your answer. I have read this thread already, but it is not realy what I need. But anyway in the night I have found solution.
I will go through table DRAW where I will get just DOCNUMS for current date range.
Than I will select correct rows from table DRAD for selected KUNNR.
Final set od DOCNUMS I will use as selection criteria for BAPI.
It should help, now I go to try it.
Thansk anyway
Petr

Similar Messages

  • Reg:how disaplay selection range for date field

    hi all
    can you please  let me know how to write  the code in wdabap  to display a date field with range option.i mean in abap we use at selection screen  ,but coming to wdabap can you  help how to write the code in wdabap.
    Thanks in advance
    Deepika

    To simplify the requirement, let me consider the followign understanding:
    1. You need few fields in the selection screen. They need to be select options and some parameter fields.
    2. The user clicks the button. You need to read teh user entered data.
    Once, you have teh data in your code, assign it to the context node - attributes. later, you need to decide what you shoudl do with that data.
    Sol: 1. To obtain fields into selection screen, use the component "wdr_select_options" and *** the interface view into your window. Make the view as default.
    Now,  you need to build the select options. Firstly create a method or insert the code in init().
    DATA: lr_componentcontroller TYPE REF TO ig_componentcontroller,
            l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
    create the used component
      l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
      IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
        l_ref_cmp_usage->create_component( ).
      ENDIF.
      wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
    init the select screen
      wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
      wd_this->m_handler->set_global_options(
                                  i_display_btn_cancel  = abap_false
                                  i_display_btn_check   = abap_false
                                  i_display_btn_reset   = abap_true
                                  i_display_btn_execute = abap_false ).
    Adding a block (type Tray) to the select-options
      wd_this->m_handler->add_block(
        i_id         = `BSC01`
        i_block_type = if_wd_select_options=>mc_block_type_tray
        i_title      = `Selection Screen` ).
    Adding a parameter field to the created block
    Create a reference to the type of customer number KUNNR
      CREATE DATA lr_field TYPE kunnr.
    Sets the airline code initial value
      ASSIGN lr_field->* TO <fs_field>.
    Add the parameter to the group
      wd_this->m_handler->add_parameter_field(
        i_id           = `KUNNR`
        i_within_block = `BSC01`
        i_obligatory   = abap_true
        i_value        = lr_field ).
    FREE lr_field.
    Adding a select-options field to the created block
    Create a reference to the material number range table
      lr_field = wd_this->m_handler->create_range_table( `MATNR` ).
    Add the select-option to the group
      wd_this->m_handler->add_selection_field(
        i_id           = `MATNR`
        i_within_block = `BSC01`
        it_result      = lr_field ).
      FREE lr_field.
    The code with method "set_global_options" is used to make the buttons visible or disappear.
    Its convinient to create your own button with an action instead or subscribing to the action of exceute button.
    Sol. 2: Read the data.
      FIELD-SYMBOLS:
        <fs_sel_item> LIKE LINE OF lt_sel_item,
        <fs_kunnr>   TYPE kunnr,
        <fs_matnr>   TYPE ranges_matnr.
        wd_this->m_handler->get_value_of_parameter_field(
          EXPORTING i_id = 'KUNNR'
          RECEIVING r_value = p_kunnr ).
    Get the selection-screen items
          wd_this->m_handler->get_selection_fields(
            IMPORTING et_fields = lt_sel_item ).
    Retrieve the values from the select-options items
          LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
            CASE <fs_sel_item>-m_id.
              WHEN `MATNR`.
                ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_matnr>.
             WHEN < Other sel-option'
           ENDCASE.
         ENDLOOP.
    Obtain a reference to your context node and assign the field symbols to the attributes.
    Finally, you would have the data in your nodes. Now, you need to handle the coe as per your req.
    Regards,
    Sharath
    Edited by: Sharath M G on Aug 27, 2010 9:45 AM

  • Query to find first and last call made by selected number for date range

    Hi,
    query to find first and last call made by selected number for date range
    according to filter:
    mobile_no : 989.....
    call_date_from : 25-april-2013
    call_date_to : 26-april-2013
    Please help

    Hi,
    It sounds like you want a Top-N Query , something like this:
    WITH    got_nums   AS
         SELECT     table_x.*     -- or list columns wanted
         ,     ROW_NUMBER () OVER (ORDER BY  call_date      ) AS a_num
         ,     ROW_NUMBER () OVER (ORDER BY  call_date  DESC) AS d_num
         FROM     table_x
         WHERE     mobile_no     = 989
         AND     call_date     >= DATE '2013-04-25'
         AND     call_date     <  DATE '2013-04-26' + 1
    SELECT  *     -- or list all columns except a_num and d_num
    FROM     got_nums
    WHERE     1     IN (a_num, d_num)
    ;This forum is devoted to the SQL*Plus and iSQL*Plus front ends. This question doesn't have anything to do with any front end, does it? In the future, you'll get better response if you post questions like this in the PL/SQL.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the SQL forum FAQ {message:id=9360002}

  • How to set a date range for date field ?

    Dear Experts,
    Scenario:
    I have a query in validating the date field in my BSP application. My application is for maintain infotype 0023 Other/Previous Employers online by employees in the company.
    As per our design we are maintaining the all employment details of the employee both ( with in the current company / previous employment outside the company) in the same infotype.
    Every employee will have a hiring date within the SAP HR system. We consider this date as the cutoff date between current and previous employment in our application. When the employee updating the details wia BSP page I need to check the following.
    Record inside current company: Validation that, the user should only able to enter BEGIN DATE (BEGDA)  greater than or equal HIRING DATE and END DATE(ENDDA) should be greater than FROM  DATE (BEGDA).
    Record outside current Company: Validation that, the user should only able to enter BEGIN DATE (BEGDA)  less than or equal HIRING DATE and END DATE (ENDDA) should be greater than FROM  DATE (BEGDA) and less than HIRING DATE.
    Technical Requirement:
    How to set a date range for date field, i.e. how we can limit the date range in a HTMLB date field? Can this it be achieved via standard functionality of HTMLB?
    Following is the code to describe date field in my application.
        <htmlb:inputField id= "ENDDA_NEW_IN"
                          type= "date"
                    doValidate= "TRUE"
                      showHelp= "TRUE"
                      disabled= "FALSE"
                         width= "183"
                         style= "cssTextAreadate"
                         value= "<%='99991231'%>"/>
    Thanks a lot in advance for your assistance and help.
    Cibinu2026
    Edited by: cibin kuruvilla on Nov 12, 2008 11:13 AM

    Hi,
    This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
    Regards,
    <p>Blair Wheadon</p>
    <p>Product Manager, Crystal Reports</p>

  • Select-options for date field.

    Hi all,
    i need to give select options for Date field.How can i give that.
    Thanks & Regards
    Ravi.

    Hi Ravi,
    Use the Component WDR_SELECT_OPTIONS to include select options in Web Dynpro ABAP. Follow these steps:
    1. In your Component , "Used Componet" tab add Component WDR_SELECT_OPTIONS . Component Use can be any name that you want to give, eg SELECT_OPTIONS
    2. Go to the View where you want to include the Date Select Options. I am assuming that you already have an Attribute of Type DATS in your context.
    3. View: Properties Tab:Create Controller Usage and select
    SELECT_OPTIONS     WDR_SELECT_OPTIONS                   
    SELECT_OPTIONS     WDR_SELECT_OPTIONS     INTERFACECONTROLLER
    4. View Layout Tab:Include a View Container. In this view container we will show the Date Select Options.
    5. View Attributes Tab: Create Following two attributes:
    M_HANDLER type IF_WD_SELECT_OPTIONS
    M_WD_SELECT_OPTIONS type IWCI_WDR_SELECT_OPTIONS
    6: View Methods Tab: Create a method eg CREATE_SELECTION_SCREEN. Call this method in the WDDOINIT of the view.
    7:CREATE_SELECTION_SCREEN: Write following Code:
    * Data Declaration
      data:
            lt_range_table TYPE REF TO DATA.
      data:
            lr_componentcontroller TYPE REF TO IG_COMPONENTCONTROLLER,
            lr_componentusage TYPE REF TO IF_WD_COMPONENT_USAGE.
    * Execution
    *  Create Used Component
      lr_componentusage = wd_this->wd_cpuse_select_options( ).
      if LR_COMPONENTUSAGE->HAS_ACTIVE_COMPONENT( ) is initial.
        lr_componentusage->create_component( ).
      endif.
    *  Get pointer to interface controller of select options
      wd_this->M_WD_SELECT_OPTIONS = wd_this->wd_cpifc_select_options( ).
    * initialize selction screen
      wd_this->M_HANDLER = wd_this->M_WD_SELECT_OPTIONS->init_selection_screen( ).
    *  Create Range Table for: Date
      CALL METHOD WD_THIS->M_HANDLER->CREATE_RANGE_TABLE
        EXPORTING
          I_TYPENAME     = 'DATS'
        RECEIVING
          RT_RANGE_TABLE = lt_range_table.
    * Add Selection Field for: Date
      CALL METHOD WD_THIS->M_HANDLER->ADD_SELECTION_FIELD
        EXPORTING
          I_ID                         = '<name of date attribute in the context>'
    *      I_WITHIN_BLOCK               = MC_ID_MAIN_BLOCK
    *      I_DESCRIPTION                =
    *      I_IS_AUTO_DESCRIPTION        = ABAP_TRUE
          IT_RESULT                    = lt_range_table
    *      I_OBLIGATORY                 = ABAP_FALSE
    *      I_COMPLEX_RESTRICTIONS       =
    *      I_USE_COMPLEX_RESTRICTION    = ABAP_FALSE
    *      I_NO_COMPLEX_RESTRICTIONS    = ABAP_FALSE
    *      I_VALUE_HELP_TYPE            = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_NONE
    *      I_VALUE_HELP_ID              =
    *      I_VALUE_HELP_MODE            =
    *      I_VALUE_HELP_STRUCTURE       =
    *      I_VALUE_HELP_STRUCTURE_FIELD =
    *      I_HELP_REQUEST_HANDLER       =
    *      I_LOWER_CASE                 =
    *      I_MEMORY_ID                  =
    *      I_NO_EXTENSION               = ABAP_FALSE
    *      I_NO_INTERVALS               = ABAP_FALSE
    *      I_AS_CHECKBOX                = ABAP_FALSE
    *      I_AS_DROPDOWN                = ABAP_FALSE
    *      IT_VALUE_SET                 =
    *      I_READ_ONLY                  = ABAP_FALSE
    *      I_DONT_CARE_VALUE            =
    *      I_EXPLANATION                =
          I_TOOLTIP                    = 'Select Date'.
    8: To Fetch Data entered in the selection field, write following code on action of button click:
      data:
            lt_date type REF TO DATA.
    FIELD-SYMBOLS:
                     <fs_date> TYPE table.
      *  retrieve Date from Select Options
      CALL METHOD WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD
        EXPORTING
          I_ID           = '<attrib_name>'
        RECEIVING
          RT_RANGE_TABLE = lt_date.
    *  assign Date Field Symbol
      ASSIGN lt_date->* to <fs_date>.
    9: Windows Window Tab: In the View Conatiner, embed the WND_SELECTION_SCREEN view from SELECT_OPTIONS component Usage of  WDR_SELECT_OPTIONS component.
    Regards,
    Reema.

  • Select option for date

    i want give default values in select option for date (for a period)
    I used
    SELECT-OPTIONS y_s_mnth FOR y_v_dt_month default first to last OPTION BT.
    first and last are dates.
    I am getting error dialog box....specify ranges...
    Please give sample code..

    Hi Suhas,
    I hope this code will help you.  Reward me if it is helpful.
    select-options : y_s_mnth FOR sy-datum.
    initialization.
    y_s_mnth-sign   = 'I'.
    y_s_mnth-option = 'BT'.
    y_s_mnth-low    = sy-datum - 30.    "first_day
    y_s_mnth-high   = sy-datum.         "last_day
    append y_s_mnth.
    clear  y_s_mnth.
    Regards,
    Sagar

  • How to schedule Job for data uploading from source to BI

    Hi to all,
    How to schedule Job for data uploading from source to BI,
    Why we required and how we do it.
    As I am fresher in BI, I need to know from bottom.
    Regards
    Pavneet Rana

    Hi.
    You can create [process chain |http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/502b2998-1017-2d10-1c8a-a57a35d52bc8?quicklink=index&overridelayout=true]for data loading pocess and schedule start process to any time/date etc ...
    Regadrs.

  • Problem with select range for a character type field. Kindly Help! Urgent!

    Hi Experts,
        I have to write a report to pull data from a table BUT000 for a selected range of  BPEXT field values in selection screen.
        In the table BUT000, the BPEXT field is type char. Now what is happening is that if the user gives a range in selection screen from 1000 to 1010 the query pulls all the records where teh forst character starts from 1.
    For example if the table has
        BPEXT
        1
        10
        100
        101
        1000
        1001
        1002
        1005
        1010
        20
        200
        2000
    Then my query pulls
       BPEXT
        101
        1000
        1001
        1002
        1005
        1010
       Instead it should pull only
       BPEXT
        1000
        1001
        1002
        1005
        1010
        My guess this is because the BPEXT field is of CHAR type instead of numeric.
        What shall i do to solve this problem? Kindly help please!   
    Thanks
    Gopal
    Message was edited by:
            gopalkrishna baliga

    Hi Chakradhar,
        How to find the conversion exit for BPEXT field?
        How to use the conversion exit in a select query in my ABAP report? Any sample code will be really helpfull.
       Please help!
    Thanks
    Gopal

  • DMS :Select Range for User defined fields in Classification Tab in CV04N

    Dear All,
    We have added User Define Fields Date field in Classification Tab in CV04N Transaction But it has single search (parameter) where we need to have Date range selection (Like Select Option) for the documents.
    I request you to suggest me some solution whether it is possible to achieve with any standard configuration as it is very critical to the Business .
    I would appreciate for your quick response and support.
    Thanks in Advance,
    Regards,
    Vishal.

    Dear Ravindra,
    Actually My requirement is when we enter the exact date in the input field its giving the documents submitted on that date.But when i give date range its not displaying the any documents where the document submited in between those two dates.
    Ex: I have submitted the document ( in CV01N ) for the approval on 10.05.2010(this is the same field in classification).
    In the CV04N transaction ,classification tab if I enter date as 10.05.2010 its giving the document submitted on that date.but if I enter the two dates 01.05.2010 and 20.05.2010 where document is been created B/W the input dates.
    Please suggest how to fulfill my business requirement ,I also request to check any configuration for the user defined fields can solve this problem instead of selecting single value when it can select the range of values.
    Thanks for your earlier reply.
    Regards,
    Vishal.

  • How to select range of values (select-options) in BDC?

    Dear experts,
      I need to write a BDC program for the T-code CN72 where i need to  handle a range of intervals (select-options) for the WBS element field in the initial screen.I have done the recording. what is the logic in BDC to handle the range of intervals ?
    How do we handle the range of intervals?

    Hi,
      Suppose your select-option field name is N_PSPNR .then send the values as N_PSPNR-LOW = 'ABC'
        N_PSPNR-HIGH = '678' . In recording u will find the screen field name and what value is passed.
    regards
    Manish

  • Select Range of dates

    Hello,
    is it possible to use the <cfinput datefield> or the <cfcalendar> to allow users to select multiple range of dates.
    EG User wants to select some days in June, July and August.

    The cfcalendar only allows for blocking of range of Dates and not for multiple selection of dates.
    My client would want to select multiple dates like July 14, 17,25 Aug 25,26,28 at one shot from the calendar

  • Extraction problem - selection conditions for data load using abap program

    Hi All,
           I have a problem loading data over a selected period where the selection of date range is done using ABAP routine (type 6). Here though in the request header tab in monitor screen i'm able to see the selection date range populated correctly, no records are being extracted. But if i delete the abap filter and directly give the same date range for selection we are able to extract data. if any body has faced similar problem and have a solution for it please help me with yur suggestion.
    Thanks,
    nithin.

    It seems the the data range is not properly set in the routine.
    You can check the value of selection period generated by routine in the data selection tab-> execute button is there .
    Click it to to test the selection values generated by the ABAP routine..
    If the value here seems correct one then paste the code of the routine that u have written with brief logic details that u have applied.
    Sonal.....

  • How to change language for date in ipad.

    Hi,
    I have ipad 4 with iOS 7.1. I bought it in Japan one week ago.Can any 1 tell me how to change the language for date. My calendar shows days and month typed in Japanese and I want to change it to English. I had selected my language as English, initially. Everything else is in English except for dates and months. I guess need to change some settings in the app calendars.

    Sorry, Settings >> General >> International >> Calendar. Change to Gregorian.

  • How do I search for data that's not there?

    Scenario:
    The store managers are supposed to upload the previous days data by 11am the following day.
    I have a table of stores (74 records, 1 for each store) and a table of events (3600+ records,1 for each store per day). When I look at the event data selecting a specific date, I can see I only have 71 records, but I can't easily tell which stores are missing.  I want to gather all the events for a date, then look for the store records and report only if the store is NOT there.  I have tried the following linking options:
    store.store_no (equal to link) event.store_no (gives all 71 event records, as expected, but not the ones that aren't there)
    store.store_no (not equal to link) event.store_no (gives all 71 event records, for each store record, store1, event 1, store1, event2, store2, event1, stove2, event2, etc) I believe this is because it's looking for the store match first, not the date, then the store)
    store.store_no (left outer join) event.store_no (gives all 71 event records, as expected, but not the ones that aren't there at the bottom, like the help states)
    I thought of subreport too, but you can't like on what's not there.
    does anybody have any clues?
    BTW, I'm using 8.5 but can change to 10.
    Thanks,
    Clare

    Carl,
    Thanks so much. I took we a while to get the formatting correct, here's what I ended up with:
    SELECT
        store."store_number", store."address1"
    FROM
        "sac"."store" LEFT OUTER JOIN (SELECT * from "sac"."posj_event"  WHERE  posj_event."business_date" = {d '2009-07-08'} ) ev  ON store."store_number"=ev."store"   
    WHERE
        ev."store" is null
    ORDER BY
        store."store_number" ASC
    My original report was set to look for CurrentDate-1, which translated to {d '2009-07-08'} will that still work here?
    Clare

  • How to define ranges for a keyfigure

    Hi Frnds,
    I have two keyfigures for employee experience. One for present company experience and the second for previouse experience. And I have created a calculated keyfigure for calculating the total employee experience by adding the those two keyfigures.
    Here I want to design a query using the range values for that calculated keyfiger values. And for that range i want to display count i.e the no. of employees.
    for eg:
    range   | TotalYrsof exp
    <1       |  10
    1-2      |  20
    3-5      |  30
    6-10    |   40
    So anybody pls help me in this problem.
    Here How can I define ranges for that calculated keyfigure?
    Is there any other way to define ranges?
    Thanks in advance,
    Sridhar

    Hi,
    Create a Cal.Keyfigure on Total Exp. and use that for another cal keyfigure
    Example for  <1
    Total Exp <1
    for 1-2
    Total Exp >=1 AND Total Exp <=2
    for 3-5
    Total Exp >=3 AND Total Exp <=5
    and so on...
    Thanks,

Maybe you are looking for