Application Development 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: 

BADI or EXIT that i can change the ekko-frgzu

Former Member
0 Kudos

Hi,

I need a BADI or EXIT that i can change the ekko-frgzu, actually i want to restart the release strategy based on some condition like ZTERM changes.

I found some exits but they are not proper for my purpose.

How can i do that ?

Thanks.

4 REPLIES 4

nirajgadre
Active Contributor
0 Kudos

Hi,

Try to use BADI ME_PROCESS_PO_CUST. use the method PROCESS_HEADER .

In this use the method GET_PREVIOUS_DATA and GET_DATA to read the ZTERM and then on change use the method SET_DATA to change the Release status of PO.

0 Kudos

Thanks for your reply.

I tried both Header and Post methods but i could not get the desired result with the following code:

method IF_EX_ME_PROCESS_PO_CUST~POST.

  Data: ex_data type  MEPOHEADER, new type  MEPOHEADER,
      data1 type MEPOHEADER.

  CALL METHOD im_header->get_previous_data
    IMPORTING
      ex_data = ex_data.

   CALL METHOD im_header->get_data
    RECEIVING
      re_data = new.

  MOVE-CORRESPONDING new to data1.

  if ( new-zterm <> ex_data-zterm ).
      data1-frgzu = ''.
      data1-frgke = ''.
      data1-frgrl = 'X'.
      CALL METHOD im_header->set_data
      EXPORTING im_data = data1.

  endif.

endmethod.

Release is still not at the beginning, PO seems released i mean.

0 Kudos

Hi,

try to use the method SET_CHANGED at the end of the logic.

method IF_EX_ME_PROCESS_PO_CUST~PROCESS HEADER

Data: ex_data type MEPOHEADER,

data1 type MEPOHEADER.

CALL METHOD im_header->get_previous_data

IMPORTING

ex_data = ex_data.

CALL METHOD im_header->get_data

RECEIVING

re_data = data1.

if ( new-zterm NE ex_data-zterm ).

data1-frgzu = ''.

data1-frgke = ''.

data1-frgrl = 'X'.

CALL METHOD im_header->set_data

EXPORTING im_data = data1.

use the SET_CHANGED method here

endif.

endmethod.

0 Kudos

Hi,

Check this BAPI ME_BAPI_PO_CUST.

and CH_POHEADER-REL_STATUS

you can change the value but i think this bapi is getting called in BAPI po change.

Thanks.