2014 Dec 01 2:43 PM
Hi I want to change funds center of accounting assingment in me 51n.
I use process_item and process_account of badi me_process_req_cust.BUT it doesn't change.
How can I do?
2014 Dec 01 3:44 PM
2014 Dec 02 6:34 AM
Hi;I wrote this code
lrd_item = im_account_ref->get_item( ).
lwa_item = lrd_item->get_data( ).
IF lwa_item-knttp IS INITIAL.
CLEAR ls_t134g.
SELECT SINGLE gsber FROM t134g
INTO ls_t134g-gsber
WHERE werks = lwa_item-werks
AND spart = space.
CLEAR ls_tabadrs.
SELECT SINGLE param_1
FROM tabadrs
INTO ls_tabadrs-param_1
WHERE APPLCLASS = 'FM'
AND SUBCLASS = '01'
AND abadrstratid = 'FMOA'
AND abadrenv = 'SUR YAPI'
AND STEP_NO = '2'.
SELECT SINGLE bukrs FROM t001k
INTO lv_bukrs
WHERE bwkey = lwa_item-werks.
CLEAR LV_TARGET1.
SELECT SINGLE TARGET1
INTO LV_TARGET1
FROM (ls_tabadrs-param_1)
WHERE SOUR1_FROM = lv_bukrs
AND SOUR1_TO = lv_bukrs
AND SOUR2_FROM = ls_t134g-gsber
AND SOUR2_TO = ls_t134g-gsber
AND DELETE_FLG EQ SPACE.
lwa_accounting-fistl = lv_target1.
lwa_exknx-fistl = 'X'.
call method im_account->set_exkn( lwa_accounting ).
call method im_account->set_exknx( lwa_exknx ).
endif.
2014 Dec 02 6:55 AM
2014 Dec 02 7:19 AM
These codes are written top of code.
data : l_account type exkn.
data : l_item type mereq_item.
call method im_account->get_exkn
receiving
re_exkn = l_account.