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

SAP DM - Global variable memory consumption with different data type

ankit12
Active Participant
0 Likes
316

Hi Experts,

we want to use the global variable to hold data that is quite large in volume. but as per SAP documentation global variable can hold only 2 MB of data in it so we want to make sure that if we use global variable to hold data which data type we should use so it can hold more data. 

as per our understanding and checked : 

* String - it will take less memory and more data in terms of storing data. but data extraction logic will be complex.

* structure: it will hold less data and take more memory. but data extraction logic can be easy.

has anyone tried using structure array and structure Map in terms of how much data they can hold if we use global variable of these type.

 this is the sample payload we want to store in global variable:

{
"partSerialNumber": "1234",
"inventoryID": "ABC",
"batchNumber": "SDFS",
"status": "HOLD"
}

if anyone has worked with these type please help us to understand, quick response is appreciated.

Regards,
Ankit Gupta 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

marcobarat
Participant
0 Likes

Hi Ankit,

You can technically work around the 2 MB global variable limitation by storing large textual data inside a dummy Work Instruction, and then loading it on demand from the POD.
This approach works because WI content is retrieved dynamically and is not bound by the same in‑memory size constraints as global variables.

However, even though this can help in specific cases, I would not consider it an ideal or scalable solution.

For anything beyond small or static text blobs, the more robust and future‑proof approach is to rely on an external database or persistence layer (e.g., Data Store, HANA, external DB, microservice API, etc.) and only keep keys/references in the global variable.

This gives you:

  • No size limitation
  • Better data management
  • Easier maintainability
  • More predictable performance

So the WI workaround can help for very specific edge cases, but for real data volumes I strongly recommend an external storage solution rather than trying to expand what a global variable can hold.

In addition to the workaround with a dummy Work Instruction (which can work for static or semi-static textual payloads), another option is to offload the large data into SAP Integration Suite.