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

Activate one row in table control

bhargava_dns
Participant
0 Likes
835

Hi all,

In table control while displaying the values the primary key values are grayed out and displayed,

but when user want to add any further values he can click the '+' symbol provided by the table control wizard

and add new rows....the requirement is while adding the new rows existing grayed out fields i.e. primary key fields of existing entries

should be in the same state but the new row that is being added should be in the open state ie should all values to be entered in the primary key.

1 ACCEPTED SOLUTION
Read only

former_member212124
Active Participant
0 Likes
805

Hi bhargava,

Following steps will help you.

1) First on press of Add button you have to append a empty like to index 1 to that internal table.

2) Now In PBO Inside the loop of that internal table create a module or use existing one.

3) Here you can use following code.

LOOP AT SCREEN.


     IF work_area IS INITIAL.


       IF screen-name =  'Name of the primary key in table control'.
         screen-input = 1.
       ENDIF.


     ELSE.


      IF screen-name =  'Name of the primary key in table control'.

         screen-input = 0.

     ENDIF.

     ENDIF.


     MODIFY SCREEN.
   ENDLOOP.



thanks,

vidyasagar

Hi bhargava,

Following steps will help you.

1) First on press of Add button you have to append a empty like to index 1 to that internal table.

2) Now In PBO Inside the loop of that internal table create a module or use existing one.

3) Here you can use following code.

LOOP AT SCREEN.


     IF work_area IS INITIAL.


       IF screen-name =  'Name of the primary key in table control'.
         screen-input = 1.
       ENDIF.


     ELSE.


      IF screen-name =  'Name of the primary key in table control'.

         screen-input = 0.

     ENDIF.

     ENDIF.


     MODIFY SCREEN.
   ENDLOOP.



thanks,

vidyasagar

3 REPLIES 3
Read only

former_member212124
Active Participant
0 Likes
806

Hi bhargava,

Following steps will help you.

1) First on press of Add button you have to append a empty like to index 1 to that internal table.

2) Now In PBO Inside the loop of that internal table create a module or use existing one.

3) Here you can use following code.

LOOP AT SCREEN.


     IF work_area IS INITIAL.


       IF screen-name =  'Name of the primary key in table control'.
         screen-input = 1.
       ENDIF.


     ELSE.


      IF screen-name =  'Name of the primary key in table control'.

         screen-input = 0.

     ENDIF.

     ENDIF.


     MODIFY SCREEN.
   ENDLOOP.



thanks,

vidyasagar

Read only

0 Likes
805

Hi vidyasagar,

I have tried the same way but i could did not achieve the desired result.

Read only

0 Likes
805

can you send the code from PBO.