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

how to disable fields in module pool programming?

Former Member
0 Likes
7,950

Hi,

I am creating custom t-codes for creat, edit and view. I need to get all information in display mode in view t-code. How can i approch it.

Please let me know.

Swathi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,079

Hi swathi,

First go to your screen layout.

Make them group and give group name for all fields which you want to dislpy.

in pbo write one module for that like

module modify screen.

inside the module write code like below.

LOOP AT SCREEN.

IF screen-group EQ 'group name '.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Reward if it is helpful to you.

Shiva Kumar.

10 REPLIES 10
Read only

Former Member
0 Likes
3,079

Hi,

in the screen attributes of that field keep those fields as output_only(check that check box).

rgds,

bharat.

Read only

Former Member
0 Likes
3,079

Hi Swathi,

For this you need to the coidng in the Screen PBO(Process Before Output). There you can get the screen table and change it to enable proprty.

Warm Regards,

Vijay

Read only

Former Member
0 Likes
3,079

hi,

Make use of screen modifications by assigning them to a Group.

in PBO.

  loop at screen.
  if screen-group1 = 'ABC'.
   screen-input = 0.
  modify screen.
 endif.
 endlooop.

Regards

Sailaja.

Read only

Former Member
0 Likes
3,079

hi swathi,

you need to use the command screen-input = 0. since you want the entire screen to be in the displayable mode, just give the above statement in your PBO.

if incase if you want certain field then use

if screen-name = '<name of the screen field>'.

screen-input = 0.

*and put the statement.

modify screen.

Read only

Former Member
0 Likes
3,079

In the PBO of the screen, set all fields to display mode.

Loop at screen.

screen-input = 0.

modify screen.

endloop.

Read only

former_member2382
Active Participant
0 Likes
3,079

Hi,

U can use the following code in PBO of that Screen Number.

Case sy-ucomm.

when 'TCODENAME'.

Loop at screen.

if screen-fieldname = 'FIELDNAME.

Screen-input = 0.

screen-output = 1.

modify screen.

endif.

endloop.

Regards,

parvez.

Read only

former_member2382
Active Participant
0 Likes
3,079

Hi,

U can use the following code in PBO of that Screen Number.

Case sy-ucomm.

when 'TCODENAME'.

Loop at screen.

if screen-name = 'FIELDNAME'.

Screen-input = 0.

screen-output = 1.

modify screen.

endif.

endloop.

Regards,

parvez.

Read only

Former Member
0 Likes
3,079

Hi Swathi,

u have to write the code in PBO.

loop at screen.

if screen-group1 = '123'.

screen-input = 0.

modify screen.

endif.

endlooop.

or else for more example go to SDWA pacakage in se 80.

in that u can find more examples

Regards,

Ramana

Read only

Former Member
0 Likes
3,080

Hi swathi,

First go to your screen layout.

Make them group and give group name for all fields which you want to dislpy.

in pbo write one module for that like

module modify screen.

inside the module write code like below.

LOOP AT SCREEN.

IF screen-group EQ 'group name '.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Reward if it is helpful to you.

Shiva Kumar.

Read only

Former Member
0 Likes
3,079

Thanx..!!