Duplicate records in TABLE CONTROL

Hi folks,
i am doing a module pool where my internal table (itab) data is comming to table ontrol(ctrl).then i need to select one record in table control & then i press REFRESH push button.
after putting the refresh button, some new records are comming to that same internal table.then i need to display the modified internal table (some new records are added) data in the table control.
The modified internal table data is comming to the table control but to the last of table control, some records are repeating.
before comming to table control, i checked the modified itab. it contains correct data.i.e it contains 15 records.(previously i have 5 records.after REFRESH button 10 more records are added.). but when this table is comming to table control, it contains some 100 record.i should get only 15 record.
why these records r repeting. how to delete the duplicate records from table control?
plz suggest me where i am doing mistake.
correct answer will be rewarded
Thanks & Regards

Hi ,
Thanks for ur help. but i should not refresh the internal table  as some records r already present.after putting the REFRESH button, some new records r appending to this existing table.then i am going to display the previous records & the new records as well.
i checked the internal table after modification.it contains actual number of records. but after comming to table control , more records r comming.
is this the problem with scrolling or waht?
plz suggest where i am doing mistake.i am giving my coding below.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0200.
module tc_shelf_change_tc_attr.
loop at object_tab1
       with control tablctrl
       cursor tablctrl-current_line.
    module tc_shelf_get_lines.
  endloop.
PROCESS AFTER INPUT.
module set_exit AT EXIT-COMMAND.
   loop at object_tab1.
         chain.
          field: object_tab1-prueflos,
                 object_tab1-matnr.
           module shelf_modify on chain-request.
         endchain.
        field object_tab1-idx
         module shelf_mark on request.
               endloop.
module shelf_user_command.
module user_command_0200.
***INCLUDE Y_RQEEAL10_STATUS_0200O01 .
*&      Module  STATUS_0200  OUTPUT
      text
MODULE STATUS_0200 OUTPUT.
  SET PF-STATUS 'MAIN'.
SET TITLEBAR 'xxx'.
ENDMODULE.                 " STATUS_0200  OUTPUT
*&      Module  tc_shelf_change_tc_attr  OUTPUT
      text
MODULE tc_shelf_change_tc_attr OUTPUT.
delete adjacent duplicates from object_tab1 comparing prueflos matnr.
describe table object_tab1 lines tablctrl-lines.
ENDMODULE.                 " tc_shelf_change_tc_attr  OUTPUT
*&      Module  tc_shelf_get_lines  OUTPUT
      text
MODULE tc_shelf_get_lines OUTPUT.
data:  g_tc_shelf_lines  like sy-loopc.
if tablctrl-current_line > tablctrl-lines.
stop.
endif.
g_tc_tablctrl_lines = sy-loopc.
*refresh control tablctrl from screen 0200.
ENDMODULE.                 " tc_shelf_get_lines  OUTPUT
***INCLUDE Y_RQEEAL10_SHELF_MODIFYI01 .
*&      Module  shelf_modify  INPUT
      text
MODULE shelf_modify INPUT.
modify object_tab1
    index tablctrl-current_line.
ENDMODULE.                 " shelf_modify  INPUT
*&      Module  set_exit  INPUT
      text
module set_exit INPUT.
leave program.
endmodule.                 " set_exit  INPUT
*&      Module  shelf_mark  INPUT
      text
MODULE shelf_mark INPUT.
data: g_shelf_wa2 like line of object_tab1.
  if tablctrl-line_sel_mode = 1
  and object_tab1-idx = 'X'.
    loop at object_tab1 into g_shelf_wa2
      where idx = 'X'.
      g_shelf_wa2-idx = ''.
      modify object_tab1
        from g_shelf_wa2
        transporting idx.
    endloop.
  endif.
  modify object_tab1
    index tablctrl-current_line
    transporting idx plnty plnnr plnal.
ENDMODULE.                 " shelf_mark  INPUT
*&      Module  shelf_user_command  INPUT
      text
MODULE shelf_user_command INPUT.
ok_code = sy-ucomm.
  perform user_ok_tc using    'TABLCTRL'
                              'OBJECT_TAB1'
                     changing ok_code.
  sy-ucomm = ok_code.
ENDMODULE.                 " shelf_user_command  INPUT
*&      Module  user_command_0100  INPUT
      text
MODULE user_command_0200 INPUT.
data:v_line(3).
case OK_CODE.
when 'LAST'.
read table object_tab1 with key idx = 'X'.
if sy-subrc = 0.
select * from qals
                      where enstehdat <= object_tab1-enstehdat
                      and   plnty ne space
                      and   plnnr ne space
                      and   plnal ne space.
if sy-dbcnt > 0.
if qals-enstehdat = object_tab1-enstehdat.
   check qals-entstezeit < object_tab1-entstezeit.
   move-corresponding qals to object_tab2.
   append object_tab2.
   else.
   move-corresponding qals to object_tab2.
   append object_tab2.
   endif.
     endif.
        endselect.
   sort object_tab2 by enstehdat entstezeit descending.
loop at object_tab2 to 25.
  if not object_tab2-prueflos is initial.
append object_tab2 to object_tab1.
  endif.
  clear object_tab2.
endloop.
  endif.
when 'SAVE'.
loop at object_tab1 where idx = 'X'.
  if ( not object_tab1-plnty is initial and
                not object_tab1-plnnr is initial and
                           not object_tab1-plnal is initial ).
   select single * from qals into corresponding fields of wa_qals
   where prueflos = object_tab1-prueflos.
      if sy-subrc = 0.
       wa_qals-plnty = object_tab1-plnty.
       wa_qals-plnnr = object_tab1-plnnr.
       wa_qals-plnal = object_tab1-plnal.
update qals from wa_qals.
  if sy-subrc <> 0.
Message E001 with 'plan is not assigned to lot in sap(updation)'.
else.
v_line = tablctrl-current_line - ( tablctrl-current_line - 1 ).
delete object_tab1.
endif.
   endif.
      endif.
           endloop.
when 'BACK'.
leave program.
when 'NEXT'.
call screen 300.
ENDCASE.
***INCLUDE Y_RQEEAL10_USER_OK_TCF01 .
*&      Form  user_ok_tc
      text
     -->P_0078   text
     -->P_0079   text
     <--P_OK_CODE  text
form user_ok_tc  using    p_tc_name type dynfnam
                          p_table_name
                 changing p_ok_code like sy-ucomm.
   data: l_ok              type sy-ucomm,
         l_offset          type i.
   search p_ok_code for p_tc_name.
   if sy-subrc <> 0.
     exit.
   endif.
   l_offset = strlen( p_tc_name ) + 1.
   l_ok = p_ok_code+l_offset.
   case l_ok.
     when 'P--' or                     "top of list
          'P-'  or                     "previous page
          'P+'  or                     "next page
          'P++'.                       "bottom of list
       perform compute_scrolling_in_tc using p_tc_name
                                             l_ok.
       clear p_ok_code.
   endcase.
endform.                    " user_ok_tc
*&      Form  compute_scrolling_in_tc
      text
     -->P_P_TC_NAME  text
     -->P_L_OK  text
form compute_scrolling_in_tc using    p_tc_name
                                       p_ok_code.
   data l_tc_new_top_line     type i.
   data l_tc_name             like feld-name.
   data l_tc_lines_name       like feld-name.
   data l_tc_field_name       like feld-name.
   field-symbols <tc>         type cxtab_control.
   field-symbols <lines>      type i.
   assign (p_tc_name) to <tc>.
   concatenate 'G_' p_tc_name '_LINES' into l_tc_lines_name.
   assign (l_tc_lines_name) to <lines>.
   if <tc>-lines = 0.
     l_tc_new_top_line = 1.
   else.
     call function 'SCROLLING_IN_TABLE'
       exporting
         entry_act      = <tc>-top_line
         entry_from     = 1
         entry_to       = <tc>-lines
         last_page_full = 'X'
         loops          = <lines>
         ok_code        = p_ok_code
         overlapping    = 'X'
       importing
         entry_new      = l_tc_new_top_line
       exceptions
         others         = 0.
   endif.
   get cursor field l_tc_field_name
              area  l_tc_name.
   if syst-subrc = 0.
     if l_tc_name = p_tc_name.
       set cursor field l_tc_field_name line 1.
     endif.
   endif.
   <tc>-top_line = l_tc_new_top_line.
endform.                              " COMPUTE_SCROLLING_IN_TC
Thanks

Similar Messages

  • BDC Recording for Table Control

    dears,
    I am using BDC for posting payments by TCode FP05.
    after processing two payment items i am getting the following error.
    "Runtime error SAPSQL_ARRAY_INSERT_DUPREC has occurred"
    but when i repeat the same recording in foreground it processes the payment sucessfully.
    wht could be wrong with the recording?
    how to record for table control?
    Bye

    Hi Syed,
    I could find few notes for the array insert duplicate runtime error.
    136433
    191544
    You can find may in OSS.
    Cheers
    Vinod

  • Add a new record to table control

    Dear all,
    How to add a new  blank record to a table control?
    Following code is not working for adding  a new blank record to a table control
    MODULE USER_COMMAND_0100 INPUT.
        SAVE_OK = OK_CODE.
        CLEAR OK_CODE.
        CASE SAVE_OK.
          WHEN 'EXIT'.
            LEAVE PROGRAM.
          WHEN 'APND'.             " A button "Add" to add a new record to table control
            REFRESH IT_KNA1.
            CLEAR IT_KNA1.
            APPEND IT_KNA1.
        ENDCASE.
    ENDMODULE.        
    Thanks you

    Hope you have done all table control specific coding
    refer this example program
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac5e35c111d1829f0000e829fbfe/content.htm

  • How to update record in Table control

    Dear Friends,
      I have table control that has space for 10 records but i need to update 15 record from the flat file which is getting into the table how can i do this.
    Regards,
    MAHENDRA.

    Hi,
    you record for an item and then click on page down and save it.use the loop on this bdc to populate the the bdc table no need to do manually.
    LOOP AT  l_i_dettab_item INTO l_wa_dettab_item..
          l_cursor = l_cursor + 1.
          IF l_cursor GT 1.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                   '=P+'.
          ENDIF.
          PERFORM cursor_pos_notation    USING 'V_EAN_DET001- GTIN_VARIANT_TYP'
                                                  l_cursor
                                        CHANGING  l_cursor_notation.
          PERFORM cursor_pos_notation    USING 'V_EAN_DET001-VTWEG'
                                                  l_cursor
                                        CHANGING  l_cursor_notation.
          PERFORM bdc_field       USING l_cursor_notation
                                        l_wa_dettab_item-vtweg.
          PERFORM cursor_pos_notation    USING 'V_EAN_DET001-DATEFROM'
                                                  l_cursor
                                        CHANGING  l_cursor_notation.
             PERFORM bdc_field       USING l_cursor_notation
                                        l_v_date.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        l_cursor_notation.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=SAVE'.
        ENDLOOP.
    Here my ok code for page down is =P+  so i am looping on the table control data and then populating the bdc table after this i will populate the remaing info required for the call transaction and refresh bdcdata.
    thats it no need to do recording 1000 times.
    now if u do like this it doesn't depend on the number of records on table control.
    it will take all the records.
    Reward if useful.
    Regards,
    sasi
    Regards,
    sasi

  • How can we do the validation for non visible records in table control.

    Hi Experts,
      I have a table control which displays list of material details. I have a button to upload the material details from excel file to table control directly. I have to validate all the customers which are exist in the table. But my item (Material) table control displays only 5 rows i.e only 5 entries are visible in module pool screen. The validation is done for 5 records only in PAI event, but i need to do validation for rest of the records too (Which are not visible on items table), if validation fails then needs to display error message.
      How can we do the validation for non visible records in table control.
    Regards,
    Bujji

    Hi,
    try validating material before displaying it in table control...'
    Rgds/Abhhi

  • How to save the selected records from Table control in dialog programming

    Hiiiiiiii Every1
    Actually the problem is like this:-
    I have to select some records from table control and then want to save the selected records in DB table.
    Example
    I have some rows having inforamtion bout employees...
    Now what i want is that when i click on 'SAVE' button then these selected rows should be moved into DB table.
    Sachin Dhingra

    see below example, I have added INSERT option after DELETE option.
    REPORT demo_dynpro_tabcont_loop_at.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA cols LIKE LINE OF flights-cols.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn.
    TABLES demo_conn.
    SELECT * FROM spfli INTO TABLE itab.
    LOOP AT flights-cols INTO cols WHERE index GT 2.
      cols-screen-input = '0'.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
      MODIFY itab FROM demo_conn INDEX flights-current_line.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'TOGGLE'.
          LOOP AT flights-cols INTO cols WHERE index GT 2.
            IF  cols-screen-input = '0'.
              cols-screen-input = '1'.
            ELSEIF  cols-screen-input = '1'.
              cols-screen-input = '0'.
            ENDIF.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDLOOP.
        WHEN 'SORT_UP'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) ASCENDING.
            cols-selected = ' '.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'SORT_DOWN'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) DESCENDING.
            cols-selected = ' '.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'DELETE'.
          READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'.
          IF sy-subrc = 0.
            LOOP AT itab INTO demo_conn WHERE mark = 'X'.
              DELETE itab.
            ENDLOOP.
          ENDIF.
        WHEN 'INSERT'.
          READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'.
          IF sy-subrc = 0.
            LOOP AT itab INTO demo_conn WHERE mark = 'X'.
              itab1 = itab.
              modify itab1.
            ENDLOOP.
          ENDIF.
          if not itab1 is initial.
            INSERT dbtab FROM TABLE itab1.
          endif.
      ENDCASE.
    ENDMODULE.

  • BDC for existing record in table control

    Hi,
    I have a requirement to change existing records in table control through BDC. Is there any way I can choose the respective record from Table Control through BDC dynamically.
    Regards
    Akash

    /J4I/015PER, this transaction is used for adding permits to Operation in WEC. It has list of operations in Table Control. Permit can be added for choosing the operation from table control.
    Our custom program is designed to add permits for the operation. So if I have to use the above transaction for adding permits, then first I have to choose the correct operation from the table control and then add permit.

  • Problem in modifying the existing record in table control

    Hi Experts,
    I have one table control.I have entered one record and save it.When I am modifying the same record a duplicate record is created.I need if I modify the same record that record should only modify.How to delete the duplicate record.

    Hi,
    In Flow logic.
    LOOP .                        
      MODULE tbc_modify ON CHAIN-REQUEST.
      MODULE tbc_mark.     
    ENDLOOP.    
    In module.
    MODULE tbc_modify INPUT.
      MODIFY t_data
        FROM fs_data
       INDEX tbc-current_line.
      IF sy-subrc NE 0.
        APPEND fs_data TO t_data.
      ENDIF.                              
    ENDMODULE.                            
    MODULE tbc_mark INPUT.
      DATA: tbc_wa2 LIKE LINE OF t_data.
      IF tbc-line_sel_mode = 1
      AND fs_data-mark = 'X'.
        LOOP AT t_data  INTO tbc_wa2
         WHERE mark = 'X'.
          tbc_wa2-mark = ''.
          MODIFY t_data
            FROM tbc_wa2
            TRANSPORTING mark.
        ENDLOOP.                          .
      ENDIF.                             
      MODIFY t_data  FROM fs_data
        INDEX tbc-current_line
        TRANSPORTING mark.      
    ENDMODULE.
    Edited by: sapabap403 on Aug 31, 2011 9:29 AM

  • How to delete record from table control in BDC?

    Hello friends,
    I am running a BDC program to delete records.
    I have file with following records and i got these records into t_itab.
    Material     Plant     Start date     End date     Cost
    MQ100001     S001     09/01/2008     09/31/2008     55.00
    MQ100004     S002     09/01/2008     09/31/2008     56.00
    MQ100008     S003     09/01/2008     09/31/2008     57.00
    Now, I have BDC transaction in which table control screen which contains following structure.
    MQ100001     S001     09/01/2008     09/31/2008     55.00
    MQ100002     S002     09/01/2008     09/31/2008     56.00
    MQ100004     S003     09/01/2008     09/31/2008     47.00     
    MQ100005     S004     09/01/2008     09/31/2008     25.00
    MQ100006     S012     09/01/2008     09/31/2008     76.00
    MQ100007     S033     09/01/2008     09/31/2008     17.00
    MQ100008     S011     09/01/2008     09/31/2008     95.00
    MQ100009     S002     09/01/2008     09/31/2008     46.00
    I have recorded from SHDB in which first record will be delete.
    So, when i loop through t_itab,instead of deleting MQ100001,MQ100004 and MQ100008 from BDC screen,
    it is deleting MQ100001,MQ100002 and MQ100004 (first record for each process ).
    Which i don't want to.
    Is there any facility in BDC to put records on top which i want to delete?
    Please guide me.
    Regards,
    RH

    Hi,
    While doing recording check for Filter button available for the table control, if it available then do the recording for the same.
    Once it is done while passing the data from internal table put the value into Filter field.
    Hope it resolves your issue.
    Thanks & Regards.
    Nagaraj Kalbavi

  • How to delete record from table control using BDC?

    Hello friends,
    I am running a BDC program to delete records.
    I have file with following records and i got these records into t_itab.
    Material     Plant     Start date     End date     Cost
    MQ100001     S001     09/01/2008     09/31/2008     55.00
    MQ100004     S002     09/01/2008     09/31/2008     56.00
    MQ100008     S003     09/01/2008     09/31/2008     57.00
    Now, I have BDC transaction in which table control screen which contains following structure.
    MQ100001     S001     09/01/2008     09/31/2008     55.00
    MQ100002     S002     09/01/2008     09/31/2008     56.00
    MQ100004     S003     09/01/2008     09/31/2008     47.00     
    MQ100005     S004     09/01/2008     09/31/2008     25.00
    MQ100006     S012     09/01/2008     09/31/2008     76.00
    MQ100007     S033     09/01/2008     09/31/2008     17.00
    MQ100008     S011     09/01/2008     09/31/2008     95.00
    MQ100009     S002     09/01/2008     09/31/2008     46.00
    I have recorded from SHDB in which first record will be delete.
    So, when i loop through t_itab,instead of deleting MQ100001,MQ100004 and MQ100008 from BDC screen,
    it is deleting MQ100001,MQ100002 and MQ100004 (first record for each process ).
    Which i don't want to.
    Is there any facility in BDC to put records on top which i want to delete?
    Please guide me.
    Regards,
    RH

    One option is to identify the table and find out the location as the number of row which should be deleted from the table and then in the bdc program instead of postioning the cursor on the row 1(using the statement perform bdc_cursor ....(01)), replace the 01 with the row number.
    Second option is that if a filter control is available for the table control, then filter the data each and every time with the material number to be deleted and then delete the first row.
    Regards
    Farzan

  • How to execute multiple records in table control

    HI.
    I have a requirement that in table control user will select more than one row and when he clicks 'SAVE' it should go and sit in a custom table. how to pass more than one records.
    thanks & regards.
    sandeep

    Hi Sandeep,
    I understand your requirement .......
    See this standard program........
    <b>" DEMO_DYNPRO_TABCONT_LOOP_AT "</b>
    <b>Understand how DELETE button is working,inorder to delete multiple lines....Copy this program if necessary..OK.
    Simply,Replace DELETE statement with your INSERT statement to push records into your custom table....very easily you can do it.</b>
    <b>Reward all helpful answers.</b><b>
    Hope you problem is solved.</b>
    Regards,
    V.Raghavender.

  • Regd updation of one record in table control

    hai all
    i have a table control with 100 fields with 200
    records in the table control.
    i want to change one particular record in the 17th
    field.
    how to update that record,,please ,
    awaiting replies

    Please check the code.
    PROCESS BEFORE OUTPUT.
    MODULE status_9010.
    LOOP WITH CONTROL tab_control.
    MODULE move_data_to_table.
    ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP WITH CONTROL tab_control.
    MODULE move_data_from_table.
    ENDLOOP.
    *& Module move_data_to_table OUTPUT
    This is to move the data from the internal table to the table control
    MODULE move_data_to_table OUTPUT.
    This is to move the data from the internal table to the table control
    zmpets_mode-modecode,zmpets_range-rangeid,zmpets_servfacto-factor are column name if *table control
    READ TABLE int_factor INDEX tab_control-current_line.
    IF sy-subrc = 0.
    zmpets_mode-modecode = int_factor-modecode.
    zmpets_range-rangeid = int_factor-rangeid.
    zmpets_servfacto-factor = int_factor-factor.
    ENDIF.
    ENDMODULE. " move_data_to_table OUTPUT
    *& Module move_data_from_table INPUT
    Date is moved from the table control to the Internal Table
    MODULE move_data_from_table INPUT.
    To move the data from the table control to internal table 'INT_FACTOR.
    int_factor-modecode = zmpets_mode-modecode.
    int_factor-rangeid = zmpets_range-rangeid.
    int_factor-factor = zmpets_servfacto-factor.
    MODIFY int_factor INDEX tab_control-current_line.
    IF sy-subrc NE 0.
    APPEND int_factor.
    CLEAR int_factor.
    ENDIF.
    ENDIF.
    ENDMODULE. " move_data_from_table INPUT
    Regards

  • How to delete records in Table control

    Hi,
    i defined  a table control in which it has 5 records and i have 1 ''DELETE button.
    if i select a record and if i click on delete button.
    The selected button has to be deleted.
    Please let me know how i can i do..if possible with sample codes..
    Thanks in advance.

    Hi Andrew,
    In the PAI event, you need to handle the DELETE logic.
    Just have a look at the following code.
    OK_CODE = SY-UCOMM.
    Case OK_CODE.
    When 'DELETE'.
    Loop at internal table where CHECKBOX = 'X'. " Checkbox is marked.
    lv_sytabix = sy-tabix.
    If sy-subrc eq 0.
      Delete from itab index lv_sytabix. " Deleting values from ITAB
    Endif.
    Endloop.
    Endcase.
    Also have a look at this demo dynpro code. This will let you know the exact syntax.
    DEMO_DYNPRO_TABCONT_LOOP_AT.
    Hope this will help.
    Thanks,
    Samantak.

  • Can set the cursor in next line when user inputted one record?table control

    For Dnypro Table control
    I just know when data check error, we can set the cursor to the error field of current line.
    Now user hope that after they inputted the data of one record, he enter the [ENTER], the cursor can be set to the next new line's first field.
    I tried to use such as
    [SET CURSOR FIELD 'WA_XXXX-XXXXX' LINES 5.].
    But if no any error , the cursor will be automatically setted to the field which setted at Cursor position in Dnypro's attribution
    Can it be realized?
    Thanks.

    try to use same procedure as when you program page down:
      DATA: ITAB_LINES LIKE SY-TABIX,
            FIRST_LINE LIKE SY-TABIX,
            J LIKE SY-TABIX.
      GET CURSOR FIELD CURSOR_FIELD.       "to see what Loop is selected
      DESCRIBE TABLE IRE05 LINES ITAB_LINES.
      RE05-LINES = ITAB_LINES.
        WHEN 'P+'.
    FIRST_LINE = RE05-TOP_LINE + LOOPLINE_IRE05.
    ->      FIRST_LINE = RE05-TOP_LINE + 1.
          J = RE05-LINES - LOOPLINE_IRE05 + 1.
          IF J LE 0.
            J = 1.
          ENDIF.
          IF FIRST_LINE LE J.
            RE05-TOP_LINE = FIRST_LINE.
          ELSE.
            RE05-TOP_LINE = J.
          ENDIF.
    Edited by: Andreas Mann on Feb 28, 2008 11:46 AM

  • Reg : Find the records  in Table control

    Dear all
    Im having one requirement in table control .  In my table control totally 100 records contains sales documents
    for Example
    100010
    100020
    100030
    In that Records how to find particluar sale document in table control. How to build find option in table control.
    If possible or not
    Thanks & regards
    Sri

    Hi Sridhar,
    You need to implement amodal screen for this and a Find button above the table control.
    or you can use POPUP_GET_VALUES FM
    after you enter a value in the POP up screen.
    " You need to put some effort to implement this, wish you to implement it successfully as this is possible
    READ TABLE ITAB WITH KEY VBELN = FIND_VBELN. " FIND_VBELN is the field on your find screen.
    if sy-subrc = 0.
    tc-top_line = sy-tabix. " this makes the record visible in the First position
    endif.
    PROCESS AFTER INPUT.
      LOOP AT itab.
        MODULE find.
      ENDLOOP.
    In Program
    MODULE find INPUT.
      DATA : tab TYPE STANDARD TABLE OF sval WITH HEADER LINE.
      REFRESH tab.
      CASE ok_code.
        WHEN 'FIND'.
          clear ok_code.
          tab-tabname = 'VBAK'.
          tab-fieldname = 'VBELN'.
          APPEND tab.
          CALL FUNCTION 'POPUP_GET_VALUES'
            EXPORTING
    *   NO_VALUE_CHECK        = ' '
              popup_title           = 'Find Sales Order'
       start_column          = '5'
       start_row             = '5'
    * IMPORTING
    *   RETURNCODE            =
            TABLES
              fields                = tab
    EXCEPTIONS
       error_in_fields       = 1
       OTHERS                = 2
          IF sy-subrc = 0.
            READ TABLE itab WITH KEY vbeln = tab-value.
            IF sy-subrc = 0.
              tc-top_line = sy-tabix.
            ENDIF.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " find  INPUT
    Cheerz
    Ram

Maybe you are looking for

  • FAQ: How Do I Download files from Revel?

    Downloading photos from Revel: Iphone or Ipad: On iOS you tap on the one photo, tap on the actions icon at the top right (up arrow) and then 'save original'. Downloading in this fashion will save the original full resolution photo without any edits t

  • CR4E "file not found" while trying to run CR project

    The only way I can run the .jsp file which calls my crystal report is by stopping Tomcat6 then right clicking on the .jsp file and clicking "run on server".  Of course when I do this none of my other java servlets or .jsp files work. If I start up To

  • Spring Loaded Folders in Bookmark Bar

    My apologies if this has already been asked (I couldn't find anything). Is it possible or is there a plugin that will allow folders in the bookmark bar to act like spring loaded finder folders? For example I have an Apple folder in my bookmarks bar w

  • Problem in joining results

    hi experts, i am newbie, please help me with my sql query table1 id X 1 1 2 1 3 1 1 1 3 1 table2 id Y 1 1 2 1 4 1 5 1 2 1 required output id X Y 1 2 1 2 1 2 3 2 0 4 0 1 5 0 1 my following query produces wrong output, please help me to correct/rewrite

  • My Mac book pro mouse is acting crazy, any suggestions?

    The trackpad on my Mac book pro suddenly started going crazy.  Any suggestions?