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 Problem

Former Member
0 Kudos

Hi,

I want to display the records of internal table in a table control. When the table control will display, the rows of table control contains data should be in display mode and rest of the rows of table control should be in input mode.

Thanks,

Saroj.

4 REPLIES 4

Former Member
0 Kudos

hi

in your pbo of the table control, try using this..

loop at screen.

if screen-name = 'itab_tc-matnr'. "the int. tab. that's displayed in tablecontrol

if itab_tc-matnr is initial.

screen-input = '1'.

endif.

endif.

modify screen.

endloop.

Former Member
0 Kudos

Hi ,

In the PBO module.

Use loop at screen .

check screen name for the fields having data

screen-active = 0.

else.

screen-active = 1.

endloop.

Please reward if useful.

Former Member
0 Kudos

Hi Saroj,

put the screenfield ( which you want in display mode )in a group ( e.g. XX ) :

LOOP AT SCREEN.

IF screen-group1 = 'XX'.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

regards

Deepak .

Former Member
0 Kudos

Check the following sample code.

PROCESS BEFORE OUTPUT.

MODULE SCR_INIT.

*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TC1'

MODULE TC1_INIT.

*&SPWIZARD: MODULE TC1_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE TC1_CHANGE_COL_ATTR.

LOOP AT G_TC1_ITAB

INTO G_TC1_WA

WITH CONTROL TC1

CURSOR TC1-CURRENT_LINE.

*&SPWIZARD: MODULE TC1_CHANGE_FIELD_ATTR

MODULE TC1_MOVE.

MODULE TC1_GET_LINES.

ENDLOOP.

MODULE GET_AUTH_USER.

*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TC2'

MODULE TC2_INIT.

*&SPWIZARD: MODULE TC2_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE TC2_CHANGE_COL_ATTR.

LOOP AT G_TC2_ITAB

INTO G_TC2_WA

WITH CONTROL TC2

CURSOR TC2-CURRENT_LINE.

*&SPWIZARD: MODULE TC2_CHANGE_FIELD_ATTR

MODULE TC2_MOVE.

MODULE TC2_GET_LINES.

MODULE CHECK_AUTH.

ENDLOOP.

&----


*& Module CHECK_AUTH OUTPUT

&----


  • text

----


MODULE CHECK_AUTH OUTPUT.

LOOP AT SCREEN.

IF NOT G_AUTH IS INITIAL.

if g_auth = 'BM'.

if screen-group1 = 'RM'.

SCREEN-INPUT = '0'.

endif.

if screen-group1 = 'NSM'.

SCREEN-INPUT = '0'.

endif.

IF BM_APP = 'C'.

if screen-group1 = 'BM'.

screen-input = '0'.

endif.

endif.

elseif g_auth = 'RM'.

if screen-group1 = 'BM'.

SCREEN-INPUT = '0'.

endif.

if screen-group1 = 'NSM'.

SCREEN-INPUT = '0'.

endif.

IF RM_APP = 'C'.

if screen-group1 = 'RM'.

screen-input = '0'.

endif.

endif.

IF BM_APP <> 'C'.

if screen-group1 = 'RM'.

screen-input = '0'.

endif.

endif.

elseif g_auth = 'NSM'.

if screen-group1 = 'BM'.

SCREEN-INPUT = '0'.

endif.

if screen-group1 = 'RM'.

SCREEN-INPUT = '0'.

endif.

IF NSM_APP = 'C'.

if screen-group1 = 'NSM'.

screen-input = '0'.

endif.

endif.

IF BM_APP <> 'C'.

if screen-group1 = 'NSM'.

screen-input = '0'.

endif.

endif.

IF RM_APP <> 'C'.

if screen-group1 = 'NSM'.

screen-input = '0'.

endif.

endif.

  • modify screen.

ELSE.

if screen-group1 = 'RM'.

SCREEN-INPUT = '0'.

endif.

if screen-group1 = 'BM'.

SCREEN-INPUT = '0'.

endif.

if screen-group1 = 'NSM'.

SCREEN-INPUT = '0'.

endif.

  • modify screen.

endif.

ELSE.

if screen-group1 = 'BM'.

SCREEN-INPUT = '0'.

endif.

if screen-group1 = 'RM'.

SCREEN-INPUT = '0'.

endif.

if screen-group1 = 'NSM'.

SCREEN-INPUT = '0'.

endif.

ENDIF.

modify screen.

endloop.

ENDMODULE. " CHECK_AUTH OUTPUT