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

Purchasing Contract bapi for rejection

Former Member
0 Likes
545

Hi

Please I need to create a RFC to reject a Purchasing Contract workflow, I´ve found just BAPI_CONTRACT_CHANGE bapi but it just works with contracts with material itens, it doesn´t work with contracts with service itens.

helpful answers will be awarded.



  DATA:
     wl_header TYPE bapimeoutheader,
     wl_headerx TYPE bapimeoutheaderx.

  wl_header-procstat = '08'.
  wl_headerx-procstat = 'X'.

  CALL FUNCTION 'BAPI_CONTRACT_CHANGE'
    EXPORTING
      purchasingdocument = i_ebeln
      header             = wl_header
      headerx            = wl_headerx
    TABLES
      return             = bapiret2.

  READ TABLE bapiret2 TRANSPORTING NO FIELDS
  WITH KEY type = 'E'.
  IF sy-subrc NE 0.

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

  ENDIF.

1 REPLY 1
Read only

Former Member
0 Likes
378

Hi Michel,

I also have same requirement , Can you please send me the code.

My Email ID : sivaji.kankanala@gmail.com

Appreciate your help!

Thanks,

Sivaji.