Skip to Content

MM - Check on minimum remaining shelf life at GR against Purchase order

Dear All,

At GR on Purchase order using MIGO, there is standard function to perform a check on minimum remaining shelf life.
If that option is activated in customizing, and you provide a total shelf life + minimum remaining shelf life, system compute the SLED and compare SLED - minimum remaining shelf life to posting date.


Then, depending on whether you customized the message as a Warning or an error in OMCQ, when you post a GR later than allowed by minimum remaining shelf life, 2 different things occurs :

- if the message is Error, you are blocked ...

- if the message is a warning, it appears in MIGO in a popup with option "Check" but it's not displayed when you POST the mvt.

If you try to simulate the GR using "BAPI_GOODS_MVT_CREATE" and the message is define as a warning, nothing is returned into the message table.
So, you just post the mvt without knowing that your material does not match the minimum remaining shelf life rule.

My question is : do you please know anhy standard function module or other clean way to control that rule or every other controls performed with "check " button from ME21N ?

Thanks for kind help

Regards

Morgan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Sep 14, 2016 at 02:10 PM

    You could use a custom version (eg. 'Z1') in OMCQ transaction to create another set of rules for messages, switch from standard one to custom one setting SPA/GPA parameter 'MSV.'

    * Switch to variant with error

    SET PARAMETER ID 'MSV' FIELD 'Z1'.

    * Map parameters of BAPI

    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

    EXPORTING

    goodsmvt_header = goodsmvt_header

    goodsmvt_code = goodsmvt_code

    testrun = abap_true

    TABLES

    goodsmvt_item = goodsmvt_item

    return = return.

    * Analyze return table

    " ...

    * Switch back to variant with warning

    SET PARAMETER ID 'MSV' FIELD '00'.

    Regards,

    Raymond

    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.