cancel
Showing results for 
Search instead for 
Did you mean: 

Components Requirement Quantity in orders !!

Former Member
0 Kudos

Dear Experts,

Hello

Is there a way by which we can make "requirement quantity" (tab: components) while order creation a mandatory field only if the component is assigned to the orders.


Please read below to find out the objective:


Actually I have been working on my assignment of forming release levels for orders (based on planned cost). I have achieved my goal as well by forming a z-table and maintaining user IDs against their levels of release as well. Definitely the release will be based on planned cost so planned cost should be there at the time of release.

What I have noticed is that users can by-pass this as they just assign the component (with no Req. quantity) and then release the order. After they release: in the change mode user can easily assign the requirement quantity of the component even if it exceeds the limit of their authorization.

In short, I want to have requirement quantity (components tab) as mandatory field if the component is assigned to an order at the time of order creation so. that planned cost is generated to stop the unauthorized user to release.

Regards

Rubab Zehra.

A link is shared below using which I have achieved my goal so far. (proper solution can also be found)

Accepted Solutions (1)

Accepted Solutions (1)

MTerence
Active Contributor
0 Kudos

Hi Rubab,

Above code logic will definitely work.

Just a second thought, will the field selection (OICMPD) is not sufficient, like making requirement quantity mandatory field mandatory.

Below is how my system displayed when i entered the material in the components tab.

I hope this is your issue right, or i understood differently.

May be if this requires only at the time of creation, since this field selection can be set at Order type only, not in transaction level.

Regards

Terence

Answers (6)

Answers (6)

uzair_1234
Explorer
0 Kudos

Hi all,

I have a similar validation requirement. I have created a Z Table. The IDs maintained in the Z Table should not have the authorization to make changes in the Requirement Quantity and also should not be able to delete any line item and if they do they should get the error message "You are not authorized to make any changes" Else those IDs can do other changes. Please guide me on this.

Former Member
0 Kudos

Dear Maria/ Joges Sir,

To my surprise I am unable to find field -RESBD-MENGE in the field selection for the customizing settings of tcode oicmpd suuggested.

Please suggest

Regards

Rubab

MTerence
Active Contributor
0 Kudos

Hi,

Is this you are asking ?

Refer below note

1457695 - OICMPD: Cannot customize RESBD-MENGE and RESBD-EINHEIT


Regards

Terence

Former Member
0 Kudos

Yes ! exactly this is what has been suggested by you as well. But there is no field name RESBD-MENGE in my customizing settings. Please suggest !

MTerence
Active Contributor
0 Kudos
jogeswararao_kavala
Active Contributor
0 Kudos

Rubab

  • I agree with Maria's OICMPD. In this case the customizing setting in OICMPD  for field RESBD-MENGE as 'Req.' addresses your issue.
  • The need of above suggested user-exit solutions will arise when you have complex conditions to have this field mandatory.
  • The user-exit solution will be relevant in a case when you have the condition on a field which is not among Influencing fields. OR a case when your condition is based on more than one Influencing fields.


For example:

If you want to have this mandatory setting when Order type is 'PM04' and for item category is 'L' then, both these conditions can not be addressed through OICMPD.

User-exits (or BAdi interfaces) are suitable for such complex conditions. So in the above case the code suggested by me for user-exit PPCO0023 to be inserted between these two lines.


IF is_header-auart = 'PM04' AND is_component-postp = 'L'

<the suggested code>.

ENDIF.


And here CNEX0013,  is not recommended, because the code will get lengthier. I repeat, if your requirement is a very plain requirement based on one Influencing condition then you should go with OICMPD.



Good luck

KJogeswaraRao

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Rubab,

Another right exit for this is CNEX0013 .

Solution.

Put this simple code in the include ZXCN2U03 of the above exit and the job is done.


IF resbd_imp-menge IS INITIAL.

   MESSAGE: 'Please fill ''Reqmt Qty''.' TYPE 'E'.

ENDIF.

In the components tab, when you give a Material code and hit Enter without filling the Reqmt Qty field, the following error triggers in the status bar and cursor goes to Reqmt Qty field asking you to enter value. Thus Reqmt Qty filling will be forced.

Good luck

KJogeswaraRao

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Rubab,

The right exit for this is PPCO0023 .

Solution.

Put this simple code in the include ZXCO1U23 of the above exit and the job is done.


IF is_component-menge IS INITIAL.

   MESSAGE: 'Please fill ''Reqmt Qty''.' TYPE 'I'.

   RAISE no_changes_allowed.

ENDIF.

In the components tab, when you give a Material code and hit Enter without filling the Reqmt Qty field the following information triggers and the entry will be deleted when you close the pop-up. So Reqmt Qty filling will be forced.

Please remember that the use of exit IWO10009 for such purposes is not recommended and is a sort of not relevant.

Good luck

KJogeswaraRao

Former Member
0 Kudos

Hi Rubab,

You can use exit IWO10009.  Here,

CASE TRTYP = H ( Order creation)

if material number ( MATNR) is NOT initial, & MENGE is INITIAL

system should throw error message " Req. Quantity should be entered".

Regards,

Amol