How to turn on change log for notes/text, when custom text objects are created for customer object (KNA1/BUT000) in both ECC and CRM.
Customizing Notes/Long text in SAP CRM
In SAP CRM the text determination procedure is customized via the SPRO transaction for a particular transaction process.
- Log in to SAP CRM and enter SPRO in the command box.
- Click SAP Reference IMG and navigate to Customer Relationship Management->Basic Functions->Text Management
In the Define Text Objects and Text Types screen, create the Text Types and Text Objects that you need.
3. In the Define Text Determination Procedure screen, create a new procedure and link it to the text object created.
4. Navigate to Customer Relationship Management->Transactions->Basic Settings.
5. In the Define Transaction Types screen, assign the text determination procedure to the transaction type (‘Business partner’ in this case).
The values configured for the ‘Changes’ field for the different text types determine the behavior of the notes on SAP CRM Service Manager.
The following change control values can be configured for the note types:
- Edit – you can edit the texts here. This is the default mode.
- Log (P) – the text you enter here will be appended to the note of type ‘Display Log’.
- Display Log (R) – this is read-only text where the content gets updated from the note of type ‘Log’.
- Paste (A) – you can create this text only once, after which it becomes non-editable.
- Display (C) – you cannot create or change this text. This automatically reads specific texts from an associated object.
Customizing Notes/Long text in SAP ECC
Long Texts (also referred as SapScript texts or text objects) are the containers for containing long texts in SAP systems, and they are usually attached to business objects, that users can enter free comments.
In certain table we would like to create records in CDHDR and CDPOS tables on change of some custom fields or some standard fields.
In our case we want to track the changes for customer objects (KNA1).
The long texts / notes are directly saved in STXH and STXL tables in ERP. So to build an audit of changes to long texts, it is necessary to track the changes in STXH/STXL tables for customer object.
- For this first activate the log change for STXH and STXL tables via technical settings in SE11.
Go to SE11.
Enter you table name, then press display, You will find a technical setting tab. Click on that technical setting tab.
Then press edit.
When you click on the Change button, then the all fields will be in editable mode.
At the bottom, you will find an option Log data changes.
Just tick on the option and save your data.
Follow the same process to activate log data changes for the STXL.
2. For capturing text changes in tables ( STXH/STXL ) needs at least an entry to be maintained in table STXXFILTER.
Further details please refer SAP NOTE : 2515264 - Logging of tables STXH and STXL.
This enabling of logging changes is a standard configuration. The logs are written to a table called DBTABLOG, where audit trial can be viewed.
Note: If DBTABLOG table is not recording any changes to STXH and STXL. This is due to release of the kernel patch. In that case Implement the below SAP Note.
2652603 - STXH/STXL long texts are not saved in DBTABLOG.
Test case 1: Add a Long text in ECC and it will automatically sync to CRM.
- Go to XD02 t-code and open customer in ECC.
- Go into the menu Extras -> Texts.
- Currently no text/notes exist:
Double click on a row, e.g. “Customer Service notes”,
Enter a text:
Click on Save.
the text is saved on the customer and is available in the audit trail (via t-code AUT10).
To see change logs follow below steps.
i)Go to transaction AUT10
ii)Go to enhancement mode
iii) On the right pane pick the long text logs tab
Please feed in these details and click on execute
You shall the see the output. Text old/new shall show the changed values.
The note we just created in ECC, can be viewed on the customer in CRM (web-interface/GUI).
Open the same customer in CRM webui.
The note is saved under the text type “Correspondence”. To view the whole note, click on the blue text.
Test case 2: Add a Note/ Long text in CRM and it will automatically sync to ECC.
Open business partner and add a long text / note for business partner by click on new in CRM.
Choose which “Text Type” you want (in this case we chose “Insurance Notes”, and add your note, before pressing “Back”.
Click on Save.
This note can now be seen in the text type “Correspondence”, click on the blue text.
If we go back to ECC, this note can now be found in XD02 on customer.
You can double click on the row and read the full note.
You can also go into the audit trail in AUT10 (follow instructions above).
Summary:
With this solution you can create notes and audit texts in both CRM and ECC, in ways to be complaint for reporting.
In CRM it will be logged in Correspondence with date, time and user id.
In ECC it will be logged in t-code AUT10, in the audit trail.