
The AIFAEM AddOn provides a Framework to publish Events from ECC and S/4HANA Systems to AEM easily. I have explained it in one of my blogs. Unfortunately one feature is not included: Displaying the JSON Data sent out to AEM. With this blog, I want to show you how to extend your System to persist and display JSON Payloads from your AIFAEM Events.
For the Implementation of this you will need some Custom ABAP Objects. I have stored my Custom Objects here: https://github.com/alPfeil/AIFAEM/tree/main
You will need
1) DB Table zaifaem_json
This Table provides Persistence for the JSON Payloads.
2) Function Module ZAIF_ACTION_CALL_AEM_CUSTOM
This Function Module is an extended Version of the Standard AIFAEM Action which will persist the Payload in zaifaem_json
3) ABAP Report ZAIF_AEM_DISPLAY_JSON
This ABAP Report selects the JSON Data from the DB Table and displays it as PopUp
4) Message Class ZAIF_AEM_MESSAGES
In this Message Class there is the Message which will provide the GUID to the UI for the Display Function.
Assuming you already have set up an AIFAEM Interface, you will only need to do the following:
In /N/AIF/CUST -> Interface Development -> Define Action you´ll need to create a new Action
In /N/AIF/CUST -> Interface Development -> Define Structure Mapping you´ll need to assign the Custom Action instead of the Standard Action
With this Action, your Interface will now persist the Data into the DB Table ZAIFAEM_JSON. Let´s test it.
Change of a Business Partner:
--> /N/AIF/ERR
In SE16N we can see the JSON:
In order to see it in AIF Error Monitoring we need a Custom Function.
In AIF Error Monitoring you can simply add Custom Functions here
Just add the Report, the GUID Parameter and the Text + Icon. Also Skip Screen because the selection is done by the Message Paramter
Now when clicking the button we can see the JSON:
Last Step: In order to make this Custom Function availiable for every User and Interface + add it to a transport, we need to open Transaction /N/AIF/CUST_FUNC
Here we can see how the set up looks like when done in Customizing:
I recommend to change these 2 parameters:
Then the system should prompt you for a transport. If not, you can add it manually with Table View -> Transport. To make sure the System also takes the Parameter for P_GUID, please make a dummy change in "Define Parameter IDs and Values" and save.
Thats it! Happy Eventing 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
33 | |
15 | |
11 | |
8 | |
8 | |
7 | |
7 | |
7 | |
6 | |
5 |