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

Table Control - No Input

Former Member
0 Likes
592

Hi!

I want to show table data in a table control with no input-possibility in some cases (not in all, so making the whole control as output in the layout-editor is no solution for me).

I tried to make it with "loop at screen" and "screen-xxx" but it doesn´t work like for normal dynpro-fields.

thank you for your answers!

Andreas

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
482

Try the following:

process before output.

* Set screen attributes for top part of screen
  MODULE modify_screen_0100_top.

* Set screen attributes for table control
  LOOP AT itab_0100 with control tab_ctl
                    cursor tab_ctl-top_line.
    MODULE move_data_to_0100.
    MODULE modify_screen_0100.
  ENDLOOP.

*&---------------------------------------------------------------------*
*&      Module  MODIFY_SCREEN_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
  MODULE modify_screen_0100 OUTPUT.

  LOOP AT SCREEN.
    IF screen-group1  = '001'.
      screen-input = '0'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

ENDMODULE.                 " MODIFY_SCREEN_0100  OUTPUT

Rob

2 REPLIES 2
Read only

Former Member
0 Likes
482

You have to specify

output only, input, output attributes for the fields of the table control in SE51.

I hope it helps.

thanks

Read only

Former Member
0 Likes
483

Try the following:

process before output.

* Set screen attributes for top part of screen
  MODULE modify_screen_0100_top.

* Set screen attributes for table control
  LOOP AT itab_0100 with control tab_ctl
                    cursor tab_ctl-top_line.
    MODULE move_data_to_0100.
    MODULE modify_screen_0100.
  ENDLOOP.

*&---------------------------------------------------------------------*
*&      Module  MODIFY_SCREEN_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
  MODULE modify_screen_0100 OUTPUT.

  LOOP AT SCREEN.
    IF screen-group1  = '001'.
      screen-input = '0'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

ENDMODULE.                 " MODIFY_SCREEN_0100  OUTPUT

Rob