Beruflich Dokumente
Kultur Dokumente
Applies to:
Business users in purchasing function who are responsible for carrying out goods receipt against purchasing
documents.
Summary
This article provides a methodical approach to ensure that SAP system captures the delivery note number
for the goods received against purchasing document only. Standard feature in SAP configuration can ensure
that delivery note number is mandatory but it does not differentiate between goods receipts from purchase
orders and production orders.
Author:
Rahul G Asai
Company: IBM
Created on: 25 April 2011
Author Bio
The author works with IBM as a logistics consultant. He brings with him rich experience in
logistics modules of SAP for close to 4 years and domain experience of 2 years. He is an
engineer and later pursued his MBA in Information Technology from VGSOM, IIT Kharagpur.
.
Making Delivery Note Mandatory in MIGO when Goods Receipt is Done Against Purchase Order
Table of Contents
Business Requirements Specifications .............................................................................................................. 3
Scope of Standard SAP Configuration ............................................................................................................... 3
Use of BADI to make Delivery Note mandatory ................................................................................................. 4
Logic to be provided to ABAP Team ............................................................................................................... 4
Steps & Screenshots to be followed ............................................................................................................... 5
ABAP Code to be used in Mode_Set .......................................................................................................................... 6
ABAP Code to be used in Status_And_Header .......................................................................................................... 8
Test Case.......................................................................................................................................................... 10
Disclaimer and Liability Notice .......................................................................................................................... 13
Making Delivery Note Mandatory in MIGO when Goods Receipt is Done Against Purchase Order
Making Delivery Note Mandatory in MIGO when Goods Receipt is Done Against Purchase Order
SAP Customizing Implementation Guide -> Materials Management -> Inventory Management and Physical
Inventory -> Settings for Enjoy Transactions -> Settings for Goods Movements (MIGO) -> Field Selection for
MIGO
Making Delivery Note Mandatory in MIGO when Goods Receipt is Done Against Purchase Order
Making Delivery Note Mandatory in MIGO when Goods Receipt is Done Against Purchase Order
Here, you can see that there are two parameters, namely Action and Reference Documents as indicated
below. Corresponding indicators for them areAction:
Reference Document:
Here, ABAP code will check if in MIGO transaction, if the user has made the selection of GR and PO.
These inputs of users will be stored in the Memory ID of the ABAP code and will be transferred to another
method of the BADI which will make the Delivery Note mandatory.
= i_action
i_refdoc
= i_refdoc.
endmethod.
Making Delivery Note Mandatory in MIGO when Goods Receipt is Done Against Purchase Order
Come back the interface screen again. Select Status_And_Header method to land up at Delivery Note field.
ABAP programme will check if the selection in MIGO is GR against PO and this input will be transferred to
the method Status_And_Header through a memory ID.
Making Delivery Note Mandatory in MIGO when Goods Receipt is Done Against Purchase Order
In above case, delivery note filed LFSNR will be made mandatory as indicated below.
Making Delivery Note Mandatory in MIGO when Goods Receipt is Done Against Purchase Order
ENDIF.
ENDIF.
ENDMETHOD.
Note: An error message is set as per business requirement. This is indicated in the Test Case in subsequent section.
Making Delivery Note Mandatory in MIGO when Goods Receipt is Done Against Purchase Order
Test Case
Goods receipt against purchase order is selected in MIGO transaction. PO number is entered in
the MIGO screen. Delivery Note is kept blank initially.
On pressing enter, this BADI gets called and as there is no data in the Delivery Note, it throws an error
message-
Making Delivery Note Mandatory in MIGO when Goods Receipt is Done Against Purchase Order
Again on Enter strike, PO number needs to be input. This time, delivery note data is input and it is executed.
This will populate the data from PO. Now, normal processing of GR against PO starts.
All mandatory fields like storage location, batch etc. are entered. Item is checked as indicated below-
Making Delivery Note Mandatory in MIGO when Goods Receipt is Done Against Purchase Order
Making Delivery Note Mandatory in MIGO when Goods Receipt is Done Against Purchase Order