Fetch data in edittable field in alv using REUSE_ALV_GRID_DISPLAY_LVC FM

i am using REUSE_ALV_GRID_DISPLAY_LVC to display alv.
how can i fetch the data in edittable field in alv.

Check this Sample code.
calling the Function in the user command will help you in getting the updated values to interanl table.
'GET_GLOBALS_FROM_SLVC_FULLSCR'
REPORT  ztest_lvc_fm.
TYPE-POOLS: slis.
DATA: x_fieldcat TYPE lvc_s_fcat,
it_fieldcat TYPE lvc_t_fcat.
DATA: BEGIN OF itab OCCURS 0,
vbeln LIKE vbak-vbeln,
posnr LIKE vbap-posnr,
chk(1),
color(4),
END OF itab.
SELECT vbeln
posnr
FROM vbap
UP TO 20 ROWS
INTO TABLE itab.
x_fieldcat-fieldname = 'CHK'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 1.
x_fieldcat-edit = 'X'.
x_fieldcat-checkbox = 'X'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
x_fieldcat-fieldname = 'VBELN'.
x_fieldcat-coltext = 'VBELN'.
x_fieldcat-hotspot = 'X'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 2.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
x_fieldcat-fieldname = 'POSNR'.
x_fieldcat-coltext = 'POSNR'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-edit = 'X'.
x_fieldcat-col_pos = 3.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
  EXPORTING
    i_callback_program      = sy-repid
    i_callback_user_command = 'USER_COMMAND'
    it_fieldcat_lvc         = it_fieldcat
  TABLES
    t_outtab                = itab
  EXCEPTIONS
    program_error           = 1
    OTHERS                  = 2.
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*&      Form  USER_COMMAND
*       text
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
  DATA: gd_repid LIKE sy-repid, "Exists
  ref_grid TYPE REF TO cl_gui_alv_grid.
  IF ref_grid IS INITIAL.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
      IMPORTING
        e_grid = ref_grid.
  ENDIF.
  IF NOT ref_grid IS INITIAL.
    CALL METHOD ref_grid->check_changed_data .
  ENDIF.
  "now check the entries in ALV table
  BREAK-POINT.
ENDFORM. "USER_COMMAND
Regards
Vijay Babu Dudla

Similar Messages

  • How to populate field catalogue fields in ALV using  dynamic internal table

    Hi All,
    Please let me know how to populate field catalogue fields in ALV using  dynamic internal table.
    I have created <dyn_table> using code below.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
                     EXPORTING
                       it_fieldcatalog = g_t_ifc
                        it_fieldcatalog = g_t_fieldcat
                     IMPORTING
                        ep_table        = dy_table.
      ASSIGN dy_table->* TO <dyn_table>.
    Create dynamic work area and assign to FS
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.
    Now this  <dyn_table>  has fields like idoc no.,creation date ,
    segment field 1, segment field 2 etc..Now idoc no.,creation date  are static fields from table EDIDC. And segment field 1, segment field 2 etc are dynamic fields from table EDSAPPL.
    In my  ALV report I am getting the final layout properly but I am unable to move values to corresponding fields in the final layout shown.Please let me know how to populate these fields from different tables.
    I tried this way but its not working.
    SORT g_t_edid4 BY docnum.
      LOOP AT g_t_edidc INTO g_r_edidc.
        READ TABLE g_t_edid4 into g_r_edid4
                         WITH KEY docnum = g_r_edidc-docnum
                                        BINARY SEARCH.
        IF sy-subrc = 0.
          <dyn_wa> =  g_r_edid4-sdata.
         MOVE-CORRESPONDING g_r_edid4 to <dyn_wa>.
       CLEAR g_r_edid4.
        ENDIF.
    MOVE-CORRESPONDING g_r_edidc to <dyn_wa>.
    APPEND <dyn_wa> TO <dyn_table>.

    You have to assign each field to field symbol and then assign the value to that field symbol and asssign that field symbol to workarea field symbol.
    LOOP AT g_t_edidc INTO g_r_edidc.
    READ TABLE g_t_edid4 into g_r_edid4
    WITH KEY docnum = g_r_edidc-docnum
    BINARY SEARCH.
    IF sy-subrc = 0.
    ASSIGN COMPONENT 'SDATA' OF STRUCTURE <DYN_WA> TO <DYN_FLD>.
    <DYN_FLD> = g_r_edid4-sdata.
    " <dyn_wa> = g_r_edid4-sdata.
    " Assign each fields like this.
    " MOVE-CORRESPONDING g_r_edid4 to <dyn_wa>.
    CLEAR g_r_edid4.
    ENDIF.
    " MOVE-CORRESPONDING g_r_edidc to <dyn_wa>.
    APPEND <dyn_wa> TO <dyn_table>.
    Regards,
    Naimesh Patel

  • How to set cureent date as input field in alv

    Hi Experts
        I have created an Alv report.In that report i have an input field Created Date.
        how to set the current date default in the alv input.Plz guide

    Hi ,
    In the internal table declare a field of type D and pass the sy-datum.  this will solve ur problem.
    Hope information shall be useful.
    Regards
    Santosh Kumaar.M

  • Unable to add the F4 help data description in field of ALV

    Hi All,
    I want to create a column based on the F4 help data description which i has mentioned below images..
    I want to create a new column next to G/L account number column.
    I want to add F4 Long Text field to a column..
    Please help me how to pass the F4 help data from F4 to New column???
    Thanks in advance..
    Regards,
    Kiran

    Hi Aruna,
    Thanks for replying.
    Actually my requirement is , I use to add G/L number on F4 help, there I am having G/L account number with G/L account Description next to it ( LONG TEXT), I want that description should come in separate column next to G/L account.
    After giving the G/L account number, its description will populate next to its Column...
    The column will looks like in this Screen shot.
    I added the new Column called G/L account Description, But how to pass the field value from F4 search data to that Column??
    pls help me with this.
    Regards,
    Kiran

  • OAF Export button fetching data in one column - view object using union all

    Dear All,
    Export button showing data in one column from  view object,
    View object is based on mulitple queries with union all ,
    Please let me know the solution for this issue.
    Thanks
    Maheswara Raju

    Maheswara Raju,
    As per my understanding you are not able to export all the View Attribute using export Button. Only the attribute which is used with the item/region will get exported.
    There are few work around in case if you want to export the column without showing on OAF Page. Let me know.
    Cheers
    Gyan

  • Obtaining subtotals based on 2 fields.(ALV using oops concept)

    Need help on how to apply sort on 2 fields and obtain subtotals.For example if I have some records for similar tax code and some more records  for a similar tax jurisdiction (under which all tax codes come).I need to calculate subtotals for same tax code as well as same tax jurisdiction code.Currently I am able to generate subtotals by sorting on 1 field only ,using OOPs concept.How do I apply for both the fields? This is what is being done currently with regard to sorting and subtotaling : 
    METHOD set_sorts.
    lr_sorts = gr_alv_data->get_sorts( ).
    TRY.
            lr_sorts->add_sort( 'TXJCD' ). ---sorting based on tax jurisdiction
          CATCH: cx_salv_not_found,
                cx_salv_existing,
                cx_salv_data_error.
        ENDTRY.
        TRY.
            lr_sorts->add_sort( columnname = 'MSKWZ'
                                        subtotal = if_salv_c_bool_sap=>true ).
          CATCH cx_salv_data_error cx_salv_not_found
                cx_salv_existing.                          
        ENDTRY.
      ENDMETHOD.                    "set_sorts
    Thanks & Regards,
    Savitha

    Hi Savitha,
    Use the other paramenters like POSITION, SEQUENCE, SUBTOTAL for both fields like as follows. Then it will work fine.
    TRY.
    lr_sorts->add_sort( columnname = 'TXJCD'
    sequence = 1
    Position = 1
    subtotal = if_salv_c_bool_sap=>true ).
    CATCH cx_salv_data_error cx_salv_not_found
    cx_salv_existing.
    ENDTRY.
    TRY.
    lr_sorts->add_sort( columnname = 'MSKWZ'
    sequence = 2
    Position = 1
    subtotal = if_salv_c_bool_sap=>true ).
    CATCH cx_salv_data_error cx_salv_not_found
    cx_salv_existing.
    ENDTRY.

  • Coloring an single field of an ALV using factory method

    how can we color just a single field in ALV using factory method.

    Hello Regi you may want to check this sample code, basically what you need is to use the lvc_s_colo structure and the  set_color method of the class cl_salv_column_table.
    METHOD set_colors.
    *.....Color for COLUMN.....
        DATA: lo_cols_tab TYPE REF TO cl_salv_columns_table,
              lo_col_tab  TYPE REF TO cl_salv_column_table.
        DATA: ls_color TYPE lvc_s_colo.    " Colors strucutre
    *   get Columns object
        lo_cols_tab = co_alv->get_columns( ).
        INCLUDE <color>.
    *   Get ERDAT column & set the yellow Color fot it
        TRY.
            lo_col_tab ?= lo_cols_tab->get_column( 'ERDAT' ).
            ls_color-col = col_total.
            lo_col_tab->set_color( ls_color ).
          CATCH cx_salv_not_found.
        ENDTRY.
    *.......Color for Specific Cell & Rows.................
    *   Applying color on the 3rd Row and Column AUART
    *   Applying color on the Entire 5th Row
        DATA: lt_s_color TYPE lvc_t_scol,
              ls_s_color TYPE lvc_s_scol,
              la_vbak    LIKE LINE OF ct_vbak,
              l_count    TYPE i.
        LOOP AT ct_vbak INTO la_vbak.
          l_count = l_count + 1.
          CASE l_count.
    *       Apply RED color to the AUART Cell of the 3rd Column
            WHEN 3.
              ls_s_color-fname     = 'AUART'.
              ls_s_color-color-col = col_negative.
              ls_s_color-color-int = 0.
              ls_s_color-color-inv = 0.
              APPEND ls_s_color TO lt_s_color.
              CLEAR  ls_s_color.
    *       Apply GREEN color to the entire row # 5
    *         For entire row, we don't pass the Fieldname
            WHEN 5.
              ls_s_color-color-col = col_positive.
              ls_s_color-color-int = 0.
              ls_s_color-color-inv = 0.
              APPEND ls_s_color TO lt_s_color.
              CLEAR  ls_s_color.
          ENDCASE.
    *     Modify that data back to the output table
          la_vbak-t_color = lt_s_color.
          MODIFY ct_vbak FROM la_vbak.
          CLEAR  la_vbak.
          CLEAR  lt_s_color.
        ENDLOOP.
    *   We will set this COLOR table field name of the internal table to
    *   COLUMNS tab reference for the specific colors
        TRY.
            lo_cols_tab->set_color_column( 'T_COLOR' ).
          CATCH cx_salv_data_error.                         "#EC NO_HANDLER
        ENDTRY.
      ENDMETHOD.                    "set_colors

  • SELECT is taking lot of time to fetch data from cluster table BSET

    <Modified the subject line>
    Hi experts,
    I want to fetch data of some fields from bset table but it is taking a lot of time as the table is cluster table.
    Can you please suggest me any other process to fetch data from cluster table. I am using native sql to fetch data.
    Regards,
    SURYA
    Edited by: Suhas Saha on Jun 29, 2011 1:51 PM

    Hi Subhas,
    As per your suggestion I am now using normal SQL statement to select data from BSET but it is still taking much time.
    My SQL statement is :
    SELECT BELNR
                  GJAHR
                  BUZEI
                  MWSKZ
                  HWBAS
                  KSCHL
                  KNUMH FROM BSET INTO CORRESPONDING FIELDS OF TABLE IT_BSET
                  FOR ALL ENTRIES IN IT_BKPF
                  WHERE BELNR = IT_BKPF-BELNR
                      AND BUKRS = IT_BKPF-BUKRS.
    <Added code tags>
    Can you suggest me anymore?
    Regards,
    SURYA
    Edited by: Suhas Saha on Jun 29, 2011 4:16 PM

  • ALV USING FM(FIELDCATALOG_MERGE)

    What is the purpose of fm
    "REUSE_ALV_FIELDCATALOG_MERGE"
    explain briefly with sample code.

    Hi,
    Using REUSE_ALV_FIELDCATALOG_MERGE can automatically determine the fieldstructure from this source program, no need to maunally build fieldcatalog for the fields defined in the internal table.
    REPORT Z_ALV_SIMPLE_EXAMPLE_WITH_ITAB .
    *data definition
    tables:
    marav. "Table MARA and table MAKT
    * Data to be displayed in ALV
    * Using the following syntax, REUSE_ALV_FIELDCATALOG_MERGE can auto-
    * matically determine the fieldstructure from this source program
    Data:
    begin of imat occurs 100,
    matnr like marav-matnr, "Material number
    maktx like marav-maktx, "Material short text
    matkl like marav-matkl, "Material group (so you can test to make
                            " intermediate sums)
    ntgew like marav-ntgew, "Net weight, numeric field (so you can test to
                            "make sums)
    gewei like marav-gewei, "weight unit (just to be complete)
    end of imat.
    * Other data needed
    * field to store report name
    data i_repid like sy-repid.
    * field to check table length
    data i_lines like sy-tabix.
    * Data for ALV display
    TYPE-POOLS: SLIS.
    data int_fcat type SLIS_T_FIELDCAT_ALV.
    select-options:
    s_matnr for marav-matnr matchcode object MAT1.
    start-of-selection.
    * read data into table imat
      select * from marav
      into corresponding fields of table imat
      where
      matnr in s_matnr.
    * Check if material was found
      clear i_lines.
      describe table imat lines i_lines.
      if i_lines lt 1.
    *   Using hardcoded write here for easy upload
        write: /
        'No materials found.'.
        exit.
      endif.
    end-of-selection.
    * Now, we start with ALV
    * To use ALV, we need a DDIC-structure or a thing called Fieldcatalogue.
    * The fieldcatalouge can be generated by FUNCTION
    * 'REUSE_ALV_FIELDCATALOG_MERGE' from an internal table from any
    * report source, including this report.
    * The only problem one might have is that the report and table names
    * need to be in capital letters. (I had it :-( )
    * Store report name
      i_repid = sy-repid.
    * Create Fieldcatalogue from internal table
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_PROGRAM_NAME         = i_repid
                I_INTERNAL_TABNAME     = 'IMAT'  "capital letters!
                I_INCLNAME             = i_repid
           CHANGING
                CT_FIELDCAT            = int_fcat
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.
    *explanations:
    *    I_PROGRAM_NAME is the program which calls this function
    *    I_INTERNAL_TABNAME is the name of the internal table which you want
    *                       to display in ALV
    *    I_INCLNAME is the ABAP-source where the internal table is defined
    *               (DATA....)
    *      CT_FIELDCAT contains the Fieldcatalouge that we need later for
    *      ALV display
      IF SY-SUBRC <> 0.
        write: /
        'Returncode',
        sy-subrc,
        'from FUNCTION REUSE_ALV_FIELDCATALOG_MERGE'.
      ENDIF.
    *This was the fieldcatlogue
    * And now, we are ready to display our list
    * Call for ALV list display
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
    *            I_CALLBACK_PROGRAM = 'Z_ALV_SIMPLE_EXAMPLE_WITH_ITAB'
                I_CALLBACK_PROGRAM = i_repid
                IT_FIELDCAT        = int_fcat
                I_SAVE             = 'A'
           TABLES
                T_OUTTAB           = imat
           EXCEPTIONS
                PROGRAM_ERROR      = 1
                OTHERS             = 2.
    *explanations:
    *    I_CALLBACK_PROGRAM is the program which calls this function
    *    IT_FIELDCAT (just made by REUSE_ALV_FIELDCATALOG_MERGE) contains
    *                 now the data definition needed for display
    *    I_SAVE allows the user to save his own layouts
    *      T_OUTTAB contains the data to be displayed in ALV
      IF SY-SUBRC <> 0.
        write: /
        'Returncode',
        sy-subrc,
        'from FUNCTION REUSE_ALV_LIST_DISPLAY'.
      ENDIF.
    Thanks,
    Sriram Ponna.

  • Using Field symbol to fetch data from another program

    I have a requirement where i need to fetch value  of a field from one of the function pool so i have written a sample progam to check the logic but its doest seems to work its giving dump.
    Basically i want to know how to use <programname><fieldname> with fieldsymbol.
    REPORT ztest1.
    DATA test(25) VALUE 'ggg'.
    submit ztest.
    report ztest.
    constants: lv_memory(25) type c value '(ZTEST1)TEST'.
    field-symbols: <fs2> type char25 .
    assign (lv_memory) to <fs2>.
    write : <fs2>.
    I am getting same field symbol assignment dump

    Hi Rahul,
    You can use this concept in between the FUNCTION MODULES where both are
    under same FUNCTION GROUP ( as both the FM's have same global memory area ).
    And also if you are calling an FM or method from your program  ,you can have the data of the calling program in that called FM or METHOD.
    Hope this may help you.
    Regards,
    Smart Varghese

  • How to display date field in ALV in format 'YYYY-MM-DD'?

    Hi experts,
    I am not getting displayed the date field in ALV in the format 'YYYY-MM-DD' if it is different than my user setting's format (DD.MM.YYYY).
    Tried with the edit mask
    LVC_S_FCAT-EDIT_MASK = '____-__-__'  but it does not work.
    I could not find the conversion routine for this. Is it possible to write customer conversion routine?
    I have to use DATE field, otherwise if I display this format in CHAR10 field , sorting in ALV does not work for this field.
    PLEASE ANY HELP!
    Kind regards,
    Danijela

    Hi,
    Use FM FORMAT_DATE_4_OUTPUT.
    TYPE-POOLS : slis, KKBLO.
    TYPES: BEGIN OF t_data,
           sel     TYPE char1,
           matnr   TYPE matnr,
           bldat   type char10,
           END OF t_data.
    DATA: it_tab TYPE STANDARD TABLE OF t_data,
          it_fcat TYPE slis_t_fieldcat_alv.
    DATA: wa_tab TYPE t_data,
          wa_fcat TYPE slis_fieldcat_alv,
          wa_layout type SLIS_LAYOUT_ALV.
    data: lv_repid    TYPE syrepid.
    data : lv_date    type NLEI-IBGDT,
           lv_outdate type RN1DATUM-DATEX,
           lv_format  type RN1DATUM-FORMAT value 'YYYY-MM-DD'.
    lv_repid = sy-repid.
    lv_date = sy-datum.
    CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'
      EXPORTING
        datin         = lv_date
        format        =  lv_format
    IMPORTING
       DATEX         = lv_outdate.
       move lv_outdate to wa_tab-bldat.
    wa_tab-matnr = '0000001'.
    APPEND wa_tab TO it_tab.
    lv_date = sy-datum + 1.
    CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'
      EXPORTING
        datin         = lv_date
        format        =  lv_format
    IMPORTING
       DATEX         = lv_outdate.
       move lv_outdate to wa_tab-bldat.
    wa_tab-matnr = '0000002'.
    APPEND wa_tab TO it_tab.
    lv_date = sy-datum + 2.
    CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'
      EXPORTING
        datin         = lv_date
        format        =  lv_format
    IMPORTING
       DATEX         = lv_outdate.
       move lv_outdate to wa_tab-bldat.
    wa_tab-matnr = '0000003'.
    APPEND wa_tab TO it_tab.
    wa_fcat-fieldname = 'SEL'.
    wa_fcat-ref_fieldname = 'XCHPF'.
    wa_fcat-ref_tabname = 'MARA'.
    wa_fcat-edit = 'X'.
    wa_fcat-checkbox = 'X'.
    APPEND  wa_fcat TO  it_fcat.
    CLEAR :  wa_fcat.
    wa_fcat-fieldname = 'MATNR'.
    wa_fcat-ref_fieldname = 'MATNR'.
    wa_fcat-ref_tabname = 'MARA'.
    APPEND  wa_fcat TO  it_fcat.
    CLEAR :  wa_fcat.
    wa_fcat-fieldname = 'BLDAT'.
    wa_fcat-ref_fieldname = 'BLDAT'.
    wa_fcat-ref_tabname = 'BKPF'.
    APPEND  wa_fcat TO  it_fcat.
    call 'REUSE_ALV_GRID_DISPLAY'' after this
    Edited by: Ankur Parab on Oct 1, 2009 2:50 PM
    Edited by: Ankur Parab on Oct 1, 2009 2:51 PM

  • Editable field in alv data format

    i have a editable field on ALV which is of date format and i need when user enter a date the value will be updated in the database table .
    note that i am using alv list and the field catalog is of date format dat 8
    the update is not done pleaseee helppp urgent

    Hi,
    You need to use the USER_COMMAND in the ALV function module
    {CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = gd_repid
    i_callback_user_command = 'USER_COMMAND'
    i_callback_pf_status_set = 'GUI_STAT'
    *i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    *it_special_groups = gd_tabgroup
    *it_events = it_events
    i_save = 'X'
    *is_variant = z_template
    TABLES
    t_outtab = i_final
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    then you need to write the below FORM
    *• FORM USER_COMMAND *
    *• --> U_COMM *
    *• --> RS_SELFIELD *
    FORM user_command USING u_comm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.}
    Here in the Form, Write the UPDATE statment to update the database table
    Regards
    Sudheer

  • How to display the fields in ALV Output without using Field catalog?

    How to display the fields in ALV Output without using Field catalog?
    Could you pls tell me the coding?
    Akshitha.

    Hi,
    u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
    data: itab type table of mara.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_structure_name = itab
    CHANGING
    ct_fieldcat = lt_fieldcat[]
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    *Pass that field catalog into the fillowing FM
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_grid_title            = 'REPORTING'
                is_layout              = gt_layout
                it_fieldcat             = lt_fieldcat[]
           tables
                t_outtab                = itab.

  • How to make use of Index of a table in report to fetch data?

    Hi,
    I need a sample code for select statement which is making use of INDEX of a table
    to fetch data.
    Doubt:
    Can I fetch all the fields in the table by passing certain key fields of INDEX in where condition?

    Hi Raja,
    1) Mention the fields that you wish from database table (incase you don't need all the fields from the database table).
    2) Don't use the INTO CORRESPONDING FIELDS OF TABLE ztable clause.
    3)Instead use INTO TABLE ztable (But take care that during the declaration of the ztable, the fields declared are in order that in database table to fetch the Records in sequence).
    Please Find the Syntax and Code Below..
    SELECT *  FROM <TABLE>
      WHERE  <WHERE>
        %_HINTS ORACLE 'INDEX("<TABLE>~<INDEX ID")'.
    SELECT carrid
    INTO TABLE t_spfli
    FROM spfli
    WHERE carrud IN s_carrid AND
    connid IN s_connid
    %_HINTS ORACLE 'INDEX("&SPFLI&" "SPFLI~XXX")'.
    Hope this Is helpFul
    Thanks
    kalyan

  • Slow Speed While fetching data from SQL 2008 using DoQuery.

    Hello,
    I am working for an AddOn and tried to use DoQuery for fetching data from SQL 2008 in C#.
    There are around 148 records which full fill this query condition but it takes much time to fetch the data.
    I wanna know that is there any problem in this code by which my application is getting slower.
    I used break Points and checked it, I founds that while connecting to the server it is taking time.
    Code:
    // Get an initialized SBObob object
    oSBObob = (SAPbobsCOM.SBObob)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge);
    //// Get an initialized Recordset object
    oRecordset = (SAPbobsCOM.Recordset)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
    string sqlstring = "select DocEntry,ItemCode From OWOR  where OWOR.Status='R' and DocEntry not in ( Select distinct(BaseRef) from IGE1 where IGE1.BaseRef = OWOR.DocEntry)";
    oRecordset.DoQuery(sqlstring);
    var ProductList = new BindingList<KeyValuePair<string, string>>();
    ProductList.Add(new KeyValuePair<string, string>("", "---Please Select---"));
    while (!(oRecordset.EoF))
    ProductList.Add(new KeyValuePair<string, string>(oRecordset.Fields.Item(0).Value.ToString(), oRecordset.Fields.Item(0).Value.ToString() + " ( " + oRecordset.Fields.Item(1).Value.ToString() + " ) "));
    oRecordset.MoveNext();
    cmbProductionOrder.ValueMember = "Key";
    cmbProductionOrder.DisplayMember = "Value";
    Thanks and Regards,
    Ravi Sharma

    Hi Ravi,
    your code and query look correct. But can you ellaborate a little bit.
    It seems to be a DI API program ( no UI API ) ?
    When you say "I founds that while connecting to the server it is taking time." do you mean the recordset query or the DI API connection to SBO ? The later would be "normal" since the connection can take up to 30 seconds.
    To get data it is usually better to use direct SQL connections.
    regards,
    Maik

Maybe you are looking for

  • How can I download previous music purchases in iTunes

    There seems to have been a glitch in one track of an album purchased from the Store. On advice at an Apple retail store I deleted the tracks from the album (with the intent of re-downloading the album hoping for a clear download) and yet when I check

  • Problems with toplink in a ROLAP application - please , I need help

    Hello, I am not too much experieced with toplink but I want use it for building a ROLAP (relational OLAP) client (something like Discoverer Plus) . Because of an database bug , Oracle Warehouse Builder can not generate materialized views creation scr

  • Linked lists understanding help

    Hi I am having problems trying to understand linked lists. For example in the following code: public class LinkDouble    private double dData;               // data item    private LinkDouble next;                  // next link in list    private Lin

  • Creating an Index HTML in Dreamweaver?

    I am new to Dreamweaver and was trying to up load my web to the server.  It seems most servers require an INDEX HTML as the opening p age.  However, dreamweaver does not create this.  I have afolder with the home page files in it.  How do I make thes

  • Dropping a datafile

    Can we drop one datafile from a tablspace? I have a tablespace TS1 which has 3 datafiles.i made one datafile offline and trying to drop that particular datafile....is it possible ? SQL> alter database datafile 'E:\ORACLE\ORADATA\TESTDB\KISH1.DBF' DRO