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

Disable Individual Fields in Table Control

Former Member
0 Likes
1,906

Hello,

I understand how to disable entire columns in the table control but can anyone demonstrate how I would disable individual fields/cells?

How would it vary from this:


    constants:
      c_disable type char1 value '0'.
*
    data:
      l_column type cxtab_column.
*

    loop at ret_unit_tab-cols into l_column.

      l_column-screen-input = c_disable.
      modify ret_unit_tab-cols from l_column.

    endloop.

Thank you in advance.

Brett

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
835

In the PBO:


process before output.

* Set screen attributes for table control
  loop at zzhb6_0100 with control zhb6ctl
                    cursor zhb6ctl-top_line.
    module modify_screen_0100.
  endloop.

Then:


module modify_screen_0100 output.
  loop at screen.
    if screen-name = 'ZZHB6_SAL_PHASE2_S-ZZMERIT_AMT'.
      if zzhb6_sal_phase2_s-zzself_funded = 'X' or
         zzhb6_sal_phase2_s-zzmed_rec     = 'X' or
         zzhb6_sal_phase2_s-zztr          = 'X'.
        screen-input = '0'.                       "Display
        modify screen.
      endif.
    endif.

    if screen-name = 'ZZHB6_SAL_PHASE2_S-ZZMERIT_AMT_SP'.
      if zzhb6_sal_phase2_s-zzself_funded = 'X'.
        screen-input = '0'.                       "Display
        modify screen.
      endif.
    endif.
  endloop.

Rob

In the PBO:


process before output.

* Set screen attributes for table control
  loop at zzhb6_0100 with control zhb6ctl
                    cursor zhb6ctl-top_line.
    module modify_screen_0100.
  endloop.

Then:


module modify_screen_0100 output.
  loop at screen.
    if screen-name = 'ZZHB6_SAL_PHASE2_S-ZZMERIT_AMT'.
      if zzhb6_sal_phase2_s-zzself_funded = 'X' or
         zzhb6_sal_phase2_s-zzmed_rec     = 'X' or
         zzhb6_sal_phase2_s-zztr          = 'X'.
        screen-input = '0'.                       "Display
        modify screen.
      endif.
    endif.

    if screen-name = 'ZZHB6_SAL_PHASE2_S-ZZMERIT_AMT_SP'.
      if zzhb6_sal_phase2_s-zzself_funded = 'X'.
        screen-input = '0'.                       "Display
        modify screen.
      endif.
    endif.
  endloop.

Rob

4 REPLIES 4
Read only

Former Member
0 Likes
836

In the PBO:


process before output.

* Set screen attributes for table control
  loop at zzhb6_0100 with control zhb6ctl
                    cursor zhb6ctl-top_line.
    module modify_screen_0100.
  endloop.

Then:


module modify_screen_0100 output.
  loop at screen.
    if screen-name = 'ZZHB6_SAL_PHASE2_S-ZZMERIT_AMT'.
      if zzhb6_sal_phase2_s-zzself_funded = 'X' or
         zzhb6_sal_phase2_s-zzmed_rec     = 'X' or
         zzhb6_sal_phase2_s-zztr          = 'X'.
        screen-input = '0'.                       "Display
        modify screen.
      endif.
    endif.

    if screen-name = 'ZZHB6_SAL_PHASE2_S-ZZMERIT_AMT_SP'.
      if zzhb6_sal_phase2_s-zzself_funded = 'X'.
        screen-input = '0'.                       "Display
        modify screen.
      endif.
    endif.
  endloop.

Rob

Read only

0 Likes
835

Great stuff!

Thank you so much.

Read only

0 Likes
835

Glad to help - I remember when I had to do this the first time. It almost drove me crazy.

Rob

Read only

LucianoBentiveg
Active Contributor
0 Likes
835

In the PBO inside looping of table control you need a rotuine with:

If conditions for line are enough.

LOOP AT SCREEN.

IF screen-name EQ 'name of column'.

screen-input = 1. "or 0

MODIFY SCREEN.

ENDIF.

ENDLOOP.

endif.