You may wonder how to execute AMDP TRFN directly via ABAP. It seems that the best idea is to use the method below:

        i_processing_phase      = lr_request->if_rsbk_request~get_stage( )-stage_id
        i_target_request        = lr_request->if_rsbk_request~get_requid( )
        i_dtp                   = lr_dtp->n_dtp
        i_t_trfn                = lr_request->if_rsbk_request~get_t_transformation( i_only_she_relevant = rs_c_true )
        i_r_log                 = lr_request->if_rsbk_request~get_log( )
        i_simulation            = lr_request->get_simulation( )
        i_th_bp                 = lt_bp
        i_r_outbound            = lr_outbound
        e_r_analysis_rt         = DATA(lr_analysis) ).

DATA(lr_segment_outbound) = lr_outbound->get_segment( i_segid = 001 ).

Unfortunately you can’t put data into this method - it always reads it from the ADSO table and provides only the result. For a complete use case please check out this repository.