Application Development and Automation 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: 
Read only

Make Editable or Not editable cels in Table Control

Former Member
0 Likes
714

Hi Experts,

I have a requeriment where I need to put cells of a Table Control editable or not editable when my condicions are true.

f.e:

I should put the cells in editable when the cells are empty and not editable when aren't empty.

I have a module in the PBO for change de screen, but It should not be working well, because it changes all column. I don' t need to put all colum edit, only the cells of table control empty.

My code:

PBO:

LOOP AT   it_my_tab
        INTO wa_
my_tab
        WITH CONTROL tc_my_tab
        CURSOR tc_my_tab-current_line.
     MODULE TC_CHANGE_ATTR.

   ENDLOOP.

MODULE tc_change_attr OUTPUT.

LOOP AT SCREEN.
      
         WHEN 'WA_MY_TAB-ROL'.
           IF wa_my_tab-rol IS INITIAL .
             screen-input = 1.
           ELSE.
             screen-input = 0.
           ENDIF.
           screen-active = 1.

          .

          .

          .

          .

         WHEN OTHERS.
       ENDCASE.
       MODIFY SCREEN.
     ENDLOOP.
   ENDIF.

ENDMODULE.

I' ve looked similars discussions but  I haven' t found any solution for my problem.

I hope someone can help me.

Thanks

<<Moderator message - there are plenty of discussions on this topic in the ABAP spaces. Please search before asking >>

Locked

Message was edited by: Rob Burbank

3 REPLIES 3
Read only

Former Member
0 Likes
681

Hi,

Please check CXTAB_CONTROL this structure.here you will find so many properties for table control.

Regards,

venkat.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
681

LOOP AT SCREEN.
    WHEN 'WA_MY_TAB-ROL'.

Provide the CASE statement (CASE SCREEN-NAME.)

Regards,

Raymond

Read only

Former Member
0 Likes
681

Hi,

Check the following link:

http://scn.sap.com/thread/626445

I think this will solve your query.