Splitting Select Options

Hi All,
I am facing a problem in splitting the Select options for my screen. What I have to do is I am expecting the User to enter around 5000 records in the Select Options. I have to use 2000 records at a time for processing, which means three set of records of 2000, 2000 and 500.
Can you please tell me how can this be achieved??

Are you sure that even reducing the SELECT-OPTION to package of 2000 will be enough, in some database the system will raise an error related to a too large SQL statement.
Splitting an internal table (as SELECT-OPTIONS are) is very easy. (see bellow)
But be aware that some records may be exclusions, like :
- SIGN = 'E' and OPTION is one of the positive operator like EQ, BT or CP
- SIGN = 'I' and OPTION is one of the negative operator (every operator except the three previous)
Those records must be in every package of selection
so loop at select-options
- put the exclusion in a first internal table
loop once again at select-options excluding the records of the previous loop
- append to a temporary internal table
- when number of record equal maximal number allowed for a SQL SELECT minus the number of record in the first internal table, execute the SELECT, clear the temporary internal table
To bypass this problem
- don't use those record to build the partial select-options but delete records after select from database
- You could(should) consider restricting select-options allowed options ([SELECT_OPTIONS_RESTRICT|http://wiki.sdn.sap.com/wiki/display/Snippets/RestrictSelectOptions]) so you wont have to execute this and only have to split an internal table with statement like [APPEND|http://help.sap.com/abapdocu_70/en/ABAPAPPEND.htm] [LINES OF jtab [FROM idx1] [TO idx2] |http://help.sap.com/abapdocu_70/en/ABAPAPPEND_LINESPEC.htm#&ABAP_ALTERNATIVE_3@3@]
Regards,
Raymond

Similar Messages

  • Select-options split date into month and assign to low and high

    Hi,
       In my select-options i am giving BEDAT (01.04.2004 TO 30.10.2005).I need to split month and
    year in separate fields.that is
    select-option_low-month in one field
    select-option_high-month in second field
    select-option_low-year in third field
    select-option_high-year in fourth field.
    Finally i need to move these four fields to it_final.
    select * from mbewh into corresponding fields of table it_mbewh
               for all entries in it_final where matnr = it_final-matnr and
               bwkey = it_final-werks and lpmon = ? and lfgja = ?
               and  bklas <> ' '.
    what input i have to give in lpmon and lfgja in select query to get for lfmon (04 to 10)
    and lfgja (2004 to 2005).
    suggest some ideas.

    Hi ,
    Can you please check the following code.
    Hi ,
    data :  l_low_yr(4),
              l_high_yr(4),
              l_low_mon(2),
              l_high_mon(2).
    Splitting the select option date to month and year into low and higher values
    l_low_yr        =   s_date-low+00(04). "  Year low value from the date range
    l_low_mon    =   s_date-low+04(02). "  Month low value from the date range
    l_high_yr      =   s_date-high+00(04)."  Year high value from the date range
    l_high_mon   =   s_date-high+04(02)." Month high value from the date range
    selecting the data from the table mbewh based on some conditions.
    select * from mbewh into corresponding fields of table it_mbewh
               for all entries in it_final where matnr = it_final-matnr and
               bwkey = it_final-werks and lfmon BETWEEN  l_low_mon and l_high_mon
    and lfgja BETWEEN l_low_yr and l_high_yr   and  bklas EQ  ' '.
    This select will retrive the desired data records from the table MBEWH.
    Please let me know if this works according to your requirement.
    Thanks and Regards
    Saritha

  • Report text element as selection option

    Hi,
      I encounter a performance problem in a report program that include a self define fields in the selection option.  I use the FM READ_TEXT to read those fields and compare with the user input.Then, eliminates those unmatched records with if else statement.
    Here is my code:
    SELECT-OPTIONS: S_WADAT FOR LIKP-WADAT_IST.
      PARAMETERS: P_MAWB LIKE WA_REPORT-KZABE.
      PARAMETERS: P_HAWB LIKE LIKP-BOLNR.
      PARAMETERS: P_MATNR LIKE LIPS-MATNR.
      PARAMETERS: P_LOT(20) TYPE C.
      CLEAR: I_REPORT,I_DELIVERY,I_DELIVERY_INFO.
      REFRESH: I_REPORT,I_DELIVERY,I_DELIVERY_INFO.
      DATA WHERE_TAB(80) OCCURS 10 WITH HEADER LINE.
      DATA: BEGIN OF LTEXT OCCURS 50.
              INCLUDE STRUCTURE TLINE.
      DATA: END OF LTEXT.
      IF NOT P_HAWB IS INITIAL.
        CONCATENATE ' BOLNR = ' WHERE_TAB INTO WHERE_TAB.
        CONCATENATE WHERE_TAB '''' INTO WHERE_TAB.
        CONCATENATE WHERE_TAB P_HAWB INTO WHERE_TAB.
        CONCATENATE  WHERE_TAB '''' INTO WHERE_TAB.
        APPEND WHERE_TAB.
      ENDIF.
      IF NOT P_MATNR IS INITIAL.
        IF NOT WHERE_TAB IS INITIAL.
          CONCATENATE ' AND MATNR = ' WHERE_TAB INTO WHERE_TAB.
        ELSE.
          CONCATENATE ' MATNR = ' WHERE_TAB INTO WHERE_TAB.
        ENDIF.
        CONCATENATE WHERE_TAB '''' INTO WHERE_TAB.
        CONCATENATE WHERE_TAB P_MATNR INTO WHERE_TAB.
        CONCATENATE  WHERE_TAB '''' INTO WHERE_TAB.
        APPEND WHERE_TAB.
      ENDIF.
      SELECT A1~VBELN
             WADAT_IST
             BOLNR
             C1~LIFNR
             B1~MATNR
             LFIMG
             BTGEW
             B1~CHARG
        INTO CORRESPONDING FIELDS OF TABLE TMP_REPORT
        FROM LIKP AS A1 JOIN LIPS AS B1 ON A1~VBELN = B1~VBELN
            JOIN MCHA AS C1 ON B1~MATNR = C1~MATNR
                               AND
                               B1~WERKS = C1~WERKS
                               AND
                               B1~CHARG = C1~CHARG
         WHERE LFART = 'EL'
               AND
               WADAT_IST IN S_WADAT
               AND
               B1~CHARG NE ''
               AND
               B1~WERKS = 'ABC'
               AND
               (WHERE_TAB)
      SORT TMP_REPORT BY VBELN.
      DATA: V_FLAG TYPE I,
            V_EXCLUDE TYPE I,
            V_LOT_EXCLUDE TYPE I.
      V_FLAG = 0.
      V_EXCLUDE = 0.
      V_LOT_EXCLUDE = 0.
      IF SY-SUBRC = 0.
    * trim the parameter space
        SHIFT P_MAWB RIGHT DELETING TRAILING SPACE.
        SHIFT P_MAWB LEFT DELETING LEADING SPACE.
        SHIFT P_LOT RIGHT DELETING TRAILING SPACE.
        SHIFT P_LOT LEFT DELETING LEADING SPACE.
        LOOP AT TMP_REPORT.
          AT NEW VBELN.
            V_FLAG = 1.
            V_EXCLUDE = 0.
          ENDAT.
          IF V_FLAG = 1.
            PERFORM GET_HEADER_TEXT
                  TABLES
                       LTEXT
                  USING
                       'Z3IH'
                        TMP_REPORT-VBELN
            READ TABLE LTEXT INDEX 1.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-VERUR TMP_REPORT-VERUR.
            READ TABLE LTEXT INDEX 2.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-KZGBE TMP_REPORT-KZGBE.
            READ TABLE LTEXT INDEX 3.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-KZABE TMP_REPORT-KZABE.
            READ TABLE LTEXT INDEX 4.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-STABE TMP_REPORT-STABE.
            READ TABLE LTEXT INDEX 5.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-PRONU TMP_REPORT-PRONU.
            READ TABLE LTEXT INDEX 6.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-LADEL TMP_REPORT-LADEL.
            SHIFT TMP_REPORT-KZABE RIGHT DELETING TRAILING SPACE.
            SHIFT TMP_REPORT-KZABE LEFT DELETING LEADING SPACE.
            MOVE-CORRESPONDING TMP_REPORT TO WA_REPORT.
            MOVE-CORRESPONDING TMP_REPORT TO WA_TMPREPORT.
            V_FLAG = 0.
          ELSE.
            MOVE TMP_REPORT-VBELN TO WA_REPORT-VBELN.
            MOVE TMP_REPORT-LIFNR TO WA_REPORT-LIFNR.
            MOVE TMP_REPORT-MATNR TO WA_REPORT-MATNR.
            MOVE TMP_REPORT-LFIMG TO WA_REPORT-LFIMG.
          ENDIF.
          PERFORM GET_LOT_CODE USING
                                     WA_REPORT-MATNR
                                     '3LTU'
                                     WA_TMPREPORT-CHARG
                                     WA_REPORT-LOT.
          IF V_EXCLUDE  1 AND P_MAWB NE ''
            AND WA_TMPREPORT-KZABE NE P_MAWB .
            V_EXCLUDE = 1.
          ENDIF.
          SHIFT WA_REPORT-LOT RIGHT DELETING TRAILING SPACE.
          SHIFT WA_REPORT-LOT LEFT DELETING LEADING SPACE.
          IF P_LOT NE '' AND P_LOT NE WA_REPORT-LOT.
            V_LOT_EXCLUDE = 1.
          ELSE.
            V_LOT_EXCLUDE = 0.
          ENDIF.
          IF V_EXCLUDE  1 AND V_LOT_EXCLUDE  1.
            APPEND WA_REPORT TO I_REPORT.
            CLEAR WA_REPORT.
            CLEAR TMP_REPORT.
          ENDIF.
        ENDLOOP.

    Hi,
    i found one perfromance issue, try to remove the "INTO CORRESPONDING FIELDS OF TABLE " in your select statement, the order of the fields that you are fetching and the oreder for the fields in your internal table structure should be same, then you can remove "INTO CORRESPONDING FIELDS OF TABLE " and while fetching the fields reffer the table and fields you need to fetch here also you need to main the same order...like you have to do the same in where condition.
    Reward if needful.
    Thanks,
    Sreeram.

  • How to get dynamic select options from logical database?

    Hi,
    in one of my extended reports (means - overwritten standard SAP functionality in Z-namespace) I'm using LDB 'DDF'. I've been requested to validate some of the dynamic selection options (for example - field HKONT at Document level) and to split the logic depending on the particular value(s).
    Tracking what is happened in the LDB program I found that this select option is added as dynamic WHERE clause to the SELECT statement - in a way:
    WHERE bukrs = p_burks AND ... AND
    (where_tab)
    Is there a way to get values of these LDB dynamic select options into my report and if yes - how?
    Thanks in advance.
    Regards,
    Ivaylo Mutafchiev
    Senior SAP Abap Consultant

    Hi,
    Try to use the following fm in your report and check
      call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
        exporting
          curr_report        = sy-cprog
          mode_write_or_move = 'M'
        importing
          p_trange           = gt_dyn_trange
        exceptions
          not_found          = 1
          wrong_type         = 2
          others             = 3.
    PS please make a whereused of this fm , how it has been used in LDB's to get dynmic selection values

  • Select Options in custom controller

    Hi,
    Any one please let me know how to put select options on custom container. I need to display select options based on the input a tree and a report should be displayed in the same screen along with input screen.
    So I planned object oriented program to split screen to display tree and report. and again I split left side container to 2 containers. Now I want put the selection screen on left top container.
    Please help.
    Chandra

    What you can do is the following:
    Define a Container Object on one side of the screen to place the ALV Tree, and a Subscreen area on the other side, so you can place your select-options right there:
    You can define the select-options this way:
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    SELECT-OPTIONS : s_ebeln FOR ekko-ebeln ,
    s_ebelp FOR ekpo-ebelp .
    SELECTION-SCREEN END OF SCREEN 100 .
    And then in the flow logic of your dynpro, assign this selection screen to your subscreen area. (Called SUB1 in this case)
      call subscreen sub1 including sy-repid '0100'.
    Regards

  • Error in Select-Option

    Hi Experts,
    In my report i need to declare a select-option . This select-option is a combination of Period and fiscal year i..e the values in the select-option should be like
    <b>PPP/YYYY</b> period and year need to be separated by <b>"/".</b>
    I had declared in that format. <b>Here the period starts from 001-012</b>.So when ever the User enters <b>010/2005</b> in low and <b>007/2007</b> in high it is giving an error that <b>Lower limit is greater than Higher limit</b> .

    Technically, I think you could actually achive this with the use of a custom data domain and on that domain refer to a custom conversion exit...this would mean that the value typed by the user in "PPP/YYYY" format could be converted immediately into "YYYYPPP" or whatever internally before screen validation kicks in... e.g. (logic below needs more work!!):
    function conversion_exit_zppyy_input.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(INPUT)
    *"  EXPORTING
    *"     REFERENCE(OUTPUT)
    * Data should be in form PPP/YYYY
      data:
        l_ppp(3)            type c,
        l_yyyy(4)           type c.
      output = input.
    *" add some validation here...
      split output at '/'
        into l_ppp l_yyyy.
    *" add more validation here
      if sy-subrc is initial.
    *" make it into YYYYPPP format
        concatenate l_yyyy l_ppp into output.
      endif.
    endfunction.
    You'd probably need an equivalent 'conversion_exit_zppyy_output" function too.
    The question remaining in my mind is what you are going to do with the values once you have them in the range table...?  And what if user inputs wildcards etc?
    Jonathan

  • Header Text selection Option

    Hi,
      I have developed a report which include a number of fields that come from the header text of the document.  Besides, those fields are also used as the selection options.  So, I use the function module READ_TEXT to retrieve it and compare it.  The problem is the performance of the report is very bad.  It takes 3 mins to get 3 records.   Is there any way to resolve this??
    SELECT-OPTIONS: S_WADAT FOR LIKP-WADAT_IST.
      PARAMETERS: P_MAWB LIKE WA_REPORT-KZABE.
      PARAMETERS: P_HAWB LIKE LIKP-BOLNR.
      PARAMETERS: P_MATNR LIKE LIPS-MATNR.
      PARAMETERS: P_LOT(20) TYPE C.
      CLEAR: I_REPORT,I_DELIVERY,I_DELIVERY_INFO.
      REFRESH: I_REPORT,I_DELIVERY,I_DELIVERY_INFO.
      DATA WHERE_TAB(80) OCCURS 10 WITH HEADER LINE.
      DATA: BEGIN OF LTEXT OCCURS 50.
              INCLUDE STRUCTURE TLINE.
      DATA: END OF LTEXT.
      IF NOT P_HAWB IS INITIAL.
        CONCATENATE ' BOLNR = ' WHERE_TAB INTO WHERE_TAB.
        CONCATENATE WHERE_TAB '''' INTO WHERE_TAB.
        CONCATENATE WHERE_TAB P_HAWB INTO WHERE_TAB.
        CONCATENATE  WHERE_TAB '''' INTO WHERE_TAB.
        APPEND WHERE_TAB.
      ENDIF.
      IF NOT P_MATNR IS INITIAL.
        IF NOT WHERE_TAB IS INITIAL.
          CONCATENATE ' AND MATNR = ' WHERE_TAB INTO WHERE_TAB.
        ELSE.
          CONCATENATE ' MATNR = ' WHERE_TAB INTO WHERE_TAB.
        ENDIF.
        CONCATENATE WHERE_TAB '''' INTO WHERE_TAB.
        CONCATENATE WHERE_TAB P_MATNR INTO WHERE_TAB.
        CONCATENATE  WHERE_TAB '''' INTO WHERE_TAB.
        APPEND WHERE_TAB.
      ENDIF.
      SELECT A1~VBELN
             WADAT_IST
             BOLNR
             C1~LIFNR
             B1~MATNR
             LFIMG
             BTGEW
             B1~CHARG
        INTO CORRESPONDING FIELDS OF TABLE TMP_REPORT
        FROM LIKP AS A1 JOIN LIPS AS B1 ON A1~VBELN = B1~VBELN
            JOIN MCHA AS C1 ON B1~MATNR = C1~MATNR
                               AND
                               B1~WERKS = C1~WERKS
                               AND
                               B1~CHARG = C1~CHARG
         WHERE LFART = 'EL'
               AND
               WADAT_IST IN S_WADAT
               AND
               B1~CHARG NE ''
               AND
               B1~WERKS = 'ABC'
               AND
               (WHERE_TAB)
      SORT TMP_REPORT BY VBELN.
      DATA: V_FLAG TYPE I,
            V_EXCLUDE TYPE I,
            V_LOT_EXCLUDE TYPE I.
      V_FLAG = 0.
      V_EXCLUDE = 0.
      V_LOT_EXCLUDE = 0.
      IF SY-SUBRC = 0.
    * trim the parameter space
        SHIFT P_MAWB RIGHT DELETING TRAILING SPACE.
        SHIFT P_MAWB LEFT DELETING LEADING SPACE.
        SHIFT P_LOT RIGHT DELETING TRAILING SPACE.
        SHIFT P_LOT LEFT DELETING LEADING SPACE.
        LOOP AT TMP_REPORT.
          AT NEW VBELN.
            V_FLAG = 1.
            V_EXCLUDE = 0.
          ENDAT.
          IF V_FLAG = 1.
            PERFORM GET_HEADER_TEXT
                  TABLES
                       LTEXT
                  USING
                       'Z3IH'
                        TMP_REPORT-VBELN
            READ TABLE LTEXT INDEX 1.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-VERUR TMP_REPORT-VERUR.
            READ TABLE LTEXT INDEX 2.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-KZGBE TMP_REPORT-KZGBE.
            READ TABLE LTEXT INDEX 3.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-KZABE TMP_REPORT-KZABE.
            READ TABLE LTEXT INDEX 4.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-STABE TMP_REPORT-STABE.
            READ TABLE LTEXT INDEX 5.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-PRONU TMP_REPORT-PRONU.
            READ TABLE LTEXT INDEX 6.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-LADEL TMP_REPORT-LADEL.
            SHIFT TMP_REPORT-KZABE RIGHT DELETING TRAILING SPACE.
            SHIFT TMP_REPORT-KZABE LEFT DELETING LEADING SPACE.
            MOVE-CORRESPONDING TMP_REPORT TO WA_REPORT.
            MOVE-CORRESPONDING TMP_REPORT TO WA_TMPREPORT.
            V_FLAG = 0.
          ELSE.
            MOVE TMP_REPORT-VBELN TO WA_REPORT-VBELN.
            MOVE TMP_REPORT-LIFNR TO WA_REPORT-LIFNR.
            MOVE TMP_REPORT-MATNR TO WA_REPORT-MATNR.
            MOVE TMP_REPORT-LFIMG TO WA_REPORT-LFIMG.
          ENDIF.
          PERFORM GET_LOT_CODE USING
                                     WA_REPORT-MATNR
                                     '3LTU'
                                     WA_TMPREPORT-CHARG
                                     WA_REPORT-LOT.
          IF V_EXCLUDE <> 1 AND P_MAWB NE ''
            AND WA_TMPREPORT-KZABE NE P_MAWB .
            V_EXCLUDE = 1.
          ENDIF.
          SHIFT WA_REPORT-LOT RIGHT DELETING TRAILING SPACE.
          SHIFT WA_REPORT-LOT LEFT DELETING LEADING SPACE.
          IF P_LOT NE '' AND P_LOT NE WA_REPORT-LOT.
            V_LOT_EXCLUDE = 1.
          ELSE.
            V_LOT_EXCLUDE = 0.
          ENDIF.
          IF V_EXCLUDE <> 1 AND V_LOT_EXCLUDE <> 1.
            APPEND WA_REPORT TO I_REPORT.
            CLEAR WA_REPORT.
            CLEAR TMP_REPORT.
          ENDIF.
        ENDLOOP.
    Regards,
    Kit

    Here is my code
      FORM GET_LOT_CODE USING MATCODE PLANT BATCH LOT_CODE.
      DATA: W_OBJECTTAVLE LIKE BAPI1003_KEY-OBJECTTABLE VALUE 'MCHA',
            W_CLASSNUM LIKE BAPI1003_KEY-CLASSNUM VALUE 'Z003',
            W_CLASSTYPE LIKE BAPI1003_KEY-CLASSTYPE VALUE '022',
            IT_ALLOCVALUESNUM LIKE BAPI1003_ALLOC_VALUES_NUM OCCURS 0,
            IT_ALLOCVALUESCHAR LIKE BAPI1003_ALLOC_VALUES_CHAR OCCURS 0,
            WA_ALLOCVALUESCHAR LIKE BAPI1003_ALLOC_VALUES_CHAR,
            IT_ALLOCVALUESCURR LIKE BAPI1003_ALLOC_VALUES_CURR OCCURS 0,
            IT_RETURN LIKE BAPIRET2 OCCURS 0.
      DATA: BEGIN OF IT_OBJECT OCCURS 0.
              INCLUDE STRUCTURE BAPI1003_OBJECT_KEYS.
      DATA: END OF IT_OBJECT.
      DATA: W_OBJECT LIKE BAPI1003_KEY-OBJECT.
      CLEAR: IT_OBJECT, IT_RETURN.
      REFRESH: IT_OBJECT, IT_RETURN.
      IT_OBJECT-KEY_FIELD = 'MATNR'.
      IT_OBJECT-VALUE_INT = MATCODE.
      APPEND IT_OBJECT.
      IT_OBJECT-KEY_FIELD = 'WERKS'.
      IT_OBJECT-VALUE_INT = PLANT.
      APPEND IT_OBJECT.
      IT_OBJECT-KEY_FIELD = 'CHARG'.
      IT_OBJECT-VALUE_INT = BATCH.
      APPEND IT_OBJECT.
      CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'
           EXPORTING
                OBJECTTABLE    = 'MCHA'
           IMPORTING
                OBJECTKEY_CONC = W_OBJECT
           TABLES
                OBJECTKEYTABLE = IT_OBJECT
                RETURN         = IT_RETURN.
      CLEAR: IT_RETURN.
      REFRESH: IT_RETURN.
      CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
           EXPORTING
                OBJECTKEY       = W_OBJECT
                OBJECTTABLE     = W_OBJECTTAVLE
                CLASSNUM        = W_CLASSNUM
                CLASSTYPE       = W_CLASSTYPE
           TABLES
                ALLOCVALUESNUM  = IT_ALLOCVALUESNUM
                ALLOCVALUESCHAR = IT_ALLOCVALUESCHAR
                ALLOCVALUESCURR = IT_ALLOCVALUESCURR
                RETURN          = IT_RETURN.
      LOOP AT IT_ALLOCVALUESCHAR INTO WA_ALLOCVALUESCHAR.
        IF WA_ALLOCVALUESCHAR-CHARACT = 'Z_VENDOR_LOT_NUMBER'.
          LOT_CODE = WA_ALLOCVALUESCHAR-VALUE_CHAR.
        ENDIF.
      ENDLOOP.
    ENDFORM.

  • Attributes select-options in form view.

    How to make UI form view context attributes multiple selection ?
    Ex: Employee Id attributes. I need provide this employee id like select-options in form view.
    Thanks,
    kaaviya

    Hi,
    this is an interesting requirement.
    please correct me if my understanding is wrong, do you mean that you want to enable a function like:
    employee ID = 3271 or 3270
    if we take this field in employee IC employee identification for example, you'd like to enable customer to enter more than one ID to start the search without using wildcard (as sometimes wildcard does not help)
    if this is your requirement, maybe try to check the following?
    here is an example for account ID search
    I enter Account ID = 3271;3270 and start search
    in
    CL_ICCMP_BP_BUPASEARCHB2B_IMPL
    FIRE_QUERY
    it will
    er_bo_col  ?= iv_query_service->get_query_result( ).
    how about use a loop to make two query?
    In the above example,
    IV_QUERY_SERVICE->PARAM_STRUCT_REF->PARTNER = 3271;3270
    maybe try to split the string with ; and start the query until the end of this string.
    and then combine the two collection?
    Hongyan

  • "WHERE field IN select-options" alternative

    I currently have a report that uses
    SELECT-OPTIONS so_num FOR qmih-qmnum.
    SELECT * FROM qmih INTO TABLE t_qmih
       WHERE qmnum IN so_num.
    Now, this works fine unless the user selects a large number of individual items in the select options, e.g. 7,000 individual qmnums, in which case I get an ABAP error.
    The dump contains the following helpful information:
    How to correct the error                                                                               
    The SAP Open SQL statement must be divided into several smaller units.
    If the problem occurred due to the use of an excessively large table  
    in an IN itab construct, you can use the addition FOR ALL ENTRIES     
    instead.                                                              
    When you use this addition, the statement is split into smaller units 
    according to the restrictions of the database system used.                                                                               
    You may able to find an interim solution to the problem               
    in the SAP note system. If you have access to the note system yourself,
    use the following search criteria:                                    
    Could anyone give me an idea of how I could fix this?

    Hi Chandrasekhar,
    very interesting statement but not necessarily correct.
    Select-options declares a range-type internal table with header line. The number of table rows is limited by the system memory storage available.
    Oracle database has a fixed limit of 32KB for the length of the select statement. The open SQL database interface will resolve the range table resulting in the right number of comparison expressions.
    If the user puts too many values into select-options, he will probably copy single values which are represented by SIGN = 'I' and OPTION = 'EQ'.
    Try this (example):
    select-options:
      s_matnr for mara-matnr.
    data:
      lt_value like hashed table of s_matnr-low with unique key table_line. "avoid duplicates
    fiels-symbols:
      <any> type any,
      <value> type any.
    loop at s_matnr assigning <any>
      where sign = 'I' and option = 'EQ'.
      assign component 'LOW' of structure <any> to <field>.
      insert <field> into table t_value.
      delete s_matnr.
    endloop.
    select ...
      into table ...
      from ...
      for all entries in lt_value
      where matnr = lt_value-table_line.
    if lines( s_matnr ) > 0.
    select ...
      appending table ...
      from ...
      where matnr in s_matnr.
    endif.
    Now you've got them all.
    Regards,
    Clemens

  • Add Select Options To ViewContainerUIElement in a TabStrip

    Hello,
    Finally, I have been able to add select options progammatically. But what I would like to do is to split them up using tabstrips.  I have searched the forum but have not seen a way to place select options into the ViewContainerUIElement.  I have seen where you can embed a view.
    I mean I sould be able to take the object and apply the same code for adding the select options.
    Can anyone provide me with some assisance?
    Regards, Dean.

    Hi Sachin,
    The only way you could do this is by copying the program PP_PICK_LIST to a Z program & then later in the include INCLUDE PPPLSEL you have to put your Select-option for Purchasing group by copying the include to a Z program.
    Also you have to debug & understand the flow of the program & find out the exact place where you can add logic for your select options.
    Regards
    Abhii

  • Limitation of using select-options or ranges

    Hi
    I have the following code to fill the select-option AUFNR with the orders from SEL_TAB table, which I have to submit to another report to get a result set.
    LOOP AT SEL_TAB.
       MOVE: 'I'   TO AUFNR-SIGN,
             'EQ'  TO AUFNR-OPTION,
             SEL_TAB-AUFNR TO AUFNR-LOW.
      APPEND AUFNR.
    ENDLOOP.
    I know that we can use the RANGES option also for the above scenario since I don't display the select-option AUFNR in my selection screen.
    My question is, is there any limitation to how many number of values the RANGES or SELECT-OPTIONS can hold? Is it 200 or 256? I am not sure of this figure, can anyone give the exact number?
    Thanks,
    Bala.

    Hi Bala,
      there's not SAP limitations for range dimension but there is a limitation about native SQL statement size.
    In fact an open SQL statement (in ABAP language) will be translated in native SQL .
    For example:
    select * from mara where matnr in r_mara
    will be translated in
    SELECT ... FROM MARA WHERE MATNR = value1 OR MATNR = value2 etc...
    So if your range is too large, the native SQL will exceed the maximum length (and short dump will occur).
    with the following simple trick you can bypass the problem:
    describe table rng_ebeln_marc lines i.
    if i > 0.
      if i <= max_rng_rows.   "MAX NUMBER OF RANGE LINES
        select *
          from ekbe
          into table tekbe
         where ebeln in rng_ebeln_marc.
      else.
        from_i = 1.
        to_i = max_rng_rows.
        clear new_ebeln_marc.
        do.
          if i < from_i.
            exit.
          endif.
          append lines of rng_matnr_mara from from_i to to_i to new_ebeln_marc.
          select *
            from ekbe
       appending table tekbe
           where ebeln in new_ebeln_marc.
           clear: new_ebeln_marc, new_ebeln_marc[].
           from_i = from_i + max_rng_rows.
          to_i = to_i + max_rng_rows.
        enddo.
      endif.
      sort tekbe by ebeln ebelp zekkn vgabe gjahr belnr buzei.
    endif.
    This will split the sql statement into more (and shorter) statements. The result will be joined.
    Let me know if you need further infos.
    Kind Regards, Manuel

  • 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

  • How To... Change the Data Type for a SELECT-OPTIONS at run time.

    Hello,
    I am trying to restrict the values available for entry into a SELECT-OPTIONS at run time depending on user input.
    The logic is as follows. The user has two input fields. A PARAMETER field which has the type RSDIOBJNM and allows them to choose an InfoObject. And the user has a SELECT-OPTIONS field to allow them to select the Characteristic values for that InfoObject.
    I would like the following example to be possible:
    The user enters 0MATERIAL into the PARAMETER. When the user clicks on the SELECT-OPTIONS control code will derive a list of possible options the user can enter in the SELECT-OPTIONS. In this case only values found in the master data or at least no values greater than 18 characters.
    I have looked at the following function module SELECT_OPTIONS_RESTRICT and this do not appear to be helpful as they only restrict on the signs allowed for the values (unless I misunderstand, it is a complex function module!).
    The code I have so far is (thus the user enters a InfoObject into p_char1 and the select options so_char1 should only accept active values of that InfoObject):
    declaration of variables for user interface
      DATA c_char(32) TYPE c.
    declaration of count variable
      DATA i_count TYPE i.
    declaration of user interface
      SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
        PARAMETERS: p_ipack TYPE RSLOGDPID.
      SELECTION-SCREEN END OF BLOCK a1.
      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
        PARAMETERS: p_char1 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char1  for c_char NO INTERVALS.
        PARAMETERS: p_char2 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char2  for c_char NO INTERVALS.
        PARAMETERS: p_char3 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char3  for c_char NO INTERVALS.
      SELECTION-SCREEN END OF BLOCK b1.
    Is what I am trying to do possible???
    Thanks for any help. Ross.

    You really want to restrict possible values of a select-option based on another field, not change the length of type of the select-option field, right?
    Here is what you do:  Code a custom F4 value help for the select-option at event AT SELECTION-SCREEN ON VALUE REQUEST FOR..  The first thing you do here is read the value of the parameter field (p_ipack in your example).  You can use function module DYNP_VALUES_READ.  Based on this value, you can propose values for the select-option fields.  Note that the use can still enter whatever s(he) wishes in to the select-option field without pressing F4. In this case, you will have to code some input validations taking into account the value in the p_ipack field.

  • Select-options in SELECT query - syntax error

    Hi all,
      I get the error below when I try to use the select options in a SELECT query . Please help me.
    "The IN operator with "SO_AWART" is followed neither by an internal
    table nor by a value list."
    The code i have used(Logical database  PNP is used):
    TABLES: pernr,
            catsdb.
    INCLUDE ztime_cwtr_top.    " global Data
    INCLUDE ztime_cwtr_f01.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    SELECT-OPTIONS SO_AWART FOR CATSDB-AWART.
    PARAMETERS P_THRES TYPE I.
    SELECTION-SCREEN END OF BLOCK B1.
    Get data from CATSDB table. Workdates within the date interval are considered.
      SELECT pernr workdate awart catsquantity beguz enduz status
      FROM catsdb
      INTO TABLE it_catsdb
      WHERE pernr  = pernr-pernr    AND
           workdate GE pn-begda     AND
           workdate LE pn-endda     AND
           status   IN ('20', '30') AND
           awart    IN  so_awart .
          awart    IN ('1100', '1137', '1138', '1139', '1140',
                      '1147', '1148', '1149', '1157', '2003' ).
    when I give the values directly i do not get any syntax error, but when I use select options in the where condition I get the syntax error.
    I have tried different options like using only the select-options in the where condition.
    Thanks in advance.....
    Madhu

    Solved.
    Code with syntax error:
    include z...top .
    include z...fo1.
    select-options: xxxxxxx
    Code  with no syntax error:
    select-options: xxxxxxx
    include z...top .
    include z...fo1.
    Thanks for all your help,
    Madhu

  • How to hide some select-option of Logical Database in report?

    How to hide select-option of  Logical Database in report?eg . In Logical Database 'PNP' , my code is 'GET  PERNR' , excute the report , select-screen is displayed . I want to hide some select-options , such as PNPPERNR-LOW .
    Edited by: rongrong wang  on Mar 26, 2008 9:31 AM

    U need to write code in initialization as
    initialization.
    loop at screen.
    if screen-name = 'PNPPERNR-LOW'.
    screen-active = '0'.
    modify screen.
    endif.
    if screen-name = 'PNPPERNR-HIGH'.
    screen-active = '0'.
    modify screen.
    endif.
    endloop.

Maybe you are looking for

  • Create Inbound Delivery from Outbound Delivery create

    Hi, This is what I am trying to do... 1. Create PO (me21n) 2. Create Outbound Delivery based on PO (VL10g) 3. PGI (this creates a DELVRY03 IDoc) (IDoc is created at this step, no issues so far) 4. Based on the Outbound DELVRY03 IDoc I want to create

  • Can I display html pages in flash player

    Hi all, Can I display html pages in flash player, i mean swf. Plz help me if it can be done. Can I call html pages in flash (i mean in flash player no new window) Thanks

  • Outlook will not open. asking to update browser.

    it is allowing to open in mobile only. asks to update browser and i did already. also, i do have a brand new pc, with windows 7. issue started on 1st opening of my hotmail acct.

  • Splitting Audiobook files

    Hello, I have an audiobook that I would like to burn as an audio CD. The main problem is that each of the seven files is at least two hours in length. How would one break it up as to fit across several CDs? I have a feeling that the word "GarageBand"

  • Availability in Slough SL2 5JA

    Hi, When can I expect to be able to receive BT Infinity in Slough / SL25JA / Kendal Drive? Solved! Go to Solution.