cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP GTS - How to Map Z-Table Services to CS_CONTROL Fields in SAP GTS BAdIs?

Hatim_EL_Ouahabi
Explorer
0 Kudos
308

Hello everyone,

In an SAP GTS implementation project, we need to adjust the document transfer control by activating and implementing the BAdIs (MM0A, MM0B, MM0C, SD0A, SD0B, and SD0C).
To implement these BAdIs, I'm working on ABAP code. The business logic for transferring or not transferring documents to GTS must be translated based on specific parameters.

The parameter CS_CONTROL of the method API_CONTROL_MODIFY has several fields that control the GTS call for individual modules/functions. However, my challenge is that in each of these 6 BAdIs, the CS_CONTROL structure contains different fields, depending on the type of document or process. I am unsure what exactly needs to be implemented in each method to account for these differences.

To manage the transfer logic, I have created a custom Z-table that defines the mapping criteria for document transfer to SAP GTS. Here’s a brief explanation of the table’s concept:

  • Purpose: The Z-table determines which GTS services should be activated for specific combinations of Company Code (BUKRS) and Plant (WERKS).
  • Structure:
    • Key fields: BUKRS (Company Code) and WERKS (Plant).
    • Service columns (Boolean fields):
      • SERVICE_COMPLIANCE – Controls compliance checks.
      • SERVICE_CUSTOMS – Activates customs processing.
      • SERVICE_RISK_MANAGEMENT – Activates risk management.
      • SERVICE_ARBV_LE – Activates labor law checks.
    • These fields are maintained via a maintenance view for easy configuration by end users.

My Specific Challenge:
While the logic for activating fields like cs_control-gcuma (for customs processing) or cs_control-cusrv (for compliance management) can be derived from the Z-table, the CS_CONTROL structure in each BAdI has different fields, depending on the document type (e.g., purchase order, delivery, invoice). My Z-table only includes the 4 services mentioned above, and I’m not sure:

  1. How to map the Z-table entries to the appropriate CS_CONTROL fields in each BAdI.
  2. Whether additional logic is required to handle document-specific parameters that are not covered in the Z-table.

For example, in MM0B (for deliveries), I noticed fields in CS_CONTROL that are specific to deliveries, but I am unsure how they relate to my Z-table services.

I would appreciate any advice or examples on how to structure the implementation for these methods, especially regarding handling the variability of the CS_CONTROL fields across the 6 BAdIs while keeping the logic consistent with the Z-table.

Thank you in advance for your support! 😊

Regards, 
Hatim.

Accepted Solutions (0)

Answers (0)