Automate

 View Only
  • 1.  BAPI_REQUISITION_DELETE - Need to Close and Delete Reqs

    Posted 11-10-2020 11:27
    Hello

    This would be my 1st BAPI script and please help me.

    I'm trying to create a script to close and delete requisitions. I used BAPI_REQUISITION_DELETE and keep getting this message " No purchase requisitions satisfying these selection criteria exist". I do have my requisition number , Line Item and Close and Delete Indicator.

    Any help or suggestions will be greatly appreciated.

    Thank You



    ------------------------------
    Vani @ Kalaivani Taraju-Naidu
    kvtaraju-naidu@wolfhomeproducts.com
    The Wolf Organization LLC
    ------------------------------


  • 2.  RE: BAPI_REQUISITION_DELETE - Need to Close and Delete Reqs

    Employee
    Posted 11-10-2020 19:50
    Hi Vani

    Congratulations on trying a Direct script!

    Please look at the padding options for the fields you are sending to SAP.  It's likely you have to either zero pad the value OR turn off padding.   The default is zero pad. 

    Also note the length of the input fields.  Sometimes the BAPI has a length of say 20 but the actual input field is 10, as an example.  Transactions take care of those things, but BAPIs do not.

    HTH,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------



  • 3.  RE: BAPI_REQUISITION_DELETE - Need to Close and Delete Reqs

    Employee
    Posted 11-10-2020 20:01
    PS:  I took a quick look at the BAPI.  You pass in the PR #, but you also have to enter line items - the line item number and then put a capital "X" in the Delete column.  It doesn't delete the PR at the header - just sets the delete flag on the lines items.

    FYI,
    Sigrid​

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------