Skip to Content

Release Purchase Requisition Fund Management issue through Gateway

Dear all,

We have implemented a purchasing system project in UI5 where we create/approve/reject Purchase requisitions. We have also implemented funds management and when a PReq is created the specific amount is bind in the budget of the specific project. The problem is that when the PReq is rejected the budget amount is not released. This happens if the PReq is rejected through the UI5 application. When I do this from ME54N, the amount is released. In order to achieve this we have also implemented BADI ME_COMMTMNT_REQ_RE_C. In my function I call functions ME_UPDATE_REQUISITION and ME_UPDATE_REQUISITION_CHNGDOC.

  SELECT *
    INTO CORRESPONDING FIELDS OF TABLE xeban
    FROM eban
    WHERE banfn = BANFN.

  SELECT *
    INTO CORRESPONDING FIELDS OF TABLE xebkn
    FROM ebkn
    WHERE banfn = BANFN.

  yeban[] = xeban[].
  yebkn[] = xebkn[].

  LOOP AT xeban.
    xeban-kz = 'U'.
    xeban-banpr = '08'.
    MODIFY xeban.
  ENDLOOP.

  CALL FUNCTION 'ME_UPDATE_REQUISITION'
    TABLES
      xeban = xeban
      xebkn = xebkn
      yeban = yeban
      yebkn = yebkn.

  CALL FUNCTION 'ME_UPDATE_REQUISITION_CHNGDOC'
    TABLES
      xeban = xeban
      xebkn = xebkn
      yeban = yeban
      yebkn = yebkn.

I have tried to create a batch input for this. If i test the function through ERP, it works fine, but if i call it through the UI5 application I get the following error when the following line is executed.

CALL TRANSACTION 'ME54N' USING bdcdata_tab MODE 'N' MESSAGES INTO messtab.

I have search for related posts but I couldn't find anything that solves my error either by the functions, or by calling batch input through odata services.

I would really appreciate your help.

Thank you all.

capture.png (31.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 19, 2017 at 12:18 PM

    You can't run batch input through a RFC so we followed a different logic to implement this.

    Thank you,

    Add comment
    10|10000 characters needed characters exceeded