‎2009 Apr 03 9:43 AM
Hallo,
I am searching for a class or coding where i can add a new rule in a transformation in a new created transformation.
Can anybody help me.
My Coding see below:
* Create new Transformation by using
TRY.
CALL METHOD cl_rstran_trfn=>factory
EXPORTING
i_tranid = d_tranid
i_s_source = l_s_source
i_s_target = l_s_target
i_expert = rs_c_false
i_new = rs_c_true
i_with_message = rs_c_false
RECEIVING
r_r_tran = o_r_tran_tlogo.
CATCH cx_rstran_not_found.
ASSERT 1 = 0.
CATCH cx_rstran_input_invalid.
ASSERT 1 = 0.
ENDTRY.
* Save of transformation
try.
call method o_r_tran_tlogo->if_rso_tlogo_maintain~save
EXPORTING
I_WITH_CTO = rs_c_true
IMPORTING
e_subrc = l_subrc.
CATCH cx_rs_error_with_message .
RAISE EXCEPTION TYPE cx_rsks_cancelled.
endtry.
IF l_subrc <> 0.
RAISE EXCEPTION TYPE cx_rsks_cancelled.
ENDIF.Then i want to to Add Rules to the new transformation
I've tried to solve the problem by using the
class: CL_RSTRAN_TRFN
and Method : ADD_RULE
Then i used the method save
But it doesn't work
Greetings
meno
Edited by: Matt on Apr 3, 2009 1:42 PM
‎2009 Apr 03 12:58 PM
Try using class CL_RSTRAN_TRFN_RULE to create the rule, then use CL_RSTRAN_TRFN->add_rule( ).
matt
‎2009 Apr 07 10:09 AM
Thank you Matt for your advise.
I have problems to create the coding for these steps.
There are two classes. How can i combine these both.
Maybe you can give me an example.
Greetings
meno