When we implement the SAP ERP project, we often develop the RFC function to provide data services for the non-sap system. This program design to provide log function in the RFC Function Module.
Source code url: GitHub - gaovv2000/ABAP-log4function: logs for the function parameter and result
- Create the DB table of logs header,the name is “ZTBCLOGS_RLGK”, and activate it.
![1.jpg]()
- Create the DB table of logs contant, the name is “ZTBCLOGS_RLGD”, and activate it.
![2.jpg]()
- Create the DB table to set enable the log function, and activate it.
![3.jpg]()
- Create the DB structure for report show data, Name is “ZSFUNCPARAS”, and activate it.
![4.jpg]()
- Use transaction code SE38 to create the include program, the name is ‘ZBCLOGSINC’.
- Use transaction code SE38 to create the executable program, the name is ‘ZBCLOGSREP’.
- Copy the code into the corresponding program, And then activate them.
- When you want to record the data for function parameter, Just goto function group “TOP include” program to insert a row statements and in function module call a macro. Goto “Top Include” program Insert “include” statement.
![8.jpg]()
![8-2.jpg]()
- Call the marco at the Function Module first row.
![8-3.jpg]()
- Set DB table “ZTBCLOGS_ACT” to enable log function.
![9.jpg]()
- Excute the Function Module to test the function.
![10.jpg]()
- Use the transaction code SE11 to view the data .
![11.jpg]()
- We have a reporting program “ZBCLOGSREP”, more easily view the logging contents.So let’s goto the transaction code SE38 to try it .
![12-1.jpg]()
![12-2.jpg]()
![12-3.jpg]()
![12-4.jpg]()
![12-5.jpg]()
![12-6.jpg]()















