SAP WMS BAPI and Exits

SAP WMS BAPI: list of most used SAP BAPI in SAP WM ( Warehouse Management ) is compiling in this post. You will find also the User-exit for the common transaction?in Warehouse management.

 

SAP WMS BAPI for Transfer Requirements

Transfer requirements are used to pass on information on goods movements that are posted inInventory Management (MM-IM) to the Warehouse Management System (WMS). You can, however, also use transfer requirements for the following purposes:

  • To initiate goods movements in WMS
  • To initiate material replenishment for production storage bins in the production supply areas using the Production Planning (PP) component
  • To call up transfer requirement reports in order to get an overview of all pending goods movements

Get the full definition of Transfer Requirement from help.sap.com

Function module for Transfer Requirements

[table tablesorter=”o” class=”table table-border”]
Function Module?,Description
L_TR_CREATE_CHECK ,Plausibility checks
L_TR_CREATE_UPDATE ,Database updates according to plausibility checks
L_TR_CREATE ,Plausibility checks and database updates
L_TR_CANCEL ,Cancel plausibility checks and database updates
[/table]

User-Exit for Transfer Requirements

in SAP WM, the enhancement or custom exit for TR ( Transfer Requirement) can be done in:

  • MWMTOAU1
    • this custom exit?allows to influence the selection of transfer requirements for the automatic creation of transfer orders.
  • MWMTOAU2
    • This SAP WM exit?allows you to influence the selection of transfer requirements for the automatic creation of multiple transfer orders using groups.

SAP WMS?BAPI for Transfer?Order

The transfer of stock using a stock transport order has the following advantages over the transfer of stock without a stock transport order:

  • A goods receipt can be planned in the receiving plant.
  • You can enter a vendor (freight vendor) in the stock transport order.
  • Delivery costs can be entered in the stock transport order.
  • The stock transfer order is part of MRP: Purchase requisitions that were created in MRP can be converted into stock transport orders.
  • The system can run an availability check for the stock transfer.

Check more information on Transfer Order in SAP WM

Function module for Transfer?Order

[table tablesorter=”o” class=”table table-border”]
Function Module?,Description
L_TO_CREATE_SINGLE,Create a transfer order with one item
L_TO_CREATE_MULTIPLE,Create a transfer order with two or more items
L_TO_CREATE_MOVE_SU,Create a transfer order to move a storage unit
L_TO_CREATE_MOVE_LSR,Initiate a stock transfer of storage units from an external system
L_TO_CREATE_TR,Create a transfer order for a transfer requirement
L_TO_CREATE_DN,Create a transfer order for a delivery
L_TO_CONFIRM,Confirm a transfer order
L_TO_CONFIRM_SU,Confirm a transfer order for a storage unit
L_TO_CANCEL,Cancel a transfer order
L_TO_CANCEL_SU,Cancel a transfer order for a storage unit
L_REF_CREATE,Create transfer orders using multiple processing
L_TO_CREATE_2_STEP_PICKING,Create transfer orders for 2-step picking
L_TO_CREATE_POSTING_CHANGE,Create transfer orders for posting changes
[/table]

User-Exit for Transfer Order

In order to implement custom logic for Creating and confirming TO, you can use one of the following Custom-exit within a project :

[table tablesorter=”o” class=”table table-border”]
Customer exit,Description
MWMTO001,Update own data after creating transfer orders
MWMTO002,Update own data after confirming transfer orders
MWMTO003,Customer-defined putaway strategy
,This task allows you to create and implement your own putaway strategy.
MWMTO004,Customer-defined picking strategy
MWMTO005,TO-related underdelivery (shortage)
MWMTO006,Storage-bin-related overdelivery
MWMTO007,Palletization and storage type search for putaway
MWMTO008,Storage type search for picking
MWMTO009,Prevents deletion of TO items
[/table]

Source:?Function Modules and Customer Exits in WMS

The Most Important SAP WM Tables (SAP Warehouse Management)

SAP WM Tables regroups the most used SAP Tables in SAP Warehouse Management. All WM tables are classified by topics in order to easily identify the right table you need.

It will covers the following SAP WM topics: Transfer requirement, Transfer order,Inventory Documents ,Storage Loc and stocks

Continue reading “The Most Important SAP WM Tables (SAP Warehouse Management)”

How To trigger IDOC LOIPRO when PO Changed or Created

Trigger IDOC LOIPRO: SAP Process Order IDoc in detail is the main topic of the following SAP ABAP Tutorial.

  • First, the SAP Process Order IDoc structure LOIPRO will be detailed. (covered in Part 1)
  • Second how to fill the extra segment of an IDoc LOIPRO extension (covered in Part 1)
  • Third, the easiest way to Generate Outbound IDoc LOIPRO for SAP PO. (covered in Part 1)
  • Last, How To trigger IDOC LOIPRO when PO Changed/Created.(Part 2)

How To trigger IDOC LOIPRO when PO Changed/Created

In SAP, Process Orders are assimilated to a Master Data. So there is no entry in NACE to trigger an Idoc when an order is updated.
Within the different ways to trigger to create an IDoc LOIPRO once a SAP Process Order is created or update is to implement a BADI. I found that it is the best way to do.

SAP Process Order BADIs

Try to implement the BADI WORKORDER_UPDATE (in SAP Tcode SE18)
Actually the BADI WORKORDER_UPDATE is the Business Add-In PM/PP/PS/PI Orders Operation: UPDATE

The others BADI for Process Order are:

[table tablesorter=”o” class=”table table-border”]
BADI, Description
WORKORDER_CONFIRM,Business Add-In PM/PP/PS/PI Orders Operation: Confirm
WORKORDER_CONFIRM_CUST_SUBSCR,Confirmation: Subscreen with Customer’s Own Fields
WORKORDER_CONFIRM_EA_APPL,Confirmation: Function Calls from EA-APPL
WORKORDER_DFPS_PIC_ATP,Defense BADI for Availability Check
WORKORDER_DOCLINKS,BAdI: Document Links (Production Orders)
WORKORDER_FINANCIALS,Anbindung FIN Add-On an Fertigungs- und Proze aufrag
WORKORDER_GOODSMVT,Business Add-In PM/PP/PS/PI Orders: Automatic Goods Movement
WORKORDER_INFOSYSTEM,BAdI: PP and PI Order Information System
WORKORDER_MODIFY_SCREEN,Screen Adjustments
WORKORDER_PISHEET,Business Add-In PM/PP/PS/PI Orders Operation: Discarding of
WORKORDER_REWORK,Business Add-In PP Orders Operation: Rework
WORKORDER_UPDATE,Business Add-In PM/PP/PS/PI Orders Operation: UPDATE
[/table]

SAP Process Order BADI WORKORDER_UPDATE

The first step is to define the list of BADI WORKORDER_UPDATE methods. Here the full list of the methods available:

[table tablesorter=”o” class=”table table-border”]
Method, Description
ARCHIVE_OBJECTS,Archiving Additional Objects
AT_DELETION_FROM_DATABASE,Order is deleted from the database (archiving)
AT_SAVE,Save Order Time: Dialog
CMTS_CHECK,Check: Configurable Warehouse Order Allowed
INITIALIZE,Initialization when Importing/Creating Order
IN_UPDATE,Save Order Time: Update
NUMBER_SWITCH,Swap Tempory Order Numbers with Final Order Numbers
BEFORE_UPDATE,Save Order Time: Before Calling Update
AT_RELEASE,Release Order Time: After SAP Checks Before Release
REORG_STATUS_ACT_CHECK,Reorganization of Order: Status Check
REORG_STATUS_ACTIVATE,Reorganization of Order: Follow-Up Action After Status Set
REORG_STATUS_REVOKE,Reorganization of Order: Follow-Up Action After Status Reset
[/table]

Method AT_SAVE – trigger IDOC LOIPRO

To trigger the LOIPRO01 IDoc when SAP Process Order/ Work Order is modified or created, we will rewrite the method AT_SAVE. This method is triggered when the user clicks on SAVE button on PO/WO SAP Tcodes ( COR1/ COR2 ).
The AT_SAVE takes as input IS_HEADER_DIALOG Order Header in Dialog Structure. It is quite enough because it has all the keys to access the SAP PO.

An important point, you must put wrapper you ABAP code in a Function Module and call the processing in BACKGROUND TASK AS SEPARATE UNIT DESTINATION ‘NONE’.
This call will wait until the Main SAP GUI Process for Saving before triggering the IDOC.
The advantages are:

  1. Wait until a COMMIT before triggering the LOIPRO IDoc
  2. Avoid blocked Processing Order – conflict
  3. keep the main flow of the SAP standard Process unchanged
  4. Avoid Stopping Saving the SAP PO if error occurs for IDoc Generation.

An ABAP Sample for creating LOIPRO in AT_SAVE Method would be:

" Call in Background Task in a separate Unit 
CALL FUNCTION 'ZIDOC_CREATE_LOIPRO' IN BACKGROUND TASK
  AS SEPARATE UNIT DESTINATION 'NONE'
       EXPORTING
            message_type = 'ZLOIPRO'
            aufnr        = is_header_dialog-aufnr
            werks        = is_header_dialog-werks
            matnr        = is_header_dialog-matnr.

Check this article about Statement SUBMIT is not allowed in this form which explain how to use the IN UPDATE TASK.

SAP Process Order IDoc LOIPRO – Structure, User-Exit and Outbound Processing

SAP Process Order IDoc in detail is the main topic of the following SAP ABAP Tutorial.
The topics will be divided into the following 4 subtopics:

SAP BOM Category Details

SAP BOM Category: BOM ( Bill of Material ) can be used to represent different Objects: Material, Order, Equipment (SM), WBS (PS), Standard (PS), Document and Functional Location (PM)
In this post, you will find some illustrations of SAP BOM in different SAP modules with the relevant SAP Tcodes and the main link SAP Table for each.

Continue reading “SAP BOM Category Details”

SAP BOM Tables for BOM Header, Items and components and Category

SAP BOM Tables details how SAP BOMs (Bill Of Material) are stored in SAP’s database.

It helps in understanding how to retrieve BOM Data or check the Bill of Material Data.

The article about the BOM table in sap will start with the important SAP BOM Tables then a short help on how to retrieve SAP BOM Data.

Continue reading “SAP BOM Tables for BOM Header, Items and components and Category”
Exit mobile version