Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Make the fields editable in module pool program

0 Kudos

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


4 REPLIES 4

Former Member
0 Kudos

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.

0 Kudos

Hi Chinmay,

I got your logic but you told me to loop the table control right
(LOOP AT TC_WT_ALLOC-COLS INTO GWA_COLS. ) In my
case I given the table control name I given in my program ( LOOP AT TC_WBSE-COLS INTO GWA_COLS
) but it shows syntax error.

Kindly tell me what needs to be done.

Thanks.

0 Kudos

What is the syntax error? Have you declared table control before using it in PBO? (Check the order of includes)

0 Kudos

Hi Chinmay,

Thanks for your answer. I did the same with OOPS ALV. And now its working.