Edit Mode control in Ztransaction -- Table control

Hi All,
I have a ZTXN containg records in a table contol.
Have Edit,save and post buttons ons screen.by default the table is in display only mode .when u say edit it comes in editable mode.now i want that even if that TXN is opened in multiple sessions only one person can edit it at a time.
This is urgent .plz help
Thanks,
Sachin

Hi Sachin
Even better, you can get the entire picture [here on SAPHelp|http://help.sap.com/saphelp_47x200/helpdata/en/c2/2d7037ecc92a7ee10000009b38f8cf/frameset.htm]
Regards
Gareth

Similar Messages

  • Edit only single line of table control

    Hi All,
    I have one scenario. Suppose i have created one table control. I have two row initially which is in display mode but I want to add one more blank row which should be only editable.
    Thanks,
    Anjaneya.

    DATA: wa_col TYPE cxtab_column.
    In PBO
    LOOP AT tctrl_ti-cols INTO wa_col.
          wa_col-screen-input = 0.
          MODIFY tctrl_ti-cols FROM wa_col.
        ENDLOOP.
    this is to make the entire column display mode.
    For  row wise display mode option,
    in the table control loop module, write the code to make the screen input as zero based on the condition
      loop at  it with control tctrl_it
                               cursor tctrl_it-top_line.
        module toggle_display.
      endloop.

  • Copy selected values from a table control into another table control

    hi there,
    as seen in the subject i need to copy selected values from a table control into another table control in the same screen. as i dont know much about table controls i made 2 table controls with the wizard and started to change the code... right now im totally messed up. nothing works anymore and i don't know where to start over.
    i looked up the forums and google, but there is nothing to help me with this problem (or i suck in searching the internet for solutions)
    i have 2 buttons. one to push the selected data from the top table control into the bottom tc and the other button is to push selected data from the bottom tc into the top tc. does somebody has a sample code to do this?

    you're funny
    i still don't get it... can't believe, there is no tutorial or sample code around how to copy multiple selected rows from a tc.
    here's my code, maybe you can tell me exactly were i have to change it:
    tc1 = upper table control
    tc2 = lower table control
    SCREEN 0100:
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      MODULE get_nfo. --> gets data from the dictionary table
      MODULE tc1_change_tc_attr.
      LOOP AT   it_roles_tc1
           INTO wa_roles_tc1
           WITH CONTROL tc1
           CURSOR tc1-current_line.
      ENDLOOP.
      MODULE tc2_change_tc_attr.
      LOOP AT   it_roles_tc2
           INTO wa_roles_tc2l
           WITH CONTROL tc2
           CURSOR tc2-current_line.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP AT it_roles_tc1.
        CHAIN.
          FIELD wa_roles_tc1-agr_name.
          FIELD wa_roles_tc1-text.
        ENDCHAIN.
        FIELD wa_roles_tc1-mark
          MODULE tc1_mark ON REQUEST.
      ENDLOOP.
      LOOP AT it_roles_tc2.
        CHAIN.
          FIELD wa_roles_tc2-agr_name.
          FIELD wa_roles_tc2-text.
        ENDCHAIN.
        FIELD wa_roles_tc2-mark
          MODULE tc2_mark ON REQUEST.
      ENDLOOP.
      MODULE ok_code.
      MODULE user_command_0100.
    INCLUDE PAI:
    MODULE tc1_mark INPUT.
      IF tc1-line_sel_mode = 2
      AND wa_roles_tc1-mark = 'X'.
        LOOP AT it_roles_tc1 INTO g_tc1_wa2
          WHERE mark = 'X'.    -
    > big problem here is, that no entry has an 'X' there
          g_tc1_wa2-mark = ''.
          MODIFY it_roles_tc1
            FROM g_tc1_wa2
            TRANSPORTING mark.
        ENDLOOP.
      ENDIF.
      MODIFY it_roles_tc1
        FROM wa_roles_tc1
        INDEX tc1-current_line
        TRANSPORTING mark.
    ENDMODULE.                    "TC1_MARK INPUT
    MODULE tc2_mark INPUT.
      IF tc2-line_sel_mode = 2
      AND wa_roles_tc2-mark = 'X'.
        LOOP AT it_roles_tc2 INTO g_tc2_wa2
          WHERE mark = 'X'.             -
    > same here, it doesn't gets any data
          g_tc2_wa2-mark = ''.
          MODIFY it_roles_tc2
            FROM g_tc2_wa2
            TRANSPORTING mark.
        ENDLOOP.
      ENDIF.
      MODIFY it_roles_tc2
        FROM wa_roles_tc2
        INDEX tc2-current_line
        TRANSPORTING mark.
    ENDMODULE. 
    thx for anybody who can help with this!

  • Data retrieve from one table control to another table control

    Hi all,
    I had an requirement like to create Two table controls.
    for first Table control i had an sel field defined as 'MARK'.
    when i check the row in the first table control think it  is header data for sales order .
    all the item details have to retrieve in the second table control.
    This is my requirement, i am not able to trigger when selecting the row in table control.
    will anybody had an experience like this.
    Regards,
    Madhavi

    Hi Madhavi,
    If  we need the case to display header and item as mentioned in 2 table controls....
    we can display in table control 2/item only (the line items of the one selected in the table control 1 or the header )...so ,at a time we need to display line items for only 1 header ....
    so ...first disable the selections/multiple selections to disable the row selector
    We have already declared a field type C to capture the value for the field selector...so we can convert this field to a radio button and then assign a function code to the radio button at screen level
    Whenever you click on the radio button ..immediately the function code is triggered..then in PAI ..we can check and find the header record with 'X' and populate the data for the table control 2
    Hope it helps
    Regards
    Byju

  • How to include "position"-control in a table control

    Dear all,
    I have a situation where I need to add a new option in the table control screen I have been developing .
    I need to be able to select one field entry and bring it on top of the display in the table.
    How can I acomplish this!?
    please help!!
    Vj

    Hi..
    try like this....
    u have tabstrip...to select...one row..right...
    now place a pushbutton on the screen when click on this..
    with the function code...write CASE: and then..
    ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
        IF <MARK_FIELD> = 'X'.
          W_INDEX = SYST-TABIX.
    and read <itab> with key <MARK_FIELD> = 'X'.
    now copy that into another work area and then delete it from the itab..
    now insert it in top in the itab..and then continue....
    check the following code...
    *&      Module  USER_COMMAND_0999  INPUT
          text
    MODULE USER_COMMAND_0999 INPUT.
      DATA:
        H_TAB_WA LIKE G_TAB_WA.
      CASE W_UCOMM.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN 'TAB_MODI' OR 'SAVE'.
          LOOP AT G_TAB_ITAB INTO G_TAB_WA.
          FORMAT   INPUT OFF.
            MOVE-CORRESPONDING G_TAB_WA TO YH642_RAM.
            READ TABLE H_TAB_ITAB WITH KEY EID = G_TAB_WA-EID INTO H_TAB_WA.
            IF SY-SUBRC EQ 0.
              IF G_TAB_WA NE H_TAB_WA.
                MODIFY YH642_RAM.
              ENDIF.
            ELSE.
              INSERT  YH642_RAM.
            ENDIF.
          ENDLOOP.
    SORT  G_TAB_ITAB.
      ENDCASE.

  • In tabstrip control to display table control

    Hi,
    I want to to display a table control under tabstrip tab , How can i write the programm.
    if any one knows pls reply me.

    hi Sridevi,
    -->create sub screen with 100 with some screen number.
    -->Create Table control..
    --> append table control screen to Tab Strip.
    --------------------- . . . . > > > > see the example below
    Scenario:
    Screen 601 has a table control named CTRL_ANVSTED.
    The table should be filled with records from the table zanvstedm
    For this purpose you use an internal table called TBL_ANVSTED
    * Declare the table control
    CONTROLS CTRL_ANVSTED TYPE TABLEVIEW USING SCREEN 601.
    *Internal table used to hold data
    DATA: TBL_ANVSTED LIKE ZANVSTEDM OCCURS 100 WITH HEADER LINE,
    * Flag for initial reading
    Data:   FLAG_INITIAL TYPE I VALUE 0.
    PROCESS BEFORE OUTPUT.
    * Read data into the table control and the internal table
    * PF status etc.
      MODULE INITIALIZE_601.
    * Read data from table anvstedm into internal table tbl_anvsted.
      MODULE INIT_TBL_ANVSTED.
    * Fill control with data from ythe internal table
      LOOP WITH CONTROL CTRL_ANVSTED.
        MODULE FILL_CTRL_ANVSTED.
      ENDLOOP.
    MODULE INIT_TBL_ANVSTED  OUTPUT.
    * Read data from table anvstedm into internal table tbl_anvsted.
      IF FLAG_INITIAL = 0.
        FLAG_INITIAL = 1.
        SELECT * FROM ZANVSTEDM INTO TABLE TBL_ANVSTED.
      ENDIF.
    ENDMODULE.
    MODULE FILL_CTRL_ANVSTED OUTPUT.
    * Fill control with data from the internal table
         READ TABLE TBL_ANVSTED INDEX CTRL_ANVSTED-CURRENT_LINE.
         IF SY-SUBRC NE 0.
           EXIT FROM STEP-LOOP.
         ENDIF.
    ENDMODULE.
    PROCESS AFTER INPUT.
    * Write changes in table control to internal table
    LOOP WITH CONTROL CTRL_ANVSTED.
      MODULE CTRL_ANVSTED.
    ENDLOOP.
    MODULE CTRL_ANVSTED INPUT.
    * Write changes in table control to internal table
       MODIFY TBL_ANVSTED INDEX CTRL_ANVSTED-CURRENT_LINE.
    ENDMODULE.
    Regards,
    Prabhudas

  • Table control designed by wizard greys out after pressing enter

    Dear Gurus
    I have implmeted a badi to show some data on vl02n in a extra tab inside a table control designed using table control wizard. I have caught sy-ucomm event to display corrsponding data on the table control  to what I am already sending from pbo of the screen everything is working fine beside just one thing. Initially all the rows of table control stays in editable mode but When I enter some record and hit enter the corresponding record is properly shown along with the record from pbo and enterd on the table control but beside the current row all the rows below it turn grey and I cannot enter any further data. Please help me out.
    Anurag
    Edited by: Anurag Jain on Sep 17, 2009 12:28 PM
    Edited by: Anurag Jain on Sep 17, 2009 12:29 PM
    Edited by: Anurag Jain on Sep 17, 2009 12:29 PM
    Edited by: Anurag Jain on Sep 17, 2009 12:29 PM

    Solved. The problem was with the sequence in which code was written for all table control in PBO module. PBO code sequence for table controls should be as per the sequence on screen.

  • Table control and a selection screen

    Hi,
    I have a requirement where I am supposed to be designing a screen that has a table control with fields
    w/selection column       label 1(non-editable)          i/o field(from)        i/o field(to)
    w/selection column       label 2(non-editable)          i/o field(from)        i/o field(to)
    On searching the forum threads, I found related threads as to how to implement a selection screen (as the I/O fields are similar to select-options) in module pool programming. But mine requires the use of table control and a kind of selection screen embedded into it. Please guide me through this requirement.

    Hi
    If you need to implement a table control on selection screen u need to use a tabstrip as graphic element supports the table control.
    So
    1 - Step: define a tabstrip with 1 tab only:
    SELECTION-SCREEN BEGIN OF BLOCK 3.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK MAX FOR 22 LINES.
    SELECTION-SCREEN TAB (25) TABS1 USER-COMMAND UCOMM1
             DEFAULT SCREEN 100.
    SELECTION-SCREEN END OF BLOCK MAX.
    SELECTION-SCREEN END OF BLOCK 3.
    2 - Step design the subscreen (in my sample the dynrpo 100) and insert the table control there:
    PROCESS BEFORE OUTPUT.
      MODULE INIT_CTRL.
      LOOP WITH CONTROL T_CTRL.
        MODULE DISPLAY_DATA.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP WITH CONTROL T_CTRL.
          MODULE UPDATE_DATA.
      ENDLOOP.
    In the module DISPLAY_DATA and UPDATE_DATA u need to implement the code to transfer the data from internal table to table control and from table control to internal table, in order to display and update the data.
    Max

  • Table control in modulepool

    Hi,
    I have table control in modulepool.I have to edit some cells in my table control and update the same fields in actual table after pressing save button.And also I should maintain the modified field in some Ztable.
    Plese provide me the code if any body having the same scenario.
    It is urgent.
    Thanks
    suresh

    refer these
    http://sap.niraj.tripod.com/id25.html
    http://sap.niraj.tripod.com/id29.html
    <b>http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm</b>
    regards,
    srinivas

  • Table Control Enable / Disable Row

    Hi,
    I have a table control with 6 columns also screen contains some header input fields.
    Out of 6 columns first two columns are disabled.
    Depending on value entered in certain field in the header I fill the table control. e.g. if the value in certain field is X, table control is filled with say 15 rows, if value is Y, table control is filled with say 5 rows.
    Now my requirement is only those rows which are filled should be disabled. i.e. If user chooses value Y then all rows after 5 should be input enabled.
    But since I have disabled the columns statically complete column remains disabled.
    Can anybody tell me How to enable a particular row in table control ?
    Thanks n Regards,
    Nitin
    Message was edited by: Nitin Pawar

    Say your Table control in TABCON.
    You screen structure is SC_ITAB.
    Your internal table is ITAB.
    In PBO of screen
       LOOP AT ITAB INTO SC_ITAB WITH CONTROL TABCON.
        module SUPPRESS_ROW.
      ENDLOOP.
    In ABAP Module
    MODULE SUPPRESS_ROW.
    IF SC_TAB IS INITIAL.
    LOOP AT SCREEN.
      SCREEN-INPUT = 0.
      MODIFY SCREEN.
      ENDLOOP.
    else.
      LOOP AT SCREEN.
       SCREEN-INPUT = 1.
       MODIFY SCREEN.
      ENDLOOP.
    endif.
    This will help you suppress at row level.
    You may change the if condition to suit your need .
    Cheers
    ENDMODULE.

  • How to make table control rows dynamic/unlimited using TC with Wizard

    Hi Friends ,
    I have designed a table control layout using table control with wizard.
    Now the problem is when we design a TC layout ,then we have to design it on the page . The page has upper & lower limits. so the maximum size & maximum rows in layout is limited. I have tried to create a TC layout with maximum size & maximum rows . Maximum rows created in Layout is 25.
    Now suppose if enduser wants 100 entries to enter by coping a file of 100 records in my TC present on entry screen , then ONLY 25 entries are displayed on entry scren before doing any user action or saving and after saving only these 25 entries are sved in DB. Means enrtries from 26 to 100 are not displayed on entry screen or saved in DB.
    So my requirement is to display all 100 entries at a time in entry screen before saving with scrolling up & down facility and these 100 entries should also get saved in DB after clicking save button. In short I want dynamic entry screen table control which can show/dieplay Any Number . of entries whatever the number may be entered by enduser .
    Plz note that I have used all 3 facilliteis i.e.
    1. Scrolling
    2. INSERT/DELETE
    3. SELECT/DESELECT
    while designing TC with wizard .
    Scrolling buttons like FIRST PAGE, PREV. PAGE, NEXT PAGE, LAST PAGE are displayed.
    BUT they are not functioning though there is system generated code present in both MPP and in PBO & PAI. After clicking any of them , data which is dislaying on entry screen ( Here it is 25 entries ) is getting cleared/disappeared from enry entry screen.
    Waiting for ur response & solutions.
    Thanks & Regards,
    Sudhir

    Hi Ashish ,
    Do one thing .
    At PAI of screen holding TC , there is module name tc_mark on request .
    in this module , there is work area declared g_tc_wa .
    Now go to tc_init module of pbo , where u have given your select command .
    select * from ........................................
    use this code .
    if g_tc_wa is initial .
       SELECT * FROm
       g_tc_wa = 'X'.
       REFRESH CONTROL 'TC' FROM SCREEN dynnr.
       ENDIF.
    Just do this , m sure all buttons, insert, delete , scroll bar.. everything will work .

  • Hiding columns dynamically in a table control

    Hello all,
    Based on the selected value in a dropdown box, I want to hide some columns in a table control. The table control is generated using the wizard from a work area and itab in the program. I have tried things like
    loop at screen.
      if screen-name = <work area>-<field name>.
         screen-invisible = 1.
         modify screen.
      endif.
    endloop.
    I have also tried screen-active = 0, but it is not working. Is there any other way to achieve this?
    Thanks in advance.
    Regards,
    Nithya

    hi,
    u cant make it invisible but u can make it disable by making one module in PBO...
    MODULE init_screen OUTPUT.
      LOOP AT SCREEN.
        IF screen-name = 'ITAB_DET-BILL_NO' AND zform_track_mast-comp_code = '1000'.
          screen-input = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDMODULE.                 " init_screen  OUTPUT
    reward if usefull...

  • Question Concerning Usage of Table Controls

    I currently have three screens. The first screen is the main screen and the other two screens are subscreens called from within the main screen. Inside each of the two subscreens, I have a separate table control. Each table control provides a display of specific data. I would like the first table control to be maintained by certain actions done in the second subscreen. At the moment, I do know that the internal table used for the first table control is being modified accordingly. The issue is the table control on the screen is not being modified based on the change reflected on the internal table. If I modify the internal table, the table control on the screen still reflects the old value.
    Is what I am trying to do possible? Do I need to force an event in order for the table control to be modified or refreshed from the internal table? I have no issue in modifying the table control defined in the second subscreen. The table control on the first subscreen is the one where I have the issue with update.
    Thanks in advance.
    --Vince

    Hi,
    If the PBO of the main screen is called..
    THen table control in the first screen should be getting called also..
    In the debugging check if the internal table is having the updated values before hitting the LOOP AT statement of the PBO of the first screen..
    Thanks,
    Naren

  • HR-ABAP using Table Control Wizard

    My requirements is to customize an infotype which is customer specific.
    After creating the infotype in PM01, I also create the screen(2000) for the
    infotype. The issue is in the table control. I create a table control
    using  table control wizard, getting the information that i need to output in the
    screen, using another infotype which is PA0007 planned working time.
    The expected result is that the data will diplay on the screen when i execute PA30.
    Do you have any idea or any recommendation to resolve the issue? thanks.
    And here are my codes.
    in PBO
      LOOP AT   g_table5_itab
           INTO g_table5_wa
           WITH CONTROL table5
           CURSOR table5-current_line.
        MODULE table5_move.
        MODULE table5_get_lines.
      ENDLOOP.
    Inside the  module pool.
    MODULE TABLE5_INIT OUTPUT.
      IF G_TABLE5_COPIED IS INITIAL.
    *&SPWIZARD: COPY DDIC-TABLE 'PA0007'
    *&SPWIZARD: INTO INTERNAL TABLE 'g_TABLE5_itab'
        SELECT * FROM PA0007
           INTO CORRESPONDING FIELDS
           OF TABLE G_TABLE5_ITAB
    *Start of Insert
           WHERE pernr = pskey-pernr.
    *End of Insert      .
         G_TABLE5_COPIED = 'X'.
         REFRESH CONTROL 'TABLE5' FROM SCREEN '2000'.
      ENDIF.
    ENDMODULE.
    MODULE TABLE5_MOVE OUTPUT.
    *Start of Delete
      MOVE-CORRESPONDING G_TABLE5_WA TO PA0007.
       MOVE-CORRESPONDING G_TABLE5_WA TO PA9201.
    *End of Delete
    *Start of Change
       MOVE G_TABLE5_WA-begda TO PA9201-zzpensda.
       MOVE G_TABLE5_WA-endda TO PA9201-zzpendda.
       MOVE G_TABLE5_WA-empct TO PA9201-zzempct.
    *End of Change
    ENDMODULE.
    MODULE TABLE5_GET_LINES OUTPUT.
      G_TABLE5_LINES = SY-LOOPC.
    ENDMODULE.

    Hi,
    Create a table control in layout and place your fields in table control.
    Press F6 and give the table name and click on get from dictionary and select the 5 fields which you required and palce those fields in table control.
    Double click on table control and give table control name .
    In Top include create a stmt as
    CONTROLS : TABlecontrolname TYPE TABLEVIEW USING SCREEN '1000'.
    In PBO under a module write your logic that means select query and place it in an internal table. Place that select query under IF condition.
    Module Read.
    If SY-UCOMM = 'ENTER'.
    Process query.
    endif.
    endmodule.
      LOOP AT ITAB INTO WA WITH CONTROL TAB.
        MODULE DISP.
        ENDLOOP.
    In PAI.
       LOOP AT ITAB.
         ENDLOOP.
    Here ITAB is internal table name.TAB is table control name.In display module write the code
    MODULE DISP OUTPUT.
    MOVE-CORRESPONDING WA TO database tablename.
    ENDMODULE.
    And in 1000 screen create SET PF status in the function keys assign a keyword to Enter Icon as 'ENTER'.
    Hope this is helpful.
    Regards,
    G.Aditya

  • How to transfer data in table control in bdc

    hi
    how to transfer data in table control in bdc . I need the theory regarding this
    bye

    Hi,
    just check in the forum , there is many threads available to ur questions.
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    You can even refer to these related threads
    bdc table control
    Re: table control in bdc
    table control in BDC
    Reward if helpful.
    Thanks
    Naveen khan

Maybe you are looking for