BAdI for Start Routine and End Routine 
Startroutine and Endroutine can be called from a transformation file to modify the incoming data and the transformed data. The Start and Endroutine are implementations based on BAdIs. The BAdI UJD_ROUTINE covers the startroutine and endroutine.
Create a BAdI implementation for UJD_ROUTINE in transaction SE19.
Enter the filter of the BAdI. The filter value is used in the transformation file to call the BAdI implementation.
Create a transformation file.
Enter the BAdI filter value in the *OPTIONS section.
Define a package to use the transformation file.
Run the package.
Transformation file
*OPTIONS
FORMAT = DELIMITED
HEADER = YES
DELIMITER =
SKIP = 0
SKIPF =
CREDITNEGATIVE=NO
CONVERTAMOUNTWDIM=
MAXREJECTCOUNT=
VALIDATERECORDS=YES
STARTROUTINE = BADI_FILTER1
ENDROUTINE = BADI_FILTER2
*MAPPING
cat=category
Acc=Account
Ent = Entity
Tim=time
Currency=Rptcurrency
int=intco
dat=Datasrc
*CONVERSION
Steps to Activate BAdI Implementations in the Business Address Services application help available on SAP Service Marketplace
Any software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or by its gross negligence.