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 a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.