Application Development and Automation 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: 
Read only

BAPI_REQUISITION_DELETE not working

Former Member
0 Likes
1,131

Hi,

I'm using this bapi to cancel a purchase requisition.

sy-subrc = 0.

But when i go on eban i don't see the field LOEKZ = X.

Can you help me about it?

Thanks in advance.

Tony De Vivo

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
600

I think you are using the BAPI in worng way . Kindly tell what parameters you are passing to the BAPI . Also tell wht message u are getting after executing the BAPI

2 REPLIES 2
Read only

Former Member
0 Likes
601

I think you are using the BAPI in worng way . Kindly tell what parameters you are passing to the BAPI . Also tell wht message u are getting after executing the BAPI

Read only

0 Likes
600

Return messages are positive(PR correctly changed).

Here's the code


DATA: 
wa_eban LIKE eban,
i_delete           LIKE bapieband  OCCURS 0 WITH HEADER LINE,
i_eban2        LIKE STANDARD TABLE OF wa_eban,
va_rda           TYPE bapieban-preq_no,
wa_delete   LIKE i_delete.


  LOOP AT i_eban2 INTO wa_eban
                 WHERE banfn = wa_file-banfn.
    wa_delete-preq_item  = wa_eban-bnfpo.
    wa_delete-delete_ind = 'X'.
    APPEND wa_delete TO i_delete.
  ENDLOOP.
  CALL FUNCTION 'BAPI_REQUISITION_DELETE'
    EXPORTING
      number                      = va_rda
    TABLES
      requisition_items_to_delete = i_delete
      return                      = i_return.