cancel
Showing results for 
Search instead for 
Did you mean: 

Validation in Migo for the combination of Plant and Production order

Former Member
0 Kudos

Dear SAP Experts,

In MIGO I have to put validation on Production order i.e. for any plant no Production order which are not there in that plant should  be posted . So how to put this validation . Do I need to put Coding in the enhancement Spot or there is any other way out. I also need to know if I put Plant in 'where' tab and order in 'account assignment' tab  and debug it , so in which structure or table I can find this plant and order..I have tried AUFK but its not there...

Regards,

Biraj

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You need to check the Entries in AFPO table by passing Plant and Material Combination.

If you find the Production order then ask abaper to input no message if it doesnt exist then ask him to create a Error message.

Use BAPI-GOODSMVT_CREATE for creating Error message.

Thanks,

Shiva

Former Member
0 Kudos

Hi shiva,

         I need to know from where I can read Plant and Order which are there on Screen of MIGO before saving the material document . I need to know the name of structure or internal table where these values are stored.

Former Member
0 Kudos

Go to Movement Type OMJJ and Select the Movement Type.

Now select the Field selection (Enjoy) on the left. Click on New Entries Button.

Make AUFNR entry in Field Name and Make it as Mandatory.

If the entry exists then goahead otherwise ask abaper to give error message.

Thanks,

Shiva

Message was edited by: shiva prasad

Former Member
0 Kudos

Hi,

You can use BADI for the above requirement of yours.

BADI Name: MB_CHECK_LINE_BADI

In this BADI you will find the Plant & the order no. in the internal table IS_MSEG in the field IS_MSEG-WERKS & IS_MSEG-AUFNR.

Regards

Swapnil.