SAP Document flow in SAP SD: This post will introduce a BAPI to read all the SAP Document flow for a SAP SD document. ( For example, read the delivery and Billing Document for Sales Order in SAP SD Sales and distribution).
Continue reading “Read SAP Document flow in SAP SD”
Tag: SAP Transaction Codes
Trigger MATMAS IDoc using BTE event
Trigger MATMAS IDoc using BTE event step by step guide how to generate a MATMAS IDOC when a SAP Material is saved in the SAP Tcode MM02.
How to generate an Outbound idoc on Material master change with BTE.
Continue reading “Trigger MATMAS IDoc using BTE event”How to find BTE Event in SAP with SAP BTE Liste in SAP ECC
How to find BTE Event in SAP: find easily the BTE Number for any SAP Tcode and the SAP BTE list available in SAP ECC6 system.
Continue reading “How to find BTE Event in SAP with SAP BTE Liste in SAP ECC”
Trigger MATMAS IDoc using BTE Function
Trigger MATMAS IDoc using BTE Function: this is a sample ABAP Program to generate a MATMAS IDoc for a Material Change using BTE event when a SAP Material is saved in MM02 / MM01. Continue reading “Trigger MATMAS IDoc using BTE Function”
SAP IDOC QUALifier List with description
SAP IDoc Qualifier List : In order to find easily the business corresponding for a segment, the whole list of SAP IDOC Qualifiers is attached.
( use CRT+F for quick find 😉 )
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:
- Wait until a COMMIT before triggering the LOIPRO IDoc
- Avoid blocked Processing Order – conflict
- keep the main flow of the SAP standard Process unchanged
- 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 VIM Main Tcodes by Topics : Part 2
SAP VIM Main Tcodes Part 2 is the second and final part of SAP OpenText VIM ( Vendor Invoice Management ) Tcodes / Transactions.
It covers SAP tcodes for /OPT/VIM_IMG* and some of others important VIM transactions.
Continue reading “SAP VIM Main Tcodes by Topics : Part 2”How to check and hide SAP IDOC entries in tRFC Queue in BD87 ?
SAP IDOC entries in tRFC Queue in BD87 is very common error in ABAP Developer’s life. Find following why this errors occurs and how to investigate and find the solution to unblock the SAP IDocs.
Continue reading “How to check and hide SAP IDOC entries in tRFC Queue in BD87 ?”IDoc Reduced Segment Check
IDoc Reduced Segment Check: SAP offers some standard functions to check if a Segment can be reduced for Specific message type and even check if the Segment’s field reduction is active.
Continue reading “IDoc Reduced Segment Check”Create SAP PO with Explicit PO Number
Explicit PO Number: This post will explain how to create a SAP PO ( Purchasing Order) with Explicit PO Number.
The first part will cover SAP PO Number Customizing and the second part will explain how to create explicit PO Number.
Continue reading “Create SAP PO with Explicit PO Number”