Table control in Selection Screen

Hi,
  Is it possible to keep table control and tabstrip control in selection screen without using dialog programming? I mean , using coding from program itself, have to get table in the selection screen,like how we are keeping checkbox and radio button from program itself . 
by
Mohan Ram
Moderator Message: Search before posting.
Edited by: kishan P on Sep 16, 2010 11:04 AM

Hi, Mohan
Please Always do a little Search Before Posting => [Search Results|http://forums.sdn.sap.com/search.jspa?threadID=&q=TablecontrolinSelectionScreen&objID=&dateRange=all&numResults=30&rankBy=10001]
Hope you will get the answer from the First Few Threads From Search Result.
Thanks and Regards,
Faisal

Similar Messages

  • Need Table Control in Selection Screen

    I have a selection screen with some fields. Now, below these fields, I need a table control in which i will have input parameter along with some check boxes so that i can enter data and use the same while executing the report.
    paste the code for the requirement how to add a table control on the selection screen.

    hi ramesh,
    i have a very same requirement as u did. pleae send me the code which u used.
    Till now, i have been able to display table control on selection screen. but, how to write or display the output or how to call the output screen. i have to display alv output.
    Please help on above issue.
    Thanks,
    Rajesh

  • Checkbox Within Table Control At Selection Screen

    Hello, there.
    In my selection screen (dialog) I'm using a table control which is based on an internal table.
    In that internal table I have a simple Yes/No field (declared as type XNULL for example).
    The problem is that I want it to be displayed as checkbox on the selection screen's table control and not as a simple string with size = 1 like it is..
    I hope it's clear and understood ...
    Thanks in advance,
    Rebeka

    Rebeka,
    Its very simple,
    In that field of table control just drag & drop the  checkbox.
    In Screen modules ,
    loop at itab.
    If Field = 'YES'.
    Checkbox = 'X'.
    else .
    clear checkbox.
    endif.
    endloop.
    Regards,
    TAlwinder

  • How do I execute some code when a line of a table control is selected?

    Hi,
    I would like to execute some code when a line of a table control is selected.  At the moment I have to select one or multiple rows and then press enter, this forces a screen refresh and my code is executed but I would like the code to be executed as soon as any line is selected.
    I've done something like this using ALV grids and object orientated code but is there a way of doing this in a normal non-OO table control?
    Thanks in advance.
    Gill

    Hi,
    U need to declare a char1 field for marking (mark field).  This will reflect with value 'X' in your tcontrol internal table for all the selected rows. 
    Now u need to handle the okcode for enter in your PAI.
    There u need to loop through the table for all marked fields.
    There after u can do what ever u want.
    Venkat.

  • Table control line selection issue

    HI im facing a problem in table control.
    I have a table control with selection column ( single ).
    First time when i select a row its is marked X in the internal table,
    Now again when i select another row .. The old row still holds the value X and the new row is gettign marked as X.
    The problem here is the old selection is not getting cleared in the internal table.
    This is the statement used in PAI
    MODIFY gt_header INDEX tbl_header-current_line FROM wa_header .
    Here the previous value is not getting cleared.

    KSD,
    During PAI Loop, the screen flow logic loops only through the visible table control lines. In your case, the user has scrolled down and seeing line 30 to 40 (say for example) after selecting a line in first page view. This is very common with any table control.
    Now user is viewing 1 to 10 lines of the TC and have selected 3rd line. User then scrolls down by pressing page-down - now PAI is triggered and the internal table's 3rd line is modified with MARK='X'. User then views lines 30 to 40 and selects 33rd line. Now table control will automatically clear the MARK in 3rd line in the Table Control only. But it is the responsibility of the developer written code to clear the same in the Internal Table.
    So within PAI Table Loop, you have to check the MARK which is coming from Screen to ABAP program every-time and if it is 'X', you have to clear any other line's MARK. Remeber you should not do this for multi-select. There is an attribute of the table control LINE_SEL_MODE. The above logic of clearing other lines' MARK should be implemented only after checking this attribute.
    So incidentally your solution was the appropriate one.
    Cheers,
    Suresh

  • Questions on handling two table controls on one screen.

    Can some people  please share some technology  tips on handling two table controls on one screen . 
    Thanks
    Moderator message - You'll find some cool tips if you search the forum or use Google first - post locked
    Edited by: Rob Burbank on Dec 7, 2009 11:20 AM

    hi
    other Table is in Disable mode.
    check that u have unticked the READ ONLY property of ur UI
    also check if u have binded the ENABLE property of ur table UI to WDY_BOOLEAN in some method
    and u r setting it to 'X'
    in the OnToggle event of ur Checkbox , set this attribute to 'X to make the checkbox ticked
    in the OnToggle event of ur Checkbox , set this attribute to ' ' to make the checkbox un ticked
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
        DATA ls_cn_node TYPE wd_this->element_cn_node .
        DATA lv_attr  LIKE ls_city-ca_attr.
    *   navigate from <CONTEXT> to <CN_VISIBLE> via lead selection
        lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
    *   get element via lead selection
        lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    *   set single attribute
        lo_el_cn_node->set_attribute(
          EXPORTING
            name =  `CA_ATTR`
            value = ' ' ).
    // set attribute CA_ATTR under CN_NODE to ' '
    // this will make the table UI control disabled
    // this is a code generated thru code wizard ( control +f7) , read context node/attribute
    // use SET_ATTRIBUTE method
    regards,
    amit

  • Custom Infotype - Using Table control in the screen.  IN OM

    Hi,
    I am having a requriement where in I need to create a custom infotype using table control in the screen. I have to create this in OM and I am using PPCI transaction to create the info type. I am able to create the infotype with fields but not table control. Please let me know if any one of you came across and help me with the process I need to follow.
    Thanks in advance.
    Venkat.

    Hello,
    After you create the info type throug PPCi, you can directly go to the Sceen module program created automatically while creating Info type and edit the screen.
    activate it after your changes.
    Regards,
    Srujan.

  • How to display data from internal table in the SELECTION-SCREEN

    Hello Experts,
    My requirement is to display the data's from an internal table in the selection screen. I tried using selection-screen comment. But it is working only for a single record. Can anyone please tell me how to do this?

    Hi Ritika,
    we cant use write statement inside selection-screen.
    see my coding.
    SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456.
      SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1
                                          NO INTERVALS.
        SELECT-OPTIONS SEL1 FOR SY-DATUM.
        PARAMETERS     PAR1(10).
    <b>** I WANT ALL RECORDS FROM AN INTERNAL TABLE HERE ONLY</b>
        SELECTION-SCREEN END OF BLOCK BL1.
      SELECTION-SCREEN PUSHBUTTON 2(10)  but1 USER-COMMAND cli1.
      SELECTION-SCREEN PUSHBUTTON 20(10)  but2 USER-COMMAND cli2.
    SELECTION-SCREEN END OF SCREEN 123.

  • Add a new column in item table control of va01 screen

    Hi All,
    i have requirement to add new column in item table control of va01 screen 4900 for the custome field of vbap table
    the required coloum is add with the help of access key
    however whem i am trying to save data, that custom field is not populate
    please let me know if any one had work on this

    I think i solved the problem . The single way to to that is to modify the SAP standard Screen.

  • How to hide table control in a screen

    Hi, Gems,
    I want to hide the table control.Using "loop at screen" I am able to hide all other components except table control.
    Can anyone tell me how to hide table control in a screen?
    Any help will be appreciated.
    -Thanks
    Surajit.

    Hi,
    In the PBO (in a module outside to the LOOP...ENDLOOP), use this
    MODULE status_0100 OUTPUT.
    IF sy-ucomm EQ space.   "Give the function code on which you want to make your table control go invisible
                                              "Give a space if you want your table control to remail invisible on display of the screen
        CLEAR: t_header[].
        LOOP AT tabcontrol1-cols[] INTO wa_control1.
          wa_control1-invisible = '1'.
          MODIFY tabcontrol1-cols[] FROM wa_control1 INDEX sy-tabix.
        ENDLOOP.
    ENDMODULE. 

  • How to transfer the contents of a line of a table control to second screen?

    Hi,
    I have a table control and I have entered some contents in one line of a table control .
    When i click on this line and then click on the detail button on the screen , it should take me to another screen and whatever I have entered in the table control should be transferred to the second screen .
    Please could anyone help me out with this .
    Regards,
    Sushanth H.S.

    Hi
    U need to get the index of the line of table control by command GET CURSOR:
    PROCESS PAI.
    LOOP AT ITAB.
       MODULE GET_CURSOR.
       MODULE MODIFY_ITAB.
    ENDLOOP.
    MODULE USER_COMMAND.
    Module to pick up the selected line:
    MODULE GET_CURSOR.
      GET CURSOR LINE VN_LINE.
    ENDMODULE.
    Module to transfer the data from table control to internal table:
    MODULE MODIFY_ITAB.
      ITAB-FIELD1 = <FIELD OF TABLE CONTROL>.
      MODIFY ITAB INDEX <TABLE CONTROL>-CURRENT_LINE.
    ENDMODULE.
    U should considere the variable line has the value of the index of the line of table control, so u need to calculate the number of the corresponding line of internal table:
    MODULE USER_COMMAND.
      CASE OK_CODE.
        WHEN 'DETAIL'.
    * Calculate the line of internal table:
           VN_LINE = <TABLE CONTROL>-TOP_LINE + VN_LINE - 1.
    * Read the data
           READ TABLE ITAB INDEX VN_LINE.
    * Transfer the data to the output structure of the new screen
           <STRUCTURE>-FIELD1 = ITAB-FIELD1.
    * Call the new screen
           SET SCREEN <NEW SCREEN>.
           LEAVE SCREEN.
    Max

  • Table control: Line selection single issue

    Hi experts,
    I have created a table control and in the screen painter I have defined the line selection as "Single" for table control.
    The table control can display upto 20 lines in a screen and i can select a single record only which pertains to my requirement. if I try to select two records it will not allow.
    Issue: consider  i select a single record from the first 20 lines displayed in screen, then i scroll the records in the table control so that it displays the records from 21 to 40. if I select a single record now from line 21 to 40, the first record that i selected is not getting deselected. That is, totally two lines are getting selected.
    How to overcome this issue
    Thanks in advance
    Regards
    Anand

    Ok
    The "problem" is here:
    Types: Begin of ty_ic,
      ic(20),
      desc(20),
      sel(1)                                 <--------------------------------
    End of ty_ic.
    You've ha a field for selected line and that field is used in table control definition as you've written:
    "Note: wa_ic is the structure used in table control and wa_ic-sel is the mark field defined the table control attributes"
    So you're using the structure WA_IC as header line of internal table IT_IC and also as input/put field of your table control (I mean the screen fields of table control are based on WA_IC).
    You don't need any code in PBO to move the data from internal table to table control, because the headerline of IT_IC and field of table control are the same, infact you've implemented only the code in PAI to save the data from table control to IT_IC:
    Loop at it_ic.
    Modify it_ic from wa_ic index tc_ic-current_line
    Endloop
    t's a good solution if it needs to transfer all data to table control automatically: it doesn't need any code in PBO
    but, of course, there'll be a problem when you don't need to display something, in this case you have to think a solution, I mean you have to write a code in order to avoid to display those data.
    It's the case of the selected line: in your situation all selected lines keep the selection, because the code to clear IT_IC-SEL is missing: only the user can deselect a line, but if he doesn't do it, the line will remain selected after navigation.
    So you make to be sure to clear all selected lines are not displayed.
    You need to create a code in PAI out of the loop of table control where you clear the flag SEL, in order to do it you need to consider:
    - The index of the first record displayed in table control is stored in field TC_IC-TOP_LINE
    - The index of the last record displayed in table control can be calculated: the variable SY-LOOPC indicates how many rows can be displayed in table control, so the last record will be: TC_IC-TOP_LINE + SY-LOOPC.
    So you need to clear the field SEL for all records not displayed, a code like this:
    PROCESS PAI.
      LOOP AT IT_IC.
         MODULE GET_LOOPC.
      ENDLOOP.
      MODULE CLEAR_SEL.
      MODULE GET_LOOPC..
          TOT_LINE_DISPLAYED = SY-LOOPC.
      ENDMODULE
      MODULE CLEAR_SEL.
    * Here you need to clear the selection of the records before of TOP_LINE
           IF TC_IC-TOP_LINE > 1.
              LOOP AT IT_IC INTO WA_IC  TO TC_IC-TOP_LINE.
                 CLEAR WA_IC-SEL.
                 MODIFY IT_IC FROM WA_IC.
              ENDLOOP.
         ENDIF.
    * Here you need to clear the selection of the records after the last one:
          LAST_INDEX = TOT_LINE_DISPLAYED + TC_IC-TOP_LINE.
         DESCRIBE TABLE IT_IC LINES SY-TABIX,
         IF SY-TABIX > LAST_INDEX.
              LOOP AT IT_IC INTO WA_IC  FROM LAST_INDEX.
                 CLEAR WA_IC-SEL.
                 MODIFY IT_IC FROM WA_IC.
              ENDLOOP.
         ENDIF.
      ENDMODULE.

  • Table display in Selection Screen

    In upper part of selection screen, there would be 2 parameters.
    In lower part of selection screen, there would be 2 table display side by side. Data of these two tables can be changed from here.
    Parameters are not related with tables data.
    After executing the program, all the data from those Database table will be shown into selection-screen's individual table area.
    After changing data, while click to 'save' button, changes would reflect into database.
    Can any one please help on this matter?

    HI,
          You can do in the following way.
        You have to create a different screen for holding the table control.. When the checkbox is ticked just call the screen using CALL SCREEN or LEAVE SCREEn in  your   program which will display your table control.
    or else
    Go with module pool program.
    Design the screen as your requirement.
    Under PBO write the bleow code.
    Create a module like MODULE_DEACTIVATE_TC.
    write the below code to invisible TC initially.
    IF CHECKBOX IS INITIAL.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'TC'.
    SCREEN-INPUT = '0'.
    SCREEN_INVISIBLE = '1'.
    MODIFY SCREEN.
    ENDIF.
    ENDIF.
    Create module inder PAI,to acivate TC
    MODULE ACTIVE_TC.
    inside module write bleow code.
    IF CHECKBOX EQ 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'TC'.
    SCREEN-INPUT = '1'.
    SCREEN_INVISIBLE = '0'.
    MODIFY SCREEN.
    ENDIF.
    ENDIF.
    Regards,
    Pavan.

  • Table Controls: - Find selected line index

    HI,
    I have a table control . In tis 4 lines are visible at a time..1 field in this table comntrol is a button.
    when the user clicks on a button, the details of the corresponding line should be used to trigger a new screen. If the no of lines in the table control is less than 4( o of visible lines) , i can use get cursor line, to get the index of the line selected. . but if i scrolled down and selected the button in the 15 th line, then get cursor line cannot be used as it will retrieve the no 3. CAn u please give me a solution.
    thnx.

    declare two variables to get line count and line index
    data: wrk_linecnt(10),
            wrk_lineindx(10).
    get cursor line wrk_linecnt.
    wrk_lineindx = <table control name>-top_line + wrk_linecnt - 1.
    read table <internal table used in table control> index wrk_lineindx.

  • Select table fields on selection screen

    I have a requirement, where I need to select the table fields dynamically from the selection screen and further I should give option to user to save selected fields as variant and display the final report with the selected fields as catalog.
    For EX: In the selection screen user have two options, one is to check the select fields option where all fields from KNA1 will display from that user will select few and he can save as variant. After execution the report output should display?
    Could you please guide me how to go ahead?
    Thanks,
    A Raghu.

    Hi Raghu,
    For your requirements, you have to define the all the select-options inyour code but at first display onlya few selected ones. Then you can give a button to the user to select the fields and depending on the selection you can hide/unhide the select-options.
    For e.g. you define the select-options on your screeen for all the fields of KNA1. But at first go, display only the customer. Now give a button to the user on the toolbar. When user clicks on the button, give a popup to the user displaying all the fields except customer and allow him to select them. Based on the selection of the user, you can hide/unhide the select-options for the remaining fields.
    Also, in this case your select query will be dynamic. The field list and the where clause have to be maintained in a string and then passed to the select statement.
    Try the functions: FREE_SELECTION_INIT, FREE_SELECTION_DIALOG and MASS_SEL_FIELDS_ENTERPRISE.
    Hope this helps,
    Regards,
    Himanshu

Maybe you are looking for

  • Data acquisition with time stamp

    Hi I'm using NI DAQ 6211 to acquire acceration, strain and temperature from a VI. I have made several modifications and my last two vis are attached. I need to get 1000 data points from a encoder and sampling the period is by far the best way to get

  • Help with WDScopeUtil in 2004s - Urgent please

    Hi, We are currently migrating our code from 2004 SP16 to 2004s. From the forum, I understood that we have to use WDScopeUtil in 2004s to pass data between pages and WDScopeUtil supports only Strings but We want to pass objects also. We came up with

  • Servlet variable in Server

    when i defined a global variable in a servlet,if there are more than one people to call the servlet in same time, and they all change the variable , what will happen? In Weblogic 6.1 mingzheng huo

  • Having trouble installing or uninstalling itunes

    While trying to download updated itunes , it stopped working . There may have been a problem the hard drive being maxed out . I took care of the space problem . Running windows XP .When I hit the start button , itunes is there , but it says it's empt

  • Extension Manager CS5 does not show Digital Publishing extension...

    ... even though the extension is installed for InDesign CS5 and operating normally. I've tried trashing the EM prefs file but that doesn't seem to make a difference. Have reinstalled extension several times. Any insights are appreciated!