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

Former Member
0 Likes
371

i have 10 colums in table control. How can i make the 2 columns invisible in PBO based upon a transaction.

4 REPLIES 4
Read only

Former Member
0 Likes
352

Hi,

Check the Table Control Properties to do this.

You can also try using LOOP AT SCREEN... MODIFY SCREEN...ENDLOOP.

Regards,

Anji

Read only

Former Member
0 Likes
352

Hi Venkat,

Please check the links,

Regards,

Hema.

    • Reward points if it is useful.

Read only

0 Likes
352

thanks, i checked the links , i got it

Read only

Former Member
0 Likes
352

See the following ex: code.

Assign group name to table control field in screen painter.

PROCESS BEFORE OUTPUT.

*&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.

DATA: BM_APP,

RM_APP,

NSM_APP.

CLEAR: BM_APP, RM_APP, NSM_APP.

IF NOT G_TC2_ITAB[] IS INITIAL.

READ TABLE G_TC2_ITAB INDEX 1 INTO G_TC2_WA1.

IF SY-SUBRC = 0.

SELECT SINGLE * FROM ZSD_RBT_APPRV

WHERE GJAHR = G_TC2_WA1-GJAHR

AND KNUMA = G_TC2_WA1-KNUMA.

IF SY-SUBRC = 0.

IF ZSD_RBT_APPRV-BM_APP = 'C'.

BM_APP = 'C'.

ENDIF.

IF ZSD_RBT_APPRV-RM_APP = 'C'.

RM_APP = 'C'.

ENDIF.

IF ZSD_RBT_APPRV-NSM_APP = 'C'.

NSM_APP = 'C'.

ENDIF.

ELSE.

CLEAR : BM_APP,

RM_APP,

NSM_APP.

ENDIF.

ENDIF.

ENDIF.

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.

  • modify screen.

ENDIF.

modify screen.

endloop.

ENDMODULE. " CHECK_AUTH OUTPUT