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: 

Table control - Various formatting of fields with conditions

ricky_shaw
Contributor
0 Kudos
141

Hello Experts,


I have a Table control with few columns and rows. One column is of type Radio Button.


I am appending some blank rows into the table control to display few gaps between few records.

Now my requirements are:

1)I need to remove the radio button field ONLY when i have blank row in Table Control.

2) I want to highlight some text in a field table control depending on some conditions FORMAT COLOR INTENSIFIED did not work for me.

Can someone please suggest.

Thanks

Ricky

3 REPLIES 3

Sandra_Rossi
Active Contributor
0 Kudos
83

Hi,

For both questions, you should change the screen attributes of the concerned field; use LOOP AT SCREEN and MODIFY SCREEN in the PBO (see the SAP help or forum)

As you have a table control, and want to do it for only a few rows, you have a table control LOOP to loop at every row, in which you insert the LOOP AT SCREEN, that will affect all fields in the row.

1) to hide the radio button field, use SCREEN-ACTIVE = '0'

2) to highlight, use SCREEN-INTENSIFIED = '1' (note: FORMAT statement is only valid for ABAP lists)

Regards

Sandra

0 Kudos
83

Hi Sandra,

Once i am using the modify stmt for screen-active = '0'. then all the radio buttons are gone.

Its like wither Radio buttons are displayed for all rows or no radio buttons at all.

I am using the following code:

     loop at itab1 into wa1_area.

               loop at tc_slots-cols into cols.

       
if cols-screen-name = 'WA_itab-radio_SEL'.

          lv2_tabix = sy-tabix.

          cols-screen-active =
'0'.

         
modify tc_slots-cols from cols index lv2_tabix .

       
endif.

     
endloop.

     endloop.

Pls suggest.

0 Kudos
83

Here you are changing the attribute of the whole column. Use LOOP AT SCREEN to operate field by field.