Application Development 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: 

Making Payment Term non-editable in ME22N.

pritam_mondal
Explorer
0 Kudos

Hello All,

I have a requirement where I need to make Payment Terms field non-editable based on some business logic. Any lead will be helpful.

Thanks in Advance.

Pritam

1 ACCEPTED SOLUTION

peter_kamenik
Active Participant
0 Kudos

Hi,

if it was up to me, I would go to some straightforward solution modifiing the standard screen 1226 with new PBO module. Adding something

If gl_aktyp = 0  and your business logic is true.
loop at screen.
if screen-name = 'ZTERM'.
screen-input = 0.
endif.
endloop.
endif.
5 REPLIES 5

peter_kamenik
Active Participant
0 Kudos

Hi,

if it was up to me, I would go to some straightforward solution modifiing the standard screen 1226 with new PBO module. Adding something

If gl_aktyp = 0  and your business logic is true.
loop at screen.
if screen-name = 'ZTERM'.
screen-input = 0.
endif.
endloop.
endif.

0 Kudos

Thank you Peter. Sounds logical to me. Thanks again.

0 Kudos

Could you please help where to add this code

raymond_giuseppi
Active Contributor
0 Kudos

If you don't work for SAP, as in case your answer would have been 'I used BAdI ME_PROCESS_PO', you could have tried the allowed BAdI ME_PROCESS_PO_CUST, in this case you would have noticed that only customer fields (those with a metafield greater than mmmfd_cust_01) are available, so you would have look at Abap stack to notice the driver FM MEPOBADI_FS_HEADER has the required data (for header) and you would try to access protected data from within the BAdI implementation, of course, in this case you would not have the opportunity to ask for a sscr key, too sad?

0 Kudos

Dear raymond.giuseppi,

Thank you for your response. You have an amazing way of responding to queries. Of course, It would not be "FUN" if you had elaborated it. Besides, who wants to concentrate on the solution when he is having fun instead?

Best Regards,

Pritam