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

Disable fields

Former Member
0 Likes
965

Hi guys,

i want to disable some field in the Module pool selection screen... plz send the code and where i should i write in PBO r in PAI...

7 REPLIES 7
Read only

Former Member
0 Likes
936

Hi,

You have to give the code in PBO..

Check this sample code.



process before output.

MODULE disable.


MODULE disable OUTPUT.

* Process the screen internal table.
  LOOP AT SCREEN.
    IF SCREEN-NAME  = 'MARA-MATNR'.  " Give the screen field name.
       
       SCREEN-INPUT = 0.    " Disable for input.
       MODIFY SCREEN.

    ENDIF.
  ENDLOOP.

ENDMODULE.

Thanks,

Naren

Read only

former_member196299
Active Contributor
0 Likes
936

hi ,

If you want ot disable some fields iun the Module pool program then use the LOOP AT SCREEN statement in your PBO part of the flow logic and disable the field .

In PBO of the flow logic of the screen !

Process before output.

Module disable_fields.

in your program :

module disable_fields.

loop at scren .

screen-name = ' <NAME OF THE SCREEN FIELD > ' , " here you specify the name of the screen field .

screen-output = '0' " this will disable the input option of the screen field .

Modify screen . " this will modify the screen with the above settings .

endloop.

endmodule.

Hope this helps !

Reward if helpful !

Regards,

Ranjita

Read only

Former Member
0 Likes
936

hi,

write in PBO.

process before output.

MODULE Disable_field.

MODULE Disable_field.

IF p_up = 'X' .

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'CCC'.

screen-input = 1. "Enable

screen-invisible = 0. "Disable

MODIFY SCREEN.

WHEN 'DDD'.

screen-input = 0.

screen-invisible = 1.

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

ENDIF.

ENDMODULE.

Read only

Former Member
0 Likes
936

hi,

We can do Screen modifications in Module pool program which is processed during the PBO Event.

process before output.

module modify_screen output.

module modify_screen.

<b>loop at screen.

if screen-name = <field name which is going to disable>.

screen-input =0. "disable for input

screen-output =0. "disable for output

endif.

modify screen.

endloop.</b>

the <b>screen</b> is the system genarated internal table it holds the attributes of each and every screen fields.

<u>Suppose if u r going to disable more than one fields, keep the fields in group.</u>

<b>loop at screen.

if screen-group1 = <group name under which we keep the fields>.

screen-input =0. "disable for input

screen-output =0. "disable for out put

endif.

modify screen.

endloop</b>

regards,

sudheer.

Read only

Former Member
0 Likes
936

I WANT TO DISABLE 10 FIELDS IN THE SELECTION SCREEN, FOR THIS CAN TAKE

IF SCREEN-NAME = ‘V_EBELN’.

SCREEN-INPUT = 0.

ENDIF.

IF SCREEN-NAME = ‘V_RFCDEST’.

SCREEN-INPUT = 0.

ENDIF.

IF SCREEN-NAME = ‘REQUESTER_ID’.

SCREEN-INPUT = 0.

ENDIF.

IF SCREEN-NAME = ‘V_ACC_CAT1’.

SCREEN-INPUT = 0.

ENDIF.

IF SCREEN-NAME = ‘DATE_FROM_TXT’.

SCREEN-INPUT = 0.

ENDIF

or

should i take AND in if condition....plz send me the code....

thanks....

Read only

0 Likes
936

HI YOUR PROGRAM IS USEFUL TO DISABLE TEXT FIELDS .BUT NOW I NEED ENABLE THE SAME TEXT FIELDS AGAIN.

PLZ REPLY SOON

Read only

0 Likes
936

Thank u very much .your coding is very usefull and working good.

Now i have another doubt!

Can we change the screen background in screen painter.

plz do the needful.