How to form an Endeca query where a field must start with certain letters

hi, Is it possible to form an Endeca query to retrieve a field that must start with certain letters? Say like get all users who's first letter is 'A' ? I checked with Range filters but it is supporting only numerical fields as well as Wild card search. But nothing worked well so far. any suggestion?

Yes. Here's the gist of how it works:
Typeahead is commonly implemented by enabling wildcard search on one or more Dimensions. An AJAX query is sent out containing the beginning of a search term. A controller in the app layer answers that AJAX query and formulates an Endeca Dimension Search query. It sends that off to the Endeca MDEX engine. Endeca responds with relevant Dimension matches. The controller returns these to the client who made the AJAX request. They are rendered as hyperlinks that lead to a particular navigation state in the catalog.

Similar Messages

  • How to write a SQL query in SAP B1 2007 B with input parameters?

    How to write a SQL query in SAP B1 2007 B with input parameters, on execution of which will ask for some input value from the user and the values will be selected from a list such as item list?

    The syntax like
    SELECT * FROM OITM T0 WHERE T0.ItemCode = '[%0\]'
    Thanks,
    Gordon

  • How can i set up mac mail so each line starts with a capital letter?

    how can i set up mac mail so each line starts with a capital letter? 

    I am pretty sure that this is not an option within Apple Mail.

  • Where do I get started with OAS and JSP ?

    Where do I get started with OAS and JSP ?
    Resources?
    Please point me in the right direction!
    Post and/or email me at [email protected]

    The simplest way is to read OAS4082 Documentation:
    Developer's Guide: JServlet and JSP Applications.

  • How to display subtotal in ALV, where the field is not a numeric.

    Hi
    We are having a requirement to display the sub total for a field using ALV grid display, where the field is not numeric.
    The field is characte, Status field(consists of values Submit, Approve ,Reject), where the subtotal should be value of count of group by status .
    say status with submit are 10 records, so after all records with submit status are, displyed, we need to display its subtotal as 10.
    Thanks & Advance

    Hi Satya,
    REPORT z_alv_subtotal.*&---------------------------------------------------------------------*
    *& Table declaration
    *&---------------------------------------------------------------------*TABLES: ekko.*&---------------------------------------------------------------------*
    *& Type pool declaration
    TYPE-POOLS: slis. " Type pool for ALV*&---------------------------------------------------------------------*
    *& Selection screen
    SELECT-OPTIONS: s_ebeln FOR ekko-ebeln.*&---------------------------------------------------------------------*
    *& Type declaration
    *&---------------------------------------------------------------------** Type declaration for internal table to store EKPO data
    TYPES: BEGIN OF x_data,
           ebeln  TYPE char30,  " Document no.
           ebelp  TYPE ebelp,   " Item no
           matnr  TYPE matnr,   " Material no
           matnr1 TYPE matnr,   " Material no
           werks  TYPE werks_d, " Plant
           werks1 TYPE werks_d, " Plant
           ntgew  TYPE entge,   " Net weight
           gewe   TYPE egewe,   " Unit of weight                          
           END OF x_data.*&---------------------------------------------------------------------*
    *& Internal table declaration
    DATA:* Internal table to store EKPO data
      i_ekpo TYPE STANDARD TABLE OF x_data INITIAL SIZE 0,
    * Internal table for storing field catalog information
      i_fieldcat TYPE slis_t_fieldcat_alv,
    * Internal table for Top of Page info. in ALV Display
      i_alv_top_of_page TYPE slis_t_listheader,
    * Internal table for ALV Display events
      i_events TYPE slis_t_event,
    * Internal table for storing ALV sort information
      i_sort TYPE  slis_t_sortinfo_alv,
      i_event TYPE slis_t_event.*&---------------------------------------------------------------------*
    *& Work area declaration
    *&---------------------------------------------------------------------*DATA:
      wa_ekko TYPE x_data,
      wa_layout     TYPE slis_layout_alv,
      wa_events         TYPE slis_alv_event,
      wa_sort TYPE slis_sortinfo_alv.*&---------------------------------------------------------------------*
    *& Constant declaration
    *&---------------------------------------------------------------------*CONSTANTS:
       c_header   TYPE char1
                  VALUE 'H',                    "Header in ALV
       c_item     TYPE char1
                  VALUE 'S'.*&---------------------------------------------------------------------*
    *& Start-of-selection event
    *&---------------------------------------------------------------------*START-OF-SELECTION.* Select data from ekpo
      SELECT ebeln " Doc no
             ebelp " Item
             matnr " Material
             matnr " Material
             werks " Plant
             werks " Plant
             ntgew " Quantity
             gewei " Unit
             FROM ekpo
             INTO TABLE i_ekpo
             WHERE ebeln IN s_ebeln
             AND ntgew NE '0.00'.  IF sy-subrc = 0.
        SORT i_ekpo BY ebeln ebelp matnr .
      ENDIF.* To build the Page header
      PERFORM sub_build_header.* To prepare field catalog
      PERFORM sub_field_catalog.* Perform to populate the layout structure
      PERFORM sub_populate_layout.* Perform to populate the sort table.
      PERFORM sub_populate_sort.* Perform to populate ALV event
      PERFORM sub_get_event.END-OF-SELECTION.* Perform to display ALV report
      PERFORM sub_alv_report_display.
    *&      Form  sub_build_header
    *       To build the header
    *       No Parameter
    FORM sub_build_header .* Local data declaration
      DATA: l_system     TYPE char10 ,          "System id
            l_r_line     TYPE slis_listheader,  "Hold list header
            l_date       TYPE char10,           "Date
            l_time       TYPE char10,           "Time
            l_success_records TYPE i,           "No of success records
            l_title(300) TYPE c.                " Title
    * Title  Display
      l_r_line-typ = c_header.               " header
      l_title = 'Test report'(001).
      l_r_line-info = l_title.
      APPEND l_r_line TO i_alv_top_of_page.
      CLEAR l_r_line.* Run date Display
      CLEAR l_date.
      l_r_line-typ  = c_item.                " Item
      WRITE: sy-datum  TO l_date MM/DD/YYYY.
      l_r_line-key = 'Run Date :'(002).
      l_r_line-info = l_date.
      APPEND l_r_line TO i_alv_top_of_page.
      CLEAR: l_r_line,
             l_date.ENDFORM.                    " sub_build_header
    *&      Form  sub_field_catalog
    *       Build Field Catalog
    *       No Parameter
    FORM sub_field_catalog .*  Build Field Catalog
      PERFORM sub_fill_alv_field_catalog USING:     '01' '01' 'EBELN' 'I_EKPO' 'L'
         'Doc No'(003) ' ' ' ' ' ' ' ',     '01' '02' 'EBELP' 'I_EKPO' 'L'
         'Item No'(004) 'X' 'X' ' ' ' ',     '01' '03' 'MATNR' 'I_EKPO' 'L'
         'Material No'(005) 'X' 'X' ' ' ' ',     '01' '03' 'MATNR1' 'I_EKPO' 'L'
         'Material No'(005) ' ' ' ' ' ' ' ',
         '01' '04' 'WERKS' 'I_EKPO' 'L'
         'Plant'(006) 'X' 'X' ' ' ' ',     '01' '04' 'WERKS1' 'I_EKPO' 'L'
         'Plant'(006) ' ' ' ' ' ' ' ',     '01' '05' 'NTGEW' 'I_EKPO' 'R'
         'Net Weight'(007) ' ' ' ' 'GEWE' 'I_EKPO'.ENDFORM.                    " sub_field_catalog*&---------------------------------------------------------------------*
    *&     Form  sub_fill_alv_field_catalog
    *&     For building Field Catalog
    *&     p_rowpos   Row position
    *&     p_colpos   Col position
    *&     p_fldnam   Fldname
    *&     p_tabnam   Tabname
    *&     p_justif   Justification
    *&     p_seltext  Seltext
    *&     p_out      no out
    *&     p_tech     Technical field
    *&     p_qfield   Quantity field
    *&     p_qtab     Quantity table
    FORM sub_fill_alv_field_catalog  USING  p_rowpos    TYPE sycurow
                                            p_colpos    TYPE sycucol
                                            p_fldnam    TYPE fieldname
                                            p_tabnam    TYPE tabname
                                            p_justif    TYPE char1
                                            p_seltext   TYPE dd03p-scrtext_l
                                            p_out       TYPE char1
                                            p_tech      TYPE char1
                                            p_qfield    TYPE slis_fieldname
                                            p_qtab      TYPE slis_tabname.* Local declaration for field catalog
      DATA: wa_lfl_fcat    TYPE  slis_fieldcat_alv.  wa_lfl_fcat-row_pos        =  p_rowpos.     "Row
      wa_lfl_fcat-col_pos        =  p_colpos.     "Column
      wa_lfl_fcat-fieldname      =  p_fldnam.     "Field Name
      wa_lfl_fcat-tabname        =  p_tabnam.     "Internal Table Name
      wa_lfl_fcat-just           =  p_justif.     "Screen Justified
      wa_lfl_fcat-seltext_l      =  p_seltext.    "Field Text
      wa_lfl_fcat-no_out         =  p_out.        "No output
      wa_lfl_fcat-tech           =  p_tech.       "Technical field
      wa_lfl_fcat-qfieldname     =  p_qfield.     "Quantity unit
      wa_lfl_fcat-qtabname       =  p_qtab .      "Quantity table  IF p_fldnam = 'NTGEW'.
        wa_lfl_fcat-do_sum  = 'X'.
      ENDIF.
      APPEND wa_lfl_fcat TO i_fieldcat.
      CLEAR wa_lfl_fcat.
    ENDFORM.                    " sub_fill_alv_field_catalog*&---------------------------------------------------------------------*
    *&      Form  sub_populate_layout
    *       Populate ALV layout
    *       No Parameter
    FORM sub_populate_layout .  CLEAR wa_layout.
      wa_layout-colwidth_optimize = 'X'." Optimization of Col widthENDFORM.                    " sub_populate_layout*&---------------------------------------------------------------------*
    *&      Form  sub_populate_sort
    *       Populate ALV sort table
    *       No Parameter
    FORM sub_populate_sort .* Sort on material
      wa_sort-spos = '01' .
      wa_sort-fieldname = 'MATNR'.
      wa_sort-tabname = 'I_EKPO'.
      wa_sort-up = 'X'.
      wa_sort-subtot = 'X'.
      APPEND wa_sort TO i_sort .
      CLEAR wa_sort.* Sort on plant
      wa_sort-spos = '02'.
      wa_sort-fieldname = 'WERKS'.
      wa_sort-tabname = 'I_EKPO'.
      wa_sort-up = 'X'.
      wa_sort-subtot = 'X'.
      APPEND wa_sort TO i_sort .
      CLEAR wa_sort.
    ENDFORM.                    " sub_populate_sort*&---------------------------------------------------------------------*
    *&      Form  sub_get_event
    *       Get ALV grid event and pass the form name to subtotal_text
    *       event
    *       No Parameter
    FORM sub_get_event .
      CONSTANTS : c_formname_subtotal_text TYPE slis_formname VALUE
    'SUBTOTAL_TEXT'.  DATA: l_s_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 4
        IMPORTING
          et_events       = i_event
        EXCEPTIONS
          list_type_wrong = 0
          OTHERS          = 0.* Subtotal
      READ TABLE i_event  INTO l_s_event
                        WITH KEY name = slis_ev_subtotal_text.
      IF sy-subrc = 0.
        MOVE c_formname_subtotal_text TO l_s_event-form.
        MODIFY i_event FROM l_s_event INDEX sy-tabix.
      ENDIF.ENDFORM.                    " sub_get_event*&---------------------------------------------------------------------*
    *&      Form  sub_alv_report_display
    *       For ALV Report Display
    *       No Parameter
    FORM sub_alv_report_display .
      DATA: l_repid TYPE syrepid .
      l_repid = sy-repid .* This function module for displaying the ALV report
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = l_repid
          i_callback_top_of_page   = 'SUB_ALV_TOP_OF_PAGE'
          is_layout                = wa_layout
          it_fieldcat              = i_fieldcat
          it_sort = i_sort
          it_events                = i_event
          i_default                = 'X'
          i_save                   = 'A'
        TABLES
          t_outtab                 = i_ekpo
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
    *    MESSAGE i000 WITH 'Error in ALV report display'(055).
      ENDIF.ENDFORM.                    " sub_alv_report_display*&---------------------------------------------------------------------*
    *       FORM sub_alv_top_of_page
    *       Call ALV top of page
    *       No parameter
    *---------------------------------------------------------------------*FORM sub_alv_top_of_page.                                   "#EC CALLED* To write header for the ALV
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = i_alv_top_of_page.
    ENDFORM.                    "alv_top_of_page*&---------------------------------------------------------------------*
    *&      Form  subtotal_text
    *       Build subtotal text
    *       P_total  Total
    *       p_subtot_text Subtotal text info
    FORM subtotal_text CHANGING
                   p_total TYPE any
                   p_subtot_text TYPE slis_subtot_text.
    * Material level sub total
      IF p_subtot_text-criteria = 'MATNR'.
        p_subtot_text-display_text_for_subtotal
        = 'Material level total'(009).
      ENDIF.* Plant level sub total
      IF p_subtot_text-criteria = 'WERKS'.
        p_subtot_text-display_text_for_subtotal = 'Plant level total'(010).
      ENDIF.
    ENDFORM.                    "subtotal_text
    Regards,
    Pravin

  • Required query perfomance tuning which has START WITH CONNECT BY PRIOR

    Hi,
    I have below small query and the CDDS table with 40+ million records.
    SELECT -LEVEL, COMPONENT_ID, COMPONENT_TYPE, COMPONENT_STATUS,
    PARENT_COMPONENT_ID, PARENT_COMPONENT_TYPE, other_info
    BULK COLLECT INTO ltbl_cdds_rec
    FROM CDDS
    START WITH
    PARENT_COMPONENT_ID IN
    ( SELECT dns_name
    FROM RAS_CARD
    WHERE ras_name = <<INPUT_PARAMATER>>
    AND parent_component_type = 'CT_NRP')
    CONNECT BY PARENT_COMPONENT_ID = PRIOR COMPONENT_ID;
    To process this query, its taking 3 hours.
    Please suggest the way forward to tune the query for better performance.

    Create statement for CDDS:
    CREATE TABLE CDDS
    COMPONENT_TYPE VARCHAR2(30 BYTE),
    COMPONENT_ID VARCHAR2(255 BYTE),
    PARENT_COMPONENT_TYPE VARCHAR2(30 BYTE),
    PARENT_COMPONENT_ID VARCHAR2(255 BYTE),
    COMPONENT_VERSION_NO VARCHAR2(30 BYTE),
    COMPONENT_STATUS VARCHAR2(30 BYTE),
    ODS_CREATE_DATE DATE,
    ODS_LAST_UPDATE_DATE DATE,
    OTHER_INFO VARCHAR2(255 BYTE)
    TABLESPACE APPL_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    NOMONITORING
    ENABLE ROW MOVEMENT;
    Create statement for RAS_CARD:
    CREATE TABLE RAS_CARD
    RAS_NAME VARCHAR2(20 BYTE),
    SLOT VARCHAR2(2 BYTE),
    RAS_CARD_ID VARCHAR2(30 BYTE),
    CARD_TYPE VARCHAR2(5 BYTE),
    IP_ADDRESS VARCHAR2(15 BYTE),
    DNS_NAME VARCHAR2(255 BYTE),
    STATUS VARCHAR2(15 BYTE),
    NRP_NO CHAR(2 BYTE),
    NRP_TOTAL_ALLOC_CAPACITY NUMBER(10),
    CREATED_BY VARCHAR2(10 BYTE),
    NRP_ALLOCATED_CAPACITY NUMBER(10),
    NIDB_DRA2_KEY VARCHAR2(15 BYTE),
    NIDB_DRN1_KEY CHAR(6 BYTE),
    ODS_CREATE_DATE DATE,
    LAST_UPDATED_BY VARCHAR2(10 BYTE),
    ODS_LAST_UPDATE_DATE DATE,
    WATERMARK NUMBER(38)
    TABLESPACE APPL_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOLOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    NOMONITORING;
    Explain Plan for the below query:
    select * from CDDS
    where PARENT_COMPONENT_ID IN
    ( SELECT dns_name
    FROM RAS_CARD
    WHERE ras_name = <<INPUT_PARAMATER>>
    | Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 1 | 107 | 12 | | |
    | 1 | TABLE ACCESS BY INDEX ROWID| CDDS | 1 | 62 | 1 | | |
    | 2 | NESTED LOOPS | | 1 | 107 | 12 | | |
    | 3 | SORT UNIQUE | | | | | | |
    |* 4 | TABLE ACCESS FULL | RAS_CARD | 4 | 180 | 6 | | |
    | 5 | PARTITION RANGE ITERATOR | | | | | KEY | KEY |
    |* 6 | INDEX RANGE SCAN | CDDS_I02 | 10 | | 1 | KEY | KEY |
    ---------------------------------------------------------------------------------------------

  • PowerShell add Printer Permissions where the printer name starts with...

    I have a printer server that has printers for multiple buildings. All the buildings have abbreviations like "BLD" for example, so my printers start with the same building abbreviations
    like “BLD-Printer1”. Is there a quick an easy way to set permissions on printers where the name starts with something like BLD?
    I'm a total noob with PS .<o:p></o:p>

    Just wanted to point out that in addition to using .NET/WMI to enumerate the printers, Windows 8 has a native PowerShell implementation you could use. It supports remote management, so you can even use it from a Windows 8 client to target your Windows Server
    2008 R2 instance. 
    $printers = Get-Printer -ComputerName $printServerName -Name bld*
    foreach ($printer in $printers) {
    Set-Printer -ComputerName $printServerName -Name $printer.Name -PermissionSDDL #fill in your permissions here
    Full description of these cmdlets: http://technet.microsoft.com/en-us/library/hh918357.aspx
    Excellent - Just fill in the SDDL.
    Does this work on WS2008R2 PrintManager Queues?  I find no -SDDL except on WS2012.  WS8 is missing this parameter. Is it only available on WS8 Enterprise?
    WS2008R2 also does not seem to support this.
    Get-Printer and its cousins are wrappers around The Q functions posted above.  The API has no security bits before WS2012.  Look at the MSDN and Technet articles for this CmdLet and the other "Printer" CmdLets.
    ¯\_(ツ)_/¯

  • How to form this SQL query

    hi,
    I have an Employees table and a Department table.
    Employees table has emp_id, emp_name, dept_no. and
    Department table has dept_no, dept_name as its columns.
    now, i want to display the emp_name and the dept_name of all the employees who are in the same deptartment as 'paul'.
    please help...
    Thanks in advance

    Select ename, Dname from
    emp e, dept D
    Where e.dept_no = D.Deptno
    and D.Deptno in ( select deptno from emp where Ename like 'PAUL')
    Regards
    RK

  • Help with query where one field is contained in another

    I have two tables – t1 and t2 which matches on column a and b. 
    I want to create a query that displays rows where column b and do not match or column b contains data in column d. 
    I have created the query below but the query is still returning results where fields in column B are contained in column D.
    Table
    a
    b
    c
    d
    100
    a
    100
    a
    112
    bcd
    112
    bcde
    113
    zzzz
    113
    zzzza
    114
    ae
    114
    ae
    Output results expected
    a
    b
    c
    d
    112
    bcd
    112
    bcde
    113
    zzzz
    113
    zzzza
    select
    a
    b,
    c,
    d
    from
    t1
    inner
    join
    t2
    on
    t1.a 
    = t2.c
    and
    t1.b
    <> t2.d
    where
    t1.b
    not like
    + t2.d
    + '%')

    Try below query
    select
    a
    b,
    c,
    d
    from
    t1
    inner
    join
    t2
    on
    t1.a 
    = t2.c
    and
    t1.b
    <> t2.d
    A-ZSQL

  • HT1751 now that I have Organized my itunes library .How can I now clean out my old cloud and start with a nice clean labeled list of music

    I need to know how to clean out my old cloud and start fresh one?

    Restore the iPod (thus erasing it), resync all the music to it from the PC.

  • I can not figure out how to set-up my home page so that it starts with Goggle, and then evrytime I open a new tab, it too opens with Goggle. TY 4 any help.

    [email protected]

    Firefox has always opened a blank new tab, if it opened to anything else that would be caused by an add-on. Check your add-ons to see if any offer this feature, or if any were disabled when you updated to Firefox 4.
    The NewTabURL add-on can be used to open a page of your choice in new tabs - https://addons.mozilla.org/firefox/addon/newtaburl

  • How to get name of class that the JVM was started with ?

    Assume I have class foo with the standard main method.
    I also have classes ding and dong, they extend foo.
    The JVM is started with either ding or dong as the 'main' class. Since neither ding nor dong directly implement main, the actual main method being executed is foo's.
    In the main method of foo I want to construct an instance of either ding or dong, depending on which the JVM was started with. Since I'm in a static context, I can't do anything with 'this'. Is there another way to get the name of the 'main' class from the JVM so that I can construct an instance of it ?

    The idea behind all of this is that the developer of
    Ding and Dong should not have to know anything about
    foo, in particular it's constructors. But if Ding and Dong are subclasses of Foo, then developers must know about Foo. If you expect developers to extend a framework without having a well-defined interface to that framework, you are probably heading for trouble.
    To be able to
    privatize the constructors, construction of the
    concrete class has to take place in foo.If Ding and Dong are subclasses of Foo, then you can not make all of Foo's constructors private.
    Of course I could have a method in Ding and Dong that
    calls a static method in foo into which the Ding and
    Dong instance pass their class, but then I'd have
    identical implementations of this method in Ding and
    Dong. Yes you would (well, not identical, but very similar). Like I said, you could do this programmatically with AOP, or you could probably do it dirtily using stack traces (though with it being a single hit at startup, you might not consider it being quite so dirty).
    But: the point of inheritance is that common
    functionality goes into superclasses. I disagree. The important thing about inheritance is that classes share an interface, and that methods can be polymorphically inherited, allowing new functionality to be 'plugged in' in the future, and even at runtime.
    Also, in
    general one wouldn't make methods static if a class
    reference is needed (or one would make it an
    argument), but Sun didn't consult me when they
    designed the main method :-(I still don't see why you need to do what you want to do. It appears that all you are after is the ability to start your program using a command line like
        java com.mypackage.Ding
    instead of
        java com.mypackage.Foo com.mypackage.Ding
    or
        java com.mypackage.Foo Ding.properties
    or something else along these lines.
    Since you must know the name of the class you want to use at the time you want to use it, why can't you just pass the name as an argument, or start up using some properties file, or a shell script?

  • How can I clear out whatever is making Firefox always start with the restore sessioin screen?

    The restore session screen appears with the same website. I cleaned out my cache, updated to the latest version and it still comes up with the restore session.

    It is possible that there is a problem with the files sessionstore.js and sessionstore.bak in the Firefox Profile Folder.
    Delete the sessionstore.js [2] file and possible sessionstore-##.js [3] files with a number and sessionstore.bak in the Firefox Profile Folder.
    * Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    * http://kb.mozillazine.org/Profile_folder_-_Firefox
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost, so you will have to create them again (make a note or bookmark them).
    See also:
    * [1] http://kb.mozillazine.org/Session_Restore
    * [2] http://kb.mozillazine.org/sessionstore.js
    * [3] http://kb.mozillazine.org/Multiple_profile_files_created

  • Select fom table for all entries where field starts with value

    Hello
    I want to write a select like this
    select * from bsis
    into lt_bsis
    for all entries in lt_itab
    where xblnr like lt_itab-belnr%
    I want to select all the entries from bsis where the field xblnr starts with the values found in lt_itab-belnr.
    for example
    ls_itab-belnr = 5100000028
    bsis-xblnr = 510000002810001
                        510000002810002
                        510000002810003
                        520000002810001
    and i want to select only the entries that start with 5100000028 in this case
    Can anybody help?
    Thanks

    Hi,
    I hope below example code will help you to fix your issue,
    REPORT  ytest.
    TYPES : BEGIN OF ty_typ1,
              val TYPE i,
            END OF ty_typ1.
    TYPES : BEGIN OF ty_typ2,
              val1 TYPE hrobjid,
              val2 TYPE hrobjid,
            END OF ty_typ2.
    DATA : int_typ1 TYPE TABLE OF ty_typ1,
           int_typ2 TYPE TABLE OF ty_typ2,
           wa_typ1  TYPE ty_typ1,
           wa_typ2  TYPE ty_typ2,
           int_1001 TYPE TABLE OF hrp1001,
           wa_1001  TYPE hrp1001.
    REFRESH : int_typ1, int_typ2, int_1001.
    CLEAR : wa_typ1, wa_typ2, wa_1001.
    wa_typ1-val = 500001.
    APPEND wa_typ1 TO int_typ1.
    wa_typ1-val = 500002.
    APPEND wa_typ1 TO int_typ1.
    wa_typ1-val = 500003.
    APPEND wa_typ1 TO int_typ1.
    wa_typ1-val = 500001.
    APPEND wa_typ1 TO int_typ1.
    SORT int_typ1 ASCENDING BY val.
    DELETE ADJACENT DUPLICATES FROM int_typ1 COMPARING val.
    LOOP AT int_typ1 INTO wa_typ1.
      wa_typ2-val1 = ( wa_typ1-val * 100 ) + 1.
      wa_typ2-val2 = wa_typ2-val1 + 98.
      APPEND wa_typ2 TO int_typ2.
      CLEAR : wa_typ1, wa_typ2.
    ENDLOOP.
    SELECT * FROM hrp1001 INTO TABLE int_1001
             FOR ALL ENTRIES IN int_typ2 WHERE
                 plvar EQ '01'          AND
                 otype EQ 'S'           AND
                 sclas EQ 'O'           AND
                 begda LE sy-datum      AND
                 endda GE sy-datum      AND
                 objid GE int_typ2-val1 AND
                 objid LE int_typ2-val2.
    LOOP AT int_1001 INTO wa_1001.
      WRITE : / wa_1001-objid.
    ENDLOOP.
    Thanks & Regards,
    Harish Kumar N

  • How to get the dynamic query result

    If in one query, there is the amount range dimension, based on different dimension value combination, the customer revenue should be refreshed into different range, how to make it by cube?
    eg.
    Customer Store    Material  Month    Amount
    C001     M & S    Tennis    2005/01   "10"
    C001     Douglas  Tennis    2005/02   "60"
    C002     M & S    Soccer    2005/01    "1"
    C002     M & S    Soccer    2005/02    "50"
    C002     M & S    Tennis    2005/02    "50"
    C003     Douglas  Tennis    2005/01    20
    Query condition:
    Time Customer Amount Range     Amount
    2005 C001     0~50_____________0
    2005 C001     51~100___________70
    2005 C001     100 +____________0
    2005 C002     0~50_____________0
    2005 C002     51~100___________0
    2005 C002     100+_____________101
    2005 C003     0~50_____________20
    2005 C003     51~100___________0
    2005 C003     100+_____________0
    However, if I drill down Time into month, the result is total different, I only list the result related to customer C001
    Time     Customer  Amount Range    Amount
    2005/01  C001      0~50____________10
    2005/01  C001      51~100__________0
    2005/01  C001      100 +___________0
    2005/02  C001      0~50____________0
    2005/02  C001      51~100__________60
    2005/02  C001      100 +___________0
    Any good solution on that? Thanks for any input.
    Message was edited by: Lei Shao

    Hi, Sen,
    I used your solution in my infocube and query, where I created a structure with 'between'. However, it is still the simple summation in different amount range.
    Just like the following:
    Sales ORG / Sales Office / Sales Rep / Amount
    East      / Atlanta      / 1001      / 3
    East      / Atlanta      / 1002      / 4
    So the query result is the same:
    S-ORG / S-Office / S-Rep / Amount Range / Amount
    East  / Atlanta  / 1001  / 0~5          / 3
    East  / Atlanta  / 1001  / 5+           / 0
    East  / Atlanta  / 1002  / 0~5          / 4
    East  / Atlanta  / 1002  / 5+           / 0
    When I remove 'drill down' for Sales Rep, the result is:
    S-ORG / S-Office / Amount Range / Amount
    East  / Atlanta  / 0~5          / 7
    East  / Atlanta  / 5+           / 0
    However our expection for the result is different, because in business traction, if we remove sales rep, the sales org and sales office will get the sub-total like this: (we can image it with ABAP program sub-total)
    Sales ORG / Sales Office / Amount
    East      / Atlanta      / 7
    So our expection for the result is:
    S-ORG / S-Office / Amount Range / Amount
    East  / Atlanta  / 0~5          / 0
    East  / Atlanta  / 5+           / 7
    Therefore, any good suggestion for this?
    Thanks a lot
    Regards,
    LS

Maybe you are looking for