Skip to Content
author's profile photo Former Member
Former Member

User Exit Called by OKC7 Controlling Validation

We currently have a requirement to prevent users issuing materials to orders of a certain type via transaction MB1A, unless they have the correct authorisation in one of their assigned roles.

So far I've managed to achieve this using a CO validation (defined in transaction OKC7) which calls exit U100, part of form pool ZGGBR000. The code I have in this exit currently looks like this:

FORM u100 USING b_result. 
ID 'IWERK' FIELD '1000' 

This code currently works for order type ZHI1, but is obviously very rudimentary as I'm a functional consultant rather than an ABAPer. What I'd like to achieve is to avoid hard-coding the order type, by passing the type of the current order into the exit from the validation. How would I go about achieving this?

Alternatively, is there a way for the exit to retrieve the current order type itself? This can be achieved in the validation transaction by just referencing the field CAUFV-AUART, but I'm not sure how to achieve this in ABAP.

Any help or guidance would be greatly appreciated.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Sep 08, 2010 at 01:29 AM


    You can maintain a Z table where in you can specify the order types to be checked during the validation... if the order type fetched in u100 exists in the Z table, the validation should work, else not

    You can also create a variable and mention your order types in this variable.. I dont know where this created.. your ABAPer would be knowing this... This variable is directly maintainable in production.. This way you can avoid Z table also


    Ajay M

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.