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
500

How to hide particular column in table control at run time?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
464

Hi,

To hide a column -

In PBO Module

loop at TABCON-COL .

if TABCON-COL-SCREEN-NAME = <DESIRED_COLUMN>.

TABCON-COL-INVISIBLE = 'X'.

ENDIF.

endloop.

TABCON is your table control.

TABCON-COL is an internal table containing all the

columns as individual rows .

TABCON-COL-SCREEN is a structure similar to screen table.

TABCON-COL-SCREEN-NAME - contains name of individual column.

check these threads

<b>or</b>

Declare Like this

CONTROLS: ITAB_INT TYPE TABLEVIEW USING SCREEN 0200.

TYPE-POOLS: CXTAB.

WA_COL TYPE CXTAB_COLUMN.

LOOP AT ITAB_INT-COLS INTO WA_COL.

if wa-screen-group1 = <group defined for the column>

WA_COL-INVISIBLE = C-ONE.

MODIFY ITAB_INT-COLS FROM WA_COL.

endif.

ENDLOOP

Regards

Sudheer

5 REPLIES 5
Read only

Former Member
0 Likes
464

check this

Regards

Prabhu

Read only

Former Member
0 Likes
464

Hi Balu,

Refer this code :

loop at i_tab1 with control tab_cntrl .

READ TABLE i_tab1 INDEX tab_cntrl-current_line.

LOOP AT SCREEN.

IF screen-name = 'itab1-matnr'..

screen-active = 0.

endif.

MODIFY SCREEN.

endloop.

endloop.

Reward points if helpful.

Regards,

Hemant

Read only

Former Member
0 Likes
464

Hi,

Check this link.This contains very good example.

http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm

Read only

Former Member
0 Likes
465

Hi,

To hide a column -

In PBO Module

loop at TABCON-COL .

if TABCON-COL-SCREEN-NAME = <DESIRED_COLUMN>.

TABCON-COL-INVISIBLE = 'X'.

ENDIF.

endloop.

TABCON is your table control.

TABCON-COL is an internal table containing all the

columns as individual rows .

TABCON-COL-SCREEN is a structure similar to screen table.

TABCON-COL-SCREEN-NAME - contains name of individual column.

check these threads

<b>or</b>

Declare Like this

CONTROLS: ITAB_INT TYPE TABLEVIEW USING SCREEN 0200.

TYPE-POOLS: CXTAB.

WA_COL TYPE CXTAB_COLUMN.

LOOP AT ITAB_INT-COLS INTO WA_COL.

if wa-screen-group1 = <group defined for the column>

WA_COL-INVISIBLE = C-ONE.

MODIFY ITAB_INT-COLS FROM WA_COL.

endif.

ENDLOOP

Regards

Sudheer

Read only

Former Member
0 Likes
464

PROCESS BEFORE OUTPUT.

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 screen-group1 = 'RM'.

SCREEN-INPUT = '0'.

screen-active = 0.

modify screen.

endif.

endloop.

ENDMODULE. " CHECK_AUTH OUTPUT