14.01.2020 Views

ABAP_to_the_Future

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8

Business Object Processing Framework (BOPF)

Figure 8.38 Change Document Item Records

The header record (Figure 8.37) tells you who changed the monster object and

when and the transaction code that wa s used. The GUID means nothing to a

human, so you use the CHANGENR field to query the CDPOS table (Figure 8.38). Here,

you can see that the age was changed from one to five days, and furthermore an

entry was added for EXT_ID, which tells you that it was monster number 5 that

was changed.

SAP provides Transaction RS SCD100 to call up an ALV report to show a joined

view of the two change document tables. You could also code a custom action to

query the change document database ta bles, but if you’re using a Web Dynpro

application to display your business object, then there’s no need to code anything

yourself: Web Dynpro components /BOFU/CHANGE_DOC_TAB and / BOFU/CHANGE_

DOC_TAB2 come as standard to show change logs. (Web Dynpro is outside the

scope of this chapter—but turn to Chapter 12 for more!)

Summary

You’ve now come to the end of this imaginary transaction. You’ve chosen the record to

create or change, made life easy for the user with some determinations to show text

fields and calculated fields, used validations to check the data integrity, and saved the

record for later use. After the record has been saved, you can keep track of who created

or changed the record.

8.3 Custom Enhancements

In this section, you’ll first take a quick look at what SAP has provided as a mechanism

for enhancing its own standard bu siness objects, and then learn how you

can take the complexity out of BOPF programming.

350

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!