11-24-2007 4:27 AM
Hi,
I have a table control with 3 columns c1,c2,c3. I have a checking condition. If the condition is true, then only 2 columns c1 and c2 should be displayed on screen else all 3 columns should be displayed on screen. Plz tell me how this should be done.
11-24-2007 4:29 AM
Assign the group GP1 in GROUP1 of the field property of the column C3.
In the PBO,
IF CONDITION IS TRUE.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'GP1'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Naimesh Patel
11-24-2007 4:29 AM
Assign the group GP1 in GROUP1 of the field property of the column C3.
In the PBO,
IF CONDITION IS TRUE.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'GP1'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Naimesh Patel
11-24-2007 4:53 AM
Hi,
there are two table control on the screen. I want this to happen only to the 2nd table. I tried the code u gave me but it is not working.
plz help.
11-24-2007 4:58 AM
Have you assigned the Group1 in the property of the COLUMN C3 in the 2nd table control's field property as GP1?
Go to Table control.. double click on the field C3.. it will display you the field property pop-up.. put the GP1 against the GROUP.
Regards,
Naimesh Patel
11-24-2007 12:51 PM
11-25-2007 7:16 AM
Have a read of:
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac9f35c111d1829f0000e829fbfe/content.htm
i.e. you may want to try hiding the columns early in your PBO using something like:
data:
l_tabix like sy-tabix,
ls_cols type cxtab_column.
loop at g_tc_9999-cols[] into ls_cols.
l_tabix = sy-tabix.
if ls_cols-index = 3. "adjust as required!
ls_cols-invisible = 1.
ls_cols-screen-invisible = 1.
modify g_tc_9999-cols from ls_cols index l_tabix.
endif.
endloop.
Jonathan