Skip to Content
avatar image
Former Member

Reset PR Release Strategy at ME_PROCESS_REQ_CUST

I'm trying to Reset the Release Strategy using the method ME_PROCESS_REQ_CUST~PROCESS_ITEM.

Using the following code:

 CALL METHOD im_item->if_releasable_mm~get_data
    IMPORTING
      ex_strategy = o_strategy
      ex_state    = o_state.

  CALL METHOD o_state->reset_release
    EXPORTING
      im_code = <rel_code> " There's a big logic to found this guy
    EXCEPTIONS
      no_authority      = 1
      not_released      = 2
      not_responsible   = 3
      illegal_call      = 4
      illegal_indicator = 5
      rfq_exists        = 6
      po_exists         = 7
      OTHERS            = 8.

I achieve sucess cleanning the strategy steps:

This method set the values:

EBAN-FRGRL = ‘X’ .

EBAN-FRGZU = ‘ '

EBAN-FRGKZ = ‘X’

And that is perfect!

The problem is the field EBAN-BANPR keep the old value "05"... And I need to reset this to "03".

I tried the methods im_item->set_data and im_item->set_datax to change this value, but that call starts a infinite loop calling the badi again.

I have the possibility of use the FM BAPI_REQUISITION_RESET_RELEASE wich works fine. But this way isn't online and worst, could create a Enquee problem.

release.jpg (12.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Feb 03, 2017 at 10:47 AM

    Problem solved!

    I keep the PROCESS_ITEM code and at CHECK method I use IF_PURCHASE_REQUISITION_ITEM~set_data and IF_PURCHASE_REQUISITION_ITEM~set_datx to change: EBAN-FRGRL, EBAN-FRGZU, EBAN-FRGKZ and finaly EBAN-BANPR.

    Beside that i change the same values at the items-MY_STATE->ITEM, to access the Item I use the method im_header->get_items.

    Add comment
    10|10000 characters needed characters exceeded