Skip to Content

EKKO-MEMORY - Customer Function to activate it

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!

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Sep 21, 2010 at 01:59 PM

    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?

    Add comment
    10|10000 characters needed characters exceeded

    • 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?