on 2022 Feb 03 4:59 PM
Hello Everyone ,
I am trying to update the FIXKZ field in EBAN ( From value 'X' to blank ) through BAPI_PR_CHANGE.
Any suggestions pls.
LOOP AT it_eban INTO DATA(wa_eban).
CALL FUNCTION 'BAPI_REQUISITION_GETDETAIL'
EXPORTING
number = wa_eban-banfn
account_assignment = 'X'
TABLES
requisition_items = lt_item
requisition_account_assignment = lt_acc
return = lt_return.
LOOP AT lt_item INTO ls_item.
ls_pritemx-preq_item = ls_item-preq_item.
ls_pritemx-preq_itemx = 'X'.
ls_pritemx-fixed = 'X'.
APPEND ls_pritemx TO lt_pritemx.
ls_pritem-preq_item = ls_item-preq_item.
* ls_item-fixed = ''.
* ls_pritem-fixed = ls_item-fixed.
APPEND ls_pritem TO lt_pritem.
CALL FUNCTION 'BAPI_PR_CHANGE'
EXPORTING
number = wa_eban-banfn
TABLES
return = lt_return2
pritem = lt_pritem
pritemx = lt_pritemx.
LOOP AT lt_return2 INTO ls_return2.
IF ls_return2-id = 'BAPI' AND ls_return2-number = '002'.
"Do not show this message
ELSE.
WRITE: / ls_return2-message.
ENDIF.
ENDLOOP.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = ls_return2.
Request clarification before answering.
Please follow the enhancement for updating fixed indicator to 'X' when Purchase requisition is released from ME55n
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If PR already released then you can't change PR and you will get return message ME664 - Change FIXKZ could not be effected from BAPI.
Please unrelease PR first before you change fixed indicator.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sxc8225,
Please check following sap note 1721189 - When is the fixed indicator set in requisitions?, fixed indicator cannot be removed manually for some PR.
Your statement is not correct.
BAPI should follow all validations of PR as same as standard tcode (ME52N).
User | Count |
---|---|
70 | |
21 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.