Skip to Content
0

MIGO Enhancement for line item validation

Nov 24, 2017 at 09:51 AM

221

avatar image
Former Member

Hi Experts,

We need to do a validation during goods movement for transfer posting against manual reservation, after fetching all the line items entered in MIGO, we tried using the method IF_EX_MB_MIGO_BADI~POST_DOCUMENT. The reason to do the validation is to restrict processing of the same reservation line item twice in the same MIGO document. We are able to view the line items in the table IT_MSEG but not all the fields are populated such as IT_MSEG-WEMPF. Is the any other method or table we can use to access the RSNUM and RSPOS values of all the line items at the same time before document is posted.

Thanks and Regards,

Satheshkumar.P

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Jürgen L
Nov 27, 2017 at 07:28 AM
1

Let us assume you could do this validation.

The user would then probably try to post this as an individual movement by starting MIGO again after the initial movement was posted.

Is that then okay that he references the same reservation?

Or does the user then get a standard error message?

Assuming there is a standard error message, had you already searched for OSS notes, maybe it is just a bug that SAP does not check it within the same document.

Share
10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi
Nov 24, 2017 at 11:00 AM
0

Allowed error message types in this method are 'A' termination or 'X' short dump message, use will be very very happy. IMHO you should try another method IMHO. Look for a method where GOITEM-RSNUM/RSPOS are available?

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Raymond,

Using MB_MIGO_BADI we are able to access the each item during each call of the method. Here we need to access all the items during one call of a method so that we can check the duplicate with RSPOS & RSNUM fields.

Regards,

Sathesh.

0

You could store the reference for each item in an internal table defined as an instance attribute of your implementing class, so you could trigger error message on duplicates as soon as user create it?

0
Former Member
Raymond Giuseppi

Hi Raymond,

Thank you for your reply,

I already tried by saving the line item in separate internal table, but the problem is the BAPI is executing for each line item & that one line item gets passed to internal table,

when the next line item comes the previous line item which got store in our internal is replaced by the current line item details.

0

The ZEILE or I_LINE_OD value should enable to distinguish each item/itab record, this could be some key of the itab?

0
avatar image
Former Member Nov 24, 2017 at 07:54 PM
0

Did you try these Badi's MB_CHECK_LINE_BADI or MB_DOCUMENT_BADI?

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Ashok,

I tried checking MB_CHECK_LINE_BADI or MB_DOCUMENT_BADI by setting break point but i am unable to find values in XMSEG tables while posting the document in MIGO.

0