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: 

grey out table control and vice versa

Former Member
0 Kudos
1,216

Hi all,

Can anyone tell me how to make table controw rows in active i.e greyed out and vice versa.

Say if you have i/p/o/p field we can use

loop at screen.

screen-input = 0

modify screen.

end loop.

i was checking the table control during debugging , it doesn't seen to have screen-input field at all.

Let me know

thanks

7 REPLIES 7

Former Member
0 Kudos
495

Hi,

Use the LOOP AT SCREEN..Inside the LOOP AT ITAB of the PBO..

Thanks,

Naren

0 Kudos
495

Hi Narendran,

My problem is

i enter to screen 2 by pressing create butoon in screen 1.

when i enter the screen2 for the first time,it takes input, i give input and save it then its grey out.until here i works fine.

but when i go back to screen 1 and push creta button again in screen 1 it takes me to screen 2.

Its now my problem comes because its still greyed out because of previous thing.

I guess i need to clear or refresh something right.

This is my piece of code in screen 2.

CONTROLS: TC TYPE TABLEVIEW USING SCREEN 9002.

DATA W_TC LIKE LINE OF TC-COLS.

loop at tc-cols into w_tc

IF SAVE EQ 'X'.

w_TC-SCREEN-INPUT = '0'.

ENDIF.

MODIFY TC-COLS FROM W_TC.

ENDLOOP.

I GUESS I NEED REFRESH TC-COLS RIGHT.

IF LET ME KNOW KNOW THE SYNTAX PLS

THANKS

Former Member
0 Kudos
495

Hi

U have to insert your code into LOOP/ENDLOOP of the tc

If you have setted the fields for input/output in screen paiter, you need only to became them disable for output:

PROCESS PBO

 LOOP AT ......
    MODULE LOOP_SCREEN.
 ENDLOOP.

PROCESS PAI

 LOOP AT ......
    
 ENDLOOP.

 MODULE USER_COMMAND.

 MODULE LOOP_SCREEN.
   CHECK ONLY_OUTPUT = 'X'.
   LOOP AT SCREEN.
     SCREEN-INPUT = 0.
     MODIFY SCREEN.
   ENDLOOP.
 ENDMODULE.

 MODULE USER_COMMAND.

  CASE OK_CODE.
    WHEN 'INPUT'.    ONLY_OUTPUT = SPACE.
    WHEN 'OUTPUT'. ONLY_OUTPUT = 'X'.
  ENDCASE.
  CLEAR OK_CODE.
 ENDMODULE.

Max

ferry_lianto
Active Contributor
0 Kudos
495

Hi Swathi,

Please check demo program demo_dynpro_tabcont_loop_at.

Hope this will help.

Regards,

Ferry Lianto

Former Member
0 Kudos
495

Hi,

REFRESH CONTROL 'TC_VIEW' FROM SCREEN '0100'.

Also have a logic to make the fields open for input..If the create button is pressed..

Thanks,

Naren

0 Kudos
495

Hi NARENDRAN,

THAT WORKED FOR ME

I assigned points

Thanks

SWATHI

Former Member
0 Kudos
495

Hi,

Please make sure to reward points..

Thanks,

Naren