Skip to Content
avatar image
Former Member

Make the fields editable in module pool program

Hi Experts,

I have a requirement in a table control in that I have to display several record with selection button. And if I select a particular record and press edit button one particular column should be made editable for that particular record.

I used loop at screen and made that particular column editable. what is happening is if I press edit button that particular column is made editable for all the records.

Kindly let me know how to solve this.

Thanks in Advance 😊 😊


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Dec 27, 2014 at 07:14 AM

    You have 2 requirements, both of which are tricky.

    1. Selection of the record.

    Are you able to select the record?

    You have to do the following settings, the variable name should be a global variable. You need to update your table record according to this variable in PAI in Loop on internal table.


    2. Make particular cells editable.

    Your simple Loop at screen does not work. You will have to read the columns from your table control and then set the editable or non-editable attributes there.

    This you will have to do in PBO in Loop on internal table.

    Sample code:

        

    DATA: gwa_cols TYPE scxtab_column. "scxtab_control-cols.

         LOOP AT tc_wt_alloc-cols INTO gwa_cols.
           IF <Condition>
             gwa_cols-invisible = abap_true.
             MODIFY tc_wt_alloc-cols FROM gwa_cols.
           ENDIF.
         ENDLOOP.

    Add comment
    10|10000 characters needed characters exceeded