Changing 'no further confirmation' flag in PO
I am in SRM7. i want to change the 'No further confiramtions' flag in PO item level in 'related documents' tab using a report.
i am using the below code to do that
CALL FUNCTION 'BBP_PD_PO_GETDETAIL' EXPORTING * I_GUID = I_OBJECT_ID = po_no * I_ATTACH_WITH_DOC = ' ' I_WITH_ITEMDATA = 'X' IMPORTING E_HEADER = ls_hdr * ET_ATTACH = TABLES E_ITEM = lt_item . data: lt_item_upd type table of BBP_PDS_PO_ITEM_ICU, ls_item_upd type BBP_PDS_PO_ITEM_ICU. loop at lt_item assigning <ls_item> where number_int eq itemno. move-corresponding <ls_item> to ls_item_upd. ls_item_upd-final_entry = 'D'. append ls_item_upd to lt_item_upd. endloop. data: ls_hdr_upd type BBP_PDS_PO_HEADER_U. move-corresponding ls_hdr to ls_hdr_upd. CALL FUNCTION 'BBP_PD_PO_UPDATE' EXPORTING * I_PARK = i_header = ls_hdr_upd I_SAVE = 'X' IMPORTING E_CHANGED = lv_changed ES_HEADER = ls_hdr_new TABLES I_ITEM = lt_item_upd . CALL FUNCTION 'BBP_PD_PO_SAVE' EXPORTING * IV_USERTYPE = 'E' IV_HEADER_GUID = ls_hdr_new-guid * . CALL FUNCTION 'BBP_PROCDOC_RESET_BUFFER' * EXPORTING * I_NO_STATUS = ' ' * I_NO_WFL = C_ON . commit work and wait.
i am getting 'X' in e_changed parameter, but when i see the PO in webgui the indiactor still say 'Yes'.
what i am seeing in bbp_pd is i am seeing a new change version for the PO but in 'deleted' status. i saw even if i change this flag using a test user, the change version is in deleted status. so i think that is an issue.in the change version i am seeing the final entry flag deleted. but the changed are not reflecting in the active version.
am i missing something here? is this some authorization issue? where should i debug to see why the active version is not updating? surprisingly i am able to change the item quantities successfully.
Edited by: SRM7CON on Feb 27, 2012 2:16 PM
Edited by: SRM7CON on Feb 27, 2012 2:59 PM
Edited by: SRM7CON on Feb 27, 2012 3:46 PM
Edited by: SRM7CON on Feb 27, 2012 7:25 PM