I can get the bapi to change the fixed and closed flag but I cannot get the ordered (bsmng) field to update. I could not find a field in the pritemx structure for ordered.
i_pritem-preq_item = wk_bnfpo.
i_pritem-fixed = 'X'.
APPEND i_pritem.
i_pritemexp-preq_item = wk_bnfpo.
i_pritemexp-ordered = wk_menge.
APPEND i_pritemexp.
i_pritemx-preq_item = wk_bnfpo.
i_pritemx-fixed = 'X'.
APPEND i_pritemx.
CALL FUNCTION 'BAPI_PR_CHANGE'
EXPORTING
number = w_header-preq_no
TABLES
return = i_return
pritem = i_pritem
pritemx = i_pritemx
pritemexp = i_pritemexp.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.