on 05-02-2012 11:07 AM
Hi Guru's,
I'm trying to change the profit center field in the Organizational Assignment of a contract so that it automatically places a value in the field to lessen errors in encoding. We've already implemented the BADI_RECN_CONTRACT_IN IF_EX_RECN_CONTRACT~CHECK_ALL method for checking of values. But I have no idea how to substitute values of the profit center in the Organizational Assignment using IF_EX_RECN_CONTRACT~SUBSTITUTE method. Any tips or sample steps on using this method?
Thank You very much
-Eric
Hi Eric,
basically to achieve this you would do following :
1. populate an internal table let's say lt_term_oa_new TYPE bapi_re_t_term_oa_intc according to your suitable logic ,
2. call the following function module towards the end of you coding:
CALL FUNCTION 'API_RE_CN_CHANGE'
EXPORTING
io_object = io_object
....
it_term_org_assignment = lt_term_oa_new
...
EXCEPTIONS
error = 1
OTHERS = 2.
This way it works for us usually pretty well and not only with Organizational Assignment. Keep in mind that it is probably better to make only one call for all kinds of changes you need to make in this contract and to avoid unnecessery calls when nothing needs to be changed .
Regards,
Siarhei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
14 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.