Skip to Content
0
Former Member
Aug 29, 2008 at 05:20 AM

BAPI_PO_CHANGE is not updating Confirmation Category and Date cate Category

503 Views

Hi to all,

Am using BAPI_PO_CHANGE in my program. My program is to upload excel file and transfer the data to corresponding tables.

All the thing is working perfectly but the two fields in BAPI are not updating. They are CONF_TYPE and DEL_DATCAT_EXT in POCONFIRMATIONS( which is tables in bapi).Am giving my code below. And this POCONFIRMATIONS is available from 6.0 version.

Thanks in advance.

Shah.

LOOP AT it_ebelp INTO is_ebelp .

CLEAR: is_header, is_poitem, is_poitemx,is_confirm, is_return.

is_header-po_number = is_ebelp-ebeln.

is_poitem-po_item = is_ebelp-ebelp.

is_poitem-conf_ctrl = 'SMIC'.

APPEND is_poitem TO it_poitem.

is_poitemx-po_item = is_ebelp-ebelp.

is_poitemx-po_itemx = 'X'.

is_poitemx-conf_ctrl = 'X'.

APPEND is_poitemx TO it_poitemx.

is_confirm-po_item = is_ebelp-ebelp.

is_confirm-conf_type = 'LA'.

is_confirm-del_datcat_ext = 'D'.

APPEND is_confirm TO it_confirm.

AT END OF ebeln.

CALL FUNCTION 'BAPI_PO_CHANGE'

EXPORTING

purchaseorder = is_header-po_number

POHEADER = is_header

TABLES

return = it_return

poitem = it_poitem

poitemx = it_poitemx

poconfirmation = it_confirm.

IF NOT it_return IS INITIAL.

LOOP AT it_return INTO is_return.

WRITE : is_return-message.

ENDLOOP.

READ TABLE it_return TRANSPORTING NO FIELDS WITH KEY type = 'E'.

IF sy-subrc <> 0.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

  • EXPORTING

  • wait = c_x

IMPORTING

return = is_return1.

ENDIF.

ENDIF.

REFRESH: it_poitem, it_poitemx,it_confirm, it_return.

ENDAT.

ENDLOOP.