Change screen input in table control

Hi Expert Abapers,
Hope everybody is in good health and state.
Well my problem is that i am taking data in itab in a table control and i want to display the data in it only.
only if we select and line and click modify, 2 fields of it should be enabled for writing.
here's the code but is not working,
case OK_CODE.
WHEN 'EDIT'.
IF MARK = 'X'.
LOOP AT SCREEN.
IF SCREEN-NAME <> 'ITAB-CHQ_NO' OR SCREEN-NAME <> 'ITAB-DD_NO'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDCASE.
Pls suggest as to where am I wrong.
Regards , Neetu

Hi Neetu,
Try to assign fields to a group , the fields which u don't want to be editable keep
it in single group for eg, 'GP1'. And now write the code like this
LOOP AT SCREEN.
IF SCREEN-GROUP EQ 'GP1'
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regards ,
Vivek

Similar Messages

  • Add change Icon in the Table Control tool bar.

    Hi Abapers,
    I need to add "change" icon in the table control. I added it but when I click on it is not working.
    My requirement is that when I run my custom report, all the fields should be shown is in display mode. Then when I click on the "change" icon, all fields should be enabled for change.
    I have already referred to the standard progs BCALV_* but it does not have the "change" icon.
    plz give me any reference prg or sample code.
    Thanks
    Nani.

    Hi Nani,
    Track the function code of change icon in user command. if it is clicked then put a flag eq X.
    check that flag in PBO, if it is eq X then screen-input = 1 or vice versa.
    try this code:
    in PBO:
    LOOP AT SCREEN
    IF WS_EDIT = 'X'
    SCREEN-INPUT = 1
    ELSE
    SCREEN-INPUT = 0
    ENDIF
    MODIFY SCREEN
    ENDLOOP
    Hope it will work fine
    Regards
    Krishnendu

  • How can I change the size of table control in table maintenance re-gen?

    Hello Experts,
    I hv created a maintenance view and after generated table maintenance view for it.
    now it adjusts the size of table control in table maintenance generation.
    I want to change the size (width) of table control and again re-generate the table maintenance.
    But when re-generation occurs, table control size is set to initial.
    why it is happening? and wt to do to solve this issue? any user exit?
    I need the changed size of table control even if its re-generated.
    Regards,
    R.Hanks

    Hello Ronny,
    Goto SM30, Enter your table name for which you have maintained your table maintainence generator .
    When the maintainence screen appears for your table name , Goto System->Status->Screen Program name.
    Copy that program name from there.
    Open that module program through SE80,this is the program name of your SM30 screen which appears when we enter our table name in SM30 transaction.
    In SE80,click the layout of the module program name you have entered there.
    Its layout will display you the table control(of SM30) present to enter your your enteries.
    In the change mode you can change its size , savee it and activate that program.
    Now goto to SM30 again and enter your table name, it will show you the changed size of the table control used to take the enteries.
    Note:This changed size is only for your table name and it will remain of its previous size for other table enteries.
    Hope it helps you.
    Thanks Mansi

  • Screen painter or table control problem

    Hi All,
    I have created two maintenance views for two custom tables , and two views has been created .
    in one view when i excuting sm54 and display i could able to see all the fields in the table control ,
    but in the other view i could see only one field very in the table control.
    Is this the problem of screen painter with table control , shall i need to intall screen painter again
    i am using  4,7 version  os sap ,
    Regards
    subba

    Hi  Chandra,
    Thanks for yorr prompt reply  and i tried so many times , can i go that particular screen and change
    the screen and include all the fields , actually the system proposes the screen when we are creating
    the table maintenance generator.
    i selected one step and screen proposed by sap in the overview screen as  1 and i have created table maintenance.
    Regards
    subba

  • How to find  dynamic value(screen value) in table control for current row .

    hi to all,
    i used table control in my screen. for column no 2 field i was used serrch help. and for column number 3 i used a dynamic help.
    in change mode you can change any row for table control.
    when i was using search help for a row which was already entered in column no 3 i cannot get any value.
    how i can get value of row no 3 and column no 2 value.
    thanks

    Try using like index for the serarch the TC-current_line

  • Can we change the attributes of table control wizard once it is created?

    hi,
    i hav created table control using wizard......now i hav to change attributes of that table control.......how to do it ?
    can anyone help me in this...............

    HI,
    Double click on the screen Number in whcih Table control is placed.
    Then Select the ELEMENT List Tab->place the cursor on the Table control and select the Atributes button in the Application toolbar.

  • How can i change the color of table control'  lines?

    Such as the subject. Thanks in advance!

    Hi,
    Please check,
    TABLE CONTROL LINES COLOR CHANGE
    color rows in table control
    Regards,
    Hema.
    Reward points if it is useful.

  • Screen Resolution in table control bdc

    Hi ,
    Im working on bdc table control using call transaction method for vk11 and mek1.While uploading data for vk11 for the first time it is taking all the records of the input file and if i do the same for the second time by changing the amount value it is taking only 24 records .(i.e if the input file contains only 24 records it wil update else if it has 25 records or more it not updating even single record and it is showing error " No batch input data for screen sapmv13A ..)...this issue is with the production server......................whereas in development and quality servers there is no problem....................
    what migh be the problem and how to solve it?
    can anyone plz help me on this

    if its a problem in screen resolution then while recording through SHDB mark the check box default size
    or
    to make the bdc execute in standard screen size check the code below
    data x_ctuparams type ctu_params.
    x_ctuparams-defsize = 'X'. " This would freeze the resolution in any system
    x_ctuparams-dismode = 'N'.
    x_ctuparams-updmode = 'S'.
    call transaction <TCODE> using it_bdcdata options from x_ctuparams.
    So whatever is the screen size of the users front-end, the BDC will execute in standard screen size

  • How to display a table data on Screen having a Table control

    Hi ,
    I am new to ABAP.I would like to display a table data (Eg: ZDemo) on a screen at run time.I have defined a Table control in screen. Now I want to populate data from ZDemo to table control.How can I do that?Please help moving forward in this regard.

    Hi Gayatri,
      After creating table control do the following steps.
    1. In the flow logic section write the following code:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0200.
    LOOP AT I_LIKP WITH CONTROL LIKP_DATA CURSOR LIKP_DATA-CURRENT_LINE.
      MODULE ASSIGN_DATA.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0200.
    LOOP AT I_LIKP.
    ENDLOOP.
    I_LIKP is the internal table which is used to display table data in the table control.
    2. In Process Before Output, in the module STATUS_0200 write the following code:
      DESCRIBE TABLE I_LIKP LINES FILL.
      LIKP_DATA-LINES = FILL.
      In Process After Input, in the module USER_COMMAND_0200 write the following code:
      CASE SY-UCOMM.
       WHEN 'LIPS'.
        READ TABLE I_LIKP WITH KEY MARK = 'X'.
        SELECT VBELN
               POSNR
               WERKS
               LGORT
               FROM LIPS
               INTO TABLE I_LIPS
               WHERE VBELN = I_LIKP-VBELN.
        IF SY-SUBRC = 0.
         CALL SCREEN 200.
        ENDIF.
       WHEN 'BACK'.
        SET SCREEN 200.
      ENDCASE.
    In Process Before Output and in the module ASSIGN_DATA which is there inside the loop write the following code:
    MOVE-CORRESPONDING I_LIKP TO LIKP.
    So, Totally your flow logic code should be like this.
    TABLES: LIKP, LIPS.
    DATA: BEGIN OF I_LIKP OCCURS 0,
           VBELN LIKE LIKP-VBELN,
           ERNAM LIKE LIKP-ERNAM,
           ERZET LIKE LIKP-ERZET,
           ERDAT LIKE LIKP-ERDAT,
           MARK  TYPE C VALUE 'X',
          END OF I_LIKP,
          BEGIN OF I_LIPS OCCURS 0,
           VBELN LIKE LIPS-VBELN,
           POSNR LIKE LIPS-POSNR,
           WERKS LIKE LIPS-WERKS,
           LGORT LIKE LIPS-LGORT,
          END OF I_LIPS,
          FILL TYPE I.
    CONTROLS: LIKP_DATA TYPE TABLEVIEW USING SCREEN 200,
              LIPS_DATA TYPE TABLEVIEW USING SCREEN 300.
    DATA: COLS LIKE LINE OF LIKP_DATA-COLS.
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
      WHEN 'LIKP'.
       SELECT VBELN
              ERNAM
              ERZET
              ERDAT
              FROM LIKP
              INTO TABLE I_LIKP
              WHERE VBELN = LIKP-VBELN.
       IF I_LIKP[] IS INITIAL.
         CALL SCREEN 200.
       ENDIF.
      WHEN 'EXIT'.
       LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  assign_data  OUTPUT
          text
    MODULE ASSIGN_DATA OUTPUT.
    MOVE-CORRESPONDING I_LIKP TO LIKP.
    ENDMODULE.                 " assign_data  OUTPUT
    *&      Module  STATUS_0200  OUTPUT
          text
    MODULE STATUS_0200 OUTPUT.
      DESCRIBE TABLE I_LIKP LINES FILL.
      LIKP_DATA-LINES = FILL.
    ENDMODULE.                 " STATUS_0200  OUTPUT
    *&      Module  USER_COMMAND_0200  INPUT
          text
    MODULE USER_COMMAND_0200 INPUT.
      CASE SY-UCOMM.
       WHEN 'LIPS'.
        READ TABLE I_LIKP WITH KEY MARK = 'X'.
        SELECT VBELN
               POSNR
               WERKS
               LGORT
               FROM LIPS
               INTO TABLE I_LIPS
               WHERE VBELN = I_LIKP-VBELN.
        IF SY-SUBRC = 0.
         CALL SCREEN 200.
        ENDIF.
       WHEN 'BACK'.
        SET SCREEN 200.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0200  INPUT
    Save and Activate the program along with the screen in which you have included table control.
    Hope this will help you.
    Regards
    Haritha.

  • Screen enhancement with table control

    Dears,
    I'm using enhancement IWO10018 to add a new tab on IW32 screen. I've added a table control to this tab. The problem is that retreived data from database do not appear on the table and it is appeared as empty fields. When tring to add any other input/output field on the same subscreen the data appear correctly on it! Please advise
    PROCESS BEFORE OUTPUT.
      MODULE fill_req_itab.
      LOOP AT req_itab
        WITH CONTROL serv_req_tab.
        MODULE move_to_screen.
      ENDLOOP.
    MODULE fill_req_itab OUTPUT.
      CLEAR: req_itab[].
      SELECT * FROM zcs_serv_req
        INTO CORRESPONDING FIELDS OF TABLE req_itab
        WHERE aufnr = order_no.
      DESCRIBE TABLE req_itab LINES serv_req_tab-lines.
    ENDMODULE.                 " FILL_REQ_ITAB  OUTPUT
    MODULE move_to_screen OUTPUT.
      MOVE-CORRESPONDING req_itab TO zcs_serv_req.
    ENDMODULE.                 " MOVE_TO_SCREEN  OUTPUT
    *&  Include           ZXWOCTOP
    DATA: mark TYPE c LENGTH 1.
    CONTROLS: serv_req_tab TYPE TABLEVIEW USING SCREEN '0900'.
    DATA: req_itab TYPE TABLE OF zcs_serv_req WITH HEADER LINE,
          zcs_serv_req LIKE LINE OF req_itab,
          order_no TYPE aufnr.

    Thanks a lot for your reply...
    I've added the below code on the mentioned include and I've commented it on the PBO but I still have the same problem. On debug mode I can see that required data retreived correctly till end.
    *&  Include           ZXWOCU15
    order_no = sap_caufvd_imp-aufnr.
    CLEAR: req_itab[].
      SELECT * FROM zcs_serv_req
        INTO CORRESPONDING FIELDS OF TABLE req_itab
        WHERE aufnr = order_no.

  • Change The title of table control

    I have Table Control on Screen 102 called TABCTRL_102.
    General attributes of TABCTRL_102 has
    <b>With title</b> checked and
    <b>Title element name</b>  TXT003
    Now I want to Change The title of my table control through program. Is there a way out.

    Hi Flora,
    Declare a global variable in your TOP Include like,
    DATA: gv_text_tc_102(30).
    Then replace TXT003 in screen painter with GV_TEXT_TC_102
    and mark it as 'Output Only'.
    Then you can fill this variable in one of the PBO Modules of the screen 102 like,
    MODULE <your PBO Module Name>.
    ***Other Code
    gv_text_tc_102 = 'My Text'. "Better use a text symbol
    ENDMODULE.
    Hope this helps..
    Sri
    Message was edited by: Srikanth Pinnamaneni

  • Screen Modification i Table Control

    Hi all,
       we have a requirement on modifying the screen field attributes for a table control.
      scenario : f1  f2   f3   f4
    now when the user enters the input for field f1 a pop-up  appears wherein you will have to make a selection. the selected one will copy to field f2.
    now for a particular input of f1 the field f2 for that particular row has to be greyed out.
    we are trying this by looping at <b>screen</b> table , but this is greying out  the entire column instead of that particular cell.
    Thanks in Advance.
    Kishore Kumar Yerra.

    HI,
    look at the code below write this code in the PBO flow logic, in the module of loop endloop of table control.
    check for the fields are initial or not.
    if fields contains value then make them disable other wise make them enable.
    <b>
      LOOP AT SCREEN.
        IF screen-name = 'F1'.
          IF grid_itab-F1 IS INITIAL.
            screen-input = 1.
          ELSE.
            screen-input = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    </b>
    Regards,

  • In BDC we need to read screen value of table control

    Dear All,
    I was doing a feasibility analysis. One BDC is there where we will have to insert records in table control based on some records of 1st column of table control already populated. We are unable to find a way for reading table control. The BDC is generating batch input session. Can you please suggest on this?
    Best wishes,
    Atanu

    Hi Atanu,
    with BDC, the only possibility is to do as Klaus suggested: you must replicate the SAP's logic in your program, you must know in advance how SAP fills this field. This is a very well known drawback of BDC. You may use the SQL trace to help you to know which tables are read. Ask functional people to help you.
    You may also use SAP GUI scripting, that's another technology (slower I think, and it can only work in dialog). It allows to do different actions between 2 screens. You must program it using OLE, or using external software (VBA for example).
    Sandra

  • Invalid field format (screen error) on Table Control

    Hello,
    When selecting a line or multiple lines on a screen made by me(using a Table Control), I get Invalid field format (screen error). Debugging the code it sends the message when looping the internal table on PAI to check if there were values changed. Is there a reason why this error appears on this?
      loop at it_values.
        chain.
          field pvalues-BEGDA.
          module CHANGE_QUEUE.
        endchain.
      endloop.
    Thanks.

    No need to loop to check whether data is changed after PBO, just check System Field SY-DATAR, it will be set to 'X' if any field was changed.
    So the following code is enough;
    IF SY-DATAR EQ 'X'.
       PERFORM SAVE_DATA.
    ENDIF.
    Regards
    Karthik D

  • Changing data in the table control during run time of transaction F-28

    Dear Experts,
    in transaction F-28 of second screen of second column (Field Name: Assignment) currently the data is getting from BSEG table and populating this column of table control, now I have a requirement that the data should be get from the other ZTABLE and populate this column during run time instead of the data from BSEG table, please let me know your suggestions, if you guys feel it will be done using User Exit then please let me know the suitable exit for this.
    Best Regards
    Venkat

    Hi Venkat,
    Use the appropriate sort key in the GL to fill up the assignment field automatically.
    U can create ur new sort key through OB16
    Regards,
    Kiran

Maybe you are looking for

  • FV11 Key combination

    Dear Team, I want to know for the condition record maintenance by FV11, what is the key combination generally used in taxinn procedure or what is actual practice or what sap suggest. Can i use the combination tax classification in taxinn procedure, b

  • Count vs sum(case) on dates in select statement

    I'm writing a statement to count the number of events occuring within 7 days of creating and also within 31 days of creating. I tried count but the script never completd. I've written this below - does anyone have a better idea on how to access the d

  • Hyperion workspace Error

    Hi all, I'm using HFM 9.3, i configured shared services,HFM,Reporting succesfully.HFM and Shared services are working properly but Workspace is not working.When i able to Log - on it shows following warning messages. "Could not find a Hyperion Report

  • Composite menu regeneration from single roles

    Hello, When I have to maintain (add or remove tcodes) and transport a "single" role that is part of a composite role, the role menu for the composite is out of synch with the single role's transaction content. The manual fix for this is to go into th

  • Websphere jndi Lookup error

    Hi all, I have 3 ear projects and 1 utility project. 1- utility jar 1- EJB 1- Web UI client for ejb 1 - MDB client for ejb i am able to compile with out errors and started the server successfully. As i go through the application and when i look up fo