Copy Functionality of Table Control like System's

Hi all,
  I have a situation in table control...
  The scenario is like this ... I have a table control in which i am able to display the data about the sales persons. Now whenever i select a row from that table control it should copy that row and show that row in another control table in the editable option so that the user can edit the data.. Then on clicking the save button it should be updated into the internal table ...
Waiting for response..
Thank You

Hi friend,
                     I have visited the link u have given . But it is a report program .it is available in ABAPDOCU tcode.
ABAPDOCU----
>ABAP User Dialogs -
>Screens -
>Complex Screen Elements -
>Table Control with Scrolling .
It is a REPORT program. and not a module pool program. plz check this in ur link also.
REPORT demo_dynpro_tabcont_loop.    &
*SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.* -
> this statement is used only in report program and system does not allow us to use in module pool program.
Second thing here data is retrived from spfli table where as my data will be whatever enduser enters it may be 15 lines , may be 50 lines or may be 200 lines and it shold be displayed on entry screen before clicking SAVE or any other user action.
My main problem is that I am unable to enter more than 11 entries in my entry screen. I want dynaamic table. Mean whichever enteries are entered they should be displayed on entry screen as well as can be scrolled up & down before saving and get saved after clicking SAVE button. here table control design is not imp because entry data depends on table control layout rows & which has limit. It can not be extended beyond certain level. i think max will be 20 Or 25 rows in layout. How to make it dynamic so that we can get any no. of entries in entry screen hiich canbe scrolled up & down.
Anyways thanks for ur reply And send some other soln.
Thanks & regards,
Ashish

Similar Messages

  • Page down functionality in table control BDC-CJ02 tcode

    Hi Friends,
    I am doing a BDC with Table control for Tcode CJ02.
    When I reach certain number of records, say 13, the page down functionality doesnt work.I tried different ways like using the BDC_OKCODE as "=P" and "=P+".Also, I tried doing a recording by pressing the down key in the table contral, in SHDB, but none of them worked.
    Refered a post in SDN as well, but it doesnt hold any solution.
    Do throw some light on the same to achieve page down functionality for the bdc tcode CJ02.
    Thanks in advance.
    Shri.

    Hi,
    I already posted an answer to that here Re: BDC scroll down with OK_CODE '=P+':
    P+ (=P+ in the BDC) is not a universal function code, but only one which is defined in ABAP lists . So, 99% of time, it doesn't work for all others situations (like yours).
    Scrolling a table control is not so easy to do. When you record a page down on a table control in SHDB, you'll get probably a /00 which corresponds to Enter. When you play the recording, it won't scroll. The issue is that "page down" is processed in 2 parts, it changes the "top line" of the table control, and executes Enter. But it's not possible to record/play the "top line" information.
    The solution is that the program usually implements a function code:
    either "add new line"
    or "position at line"
    Sometimes, the function code is hidden so you must look at inside the program (or search SAP notes, like here: [SAP note 187946 (No positioning on PRT overview in routing)|https://service.sap.com/sap/support/notes/187946 ])
    And sometimes, there's no function code at all, and then you're stuck ! (or use SAP GUI scripting, but it may only work in dialog).
    For CJ02, I can't tell how to scroll through BDC, but anyway, there is a BAPI (don't remember the name, search the forum, it will be easy to find it), so you should always prefer them over BDC.
    Sandra

  • How to copy function group from one SAP system to another

    dear all,
    our company will set up a sub-company currently,and the sub-company want to copy some programs from our SAP system.
    how to pack and copy function group?
    pls help me,tks!

    Hello  Snow zeng,
    Will the 2 systems be connected ? I.e Same land scape ?
    If they are non connected systems, check this Wiki by Marcin [How to copy Repository Objects between non-connected SAP systems|http://wiki.sdn.sap.com/wiki/display/ABAP/HowtocopyRepositoryObjectsbetweennon-connectedSAPsystems]
    Regards

  • To know the functionality of table control in ABAP Objects

    Hi,
    Is there any technique to achieve the functionality of table conrol in ABAP Objects?
    Thanks.

    Hello Raja
    If you are using an editable ALV grid then you have the functionality of a table control and much much more.
    ABAP-OO based ALV grids are much more powerful (and easier) than simple table controls.
    Regards
      Uwe

  • Page Up and Page down functionality in table control

    Hi,
        I want to add two pushbuttons in the module pool screen which has a table control that fetches data from the transparent table. One pushbutton is for the page up and other is for page down. If my table control <say tab_ctrl1> has 75 records in total with shows 25 at time so with a single page down it should show next 25 rows of the data.
    thanks
    ekta

    Hi,
    Use the function module SCROLLING_IN_TABLE.
    For ok_code pass P- for previous page and P+ for next page.
    Example:
       DATA L_TC_NEW_TOP_LINE     TYPE I.
         CALL FUNCTION 'SCROLLING_IN_TABLE'
              EXPORTING
                   ENTRY_ACT             = Table_Control-TOP_LINE
                   ENTRY_FROM            = 1
                   ENTRY_TO              = Table_Control-LINES
                   LAST_PAGE_FULL        = 'X'
                   LOOPS                 = 25
                   OK_CODE               = 'P+'
                   OVERLAPPING           = 'X'
              IMPORTING
                   ENTRY_NEW             = L_TC_NEW_TOP_LINE
              EXCEPTIONS
    *              NO_ENTRY_OR_PAGE_ACT  = 01
    *              NO_ENTRY_TO           = 02
    *              NO_OK_CODE_OR_PAGE_GO = 03
                   OTHERS                = 0.
       Table_Control-TOP_LINE = L_TC_NEW_TOP_LINE.
    Regards,
    Sesh

  • Implement Entry up/down & Page up/down functions in table control

    Hi,
    I have to implement entry up/down and page up/down functions in my table control. The logic is :-
    Suppose the entries in my table control currently are:-
    Called "Initial Position" :-
    a
    b
    c
    d
    e
    My "Cursor Position" or say my selection column is at 'c' value currently.
    If I press entry down, the result should be:-
    a
    b
    d
    c
    e
    i.e. c shifted one value down. If I press value up from "Initial Position", it should be :-
    a
    c
    b
    d
    e
    If I press page down from "initial position", the result should be
    a
    b
    d
    e
    c
    i.e. c has scrolled to the last entry. Similarly for page up, where the entry goes up to the first place and all entries move one position down.
    The problem i am facing is:-
    1) How to get index of entry selected?
    2) How to change table control contents at runtime?
    Thanks.
    Edited by: dumbledorearmy on Nov 23, 2010 12:25 PM

    Hi,
    Please check the function module - 'SCROLLING_IN_TABLE'.
    It give you some idea.
    Thanks.
    Anversha

  • How to use Page down functionality in BDC Table control

    Hi Guys,
    I am facing problem with populating data in the table control at item level. I am able to poulate upto 6 records, i need to populate n number of records.
    Pls help me with using P+ functionality for table control in BDC.
    Thanks in advance
    Satish

    Hi!
    Can you share how you got this solved?
    Thanks!

  • Table control resolution in BDC

    Hi
    All
    I have one doubt regarding table control resolution in BDC .I know how to handle table control like if i have 5 rows in my TABLE CONTROL.I write the logic according to this rows and if more than 5 rows are there in my flat file i extend the atble control.But this logic will fail in some other system if more than 5 rows are there in that syatem. But I have read from  some where that we can use ctu_params structure and if we pass default size as 'x' then it automatically take cares in every sysem.But my doubt is while writing the code initially how can  we write ie i mean how many rows i have to mention initially in my logic .
    Please tell me the answer to this question if you have already face this type of problem.
    Thanks and regards
    Venkateswar

    Hi,
    The numeber of lines of table control for BDC depend on screen resolution, but It can't be managed by program.
    So the better solution is to create a bdc doesn't depend on resolution.
    It can do that using always the first two lines of table control.
    When you start the simulation, first record has to be placed in first line of tc and the second in second one.
    Before placing the third record, it needs to place the second record to the top and so the third record can be placed in the second line.
    Before placing the next record, it needs to place the third record to the top and so the fourth record can be placed in the second line and so.
    In this way your BDC'll use alwways the first two lines of tc and your program won't depend on resolution.
    The problem is the transaction you need to simulate by BDC has to have a scroll functionality to allow to place the last record was elaborated to the top of tc, so the second line of tc can always be used to place the new record.
    If there isn't this functionality, it's better to use a BAPI instead of BDC.
    check these...
    http://www.abaplearning.com/index.php?option=com_fireboard&Itemid=2&func=view&id=11&catid=8
    BDC - standard screen resolution required?
    https://forums.sdn.sap.com/click.jspa?searchID=739193&messageID=823953
    Regards,
    Omkaram.

  • BDC table control using Excel sheet upload

    Hi All,
    I am working BDC table control.I want to upload the From excel sheet.I am using the FM ALSM_EXCEL_TO_INTERNAL_TABLE to upload the the data into my internal table.The data is populating in the internal table.
    Now i have problem tat how to populate this excel sheet data to the Bdc table control.
    Can nybody help me out.\[removed by moderator\]
    Thanks,
    Swapna.
    Edited by: Jan Stallkamp on Jul 25, 2008 10:57 AM

    after fetching data from EXCEL sheet, each column data (in excel sheet) will be uploaded to individual record into your internal table along with row number and column number, loop through that internal table and collect all your excel data into record format.pls refer the below code.
    data:
         i_excel    type alsmex_tabline occurs 0 with header line,
         l_row      type i value 1.
    data:
         begin of x_data occurs 0,
                kunnr     like RF02L-KUNNR,
                klimk(17) type c,
                CTLPC     like knkk-CTLPC,
          end  of x_data,
          begin of x_data1 occurs 0,
                data(106),
          end   of x_data1.
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
       exporting
         filename                      = p_fname
         i_begin_col                   = 1
         i_begin_row                   = 1
         i_end_col                     = no.of columns in your excel file
         i_end_row                     = no.of rows in your file
       tables
         intern                        = i_excel.
    if sy-subrc = 0.
       loop at i_excel.
         if l_row <> i_excel-row.
            append x_data.
            clear x_data.
         endif.
         case i_excel-col.
            when 1.
              x_data-kunnr = i_excel-value.
            when 2.
              x_data-klimk = i_excel-value.
            when 3.
              x_data-CTLPC = i_excel-value.
         endcase.
         l_row = i_excel-row.
         clear i_excel.
         at last.
            append x_data.
         endat.
       endloop.
    endif.
    then loop through the internal table X_DATA, pass the data to your table control like.
    tbl_control-field1(1) = x_data-field1.
    tbl_control-field2(1) = x_data-field2.
    tbl_control-fieldn(1) = x_data-fieldn.
    Regards,
    Sreeram.

  • How can i enable a column or field in table control

    hi all,
    i have a table control and in which some column is there, and all are disable mode now my requirement is :
    i want a column enable in this table control with a change button is there.
    so what is the functionality for this change button, if i click this button one of the field is enable i.e in change mode.
    for example- i have 4 fields: in a table control like-
    emp no | name | date| time|
    so i want to enable the field date.if i press the change button
    any one can help me on this, it is very urgent.
    pls send me any code ...if u have.
    thanks,
    vipin

    have  a look at this sample code
    In PAI write :
    CASE sy-ucomm.
      when 'CHANGEBUTTON'.
      Loop at screen.
        IF field1 = 'MATNR'.
          Screen-active = 0.
       endif.
      modify screen.
      endloop.
    endcase.

  • Query about screen as a structure used in table control.

    hi all,
    plz explain the fields in screen(structure).
    when and how it is used.
    specialy i/o, o/p,active,
    plz give example.

    hi,
    The screen elements text field, input/output field, status icon, group box, radio button, checkbox, and
    pushbutton all have general attributes, Dictionary attributes, program attributes, and display attributes.
    The elements subscreen, tabstrip control, and table control have general attributes, and special
    attributes relating to the respective type.
    We can divide the attributes of an element into:
    Statically definable attributes that cannot be changed dynamically
    Statically definable attributes that can be changed dynamically
    Attributes that can only be changed dynamically
    At the beginning of the PBO, the runtime system reads the statically-created and dynamically-modifiable
    attributes of each screen element on the current screen into a system table with the line type SCREEN.
    Dynamic changes to the attributes of screen elements are temporary.
    Using this technique to modify the attributes of a screen element (for example, to change whether an
    input/output field is ready for input), you can replace long sequences of separate screens, which are
    more costly in terms of both programming time and runtime.
    The system table with line type SCREEN will be called SCREEN system table in the following unit.
    When a screen is processed, the SCREEN system table contains an entry for each element created in
    the Screen Painter for that screen.
    The system table SCREEN is initialized at the start of the PBO event for the current screen. To do this, a
    system program copies the statically defined attributes of the individual screen elements into the table.
    You can then change the dynamically-modifiable attributes of the elements on the screen in a module at
    PBO using the following statements: LOOP AT SCREEN.
    MODIFY SCREEN.
    ENDLOOP.
    To do this, you use the structure SCREEN, which is created automatically by the system, and filled with
    the values of each successive line of the system table in the loop. Set attributes have the value '1',
    attributes that are not set have the value '0'. To change the system table, use MODIFY SCREEN. within
    the loop.
    To find the element whose attributes you want to modify, you can use a LOOP on the SCREEN table,
    and query one of the following fields: SCREEN-NAME, SCREEN-GROUP1 to SCREEN-GROUP4.
    You can change the attributes of several screen elements simultaneously at runtime, by including them
    in a modification group in the Screen Painter. Assign all elements that will be changed within a single
    processing step to a group in the Screen Painter.
    To do this, enter a group name for each of the relevant elements in one of the fields GROUP1 …
    GROUP4.
    You can include each element in up to four modification groups. You can choose any three-character
    sequence for the group name. You can assign elements to a modification group either in the element list
    or the layout editor in Screen Painter.
    You must program your screen modifications in a module that is processed during the PROCESS
    BEFORE OUTPUT processing block.
    You use a loop through the table SCREEN to change the attributes of an element or a group of
    elements. (LOOP AT SCREEN WHERE . . . and READ TABLE SCREEN are not supported).
    To activate and deactivate attributes, assign the value 1 (active) or 0 (inactive), and save your changes
    using the MODIFY SCREEN statement.
    Note that elements you have defined statically in the Screen Painter as invisible cannot be reactivated
    with SCREEN-ACTIVE = 1. Instead, use the statement SCREEN-INVISIBLE = 0. However, elements
    that you have statically defined as visible in the Screen Painter can dynamically be made invisible. This
    has the same effect as the three statements SCREEN-INVISIBLE = 1, SCREEN-INPUT = 0, SCREENOUTPUT
    = 0.
    There are three steps involved in displaying buffered data from the internal table in the table control:
    The system loops through the lines of the table control on the screen. The lines of the screen table are
    processed one by one. For each line, the system carries out the following steps:
    The current line of the internal table is placed in the work area of the internal table. (Note that it is
    possible to scroll in the table on the screen).
    The data from the work area of the internal table is copied into the relevant line of the table control.
    When you use table controls on a screen, the automatic field transport sequence changes.
    In the PBO processing block, data is transferred from the ABAP program to the screen after each loop
    pass in the flow logic. The rest of the screen fields are filled, as normal, at the end of the PBO.
    In the flow logic, the loop statement
    LOOP AT <itab> INTO <wa_itab> WITH CONTROL <tc_name>
    starts a loop through the screen table, and reads the line of the internal table corresponding to the
    current line of the screen table, placing it in <wa_itab>.
    <itab> is the name of the internal table containing the data, <wa_itab> is the name of the work area for
    the internal table, and <tc_name> is the name of the table control on the screen.
    If the fields in your table control have the same structure and name as those in the work area <wa_itab>,
    the system can transport data between the ABAP program and the screen automatically (step 3).
    If you are not using the same structure for the table control fields and the work area of the internal table,
    you must call a module between LOOP and ENDLOOP that moves the data from the work area
    <wa_itab> into the screen fields (MOVE-CORRESPONDING <wa_itab> TO …) .
    The system calculates the value of <ctrl>-TOP_LINE when you scroll, but not when you scroll a page at
    a time outside the table control.
    In order to transfer changed values from the table control back to the internal table the following three
    steps must be carried out:
    The system loops through the lines of the table control. The lines of the screen table are processed
    one by one. For each line, the system carries out the following steps:
    The data from the current line of the table control is copied into the header line of the internal table.
    The data in the work area must then be placed in the line of the internal table corresponding to the
    line of the table control that is being processed. (Note that it is possible to scroll in the table on the
    screen).
    In the PAI processing block, all screen fields that do not belong to a table control and that are not listed
    in a FIELD statement are transported back to the work fields in the ABAP program first.
    The contents of the table control are transported line-by-line to the corresponding work area in the ABAP
    program in the appropriate loop.
    As usual, the fields that occur in FIELD statements are transported directly before that statement.
    The structure of the screen tables contain.
    NAME
    GROUP 1
    GROUP 2
    GROUP 3
    GROUP 4
    OUTPUT
    REQUIRED
    LENGTH
    INTENSIFIED
    INVISIBLE
    ACTIVE
    Hope this helps, Do reward.
    Edited by: Runal Singh on Mar 13, 2008 10:41 AM

  • Why should I use table control?

    Hi,
    I am not expert in dialog programming so please understands why I ask this.
    When I want to create a program that will have multiple items to display, I came up with 2 option.
    First option is to use table control like many other SAP standard transactions.
    The 2nd option that I can think of is using ALV Grid using CL_GUI_ALV_GRID class.
    Is there any benefit in using table control as oppose to using ALV Grid to display or even maintain multiple items in dialog program?
    I can not see any function that table control can do but ALV Grid can not.
    Event handling already so advanced in ALV Grid and also editing function.
    Can anyone please give me some opinion about this? Thank you.
    Regards,
    Abraham

    Hi,
    check the following link
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm
    module pool ( table control wizard )
    https://forums.sdn.sap.com/click.jspa?searchID=20576590&messageID=6428426
    Regards,
    Madhu

  • How to refer to a particular field in Table Control.

    Hi,
            How can we refer to a particular field in a table control like 5th row 6th column. The actual requirement of mine is, i have a column with listbox. For each row i need to have different values for the list box. So i need to refer to that particular field in the column and assign the list values. Please kindly help.
    Regards,
    Vinay.

    hi,
    TABLE CONTROL -
    http://www.geekinterview.com/Interview-Questions/SAP-R-3
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa4735c111d1829f0000e829fbfe/content.htm
    http://www.sapgenie.com/abap/example_code.htm
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    Eg of table Control:
    http://members.aol.com/_ht_a/skarkada/sap/table_control/
    table_control.htm
    http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/45/adee2396f711d1b46b0000e8a52bed/frameset.htm
    Regards,
    Laxmi

  • Vertical scroll bar in table control with wizrads

    Hi,
      Im working on a table control with a customised table. I created a table control with wizards. But vertical scroll bar is not working. How can i invoke vertical scroll bar and can any one provide the code for the all the operations on a table control like save,find,find next,change....Thanks in advance.
    Avinash

    Hi Avinash
    move the records number of your internal table into field LINES of tablecontrol. So you should change the code generated by wizard in PBO, for example create a new module:
    PROCESS PBO
    MODULE SET_DATA_TO_T_CTRL.
    LOOP..
    ENDLOOP.
    MODULE SET_DATA_TO_T_CTRL.
       DESCRIBE TABLE ITAB LINE SY-TABIX.
       <TABLECONTROL>-LINES = SY-TABIX.
    ENDMODULE.
    Max

  • Table controls -page down and page up options

    Hi Gurus,
        I created one module pool program with table controls. I have to enter multiple records into table control so that it has to save in database table.Now iam able to enter only 15 to 16 records in table. I mean  i have to write apgedown code so that i can able to insert more number of records. please tell me how to write the code.Send what to write in pAI and PBO.

    Hi,
    There are two options to work with scrolling in table controls:
    1) Using table control Wizard: By using wizard we can automatically create table controls in screen. Please check the scroll in the wizard steps. No need to write any code for scrolling(pageup and pagedown).
    2) writing the code:
    Very good example programs are given in SAP on Table controls. Please look at those you will get good idea. Below is the code which i have copied from example(Table Control with Scrolling):
    REPORT demo_dynpro_tabcont_loop.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn,
          fill TYPE i.
    TABLES demo_conn.
    DATA: lines TYPE i,
          limit TYPE i.
    SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      DESCRIBE TABLE itab LINES fill.
      flights-lines = fill.
    ENDMODULE.
    MODULE fill_table_control OUTPUT.
      READ TABLE itab INTO demo_conn INDEX flights-current_line.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
      lines = sy-loopc.
      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 'NEXT_LINE'.
          flights-top_line = flights-top_line + 1.
          limit = fill - lines + 1.
          IF flights-top_line > limit.
            flights-top_line = limit.
          ENDIF.
        WHEN 'PREV_LINE'.
          flights-top_line = flights-top_line - 1.
          IF flights-top_line < 0.
            flights-top_line = 0.
          ENDIF.
        WHEN 'NEXT_PAGE'.
          flights-top_line = flights-top_line + lines.
          limit = fill - lines + 1.
          IF flights-top_line > limit.
            flights-top_line = limit.
          ENDIF.
        WHEN 'PREV_PAGE'.
          flights-top_line = flights-top_line - lines.
          IF flights-top_line < 0.
            flights-top_line = 0.
          ENDIF.
        WHEN 'LAST_PAGE'.
          flights-top_line =  fill - lines + 1.
        WHEN 'FIRST_PAGE'.
          flights-top_line = 0.
      ENDCASE.
    ENDMODULE.

Maybe you are looking for