Business Object data declarations

Dart, Jocelyn jocelyn.dart at sap.com
Thu Nov 14 20:20:41 EST 2002


Hi Sue,
The simple answer is improved performance for persistent values -
although using the section after the end_data works but isn't the very best
place to put that sort of data.
If they are truly persistent values you might want to make them
private attributes of the object (by putting them in the object-private..
declaration at the top of the program) - that then keeps the values even
longer for further improved performance.
 
If your values are truly dynamic and need to be calculated each time
then putting them in the local declaration of the method is more appropriate.
 
Hope that helps.
Regards,
        Jocelyn Dart
Consultant (SRM, EBP, Workflow)
and co-author of the book
"Practical Workflow for SAP"
SAP Australia
email: jocelyn.dart at sap.com
phone: +61 412 390 267
fax:   +61 2 9935 4880
 
 
 
 
-----Original Message-----
From: Susan Keohan [mailto:skeohan at mit.edu]
Sent: Friday, 15 November 2002 1:12 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Business Object data declarations
 
 
Hi folks,
 
I have a question which may not have a real 'correct' answer, but here
goes.
 
I have a business object where I define working variables at the top of
the object (right after the end_data object statement).  I can use these
variables in any attribute or method in that object.  But I notice in
some SAP business objects, that data declarations of fields used in
methods are made locally to the method.
 
Do you know if there is an advantage to having all your data
declarations in one place, and re-using them throughout the business
object as needed, (for example filling them with the contents of a
method parameter) or if it is better to have the variables defined
'locally' to the attribute or method that needs them ?
 
Thanks in advance,
Sue
 


More information about the SAP-WUG mailing list