12-09-2021 8:48 AM
Hi
I want to use include MV45ATZZ of PG SAPMV45A to define a global variable field.But MV45ATZZ is commented out.Is the include still can be used.
Or should I use MV45ATOP?
Can anybody please help.
Thanks.
12-09-2021 9:23 AM
Hello yolosap
MV45ATZZ is included in MV45ATOP. If you need to define custom global data in SAPMV45A, you should definitely declare it in MV45ATZZ, not in MV45ATOP directly. That's what suggested in comments in MV45ATZZ:
***INCLUDE MV45ATZZ .
************************************************************************
* *
* This include is reserved for user modifications *
* *
* Additional data definitions *
* *
* The name of additional data definitions should begin with 'ZZ'. *
* *
************************************************************************<br>
Best regards
Dominik Tylczynski
12-09-2021 8:56 AM
Global variable ? in a Standard program ? why ? do you expect to retrieve information from point 1 in point 2 ?
12-09-2021 9:05 AM
Yes,i want to transfer information between two userexit. ABAP memory is useful. However,The customer doesn't want me to use ABAP memory.So, i need to find another way.
12-09-2021 9:22 AM
You have two ways :
- Design pattern singleton (so scary name for a simple trick)
- ABAP Shared memory object (trans. shma I think), little bit complex, but more powerfull when you have sevaral LUW/transaction ..
12-09-2021 9:23 AM
Hello yolosap
MV45ATZZ is included in MV45ATOP. If you need to define custom global data in SAPMV45A, you should definitely declare it in MV45ATZZ, not in MV45ATOP directly. That's what suggested in comments in MV45ATZZ:
***INCLUDE MV45ATZZ .
************************************************************************
* *
* This include is reserved for user modifications *
* *
* Additional data definitions *
* *
* The name of additional data definitions should begin with 'ZZ'. *
* *
************************************************************************<br>
Best regards
Dominik Tylczynski
12-09-2021 9:32 AM
12-09-2021 9:23 AM
here the example of the SingleTon
https://answers.sap.com/questions/12988109/how-do-we-use-singleton-in-oo-abap-can-someone-ple.html
12-09-2021 9:33 AM