cancel
Showing results for 
Search instead for 
Did you mean: 

Requisition item quantity not rounding

Former Member
0 Kudos

Hi,

I could not find a thread with this issue. There were some that had the opposite in fact.

My issue is that when creating a requisition, when the item quantity is less than a full case as indicated in the rounding value of the material in MRP1, then it does not round up to that value as expected.

We see this working in ME21N POs, when we enter less than the full case the system will round the quantity up to the rounding value in MRP1 and we get a message warning.

Does anybody have any ideas on this? I tried to change the material to use rounding profile instead of a value, you can only do one or the other. This did not help either way.

Any advice is much appreciated.

Filler

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Are you creating the purchase requisition manually? Then system will not round the value at manual PR level. But if you create PO with reference to this PR, then it will round the value as per your setting. But the MRP generated PR will have the quantity already rounded to the rounding value as per master data.

Regards,

Prashant

  • - Reward points if the answer is helpful to you.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Prashant,

Thanks for the info, that is very helpful. I think our client will still want to do rounding for manual PRs. We'll have to do it through a user-exit.

Regards,

Filler

Former Member
0 Kudos

In your reply to this thread back in 2007, you said "Thanks for the info, that is very helpful. I think our client will still want to do rounding for manual PRs. We'll have to do it through a user-exit." We have the same situation ... when a purchase requisition is created MANUALLY, we want a warning message or something to alert the user that the quantity they entered is not the rounding quantity. Did you actually do a user exit, and if so, can you share your code with me?

Former Member
0 Kudos

Hi Bonnie,

Did you figure this out? Sorry, I don't visit SDN that often. We did use user exit 005 for requisitions. Here is the code, although you probably have a solution by now.

Filler

************************************************************************

  • Mimic PO rounding for quantity.

  • check rounding value from mat. master and round up the quantity if

  • needed.

  • If qty is less than the rounding value, make it equal to round value.

  • If greater, MOD divides the qty by the round value and gives a remaindr

  • If remainder is > 0, then we replace it with the rounding value, which

  • in effect rounds up the quantity to a multiple of the rounding value.

************************************************************************

DATA: orig_menge LIKE eban-menge.

DATA: l_msgvars(9) TYPE c,

l_me(6) TYPE c.

DATA: gl_dummy(70) TYPE c,

tmp_orig(13) TYPE c,

tmp_new(13) TYPE c.

orig_menge = ls_mereq_item-menge.

SELECT SINGLE bstrf INTO v_bstrf FROM marc

WHERE werks = ls_mereq_item-werks

AND matnr = ls_mereq_item-matnr.

IF sy-subrc = 0

AND v_bstrf > 0

AND ls_mereq_item-menge > 0.

IF ls_mereq_item-menge <= v_bstrf.

ls_mereq_item-menge = v_bstrf.

ELSE.

v_mod_result = ls_mereq_item-menge MOD v_bstrf.

IF v_mod_result > 0.

ls_mereq_item-menge = ls_mereq_item-menge - v_mod_result + v_bstrf.

  • if result (remainder) is > 0, subtract it from qty and replace/add round val.

  • e.g. if menge = 150 and rounding val is 144. The mod is 6 (150-144).

  • so subtract the 6 and add 144 to qty to get 288.

ENDIF.

ENDIF.

IF orig_menge <> ls_mereq_item-menge.

write orig_menge to tmp_orig.

WRITE ls_mereq_item-menge to tmp_new.

CONCATENATE 'Item: ' ls_mereq_item-matnr ' qty' tmp_orig ' to '

tmp_new INTO gl_dummy SEPARATED BY space.

CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'

EXPORTING

titel = 'Item Qty rounded'

textline1 = 'Item quantity rounded to material master rounding value'

textline2 = gl_dummy.

CALL METHOD im_req_item->set_data( ls_mereq_item ).

ENDIF.

*

ENDIF.