Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

I change funds center of accounting assingment in me51n.PLEASE HELP

Former Member
0 Kudos
238

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?

4 REPLIES 4
Read only

RaymondGiuseppi
Active Contributor
0 Kudos
170

Can you post your code, especially usage of [GET/SET]EXKN[ /X] methods in the mentioned methods.

Regards,

Raymond

Read only

0 Kudos
170

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.

Read only

0 Kudos
170

You add could a call of get_exkn[x] before calling the set* methods.

But, are you sure you are allowed to input some account assignment when Account Assignment Category is still initial, ask functional (ref table for knttp is T163K)

Regards,

Raymond

Read only

0 Kudos
170

   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.