Skip to Content
0
Jun 30, 2009 at 10:42 AM

EPSTP (PSTYP) field to grey up dynamically in ME5xN tx

886 Views

Hi all experts,

a tricky task, I'm losing months over this but without finding any acceptable solution.

I have a simple requirement: any Purchase Requisition's item that meets particular conditions (e.g. field ZSTATE <> 0) must show the PSTYP field (Item category) grey, not editable.

This is -obviously- a dynamic condition that must be checked runtime; moreover, since it involves each row of the purchase requisition, the solution of a screen variant seems not suitable (moreover, I don't know if it's possible to switch dynamically between variants).

Details: SAP_APPL 46C (quite old). No active BADIs as far as I've seen. The only user exit I've seen for these tx are the EXIT_SAPLMEREQ* family.

Tried so far:

- EXIT_SAPLMEREQ_007 is triggered any time a Purchase requisition is loaded and for any row in the PR; I can easily check if conditions are meet for any single item, but unfortunately there's no visibility over the correct SCREEN in it, so I cannot work on the visibility of that field.

- Same for EXIT_SAPLMEREQ_005; this ue is triggered every time the user press the ENTER key; i can easily check if conditions are satisfied for any single item, but once more, no visibility on SCREEN to disable that field.

- I tried to activate an ad-hoc field-exit (not yet deprecated on 46C) without success...

I should avoid - if conditions at item granularity are meet - any user operation on that field (EPSTP pressing F1 on the grid in the tx, which corresponds to the PSTYP field in EBAN) for that row; seems to be an impossible task, so I'd ask you to support me with some info and help on how accomplish this requirement. I guess if there's a way yo retrieve info on the screen and modify that at runtime in an usr exit, in cases like mine in which SCREEN visibility is almost inexistent.

EDIT:

I found an interesting description of the MEREQ001 exits family:

[http://sapass.metro.client.jp/UserExit/MEREQ001.htm|http://sapass.metro.client.jp/UserExit/MEREQ001.htm]

I think that

EXIT_SAPLMEREQ_007: Read Customer's Own Requisition Data when Reading Requisition

is a good place to start from. I've seen there's a (partial) implementation on the backend and this userexit is always triggered @ load time of a PR for every item. I can easily check there if a particular item meets my condition, but then I don't know how to make the EPSTP/PSTYP field non-editable on the transaction screen. Any help?

Edited by: Matteo Montalto on Jun 30, 2009 5:56 PM