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

module pool table control hide dynamicaly

Former Member
0 Likes
3,491

IN MODULE POOL CODING HOW TO DYNAMICALLY INACTIVE OR HIDE TABLE CONTROL OR TABLE CONTROL FIELDS

6 REPLIES 6
Read only

SumanPoddar
Active Participant
0 Likes
1,231

>

> IN MODULE POOL CODING HOW TO DYNAMICALLY INACTIVE OR HIDE TABLE CONTROL OR TABLE CONTROL FIELDS

Hi,

For any type of table control requirement you can take the help of

RSDEMO02 - Table control demo.

Check here you will find the code how to hide a fields in Table Control.

Regds.

Suman

Read only

Former Member
0 Likes
1,231

loop at screen.

if screen-name = 'table control'.

screen-invisible = '1'.

endif.

modify screen.

endlloop.

Try this out.

Read only

0 Likes
1,231

loop at screen.
     if screen-name = '<table control name>'.
        screen-input = '0'.     " input-enabled field - you can use this or below
        screen-output = '1'.   " display field
        screen-activate = '1'. " active field
        modify screen.
     endif.
endlloop.

Thanks

Satyasuresh Donepudi

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,231

Hi,

To hide controls in table control:-

For that you need to take the group1 for the screen fields that you have taken on screen as ABC and then follow code to disable fields for input in PBO of the screen:-


IF <condition>. "as per your condition
  IF screen-group1 = 'ABC'.
    LOOP AT SCREEN.
      screen-input = 0. "to disable screen fields for input
    ENDLOOP.
    MODIFY SCREEN.
  ENDIF.
ENDIF.

Now say if you want to enable fields for input on some condition then you may use:-


IF <condition>. "as per your condition
  IF screen-group1 = 'ABC'.
    LOOP AT SCREEN.
      screen-input = 1. "to enable screen fields for input
    ENDLOOP.
    MODIFY SCREEN.
  ENDIF.
ENDIF.

Remember that loop at screen only works in PBO of the screen, and not in PAI..

Hope this helps you.

Regards,

Tarun

Read only

Former Member
0 Likes
1,231

hi

try this

in SE51

PBO

loop at screen.

if screen-name = 'XXX'.

SCREEN-ACTIVE = '0'.

SCREEN-INVISIBLE = '1'.

MODIFY SCREEN.

endif.

endloop.

Regards

Read only

Former Member
0 Likes
1,231

set the field tab_cntrl-invisible = 'X'.

TAB_CNTRL is the name of the table control.

TAB_CNTRL is of type CXTAB_CONTROL.

Check the link

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm