Help in disabling display of record in table control

Hi all,
I need to disable the display of record from an internal table in table control.
I have the folllowing code:
PROCESS BEFORE OUTPUT.
Set status & title; possibly disable Proceed option
  MODULE status_0410.
Fill table control with data
  LOOP AT ts_cor
       INTO z2rlcr_screen_struc
       WITH CONTROL tc_cor
       CURSOR tc_cor-current_line.
    MODULE modify_screen.
  ENDLOOP.
module modify_screen output.
Don't allow any input for lines that would fail:
  if z2rlcr_screen_struc-status_code <> c_yellow or
     w_proceed = space.
     w_help_screen = c_yes.
  Iterate through screen
    loop at screen.
    Set screen input to 'off' if screen element is...
      if screen-name = 'Z2RLCR_SCREEN_STRUC-MANCODE' or
         screen-name = 'Z2RLCR_SCREEN_STRUC-REASDESC'.
        screen-input = c_off.
      endif.
      modify screen.
    endloop.
  endif.
Do not show the line if the line is deleted.
  if z2rlcr_screen_struc-del_line eq 'X'.
here I need the help if del_line eq 'X' then I should disable the
display of the whole record.
  endif.
endmodule.                 " MODIFY_SCREEN  OUTPUT
I hope its clear.
Any help will be appreciated.
Thanks
Sukumar.

Hi Sukumar,
Do you mean to say that the entry that you deleted should not be displayed in the table control?
If that is the case,then I think the following code can help you.
I had a similar requirement in my project and this is the code that I used.
Go through it and you will understand it.
CASE SY-COMM.
  WHEN 'DELETE'.
****To delete the seleceted line from table control****
      LOOP AT tb_schedule.           "tb-schedule is the name of the internal table used for table control.
        IF tb_schedule-mark = 'X'.
**tb_schedule is the internal table(same structure as tb_schedule) to hold the deleted entries.***
          MOVE-CORRESPONDING tb_schedule TO tb_schedule_del.
          APPEND tb_schedule_del.
          DELETE tb_schedule.
        ENDIF.
      ENDLOOP.
**to remove the deleted valules in the Ztable**
LOOP AT tb_schedule_del.
    ztm09_eket-ebeln = ztm09_ekko-ebeln.
    ztm09_eket-ebelp = tb_schedule_del-ebelp.
    ztm09_eket-etenr = tb_schedule_del-etenr.
    ztm09_eket-menge = tb_schedule_del-menge.
    ztm09_eket-eindt = tb_schedule_del-eindt.
****Delete the entries into schedule table***
    Delete ztm09_eket.
  ENDLOOP.
Hope this code will help you.
Revert for any querries.
Reward points if helpfull.
Regards,
Kashyap

Similar Messages

  • 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

  • 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 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

  • Problem in displaying o/p in Table Control

    Hi ,
    while displaying in table control.
    its is displaying  line twice.
    I have some contains in iti itab.
    which i am displaying itf itab through table control..
    i have coded like this...
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0112.
    LOOP at itf   WITH CONTROL TC  CURSOR tc-current_line.
        MODULE FILL_TABLE_CONTROL.
    ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE CANCEL AT EXIT-COMMAND.
    LOOP at itf.
        module read_table_INPUT.
      ENDLOOP.
    MODULE USER_COMMAND_0112.
    *&      Module  STATUS_0112  OUTPUT
          text
    MODULE STATUS_0112 OUTPUT.
      SET PF-STATUS 'ZTC'.
    SET TITLEBAR 'xxx'.
      DESCRIBE TABLE iti LINES  tc-lines.
    ENDMODULE.                 " STATUS_0112  OUTPUT
    MODULE fill_table_control OUTPUT
    MODULE fill_table_control OUTPUT.
    loop at iti   .
      READ TABLE  itf with key ingr_code = iti-ingr_code
                               ingr_desc = iti-ingr_desc.
            MOVE iti-INGR_CODE TO ITF-INGR_CODE.
            MOVE iti-INGR_DESC TO ITF-INGR_DESC.
            MOVE iti-CONC TO ITF-CONC.
            MOVE iti-QUANTITY TO ITF-QUANTITY.
            MOVE iti-UOM TO ITF-UOM.
            append ITF  ."index tc-current_line.
            endloop.
    ENDMODULE.                    "fill_table_control OUTPUT
    can any one help me

    loop at iti .
    READ TABLE itf with key ingr_code = iti-ingr_code
    ingr_desc = iti-ingr_desc.
    MOVE iti-INGR_CODE TO ITF-INGR_CODE.
    MOVE iti-INGR_DESC TO ITF-INGR_DESC.
    MOVE iti-CONC TO ITF-CONC.
    MOVE iti-QUANTITY TO ITF-QUANTITY.
    MOVE iti-UOM TO ITF-UOM.
    append ITF ."index tc-current_line.
    endloop
    You dont need to append the data , you have to Modify the data.
    Problem is with the above code.
    Correct to this...
    MODULE fill_table_control OUTPUT.
    READ TABLE itf index tc-current_line.
    MOVE iti-INGR_CODE TO ITF-INGR_CODE.
    MOVE iti-INGR_DESC TO ITF-INGR_DESC.
    MOVE iti-CONC TO ITF-CONC.
    MOVE iti-QUANTITY TO ITF-QUANTITY.
    MOVE iti-UOM TO ITF-UOM.
    endloop.
    ENDMODULE. "fill_table_control OUTPUT
    Regards
    Vijay Babu Dudla

  • How to display icon status in table control

    hi, i trying to display icon in table control its not displaying
    i given below statment.
    DATA: BEGIN OF WA_MARA,
            ICON1(4) TYPE C,
             END OF WA_MARA.
         INCLUDE <list>.
    MOVE ICON_GREEN_LIGHT TO IT_MARA-ICON1.
    APPEND IT_MARA..
    when i debugging it display green icon but after run the program its display ' @08@ '   in table control.
    how to display green icon in table control help me.

    Hi,
    check the link:
    Table control in custom infotypes

  • 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 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.

  • 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

  • Form does not display all records from table

    Hi guys
    I modified one form that was based on a signle DB table. I removed certain fields from the table and added some extra fields to that table. Then based on the new table I also modified the form and removed the text items related to old fields in the table and added new text items pointing to the new fields now. II have checked all the new items properties and they have don't seem to be wrong or so. But now the problem is the form does not display all the records from the table. before it used to display all records from the table when qureied but not now. It only certain records from the table containing all new data and also old data but the form does not display other records though I don't see any obvious discrepancy. Remember that the before doing the modifications, I have table back for the old, created another table that contained new records for the new fields, and then I inserted the old records and updated the new table data in the new table with these new table values. So this way I have got my new table. Could someone help why the new modified form fails to display all records from the new table updated table though it display some of them successfully.
    Any help will be appreciated.
    Thanks

    hi
    Set the block property of "Query All Records" to "YES"
    hope it will work.
    Faisal

  • How to Display multiple records in Table in VC without using BAPI.

    Hi All,
    I am working on Visual composer (NW2004s SP10). I am trying to display Poitems from BAPI_PO_GETDETAIL. I am creating my front end using VC. I have created one form and one Table where I want to display POItems. I am writing my logic of retrieving data from BAPI in CAF.I am connecting them in Guided procedures.When I run my process in Guided Procedures I am getting single row displayed in table. Can Anyone help me how to display multiple rows in table.
    Regards,
    Sheetal

    Hi Sheetal,
    if the BAPI returns a table, then you get multiple rows. From which system is the BAPI, so that I can check the BAPI to give you further information.
    Best Regards,
    marcel

  • How to Enable a Selected single record from Table control...

    Hi,
    I have 5 records in my table control and in screen Painter in Made all the fields in Table control as Output field.
    and  successfully all my Table control fields are disabled...
    Now Now i want to enable the record which i selected n rest all the 4 records should be in Disable.
    what i did is:
    in PBO.
    loop at itab into wa with contol TBC1 .
    Module XYZ.
    endloop.
    Module XYZ.
    loop at screen.
    if screen-group = 'x'.
    screen-input =  1.
    modify screen.
    endif.
    End Module.
    Please help me....
    Thanks,

    hi
    in the layout of the screen u might have dragged and dropped the table control
    double click on it u will get attributes screen in that u select MULTIPLE or SINGLE under Line-Selection
    under attributes tab based on ur requirement.
    table control declaration:
    controls : control type tableview using screen 8000.
    the internal table in table control must be like
    data : begin of itab occurs 0,
    empno type .......,
    empname......,
    empcity.....,
    check(1), " for tab selection"
    end of itab.
    data : itab1 like itab occurs 0 with header line.
    data : flag.
    data : wk_init type i.
    data : lines type i.
    in the attributes screen of the table control
    pass the value ITAB-CHECK to the field W/SELECTION
    in SE51
    PBO
    Module_status_0800
    loop with control table_control_name.
    module_fill_tcontrol.
    endloop.
    PAI
    Module_user_command_0800
    loop with control table_control_name.
    module_read_tcontrol.
    endloop.
    in se38
    Module_status_0800.
    describe table itab1 lines lines.
    control-lines = lines.
    endmodule.
    Module_fill_tcontrol.
    describe table itab1 lines wk_init.
      if wk_init is not initial.
        read table itab1 into itab index control-current_line.
      endif.
    for enabling a row in the table control:
    if sy-ucomm = 'EDIT'.
        loop at screen.
          if flag is initial.
            screen-input = 0.
          elseif ( flag eq 'Y' ).
            if  ( ( screen-name = 'ITAB-EMPNO' or
                    screen-name = 'ITAB-EMPNAME' or
                    screen-name = 'ITAB-EMPCITY' )   
              and control-line_selector eq itab-check
              and control-current_line le lines ).
              screen-input = 1.
            else.
            endif.
          endif.
          modify screen.
        endloop.
      endif.
    endmodule.
    Module_read_tcontrol.
    READ TABLE itab1 INDEX control-current_line.
    IF sy-subrc EQ 0.
    MODIFY itab1 FROM itab INDEX control-current_line.
    ELSE.
    MOVE-CORRESPONDING itab TO itab1.
    APPEND itab1.
    CLEAR itab1.
    ENDIF.
    endmodule.
    module_user_command.
    case sy-ucomm.
    when 'EDIT'. -
    > Function Code assigned to the pushbutton to enable the field 
          flag = 'Y'.
    endcase.
    endmodule.
    Regards
    Murali.M

  • How to append parameter with URL for each record in table control?

    Hi,
    I have one table control which contains 5 columns.
    (tripno, startdate, destination, reason, activities)
    In 5th column, i need to display URL for each record.
    for ex:
    www.abc.com/test?tripno=1
    www.abc.com/test?tripno=2
    www.abc.com/test?tripno=3
    when user clicks a particular hyperlink, it navigates to another page/component thru URL with one key field(tripno) to retrieve related records in next page.
    1) i am not able to assign tripno to each record. when i assign tripno, its taking the last value which i assigned. ie. tripno=3 only.
    How to assign URL to Reference field of LINK_TO_URL element at run time?
    OR
    2) we can do like this.
    Simply assign url to reach record without key field.
    www.abc.com/test
    www.abc.com/test
    www.abc.com/test
    when user clicks a particular link, we can assign corresponding key field to the URL.
    Where should i write this event? Bcoz, LINK_TO_URL doesnot have event.
    how to do?

    Hi MOg.
    Not sure whether I understand you .. but in the 5th column you want to have the reference URL. Is this the activities columen from you example?
    Nevertheless, you need a attribute (String) in your context node which contains the URL. Bind this to the reference filed of linktourl. If you can not extend the structure you can create a sub node (cardinality 1:1)  which contains the refernce attribute.
    Then loop over all elements and concatenate www.abc.com/test?tripno= with the tripno of the current element into the reference field.
    Hope tis helps,
    Sascha.
    Bind the

  • Regarding PAI event display of data in table control

    Hi all,
    I have a drop down list in my module pool screen and based on my selection the value in not getting captured as i have to display table control data (or item level data ) based on the delivery that is selected from the drop down.
    The first level of items are getting displayed in the table control for the first time but after i select the delivery for the next time no delivery is getting captured in the screen field and so on no items are getting changed in the table control.
    Pls let me know how to capture the delivery number selected from the drop down list box and so on i can write the code for displaying the new set of items in the table control for the new delivery number selected.
    Thankyou for your help.
    Amar.

    Hi All,
    I have solved my problum of getting the values in the drop down list using the function module vrm_set_values.
    Earlier it dint capture the values in the list because i am not aware of the key field its having apart from the text field.
    I have passed some numberic value to the key field earlier and the actual text to be displayed in the TEXT field.
    Anyways i came to know that we need to pass the same field values in both key field and text field only then the values wud be captured. So my problum is solved.
    I have another question on the same now
    My requirement is on selecting a value in the dropdown list the delivery items shud come in the dropdown list which is coming.
    I have another drop down in the item level so i wrote the vrm set values in the item level for one field based on that value the other fields in the table control needs to get data.
    I have provided the drop down item level field also but the problum is let us say we have 3 items and in the table control has 15 items that can be displayed. The dropdown for that field shud come only upto 3 records but it is coming for the entire column as the screen field name is same for the entire column.
    example
    f1   f2  f3 are the fields
    and the table control can accomodate 10 records
    Let us say we have 3 line items
    now the drop down is appearing for all the 15 records for field f2 where it shud appear for only  3 records.
    pls let me know if there any option in such a way that we can restrict upto 3 records.
    Thanks in advance.
    Amar.

Maybe you are looking for

  • Price changes in Purchase order Line Items its displaying as"WF-BATCH"

    Hi Experts, I need some Information about Price changes in Purchase order Line Items,In PO Documents Price changes through this wf-batch has  changed the value of this row to xxx.xx USD, which does not correspond the invoice. If  i selected the Item

  • LR4 Volumes / Hard Drives not displayed in Folders Panel

    I recentely upgraded to LR4.1 and it seems to have done something strange with my Folders. As you can see in the earlier version all of my harddrives are displayed as panel items in the folders panel. However now it's only displaying the boot drive a

  • Ipod is unable to be restored

    I have a 2nd generation Ipod classic. I dropped it and after an hour all the music disappeared and the ipod appeared to be full. I plugged it into the computer, but itunes wouldn't recognize it. When it did, I tried to restore it, but it didn't work.

  • Roaming profile in multiple servers and multiple locations

    I am planning to keep our roaming profile in Primary Domain Controller and when it fails it has to get the profile from Child Domain Controller. The child dc can be in the same location or in any branch location. Could I have the configuration steps?

  • Making sure Network High Speed Cable is being used

    Hey all, I have a quick question. I have a new iMac 24 inch Alum computer. I have a highspeed internet system already. My modem is both wireless and linked with cables. I have the cable linked into my Mac. How can I make sure that my iMac is using th