
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:
This blog will focus on step 2: the implementation of the BAdI Change Header and Item Data in Goods Receipts.
Prerequisites:
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.
From the Business Context drop-down, choose Inventory Management: Goods Receipt for Fiori apps PurOrd, ProdnOrd, NoRef, InbDeliv.
Choose the Extension Point: Change Header and Item Data in Goods Receipts (MMIM_GR4XY_PROVIDE DATA) and choose Step 2.
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
Review the details. If everything looks good, choose Create.
To add your specific code, choose Publish.
You can now click the Open Code Editor.
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:
A pop-up appears. Choose Copy to Clipboard.
After you copy the sample code, choose the Edit button.
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.
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.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |