Enterprise Resource Planning Blog Posts by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
BethBerr
Product and Topic Expert
Product and Topic Expert
956

Introduction 

Custom movement types offer you the flexibility to individualize the movement of goods in your system to meet your specific business needs.  

Fiori apps that support custom movement types include: Goods Receipt for Production Order, Goods Receipt for Purchasing Document, Goods Receipt for Inbound Delivery, Goods Receipt for Process Order, and Post Subsequent Adjustment. 

The implementation of custom movement types in your system is a 2-step process: 

  1. Use the configuration activity Copy of Movement Type (ID 103898) to Copy an Existing Movement Type. For more information on how to do this see the following blog post: Custom Movement Types in Inventory Management Fiori apps 
  2. Implement the BAdI Change Header and Item Data in Goods Receipts MMIM_GR4XY_PROVIDE_DATA.   

This blog will focus on step 2: the implementation of the BAdI Change Header and Item Data in Goods Receipts.

Prerequisites:  

  • An existing custom movement type. 
  • For the Custom Logic app: An Administrator or Extensibility Specialist role is required. 
  • For the Goods Receipt for Purchasing Document app: An Inventory Manager or Warehouse Clerk role is required. 

Example Implementation  

Let's say that you need to use movement type 101 -post goods receipt - but want to post the goods receipt to a different account. You have already done the first step and copied an existing movement type to create a new movement type Z01. (See the example here: Custom Movement Types in Inventory Management Fiori apps.) 

After creating your custom movement type, you must implement the BAdI MMIM_GR4XY_PROVIDE_DATA to enable the use of your new movement type in one of the supported Goods Receipt Fiori apps. 

Here is how you can do this: 

Start by opening the Custom Logic app and clicking on Create in the table toolbar. 

BethBerr_0-1737367450153.png

From the Business Context drop-down, choose Inventory Management: Goods Receipt for Fiori apps PurOrd, ProdnOrd, NoRef, InbDeliv. 

BethBerr_1-1737367450154.png

Choose the Extension Point: Change Header and Item Data in Goods Receipts (MMIM_GR4XY_PROVIDE DATA) and choose Step 2 

BethBerr_2-1737367450155.png

Enter an Implementation Description of your choosing. For this example, I will use CUSTOM_MVMT_TEST. The Implementation ID field will be filled automatically: YY1_ CUSTOM_MVMT_TEST. Choose Review 

BethBerr_3-1737367450156.png

Review the details. If everything looks good, choose Create 

BethBerr_4-1737367450157.png

To add your specific code, choose Publish.

BethBerr_5-1737367450158.png

You can now click the Open Code Editor 

BethBerr_6-1737367450160.png

In the code editing screen, you can now see a space to edit your code and another space for the parameters that are available for the BAdI. In the space for editing, you can choose to edit your implementation directly or, in this case, copy the sample code. To do this, you click on Show Sample Code: 

BethBerr_7-1737367450162.png

A pop-up appears. Choose Copy to Clipboard 

BethBerr_8-1737367450165.png

After you copy the sample code, choose the Edit button. 

BethBerr_9-1737367450167.png

Paste the sample code into the editor. You will have to remove the first comment paragraphs and uncomment the rest of the code. (See below.) This example shows how you would enable your custom movement Z01 for use in the Goods Receipt for Purchasing Document Fiori app. 

BethBerr_0-1737370160207.png

 

Choose Save and Publish. 

Now that you have created this implementation, you can see your custom movement type in action. After you post a goods receipt for a purchasing document, you will see your custom movement type listed in the material document. 

BethBerr_0-1737368926216.png

As an added bonus, you can use the BAdI MMIM_GR4XY_CHECK_DATA to implement your own validation logic for your custom movement type.  

For more details, see Custom Logic and App Extensibility: Post Goods Receipt for Purchasing Document. 

I hope this blog helps you to create your own custom movement type implementation! If you found this information helpful and want to see more like it, please give this article a thumbs up! 

 

 

4 Comments