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

EKKO-MEMORY - Customer Function to activate it

SimoneMilesi
Active Contributor
0 Likes
1,066

Hi gurus!

I need a BADI (better) or a customer function that allow me to set/delete the field EKKO-MEMORY.

I'm in ECC 6.0 and i look into the already customer function from components LMEKO002 and MM06E005 but i cannot find anything that can help me.

Any suggestion?

My implementation should works both for ME21/ME22 and ME21N/ME22N.

Thanks!

2 REPLIES 2
Read only

SimoneMilesi
Active Contributor
0 Likes
770

Ok, i found the badi IF_EX_ME_PROCESS_PO_CUST~POST

I put this piece of code


DATA ls_mepoheader TYPE mepoheader.
  ls_mepoheader = im_header->get_data( ).

  ls_mepoheader-memory = 'X'.
  im_header->set_data( im_data = ls_mepoheader ).

But in my EKKO table, memory field is blank.

Any suggestion?

Read only

0 Likes
770

I discover this in the standard IF_PURCHASE_ORDER_MM~SET_DATA method


  CALL METHOD me->get_data( IMPORTING ex_data = l_data_old ).
  CALL METHOD me->get_datax( IMPORTING ex_data = l_datax_old ).
  MOVE-CORRESPONDING l_data_old TO l_mepotech.

  MOVE im_data TO l_data_new.
  MOVE-CORRESPONDING l_mepotech TO l_data_new.


  IF l_data_new NE l_data_old.

...
  ENDIF.

But in this way the program overwrite l_data_new with l_data_old information! (my MEMORY field for example).

Any suggestion?