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

Making a screen exit field non-editable

Former Member
0 Likes
1,298

Hi Forum,

I have created a checkbox in a screen exit of MM06E005 enhancement. I want to make this field non editable in few transactions.

I put the below logic in PBO function exit EXIT_SAPMM06E_006

if sy-tcode = 'ME31L' and sy-tcode = 'ME32L'.

loop at screen.

if screen-name = 'chkbox'.

screen-input = '0'.

modify screen.

endif.

But this logic is not working. Please help me out the way to achieve it..

endloop.

endif.

Thanks

Mallika

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
873

Hi,

Check ur if condition.

sy-tcode cannot be 'ME31L' and 'ME32L' at the same time. so ur if condition would never be satisfied.

if st-tcode = ''ME31L' and sy-tcode = 'ME32L' .

Hope it helps.

Thanks,

Anju

Hi Forum,

I have created a checkbox in a screen exit of MM06E005 enhancement. I want to make this field non editable in few transactions.

I put the below logic in PBO function exit EXIT_SAPMM06E_006

if sy-tcode = 'ME31L' and sy-tcode = 'ME32L'.

loop at screen.

if screen-name = 'chkbox'.

screen-input = '0'.

modify screen.

endif.

But this logic is not working. Please help me out the way to achieve it..

endloop.

endif.

Thanks

Mallika

4 REPLIES 4
Read only

Former Member
0 Likes
874

Hi,

Check ur if condition.

sy-tcode cannot be 'ME31L' and 'ME32L' at the same time. so ur if condition would never be satisfied.

if st-tcode = ''ME31L' and sy-tcode = 'ME32L' .

Hope it helps.

Thanks,

Anju

Read only

Former Member
0 Likes
873

Use the OR in the If condition.

Thanks

Read only

Former Member
0 Likes
873

Hi Mallika,

Try as below :-

if sy-tcode = 'ME31L' OR sy-tcode = 'ME32L'.

loop at screen.
if screen-name = 'chkbox'.
screen-input = '0'.
modify screen.
endif.
endloop
endif.

Regards

Abhii

Read only

0 Likes
873

Hi All,

Thanks for the replies..it was my type mistake while typing in the thread..yes, i used 'OR' only..

It did not work out..

Finally i got the solution..

I kept this logic in the PBO event of my screen exit..it worked..

thanks

mallika