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

stop fields maintainable in display transaction.

Former Member
0 Likes
807

Hello guys,

I have enhanced two fields in standard screen but the fields are able to maintainable even in display transaction.how to stop fields maintainable in display mode.

Regards

Janapathi

Hello guys,

I have enhanced two fields in standard screen but the fields are able to maintainable even in display transaction.how to stop fields maintainable in display mode.

Regards

Janapathi

5 REPLIES 5
Read only

Former Member
0 Likes
768

Hi,

If you need to gray out the fields then in the screen PBO you need to write somehing like this ...


...

loop at screen.
  if screen-name = '<screen field name>'.
    screen-input = 0.
    modify screen.
  endif.
endloop.

...

Also check demo program DEMO_DYNPRO_MODIFY_SCREEN.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
768

What Transaction you added new fields ? did you use append structure for any Standard table ?

You can write simply loop at screen as Ferry Mentioned,make sure that code should be PBO...

keep the condition like

PROCESS BEFORE OUTPUT.

module screen. -> double click on screen ..

it will create new module( Use Zinclude in your case).

module screen.

if sy-tcode = 'Transaction code ". -> keep condition otherwise it will have display for others too.

loop at screen.

if screen-name = 'Screen field name '.

screen-input = '0'.

modify screen.

endif.

endloop.

endif.

endmodule.

Thanks

Seshu

Read only

0 Likes
768

Also check the other related fields on the screen - some SAP programs rely on screen groups as a way of determining which fields get locked; so in these cases setting your own fields this way can make SAP's logic to lock fields set yours too.

Read only

0 Likes
768

i used the code in pbo still fields are maintainable in display mode.

Regards

Janapathi

Read only

0 Likes
768

Janapathi,

You need to use code in right area ,did you set up break point ? if break point is not triggering then code will not work.

Let me say simple example :

Your screen exit is sub screen, so other screen is calling sub screen,so you should not write the code in PBO of your sub screen, you should write the code pbo of other screen

check with that user exit, i guess there will be some other Function module, you need to use one of the function module.

Check the below link for more information:

http://www.jt77.com/development1/programming-22764.html

Thanks

Seshu