Welcome to my first blog and here I am going to tell you a trick. Sometimes, there are multiple WD components reusing each other and share a common assistance class. Each component requires a separate instance of assistance class, however, some common data also we want to share between these WD components.
Now, there are few other ways using which we can achieve the same:
Consider that we have two WD components, ZWD_MAIN and ZWD_USED.
Both the components are using the same assistance class ZCL_WD_ASSIST.
What we know is that each WD component will have its own instance of assistance class. Each object will be different and have different instance of the ZCUSTOMERS. So how can we make sure that both the object points to same attribute? I think you have guessed it :wink:
If not, here is the magic trick, if we want to share the ZCUSTOMERS list between two WD components, then just by changing the attribute ZCUSTOMERS from Instance Attribute to Static Attribute, all the assistance class object can share the ZCUSTOMERS data. Isn’t it very simple :smile: .
Comments and suggestions are welcome.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
37 | |
10 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
2 | |
2 |