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

Changing Payment terms using Bapi

Former Member
0 Likes
756

Hi Gurus,

I want to change the Payment terms in Purchase order / Scheduling agreement Using Bapi.

I used BAPI_PO_CHANGE.but Payment terms are not updating.

Useful Answers will be rewarded with Points.

2 REPLIES 2
Read only

RaymondGiuseppi
Active Contributor
0 Likes
532

Did you use BAPI_TRANSACTION_COMMIT after BAPI_PO_CHANGE.

Look also at this <a href="http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm">Sample Abap code on BAPI_PO_CHANGE</a>

  CALL FUNCTION 'BAPI_PO_CHANGE'
    EXPORTING
      PURCHASEORDER = T_POHEADER-PO
      POHEADER      = T_BAPI_POHEADER
      POHEADERX     = T_BAPI_POHEADERX
    TABLES
      RETURN        = T_BAPIRETURN
      POITEM        = T_BAPI_POITEM
      POITEMX       = T_BAPI_POITEMX.

  READ TABLE t_bapireturn WITH KEY type = c_err TRANSPORTING NO FIELDS.
  IF sy-subrc NE 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = c_x.
  ENDIF.

Regards

Read only

Former Member
0 Likes
532

Hi,

I tried what you mention but Payment Terms not updated and t_bapireturn has type field as blank.Could you suggest how to change the payment terms in Purchase Order