Implementing a Central Finance system can be challenging with a number of BADI’s involved with customer specific requirements, and to fill gaps in the standard SAP solution. In addition, the data is mainly being transferred by SLT where it is not apparent how to go about testing and debugging individual messages.
As a team member on a Central Finance project a key skill is understanding the application interface framework, and having skills to test and debug it for troubleshooting purposes. For those new to AIF and Central Finance I’ll provide some tips in this post on how to accomplish this.
Set Interface as synchronous
To be able to debug, the related central finance interface needs to run synchronously for you to break into debug. Here are two options you can take:
- Create a run time configuration group TST in transaction /AIF/PERS_CGR The run time group is used by the interface test tool transaction /AIF/IFTEST. When setting this up be sure that the indicators “Run scheduled” and “Schedule packages” are not active and set the “Runtime Cfg Active” flag.
- Same as above, create a run-time group of your choosing, set as synchronous and assign it to the interface in SM30 view V_CFIN_AIF_RT_CF. All message via SLT will use this so be weary when testing because parallel processing will not take place.
Dont forget to place a break-point in the code you are looking to debug, for example your implementation of BADI_FINS_CFIN_AC_INTERFACE.
Testing a Single AIF message using technical mode
Go to AIF Monitor FINS_CFIN_AIF_IFMON – Interface Monitor and navigate to the interface that you want to test.
On the next screen enter into technical mode
Double Click on the message that you want to test with and then click Generate Test File. Take note of the file number created.
Now go to transaction /AIF/IFTEST – Interface Test Tool and select the test file from the File Number drop down (or leave blank to search for multiple messages).
Click Search and double click the file no in the bottom screen to activate the data as a selection.
Once the data is activated select the icon “Read Data” and from the next screen, select the icon Process in XML Run Time
Changing the message content
To test various scenarios you can change the message payload content using the interface test tool. Simply double click on a SRC_DATA structure and change the content of any field or internal table. In the example below the ACCIT table data can be changed. Be sure to install note 2615089 so that the tool does not short dump for structures with over 400 fields.
Testing a Single AIF message using Restart Option
One alternative to using run time configuration groups is to switch to synchronous mode in debug by setting a break-point in class at line 50
Jump to line 58 when break point is reached.
You can re-start any AIF message using, for example transactions FINS_CFIN_AIF_IFMON, FINS_CFIN_AIF_ERR or /AIF/XML_RESTART to reach this break point.
This is by no means exhaustive of the options available to test and debug AIF messages but based on my experience are the most straight forward to use.