Skip to Content
0
Former Member
Oct 28, 2009 at 06:25 PM

Trying to change values in PROCESS_ACCOUNT of BADI IF_EX_ME_PROCESS_PO_CUST

690 Views

Hello Experts,

My requirement is on certain conditions to change the tax code of all services in a purchase order(me21n). I've been using process_account and this is my code:

  data accounting TYPE mepoaccounting.

        CALL METHOD IM_account->get_data
          RECEIVING
            re_data = accounting.

        accounting-mwskz = 'LK'.

        CALL METHOD IM_account->set_data( accounting ).

        CALL METHOD IM_account->get_data
          RECEIVING
            re_data = accounting.

As you can see I'm using get_data to see if the changes are being made, and here everything is ok. Afterwards along the standard program the new values aren't set. Here is some code that I found after the badi processed that is not being executed:

Method:

CALL METHOD me->if_flush_transport_mm~start

After using the macro the function isn't being called because l_account is initial.

      mmpur_dynamic_cast l_account <queue>-handle.
      IF NOT l_account IS INITIAL.
        CALL FUNCTION 'MEPOBADI_PROCESS_ACCOUNT'

Could this be the problem? For some reason when in me21n the value continues empty and no changes are made, I've tried changing other accounting values but to no avail.

Does anybody have an ideia?

Thanks and regards

David