Custom MIGO: Transfer postings & Reservation/Unreservation against Sales Order
This blog will be helpful for any Manufacturing industries, either Make to Order or Make to Stock this scenario works and this could be requirement for most FMCG industries.
Standard MIGO screen in SAP has multiple functionalities whereas very few functionalities only have auto population of line items like GR against Purchase order, GR against Production Order etc., only have this functionality.
Standard SAP MIGO has direct reference of PO’s and prod. orders whereas.
- Reservation against Sales Order, may be Finished Goods, components etc.,
- Unreservation against same Sales Order.
- Sale Order to Sale Order reservation.
- Materials transfer posting from one Storage Location to another
- Production Order against component movement one storage location to another storage location
- Material to Material batch transfers
- component required for moving Sub-con from one storage location to required location
are standard transaction for any Manufacturing industries.
Above list of transfer posting a user need to list out the required material and check the inventory of respective material then entering same to MIGO screen, quantity and existing Batch/auto Batch determination followed by that posting of MIGO.
A Module pool program will help to address all the above transactions in single screen.
- Sales Order – FG alone then reading VBAP – passing the same to submit program of MB52 standard report with batch stock and no zero checks.
- Same Sales Order reservation with components then – Reading VBAP along with that exploring the BOM and passing all material to submit program of MB52 as said above
- Same way for all the tabs with reference to Production order – then AFPO, reference to Material, Subcon – then component of Sub-con all read and executed in same way mentioned above.
ABAP Functionality and screen shots:
Step 1: Listing the materials based on tab strips read functionality
Step 2: Passing the listed Materials to get physical inventory through a submit program.
SUBMIT rm07mlbs EXPORTING LIST TO MEMORY WITH matnr IN s_matnr " Material Number WITH werks EQ f_werk3 " Plant * WITH lgort EQ f_lgort3 WITH kznul EQ 'X' " No zero stock lines WITH mb52_xmchb EQ 'X' WITH mb52_alv_flt EQ 'X' "Generate Non-Hierarchical List * WITH kznul EQ 'X' AND RETURN.
Step 3: Displaying the result in ALV popup screen and make qty editable field where user can edit the quantity based of requirement qty..
Step 4: Loading to result to table control of Module pool.
Step 5: Verification by end user and posting the document.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE' EXPORTING goodsmvt_header = wa_gmvt_header_tp goodsmvt_code = LV_code * TESTRUN = ' ' * GOODSMVT_REF_EWM = IMPORTING goodsmvt_headret = gmvt_headret_tp * MATERIALDOCUMENT = gmvt_retmtd * MATDOCUMENTYEAR = TABLES goodsmvt_item = gmvt_item_tp * GOODSMVT_SERIALNUMBER = return = rt_bapiret_tp * GOODSMVT_SERV_PART_DATA = * EXTENSIONIN = . IF sy-subrc EQ 0. * For commit the changes use BAPI_TRANSACTION_COMMIT FM. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = 'X'. ENDIF.
Out of all tabs taking a production order against transfer as example. Following screen shots explain the same in detail.
Initial screen has multiple tab strips and a table controller connected with above tab strips.
Filling the details in production order tab and execute
A popup screen will show batch wise inventory of an end user and ease his work of calculation and checking the availability of material in a plant etc.,
Requirement qty has been filled in multiple lines or in single batch based on availability
Required quantity is 300 and first Material consumes 3 line item based on Batch determination.
Result screen which shows document posted details to end user for confirmation
By this approach it has reduced the transaction time and error free entries. This dynamic module pool program can be plug-in directly to any FMCG’s having the above said process.