Hold Goods Issue until Export Permission exists in SAP GTSTechnology
Nowadays it is especially important to keep all the company processes robust and well-established, especially when several IT systems serve various business processes at the same time. We are going to look at how export permission checks work in SAP S/4HANA – SAP GTS setup, and how it behaves when you plug SAP Extended Warehouse Management (EWM) in between.
To perform all the steps of selling goods to the foreign customer, we use SAP S/4HANA as an Enterprise Resource Planning (ERP) system, SAP Global Trade Services (GTS), which can handle foreign trade part of the business process, and SAP EWM which will play the role of Warehouse Management System. Instead of SAP S/4HANA, the predecessor SAP ECC system can be used as an ERP system.
Configuration of Export Permission Check in S/4HANA
Checking of Export Permission before goods issue in ERP can already be done in standard solution when you have SAP GTS integrated with your ERP system. Such customizing can be found in SAP S/4HANA IMG Menu at:
Integration with Governance, Risk and Compliance → SAP Global Trade Services → Control Data for Transfer to SAP Global Trade Services → Configure Control Settings for Document Transfer → Application Level: SD0B → checkbox “Hold Goods Issue if Export Permission Is Missing.”
Note, that this functionality requires the activation of the BADI Implementation “/SAPSLL/DELV_CUS_E_GI_CHECK” of the Enhancement Implementation “/SAPSLL/PI_CUS_DELV_PROC” in S/4HANA system. To activate the BADI, access the following node in IMG Menu:
Integration with Other SAP Components → Integration with Governance, Risk and Compliance → SAP Global Trade Services → Activate Hold of GI Posting If Export License Missing.
Note: If you use SAP ECC as an ERP system, then you should access the following IMG node:
Sales and Distribution → Foreign Trade/Customs → SAP Global Trade Services – Plug-In → Customs: Activate Hold of GI Posting if Export License Missing
After setup of checking Export Permission is finished, we can proceed to configuring the check in the SAP GTS system.
Configuration of Export Permission Check in SAP GTS
SAP GTS can make it possible for us to handle complex foreign trade processes. We integrate SAP GTS with ERP system, where ERP systems plays the role of “feeder” system for GTS. All the foreign trade relevant master and transactional data are replicated to SAP GTS.
Customs Management module of SAP GTS can help us to handle our Export process and to obtain Export Permission from the customs authorities. Release functionality can be enabled in Customs Module of SAP GTS. To do that, we should configure “Time of Release” in the appropriate Activity sequence. Therefore, we need to access the customizing node in SAP IMG menu in SAP GTS system:
Global Trade Services → Customs Management → Communication Processes → Define Control Settings for Communication Processes.
Here we can configure release logic in particular Activity Sequence. Three options of releasing the Export Customs Declaration are available:
- No release – No release happens in Customs Declaration which will result in failed Export Permission check during Goods Issue posting.
- Creation of a Customs Declaration/Shipment – Customs Declaration is released immediately after it was created.
- Receipt of a Relevant Message – Customs Declaration is released after Release Message is received. Here “Release” flag for one of the messages in Activity should be configured.
Prerequisites for checking of Export Permission
To make it possible to check Export Permission in SAP GTS before posting Goods Issue, we need to ensure that Export Declaration already exists in SAP GTS with the reference to appropriate billing document in the feeder system. Which billing document type you use as trigger for export processing in SAP GTS depends on the setup of your logistics processes in the feeder system. If your logistics process is configured to issue billing documents only after goods issue, you can use pro forma billing documents. Generally, one billing document will create one customs declaration. There are several options of how billing document can be created prior to Goods Issue:
- Manual creation of Billing Document – We create relevant billing document in ERP system manually, which is then transferred to SAP GTS and Customs Declaration is created.
- Shipment Consolidation for Customs Declarations from Sales Documents (Transaction: “/SAPSLL/CUS_INV_R3”) – With the current option, we can group the desired number of relevant outbound deliveries and generate pro forma billing documents. This will result in reduced number of Export Declarations in SAP GTS. The deliveries are grouped according to standard grouping criteria (Consignee, Sold-to-party, Incoterms, Country of Departure, etc.)
- Invoice Before Goods Issue (IBGI) creation from SAP EWM system – There is an option in SAP EWM to create Billing document in ERP Billing even before Goods Issue has been posted.
After customizing in SAP GTS and in SAP S/4HANA is finished and prerequisites are fulfilled, we can execute the standard behavior of check during Goods Issue posting from SAP S/4HANA.
Standard behavior of check between SAP S/4HANA and SAP GTS
Now every SD0B document of the appropriate type in ERP system which is subject to export procedure will be checked for obtaining export permission before it leaves the premises on the way to a customer. When we try to post Goods Issue in Outbound Delivery in our ERP system. According to the beforementioned customizing activities the check of export permission will be executed. In case of the failed check result, the goods issue will be blocked, and the result can look like as follows:
To obtain permission for Goods Issue, we need to process Export Customs Declaration in SAP GTS according to customizing that was configured before. Export Customs Declaration in SAP GTS is created based on relevant Invoice type (e.g., Pro-Forma Invoice), which means that Invoice with reference to outbound delivery should be created before Goods Issue posting in ERP.
Outbound process in SAP EWM
In case we want to leverage all the benefits of advanced warehouse management system like SAP EWM, we need to integrate our ERP business processes with SAP EWM system. When we create outbound delivery with EWM-relevant storage location assigned warehouse processing is being handed over from ERP system to EWM. That means that all the warehouse processes such as picking, loading and goods issue need to be confirmed in SAP EWM.
During EMW processing of the outbound delivery, we usually perform picking of the goods from the storage, then we can repack the goods if it is required. Afterwards, we move our products to the outbound staging area, from which we perform loading and goods issue. Goods Issue posting is performed at the end of the outbound process in EWM, which represents the physical leaving of the goods from the warehouse.
There are multiple ways in SAP EWM available of how we can post Goods Issue. This can be done either manually from EWM Outbound delivery, EWM Outbound Delivery Order or Transportation Unit or automatically via PPF actions in SAP EWM.
Standard behavior of check between S/4HANA and GTS with EWM-enabled storage location
When the goods issue is being completed in SAP EWM, the outbound delivery is handed over back to the ERP system where we confirm completion of the warehouse activities in the ERP document. Here the check of export permission is executed the same way as it worked in standard S/4HANA-GTS behavior according to the settings in S/4HANA system.
At this point of time, in case of failed check, the problem can arise. We can end up with inconsistent statuses in the same deliveries in EWM and ERP systems. On the following screenshot, we can see Goods Issue status in EWM, which tells us that it was already completed:
But at the same time, the corresponding delivery in ERP system shows us completely different status of Goods Issue posting – Not Yet Started:
Such system behavior will also result in error which remains stuck in SMQ2 queue in ERP system until the export permission will be issued to the sender of goods and the queue will be executed again.
Implementation of Export Permission check for EWM-enabled storage locations
To prevent different delivery statuses between systems and resolve occurrence of the beforementioned error in ERP system, check for Export Permission needs to be implemented in EWM system and executed before actual Goods Issue the same way that it works in S/4HANA. Such functionality can be achieved via custom development in SAP S/4HANA and BADI implementation in EWM. The result of custom check can look like follows:
This modification can help us to achieve the following functionality in the outbound process with EWM-enabled storage location:
- Export Permission before Goods Issue is checked in SAP EWM and Goods Issue posting was stopped in EWM system in case of failed check.
- Both Outbound Deliveries in ERP and EWM are coherent and represent the same Goods Issue posting status.
- No inbound erroneous queue stuck in ERP in transaction SMQ2.
Related SAP Notes:
If you are interested and would like to learn more about how Micro IT can help you, please contact us at firstname.lastname@example.org