Skip to Content
avatar image
Former Member

BAPI_PO_CHANGE

Hello,

Has anyone used BAPI_PO_CHANGE to add new confirmation lines to a PO?

It looks like you should be able to do this as this BAPI contains a table structure called POCONFIRMATION (type BAPIEKES) but I can't get it work.

Thanks,

Ruby

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Dec 09, 2009 at 04:47 PM

    Hi Ruby,

    Do a where used list for this BAPI in se37 , u will get many examples in ur landscape.

    Thanks

    Amresh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 09, 2009 at 04:51 PM

    Hi Ruby,

    Check this example :-

    [http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm]

    Regards

    Abhii

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 09, 2009 at 04:55 PM

    hi

    data : begin of t_poheader occurs 0,
           po like zvtls_sap-posap,
           end of t_poheader.
    
    DATA : BEGIN OF t_bapi_poheader OCCURS 0.
            INCLUDE STRUCTURE bapimepoheader.
    DATA : END OF t_bapi_poheader.
    
    DATA : BEGIN OF t_bapi_poheaderx OCCURS 0.
            INCLUDE STRUCTURE bapimepoheaderx.
    DATA : END OF t_bapi_poheaderx.
    
    
    DATA : l_msgty      TYPE c,
             l_msgid(2)   TYPE c,
             l_msgno(3)   TYPE c,
             l_msgtx(100) TYPE c,
             l_errflag    TYPE c.
    
      CLEAR: t_bapireturn.
      REFRESH: t_bapireturn.
    
      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.
    *C-- Write messages
    
      WRITE: / 'PO Number', t_poheader-po.
      clear : t_update,w_povtls.
      read table t_update with key posap = t_poheader-po.
      w_povtls = t_update-povtls.
    
    
    

    regard

    nawa

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 14, 2009 at 05:17 PM

    .

    Add comment
    10|10000 characters needed characters exceeded