Professional Documents
Culture Documents
How To Include Administrative Data To A BOPF Node - SAP Blogs
How To Include Administrative Data To A BOPF Node - SAP Blogs
How To Include Administrative Data To A BOPF Node - SAP Blogs
Products Industries
Industries Services Support
Services and Support Training
Training Community
Community Developer
Developer Partner
Partner
About
About
Ask a Question Write a Blog Post Login
Former Member
January 13, 2014 3 minute read
Developing a data model for your application, you normally want to track changes. So you add attributes like created_by,
changed_by and so on at least for the header data. Sometimes the business requires also to track changes on item level.
BOPF supports this standard requirement by a library function. This tutorial shows you how to use it in your BOPF BO.
The tutorial starts with the business object SALES_QUOTE created in the ‘Getting Started with Business Object Processing Framework’.
This Business Object follows the semantics of the sales quote based on the NetWeaver Enterprise Procurement Model (EPM). You can
use the BOB or BOBX editor. The tuturial uses BOB.
In the rst step we include the structure /BOBF/S_LIB_ADMIN_DATA in
the persistent structure of the root node.
Last but not least we test the changes in the BO test tool BOBT.
Enhance the structure of the root node
In this step we will enhance data structure of the root node and add the attributes for administrative data. Launch the
Business Object Builder (BOB). Open the business object ZD_SALES_QUOTE and navigate to the root node.
Double click the persistent structure and navigate to the data dictionary. Insert an include with the data type
/BOBF/S_LIB_ADMIN_DATA and the group name ADMIN_DATA. This data structure contains the a ributes CREA_DATE_TIME and
LCHG_DATE_TIME – both typed with the data element TIMESTAMPL for UTC mestamp – and the a ributes CREA_UNAME and
LCHG_UNAME – both typed with the data element UNAME.
Save and activate the DDIC change. Then go back to the BO editor.
Create a determination
In the BO editor, start the determination creation wizard on the root node. Enter the determination name DET_ADM_DATA and
a description.
Continue to the next step where you enter the name of the implementing class. Use the BOPF library class
/BOBF/CL_LIB_D_ADMIN_DATA_TSM which cares for maintaining the adminstrative attributes.
Continue to the next step to determine the Determination Pattern. Determinations can be executed at di erent phases of the
transaction. Administrative data must only be updated before the user saves the BO instance. So we select the pattern Derive
dependent data before saving.
Continue to the next step to de ne the trigger nodes. As we only de ned the administrative data on the root node, we want it
to be updated at any time something changes in the BO instance, be it on root or item level. So we have to select all nodes as
trigger nodes. The administrative data must be updated even when an item is deleted, not only when a root or item node is
created or updated. We want to track all changes.
Continue and complete the wizard. The administrative data is now updated at any change on the BO instance. You can verify
this with the BO test tool (BOBT).
To test the changes launch the transaction BOBT. Open the BO ZD_SALES_QUOTE and add a new instance. You can see the
new attributes to track the BO changes. If you save the data the attributes are determined by the framework. Play around with
item instances. You will see that they also in uence the update of these attributes.
Summary
With a few model changes and the use of a BOPF library class, you can add attributes for tracking business object changes on
each node level without having to code it by your own. You can test the new feature without any test code in the BO test tool.
Alert Moderator
Assigned tags
Related Questions
8 Comments
Christian Guenter
nice Tutorial.
Unfortunately i have an issue with the structure /BOPF/S_LIB_ADMIN_DATA. It’s neither available im our 7.31 SP05 (ERP)
nor in our 7.40 SP08 (SCM) system. Are there special requirements for this structure? Any note or something else? Of
course i can easily create a similar structure for my own…
Thanks.
Regards Christian
Like (0)
our namespaces are confusing: it is /BOBF/S_LIB_ADMIN_DATA. I felt in the trap myself… I corrected it now also in the
document.
Kind regards
Thea
Like (0)
Christian Guenter
Regards Christian
Like (0)
Siegfried Kuri
i started working with BOPF in eclipse and i tried to add this determination. But unfortunately in eclipse only “react during
save” can be set, the timepoint “before save” is missing. So i have to go to BOBX and set the timepoint “Before save” and
then it works ne. Is this really the right way to do it? or am i doing something wrong?
Regards, Siggi
Like (0)
Neil Ward
I just tried to implement this and when testing I get a short dump with message_type_x
Like (0)
Custodio de Oliveira
Like (0)
Neil Ward
Like (0)
Share & Follow
Sitemap Newsletter