Layout Management in Table Control

Hi Dialog Programming Experts,
I have a new requirement - adding Layout Management options in Table Control. This is dialog/module programming, not ALV Report. Is there a function module for this?
Thanks so much in advance for your help.
Regards,
Joyreen

Hi
For filter use the following function modules,
l_rightx-id = l_index.
  l_rightx-fieldname = 'DESCR'.
  l_rightx-text = text-054.
  APPEND l_rightx TO i_rightx.
  l_index = l_index + 1.
  CLEAR l_rightx.
  l_rightx-id = l_index.
  l_rightx-fieldname = 'DEL_CM'.
  l_rightx-text = text-055.
  APPEND l_rightx TO i_rightx.
CALL FUNCTION 'CEP_DOUBLE_ALV'
       EXPORTING
            i_title_left  = text-034
            i_title_right = text-035
            i_popup_title = text-036
       IMPORTING
            e_cancelled   = l_cancelled
       TABLES
            t_leftx       = i_leftx[]
            t_rightx      = i_rightx[].
Firstly populate the right table with all fields which you want in the filtering condition. The left table will be populated once the use selects some fields and transfer it to the left portion of the dialog.
Then use the following FM like this.
DATA: i_group TYPE lvc_t_sgrp.
      CALL FUNCTION 'LVC_FILTER_DIALOG'
           EXPORTING
                it_fieldcat   = i_fldcat1
                it_groups     = i_group
           TABLES
                it_data       = i_ziteminvoice[]
           CHANGING
                ct_filter_lvc = i_filter
           EXCEPTIONS
                no_change     = 1
                OTHERS        = 2.
here filter table should have fields from left table above.
Once you get the filter data, populate range table for each fields and then delete your internal table using these range.
CASE l_filter-fieldname.
              WHEN 'ITMNO'.
                l_itmno-sign = l_filter-sign.
                l_itmno-option = l_filter-option.
                l_itmno-low = l_filter-low.
                l_itmno-high = l_filter-high.
                APPEND l_itmno TO li_itmno.
                CLEAR l_itmno.
DELETE i_ziteminvoice WHERE NOT  itmno IN li_itmno OR
                                      NOT  aedat IN li_aedat OR...
First check this if it works, else let me know.
Thanks
Sourav.

Similar Messages

  • Table control layout

    Hi All can someone tell me how to design the complete layout of a table control.
    please tell me step-by-step process.
    reward points for all useful ans

    hi,
    •Step 1 (Create new structure for table control)
    Type is name of structure (ZTC_EKKO) and press create
    •Step 2 (Create Program)
    Goto transaction SE80(Object Navigator) -> Repository Browser -> Program.
    Enter your program name, please ensure that is begins with SAPMZ…… as this is a module pool (dialog program).
    Press enter to create, and press yes!
    Ensure that you create a top include, and press Enter.
    Accept the name created for the top include.
    Press Enter.    
    Press Save
    •Step 3 (Create TOP include)
    Double click on the top include and enter following ABAP code:
    Tables: ZTC_EKKO.
    controls: tc100 type tableview using screen 100.
    data: ok_code type sy-ucomm.
    data: it_ekko type standard
                 table of ZTC_EKKO initial size 0,
               wa_ekko type ZTC_EKKO.
    data: ok_code type sy-ucomm.
         Press Save and Activate
    •Step 4 (Create screen)
    Right click the program to create a screen 100 for the dialog. Enter Short description, set screen type to Normal and enter 0 or blank into Next screen. Then move to Element List tab and enter the OK code as OK_CODE (i.e. the same as what you declared in the top include with data: ok_code type sy-ucomm).
    •Step 5 (Create table control)
    Press the Layout button to bring up the screen painter editor.
    Press table control button and drag it on to the screen, enter the name of table control created in TOP include (TC100). Now press the yellow button for attributes and set the table control as below options
    •Step 6 (Populate table control )
    Press the orange button (Fields). On the next screen enter ZTC_EKKO and press the ‘Get from Dict’ button. Select the fields you want (all) and press enter. Now drag them onto your Table Control.
    Below is the result, there will been syntax errors if we check now! So Save and go back into the flow logic tab.
    •Step 7 (Create flow control )
    Within the flow logic of screen 100 and create two modules, one to select the data from the database and the other to move the selected fields into the table control. Also insert the two loop statements to populate and retrieve the lines of the table control.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
      module data_retrieval.
      loop at it_ekko into wa_ekko with control TC100.
        module populate_screen.
      endloop.
    PROCESS AFTER INPUT.
      loop at it_ekko.
      endloop.
    MODULE USER_COMMAND_0100.
    Double click the module data_retrieval to create and click yes to get past the popup. Ensure that a new include is created to hold all the PBO modules (default). Press enter.
    Select 10 rows of data from the EKKO table and load into the internal table it_ekko. Go back to the flow logic to load this data into the Table Control.
    ***INCLUDE MZ_TCONTROL_DATA_RETRIEVALO01 .
    *&      Module  data_retrieval  OUTPUT
          text
    MODULE data_retrieval OUTPUT.
    select data from ekko table
      SELECT ebeln bukrs bstyp bsart
             bsakz loekz statu aedat
       UP TO 10 ROWS
        FROM ekko
        INTO CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDMODULE.                 " data_retrieval  OUTPUT
    Double click the module populate_screen to create. Now move the values in this loop from the wa_ekko into the Table Control with the move-corresponding statement.
    MODULE populate_screen OUTPUT.
        DATA: ld_line TYPE i.
      Set which line of table is a top of displayed table control
        IF sy-stepl = 1.
          tc100-lines =
            tc100-top_line + sy-loopc - 1.
        ENDIF.
      move fields from work area to scrren fields
        MOVE-CORRESPONDING wa_ekko TO ztc_ekko.
      ENDMODULE.                 " populate_screen  OUTPUT
    •Step 8 (Create transaction )
    Now create a transaction to test the table control program. Right click the Program and select create-> transaction.
    •Step 9 (Execute transaction )
    Execute transaction ZTC
    but table contro wizrd automatically generates the code. try it
    reward if its useful.

  • How to set cursor in table control?

    I have a table control (Screen 300) to display invoice number and amount. For some checks we have around 200 invoices to be displayed.  When user enters the invoice number in invoice text box and click on OK, it should highlight the invoice number and amount row or set the cursor position.
    I have another problem.
    Screen 300 is being called from Screen 200. When the user clicks on OK in 300, 300 is getting closed. Acutally it should be displayed with Cusor position or highlighted row.
    I appreaciate your help ... Thanks

    I believe that you can use the SET CURSOR statement to do the first part of your requirement.  Something like this should work:
    SET CURSOR FIELD w_field LINE w_line.
    Here's the info from SAP help:
    Effect
    : The cursor is positioned on the screen element whose name is contained in upper case in field. The data object field must be character-type and flat. The screen layout or a table control is scrolled in the display so that the screen element on which the cursor is positioned is visible. If the specified screen element is not found, the statement is ignored.
    If the specified screen element is part of a table control or a step loop, the line of the table control or group of the step loop in which the cursor is positioned on the specified screen element must be specified using the addition LINE. For the data object line, the type i is expected. If there is no line or group for the value of line, or the addition LINE is not specified, the statement is ignored. The statement is also ignored if the addition LINE is specified and the screen element is not part of a table control or step loop.
    I hope this helps.
    - April King

  • Insert,  Delete and Update options in Table control

    Experts,
    I have writen code for Insert,  Delete and Update options in Table control. They are not working properly...
    can any one send the code for the above please...
    Thanks in advance..

    Hi,
    Following steps will help you.
    1.TOP-INCLUDE
    DATA: ITAB1 LIKE KNA1 OCCURS 0 WITH HEADER LINE.
    DATA: ITAB2 LIKE KNA1 OCCURS 0 WITH HEADER LINE.
    DATA: WA LIKE KNA1.
    DATA: ANT TYPE I,CUR TYPE I.
    DATA: OK_CODE TYPE SY-UCOMM.
    CONTROLS: TABCTRL TYPE TABLEVIEW USING SCREEN 100.
    IN FLOWLOGIC
    PROCESS BEFORE OUTPUT.
    LOOP AT ITAB1 CURSOR CUR WITH CONTROL TABCTRL.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE CLEAR_DATA.
    LOOP AT ITAB1.
    MODULE MOVE_DATA.
    ENDLOOP.
    ADD “OK_CODE” IN ELEMENT LIST. CLICK ON LAYOUT AND  ADD TABLE CONTROL(name it as TABCTRL) AND PUSHBUTTONS AS FOLLOWS.
    SELECT THE FIELDS FROM PROGRAM. SAVE CHECK AND ACTIVATE.
    CLICK ON FLOWLOGIC EDITOR FROM APPLICATION TOOL BAR.
    DOUBLE CLICK ON MODULE “CLEAR_DATA”.
    write the in this module as below.
    CLEAR ITAB2. REFRESH ITAB2.
    DOUBLE CLICK ON MODULE “MOVE_DATA”.
    write the code in this module as below.
    APPEND ITAB1 TO ITAB2.
    ACTIVATE PAI AND WRITE THE CODE AS BELOW.
    CASE OK_CODE.
    WHEN 'FETCH'.
    SELECT * FROM KNA1 INTO TABLE ITAB1 UP TO 20 ROWS.
    TABCTRL-LINES = SY-DBCNT.
    WHEN 'ADD'.
    GET CURSOR LINE CNT.
    CNT = TABCTRL-TOP_LINE + CNT - 1.
    CLEAR WA.
    INSERT WA INTO ITAB1 INDEX CNT.
    WHEN 'MODIFY'.
    GET CURSOR LINE CNT.
    READ TABLE ITAB2 INDEX CNT.
    LOOP AT ITAB2.
    MODIFY KNA1 FROM ITAB2.
    ENDLOOP.
    SELECT * FROM KNA1 INTO TABLE ITAB1.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    ENDCASE.
    SAVE,CHECK AND ACTIVATE ALL.
    CREATE TCODE AND EXECUTE.
    contact if u hv any issues regarding this code.
    reward points,if it is useful.
    Thanks,
    Chandu.

  • How to view lines in table control after pressing vertical scroll bar

    Hi Experts, 
    I created table control in MPP, While design my layout I design table control with 12 lines(Fixed),  But I am moving my internal table values to table control. my internal table have more then 12 lines. My problem is I cant view my 13, 14th line in table control.  Could you help me in solve this issue?

    Please make sure that you have used the following code in the PBO
    DESCRIBE TABLE it_tab LINES tab_ctrl-lines.

  • HOW TO MAKE TABLE CONTROL NON EDITABLE

    hi all
    how to make table control non editable
    Thanks & Regards
    harsha

    Hi,
    Try this code in the PBO inside the module in the LOOP...ENDLOOP.
       IF SY-TCODE EQ 'ZEMPLDISPLAY'.
        LOOP AT SCREEN.
         if screen-name eq 'column1' or screen-name eq 'column2'.  "Give the names of the columns in the table control
          SCREEN-INPUT = '0'.
          MODIFY SCREEN.
        endif.
        ENDLOOP.
      ENDIF.
    Or you can go the Layout of the table control in Change mode and for every column's attributes, make it 'Output' only field. Check  'Output only' field.

  • Function module for table control

    Hi experts,
    I am creating the BDC program, In that I need to select the particular item from the table control say for example item 0010 or 0020 based on the input file and need to process from there.
    Is there any function module to select the particular item by passing item no say 0010 or 0020.
    Thanks in advance
    sai

    Hi
    I suppose there is no function module for table control.
    below solution might be useful to you.
    1) Do BDC recording for the table control with each condition you would like to incorporate in your program.
    2) copy the code of Table Control recording in your program and place the code in Loop of internal table.
    3) based on the condition  call the respective BDC recording of the table control
    4) By the above steps  you can manage the table control based on the condition.
    Regards
    Santosh Kumaar.M

  • How to manage scrolling in Table Control

    Hi,
    I have one scenario in which i have one table control in that one column contains check boxes. After i check, some check boxes in  some rows and press scrolling button means the selection previously made goes off. I want the selection remains selected.
    Please any one suggest me how to manage this.
    Regards,
    Mithun.

    Your PAI flow logic should be following this type of structure:
    process after input.
      module at_exit_command at exit-command. "don't exit here if you want TC data changes
      module d9999_before_tc.
      loop with control tc_9999.
        chain.
          field:
            gs_9999_tc-sel,
            gs_9999_tc-checkbox.
          module d9999_line_tc_handler.  "hold onto TC row data in here
        endchain.
      endloop.
      module d9999_user_command. 
      module d9999_pai_scroll.  "scroll the table control
    As noted above, you need to catch the values of your checkboxes within the loop / endloop for the table control, and do any scrolling after this.
    Jonathan

  • I Want manage cluster table view . I control this  table

    Hi Abaper ;
    I Want manage cluster table view . I control this  table ( which cell change or delete or add  ) I use total internal table ( creating by system ) but total table has a line and some data is incorrect .
    for example :
    in database data :
                                term      stundet_name          lesson_id          lesson_name    
                                2005          ahmet                       1                  Matematik
                                2005          yasin                        2                      Tarih
    I view data   
                                term      stundet_name          lesson_id          lesson_name    
                                2001          ahmet                       1                  Matematik
                                2001          yasin                        2                      Tarih
    (term data false)

    Hi Turgut
    Check this out ; I dont try but maybe useful for you.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/a1/e4521aa2f511d1a5630000e82deaaa/content.htm

  • Search help in table control using attributes window in layout

    Hi.
    I am trying to use search help for my table control fields. the table control basically displays product details.
    I have a name field, description field and price field. I have named my field to match the the structure of my search help (stProducts-name, stProducts-description and stProducts-price respectfully). then for each i entered shProducts (my search help) in the search help field.
    However, upon running the program, in the name, description and price field, by clicking f4 the name of the product is displayed in the field irrespective to which column I am selecting. Also the values in the other fields are not affected.
    Any help would be appreciated
    Thank you

    Hi Charla,
    <li> Here is a sample program how to update other fields when you select f4 help for one field.
    <li> Need to apply in module pool program..
    REPORT zvenkat_f4_for_parameters MESSAGE-ID zmsg .
    TYPES:
       BEGIN OF t_t001w,
         werks       TYPE t001w-werks,
         name1       TYPE t001w-name1,
       END OF t_t001w,
       t_return_tab  TYPE ddshretval.
    DATA:w_t001w      TYPE t_t001w,
         w_return_tab TYPE t_return_tab.
    DATA:i_t001w      TYPE STANDARD TABLE OF t_t001w,
         i_return_tab TYPE STANDARD TABLE OF t_return_tab.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS :p_werks TYPE t001w-werks,
                p_name1 TYPE t001w-name1.
    SELECTION-SCREEN END OF BLOCK b1.
    " AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
      PERFORM f4_help_for_palant.
    *&      Form  f4_help_for_palant
    FORM f4_help_for_palant.
      DATA:
          w_dynpfields TYPE dynpread,
          i_dynpfields LIKE STANDARD TABLE OF dynpread.
      IF i_t001w[] IS INITIAL.
        SELECT werks name1
        FROM t001w
        INTO TABLE i_t001w.
      ENDIF.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'WERKS'
          dynpprog    = sy-repid
          dynpnr      = sy-dynnr
          dynprofield = 'P_WERKS'
          value_org   = 'S'
        TABLES
          value_tab   = i_t001w
          return_tab  = i_return_tab.
      READ TABLE i_return_tab INTO w_return_tab INDEX 1.
      p_werks = w_return_tab-fieldval.
      READ TABLE i_t001w INTO w_t001w WITH KEY werks = p_werks.
      IF sy-subrc = 0.
        w_dynpfields-fieldname    = 'P_NAME1'.
        w_dynpfields-fieldvalue   = w_t001w-name1.
        APPEND w_dynpfields TO i_dynpfields.
        CLEAR w_dynpfields.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname     = sy-repid
            dynumb     = sy-dynnr
          TABLES
            dynpfields = i_dynpfields.
      ENDIF.
    ENDFORM.                    " f4_help_for_palant
    Thanks
    Venkat.O

  • Table control layout column positions are different with dislay positions

    Hello All,
               I added one column to standard table control at the 13th position,but at the display of that table control its showing at
    96th position.please suggest me how to set that to 13th position at dislay.
    Thanks in advance

    Hi,
    You can do this using a single table control.
    There is a option in the screen parameters to hide the column of the table control.
    So based on the list value, you loop at screen containing the table control, and set the option to make the column invisible.. Try this.
    Hope it helps..
    Regards,
    Sekar

  • Not able to table control option in edit in layout

    HI,
    I am designing a screen with table control wizard ,but i am not able to see the option of table control wizard in edit.
    Message was edited by:
            nandulamatam Bharath
    Message was edited by:
            nandulamatam Bharath

    Hi
    Install the correct and latest patch of SAP GUI for this problem
    take the help of a BASIS person in this regard , he will install the same
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Table control View in Maintenance order Services tab

    Hi Experts,
    I am trying to change the table control fields of the services tab of the maintenance order , when we use PM03 control key to generate services PR.
    I try to remove some check box which are earlier defined as invisible to make it visible. However after saving the system variant system doesnt take the changes. It is coming back to the original .
    Here are couple of fields I would like to change the setting. As of now I am trying to change the below mentioned field to visible . Presently it is in invisible mode.
    Fields
    Formula::ESLL-FORMELNR,
    Form values: ESLL-FRMVAL1 to ESLL-FRMVAL5 and
    User field3:  ESLL-USERF1_TXT
    program name SAPLMLSP
    Control TC_VIEW
    I am following the below. Kindly let me know whether I am following the right step.
    1) Click on tbale setting
    2) CLick on administrator
    3) Select the field and do the necessary change to make visible or invisible.
    4)Activate
    5)Close
    6) save.
    RG
    Vinod
    Edited by: vnodpm on Feb 6, 2012 7:07 PM

    Hi,
    The IMG customizing will have greater priority than the screen table controls (also specific program logic can supersede the table controls). Check the customizing for service screen at following path:
    SPRO - Materials Management - External Services Management - Define Screen Layout
    -Paul

  • Color rows in table control

    Hi all,
    Does anyone know how I can color spesific lines in a table
    control?
    I've only been able to color columns.
    Thanx,
    Baruch.

    Hi
    Are you speaking about classical TABLE CONTROL? No ALV?
    In this case you should modify the attribute using the LOOP/ENDLOOP statament into LOOP/ENDLOOP of TC in PBO:
    PROCESS PBO.
    LOOP AT ...
       MODULE LOOP_SCREEN.
    ENDLOOP.
    PROCESS PAI.
    MODULE LOOP_SCREEN.
      IF ......
        LOOP AT SCREEN.
          SCREEN-INTENSIFIED = 1.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    ENDLOOP.
    If you're speaking about ALV:
    In your OUTPUT TABLE you need add a new field to manage the color:
    DATA: BEGIN OT T_OUTPUT OCCURS 0,
            TCOLOR TYPE SLIS_T_SPECIALCOL_ALV,
          END   OF T_OUTPUT.
    It needs to specify the field name in layout structure:
    IS_LAYOUT-coltab_fieldname = 'TCOLOR'.
    So while you're appending the record into T_OUTPUT you fill the structure TCOLOR too.
    These is a table where you need all fields (so the cells of a row) you want to change the color.
    DATA: WA_COLOR TYPE SLIS_SPECIALCOL_ALV.
    T_OUPUT-FIELD = ...........
    REFRESH T_OUTPUT-TCOLOR.
    WA_COLOR-FIELDNAME = <field name>
    WA_COLOR-COLOR-COL = <color number>.
    APPEND WA_COLOR TO T_OUTPUT-TCOLOR.
    This way is ok for classical ALV, if you're using OO ALV the way is the same but change the structure you have to use:
    IS_LAYOUT-CTAB_FNAME = 'TCOLOR'.
    Where TCOLOR is like LVC_T_SCOL
    Max

  • Does anyone know how to win a fight with layout manager?

    I am using the form designer in netBeans to design my page, which has a jPanel on the left and a number of controls on the right.
    My problem is that when I eventually get it to look half right at design time, it looks different at run time. The fonts are different, the combo boxes are a different height and some of my text boxes are 4 times as wide. http://RPSeaman.googlepages.com/layout.GIF shows both the design-time view and the run-time view. How can I win my fight with layout manager?

    I'd like to do an experiment where you take say 20 pairs of students of java, with each pair matched in terms of prior programming and java experience, general knowledge, etc... and set one of each pair to learn Swing using netbeans and its layout generator with the other pair learning to code Swing by hand. Then 6 months later compare their abilities. I'll bet that the code by hand group will blow the other group out of the water in terms of understanding and ability.
    Just my 2 Sheckel's worth.

Maybe you are looking for

  • Weird iTunes Match issue - song correct on computer and iPhone, wrong on iPad

    I hope someone can help. I use iTunes Match for my mobile devices, with my main home PC being the golden source/reference. Most songs work fine on my computer, iPhone 4S and iPad3 using iTunes Match ... however a few songs are incorrect on the iPad.

  • My lumia 720 stops responding

    My Lumia 720 stops responding. This is happening frequently while unlocking screen or sometimes while doing some other task. This issue has come up after gettiing updates

  • After 10.6.7 can't get desktop background to display

    This problem is similar to Linc Davis problem solved in this thread: https://discussions.apple.com/thread/2795229 In that thread I write: "I tried the [] from Linc Davis and it didn't work for me. I have a MBP bought in may 2010 i Sweden which is whe

  • To Create a Opportunity Using the FM

    Hi , I want to create a Opportunity by usinig the FM CRM_ORDER_MAINTAIN i want to pass In sales cycle phase , status, phase since , status since , Reason In relationships  Campaign , Referance Object so What are all the EXPORTING tables and CHANGING

  • Debugging of any Application on WAS

    Hello Everybody, Can two developers can debug the same application at the same time on the same server? If not, then can two developers can debug the different but dependant applications at the same time on the same server? What are the possible opti